9 years, 11 months ago.

How to protect mbed from over voltage?

Hi,

I'm building a simple circuit to measure the power (V*I) coming from an electric generator (my students have to build small wind turbines and I would like to measure the maximum and average power their turbines can produce).

I came across the information that when using motors over voltage can happen and the mbed should be protected from it. As generators are like motors (sort of, opposite of course) I assume this over voltage can happen with generators too (can it? does it?). I tried to find information about how to protect an electrical circuit but I did not get too far. I found out that I should use a diode (to avoid back current) and an RC network in order to limit the voltage, but I can not find any information which would help me to calculate exactly the components I need and a schematic showing how I have to connect them.

I have a generator which maximum voltage is 12V but our measurement with an oscillator showed about 15 V. The cable from the generator first goes through a current sensor (using Hall effect) then into a voltage divider then into an analog in.

Any help would be appreciated!

Edit: I added a schematic with the proposed solution to see whether I got it right. /media/uploads/Araitz/diode_schem.jpg

1 Answer

9 years, 11 months ago.

Anything with magnetic coils (motors, generators, solenoids, relays etc...) can produce some nasty voltage spikes, normally the reverse of their normal voltage, when switching on / off.

Since you're talking about science project scale things rather than industrial scale you should be fine with basic over/under/reverse voltage protection. It'll take 3 diodes and a resistor.

I am assuming you have a DC generator rather than AC. If your output is AC then you'll need to do a little more.

First diode goes in series with a small resistor (10 ohms, actual value not important) and is connected across the generator outputs such that it is normally reverse biased. If when it stops the generator creates a large negative spike this diode shorts it out and protects everything else. The resistor is there to protect the diode from excessive currents.

Second and third diodes go from the analog input pin to the mbed power and ground connections. Again, connect them so they are normally reverse biased, if you get it wrong then you'll short out the power supply. These diodes prevent the analog in from going more than 0.6V above the CPU power supply voltage or below -0.6V, anything outside that range gets dumped to the system power supply. Conveniently those numbers match the maximum allowed out of range voltages for the CPU pins. Connect your voltage to measure to the analog in via a series resistor in order to limit the current that can flow. something in the 100 to 1k range would work fine.

You shouldn't need any capacitors but adding one on the analog in pin wouldn't hurt, it would remove some of the noise on the value you measure.

Accepted Answer

Hi Andy,

Thank you for your detailed answer! Your solution seems as simple as I was looking for. And yes, your assumption was correct, it is a DC generator.

To see whether I got it right I draw the schematic (I've put a motor because that is what there is in the software and I left everything non-related out). Please take a look! D2 diode seems to be redundant next to D1, so I assume I got that part wrong. Where it should be then? D1 and R2 are between the legs of the generator and D2 is between the + leg/analog in of the generator and the ground.

I intend to measure maximal and average power so it may be a good idea to remove the noise. Do you have any suggestion for the size of the capacitor? I assume it should be small.

Is 24V industrial scale or still science scale? I'm developing a control system for my father to controll a high-pressure pump and the sensors, motors, etc they would like to use, etc use 24 V.

Edit: I was checking out the diodes and now I see that the ones I used in the schematic are rectifier type. Should I use Zener diodes with a 3.6 V break down voltage, so I get the +-0.6V you mentioned above? It seems logic... Sorry, pretty noob in electronics.

posted by Araitz A 17 Apr 2014

Just normal silicon diodes, nothing fancy, but you do need to turn D3 around.

A normal doide takes around 0.6V to switch on which is where you get the +-0.6V protection from, as soon as the input goes to 0.6V over Vcc D3 will turn on and dump any extra voltage into the power supply.

So two changes from your schematic: Turn D3 around. And move D2 and D3 to the other side of R3, they should be directly onto the IC pin. R3 then limits the current that can flow through those diodes.

Yes D1 and D2 are doing very similar things and you could probably get rid of one if cost was critical. But they are the reasons for them are different, D1 should be as close as possible to the motor/generator to limit it's power spikes, with larger motors/generators you'll need to use a part with a higher current/voltage rating. Even if the IC is protected later by other parts you want to minimise the distance large currents and voltages travel, they can produce large magnetic fields which in turn can induce currents in other places and in the commercial world would cause your product to fail the RF noise emission limit tests.

D2 (and D3) on the other hand are lower power signal conditioning parts, R3 protects them from high currents so they don't have to deal with too much power. Since these parts are protecting the IC input they should be as close to the IC as practical.

Keep in mind that for any voltages over 3.3V you will need a voltage divider to scale the input to the point you can measure it. Since you already have R3 there to limit current into the IC input all you need is another resistor from the IC input to ground (call it R4).

Voltage (measured) = Voltage (generator) * R4 / (R3 + R4)

24V and how much current? A car starter motor is only 12V but is hardly science project scale, it can generate spikes of hundreds of volts.

This basic design should be fine for most lower power designs, anything that pulls a lot of power I'd be tempted to put a separate buffer in between the motor and the IC (a unity gain opamp circuit is cheap and simple) if nothing else that way you blow up a far cheaper part. If you also need to scale the input you can set up the amplifier with a gain of less than 1 rather than using the resistor divider.

posted by Andy A 17 Apr 2014