Go Down

Topic: How to protect analogue pin from under /over voltage? (Read 128 times) previous topic - next topic

cossoft

I have an instrumentation amplifier set up.  Two signals are fed in and amplified.  They are AC signals, and the output is referenced to +2.5V so that it is suitable for input to an Arduino ADC pin for conversion to digital.  There is a piccy as an attachment.

Problem:  The signals can fluctuate somewhat, and the amplifier has adjustable gain via a trimmer.  I understand that taking an ADC pin below 0V is bad for the Arduino.  Someone told me that it might explode into a shower of molten plastic and metal  :smiley-eek: .  If the gain gets turned up too much, so that the output signal amplitude exceeds 2.5V, the ADC pin will go below 0V.

Is there some way to add protection to the ADC pin?  Ideally it would stop over voltage (>5V) as well as under voltage (<0V).  I expect that there is some cunning diode arrangement that can be wired, but I can't get my head round it...

P.S.  The output signal can be rectified if necessary as signal symmetry is unimportant.

Wawa

Try to keep pin current under 1mA by using a resistor between opamp output and Arduino pin.
Value depends on opamp supply voltage, but 4k7 to 10k is usually ok.
The internal pin protection diodes will now dump any excess voltage to VCC and ground.
Leo..

cossoft

Oh.  It's that simple?  The amp runs off the typical +/- 15V dual supply.  So an Arduino analogue pin can be safely fed -15V as long as the current <1mA?   I'm surprised that you can reverse bias it that much.  I'm not sure how I can confirm this easily without risking exploding Unos?

For a -15V input I would need a >15K resistor.  Will the ADC readings still be accurate from such a high impedance source?  My sense is that the approach would be to clamp /clip somehow..?

ad2049q

I'd buy a ten pack of Green LED (turn-on voltage happens to be somewhere in the 2.2 to 2.6 Volt range - you'd want to check that) or if more cautious a pack of orange or reds ( 1.6 to 2.0 Volts) and put them forward and backward from your nominal 2.5Volt.  Those will light up and get rid of at least a mA (probably 5mA) while voltage is out of range, so I'd suggest putting at least 100 Ohms in between your amplified V and these things.  To signals of +- 1 Volt (possibly +-2) around your 2.5V, they should do nothing (arduino is too slow for a nF on its a/d input to make much difference to speed) and if anything goes out of range you'll have an immediate warning light as well as protection circuit for an a_in.

Arctic_Eddie

You can use a pair of 1N4148 diodes as clamps. They have a max current rating of 200mA. You could also use Shottky diodes as they have a lower forward junction voltage.

Wawa

I'm surprised that you can reverse bias it that much.  I'm not sure how I can confirm this easily without risking exploding Unos?

For a -15V input I would need a >15K resistor.  Will the ADC readings still be accurate from such a high impedance source?  My sense is that the approach would be to clamp /clip somehow..?
1) You only reverse bias it one clamping diode drop.
Atmel connects mains voltage via a 1Meg resistor to a pin in this document.
www.atmel.com/images/doc2508.pdf

2) I thought you needed protection in case it just got out of range. If the opamp can swing that much, why not use a voltage divider on the output of the opamp. Maybe you should use a ~1:5 divider, and measure with 1.1volt Aref enabled.

You can use a pair of 1N4148 diodes as clamps. They have a max current rating of 200mA. You could also use Shottky diodes as they have a lower forward junction voltage.
Can't use common external diodes, because Vf of the external diodes is likely to be higher than the internal diodes. Schottky diodes might work in some cases. Look at the datasheet if Vf is <0.5volt at the expected fault current.
Leo..

Arctic_Eddie

I was thinking of the 1N5817. My diode checker shows a forward junction voltage of about 0.35V but at an unknown current.

Wawa

The 1N5817 has, according to the datasheet, a Vf of 0.45volt@1Amp.
It also has significant temp dependent leakage.
That might or might not be a problem.
Leo..

Arctic_Eddie

Would you not want to limit the current to the opamp max? That should be considerably lower.

Just some ideas in case the OP does not want to rely on the internal clamp.

cossoft

Hmm, all seems a little vague.  Perhaps the solution is closer to home and just introduce another resistor in series with POT R1 so that it cannot set a gain too large for the ADC?

ADC's are used extensively in the world, so I might be able to research what a professional piece of equipment does in these circumstances.  What does a digital oscilloscope do? They get all sorts of crap shoved up 'em by naughty school kids...

Wawa

The answer is simple.
1) Use most of the output swing of the opamp.
2) If you power the opamp from a different supply, then limit Arduino pin current to <= 1mA when the Arduino is powered off.

It's just a clever use of voltage dividers.
Maybe you shouldn't bias your opamp at 2.5volt, but at ground potential.
And connect the voltage divider to +5volt or any other Aref you're using instead of ground.
Leo..

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy