View Full Version : Protecting analog inputs
Hi all, Just got one quick question.What is the best way to protect analog inputs from over voltage??
Thanks, Mark
frankeltham
21-01-2006, 10:55
For cheapness you could use a resistor and zener. If you are using the ADC input for measuring you will have to compensate for the reverse V/I characteristics of the zener. You may even have to dig out a pencil and plot a graph to get a handle on the behaviour.
There are more sophisticated ways but I am tight with my pennies and get bored drilling holes in pcbs.
Remember with a zener that their rated voltages aren't a precise cutoff i.e. not an exact on-off, but a steep gradient. So you may have to twiddle a bit with a few values as this will vary depending on the resistors you use (and the source impedance too).
It ain't perfect but it'll only cost 10 pence.
Michael 2727
21-01-2006, 11:30
You could even drop the resistor.
It all depends what you aer using on the input,,?
A zener across the input to neg (4.7V or 5.1V)
should conduct any voltage over the zener voltage to neg.
Thats the theory anyway.
AS Michael says, it depends on what the over-voltage source is. For example; if measuring a battery voltage nominally 13.8V protecting against slightly higher voltage may be straight forward, but if measuring a vehicle's power supply, still nominally 13.8V, there may be 100V and higher spikes on the supply, and similarly, negative going ones.
frankeltham
21-01-2006, 12:17
If the source resistance was low and you didn't include a resistor you could blow the zener. Stick 6V battery across a 4V7 and it'll get hot. Tiddly 'signal' level zeners will only stand 500mW. (Yes, I know you can get big ones Just look at my missus.). In any event you should have a resistance on the input.
As others have said - depends on what you're measuring, but that resistor (e.g. 1 or 2 k) will reduce the probablity of popping.
For situations with negative spikes you could shove a healthy Schottky in parallel with the zener.
frankeltham
21-01-2006, 12:24
Just thought, are we at cross-purposes about the resistor?
Can we paste thumbnail images onto this site?
Michael 2727
21-01-2006, 12:37
Voltage Divider
---------- Using 12V Pos ----------->>>
|
/
\ 5.69K or 56K Ohms
/
|
------------ Input----> = 4.92V----|---->>>
| |
/ Z
\ 3.9K or 39K Ohms E
/ N
\ E
| R
------------ Neg Volts ---------------|---- >>>
*************************************
*************************************
---------- Using 13.8V Pos ----------->>>
|
/
\ 4.7K or 47K Ohms
/
\
|
------------ Input----> = 5.03V---|------>>>
| |
/ Z
\ 2.7K or 27K Ohms E
/ N
\ E
| R
------------ Neg Volts -------------|---->>>
Use the larger values if higher input impedence is required.
But Keep the ratio the same.
Edited by - Michael 2727 on 1/21/2006 11:56:44 AM
No images, just ASCII Art.
Michael 2727
21-01-2006, 12:47
As Frank has pointed out, the zener may get
hot if you are measuring straight voltage.
In this case the zener is only meant to divert the odd, short, voltage spike.
In the case of the voltage divider the resistors should limit the load on the
zener enough to cope with longer overvoltage condition.
Michael 2727
21-01-2006, 12:59
I hate ASCII Art,
In the Diag above the ZENER should appear
over on the right hand side between the Input & Neg.
It does take a fair bit of parctice, but I've grown to quite like it ...<code><pre><font size=2>Vin ---.
.|.
| |
|_|
|
}--------.------> Vadc
| |
.|. ___|___
| | / \ |
|_| /___\
| |
0V ----^--------^------> 0V </font></pre></code>
Now to work on my spelling abilities :-)
BeanieBots
21-01-2006, 14:48
Personnally, I don't like to use zeners in analog circuits because they do have a considerable leakage current as they approach their knee point. This can compramise the accuracy of what is being read. I prefer to use two clamp diodes. One between input and 0v to prevent negative voltages and one between input and supply to prevent inputs greater than the supply.
As already mentioned, specifics really depend on what type of over voltage is expected. Either way, an impedance of some sort MUST be included to prevent the over volatge from causing a destructive current. If very fast high voltage spikes are expected, then fitting a capacitor on the input will give the diodes time to respond.
I don’t like adding zeners and series resistors to protection ADC inputs because they can easily load the signal source and introduce errors. A better approach is to use a quad rail-to-rail opamp to clamp (within a few tens of mV) an ADC input to the GND and positive supply. If the amp is configured in the unity gain/non-inverting configuration, only a series resistors (say 10K) needs to be added in series with its non-inverting input (this will even provide protection when the supply is removed).
This low cost/component count approach would also overcome many of the ADC problems reported on this forum. Often caused by trying to drive the ADC inputs directly from too high impedance.
Hi all, thank you all for the coments. I cant belive how much help all you provide :)
One thing i am not too sure about. I have got a opamp contected to this pin, that is connected to a PH probe. Will the zener make any changes to the voltage coming in form the opamp? the diffrence between pH 7.0 and 7.1 is only 0.096mV. will i see any problems here. Also, the only time i get voltages higher then 5v is when i disconnect the probe. I get about 7.8v coming form the opamp. Is there anyway to maybe stop that, which will mean i dont need anything on the opamp output.
Thanks again
Mark
Mark.
If you need an opamp to do your signal conditioning, why not make it a rail-to-rail type and power it from the 5V picaxe supply? The opamp output to the ADC will never go beyond 0-to-5V and no additional protection (eg. zener) will be needed.
Mark.
If you need an opamp to do your signal conditioning, why not make it a rail-to-rail type and power it from the 5V picaxe supply? The opamp output to the ADC will never go beyond 0-to-5V and no additional protection (eg. zener) will be needed.
BeanieBots
22-01-2006, 11:29
Alternatively, you can prevent the op-amp from going above a defined value by connecting a current limiting resistor to its output (about 1k) and clamping with a suitable zener. The feedback network connects to the resistor zener junction. By using this configuration, the accuracy is not compramised because because feedback is AFTER the zener clamp. Thus, under normal conditions, the op-amp maintains full control. When the zener voltage is reached, the op-amp can no longer supply sufficient current (the 1k limiting resistor) and voltage is clamped.
Another, non accuracy compramising method is to use a comparitor that feeds the op-amp inputs. When the clamp voltage is met, the comparitor injects a signal into the op-amp input in a controlled manner that clamps the output. This is harder to visualise but is the industry standard way of producing precisely clamped voltages that do not affect the normal response.
Rail to rail op-amps will probably be OK but they do suffer 'droop' when close to their rail voltage.
The amount of ‘droop’ on a rail-to-rail opamp output is dependant on the load. A typical rail-to-rail opamps output will remain linear to within a few tens of mV of the supply rails when driving the analog input of a picaxe.
Hi All,
xstamp, this would be a easy way of doing this, but the opamp i have to use has a dual 12v supply. I have checked, but there is no opamp that will work that uses a 5v supply.
BeanieBots, i cant visulize what you have sujested. Also, there is resitors in the feedbak loop to control gain. Will this matter. My curent configuration looks like the first opamp in the following. where sould i put the zener?
http://www.thekrib.com/Plants/CO2/hurley-schemat.gif
Thanks again for your help
bobrayner
22-01-2006, 23:05
Markdem
I think for your situation the opamp powered from the same supply as pic-axe would be the easier way to go. Very small addiotional component count (1 opamp).
The LM 158, 258, 358 series will probably do. This is a dual single supply opamp with only 8 legs, output impedance of only 75ohm and quite cheap, $AU1.50 at Jaycar (LM358). Yes it does droop a bit when approaching zero volts but in all cases if you need to get close to zero volts you need a split rail device.
As for no opamps working at 5 volts I think you are reading the data sheet incorrectly. When you mention +/- 12V I think you are looking at the "typical" column not the minimum supply voltage. I think that only the highly specialised (high voltage?) units would maybe not work at +/- 5V or + 5V.
Hope this helps BobR
Hi bobrayner, what i mean to say when i stated that i cant find a opamp that is powered by +/- 5v is that now of the ones that can are sutibale to use with the ph probe i have. I need a very high input impedance and a low bias current. I cant seem to find anything that will do. I am starting to wonder what would happen if i ran my tl081 from +/- 5v. I cant seem to find a min voltage in the datasheet. Has anyone ran a tl081 at +/-5v before??
Thanks, Mark
Michael 2727
23-01-2006, 06:31
There should be heaps of OP Amps in the
range you are looking for.
As said above try the LM series 1/2/358 series they work well in similar apps.
I have only used the TL072 Dual but it was
a split rail setup.
Maxim/Dallas have a truckload of Very low
voltage rail to rail, single supply devices.
The only thing is getting hold of some to try.
Try the 082 and if the results are no good
try the 1/2/358s, you may be surprised.
What do you want to measure anyway that
needs to be so precise.
Unless you are measuring undiluted battery
acid or volcanic lake water you will
probably never get even near a rail voltage
to begin with. A little perspective please.
Edited by - Michael 2727 on 1/23/2006 5:43:53 AM
Michael 2727
23-01-2006, 07:22
Try this for starters -
Single 8 pin mdip
http://www.national.com/VCatalog/view.cgi?command=eq&attr1=Package+Type&attr2=MDIP& a1=SubCategory%2F%2Fv%3A8&a0=Category%2F%2Fv%3A8&a 3=Gain+Bandwidth%2F%2Fv%3A8&a2=Pins%2F%2Fv%3A0&a5= Input+OutputType%2F%2Fv%3A8&a4=Slew+Rate%2F%2Fv%3A 8&a7=Supply+Max%2F%2Fv%3A8&a6=SupplyCurrent+Per+Ch annel%2F%2Fv%3A8&a9=Offset+Voltage%2F%2Fv%3A8&a8=S upply+Min%2F%2Fv%3A8&c1=e%3A0%2F%2FSubCategory%2F% 2F%3Aeq%2F%2FOperational+Amplifiers%3AGeneral+Purp ose&c0=e%3A0%2F%2FCategory%2F%2F%3Aeq%2F%2FAnalog+-+Amplifiers&c2=e%3A0%2F%2FPins%2F%2F%3Aeq%2F%2F8&i =PNumber&s1=PNumber%2F%2F1&s0=Gain+Bandwidth%2F%2F 1&q=200&s=366553857862&m1=SubCategory&m0=Category& m2=Bpn&t=0&as=0&render=1&c=&domains=PNumber
Dual 8 pin mdip
http://www.national.com/VCatalog/view.cgi?command=eq&attr1=Package+Type&attr2=MDIP& a1=SubCategory%2F%2Fv%3A8&a0=Category%2F%2Fv%3A8&a 3=Slew+Rate%2F%2Fv%3A8&a2=Gain+Bandwidth%2F%2Fv%3A 8&a5=SupplyCurrent+Per+Channel%2F%2Fv%3A8&a4=Input +OutputType%2F%2Fv%3A8&a7=Supply+Min%2F%2Fv%3A8&a6 =Supply+Max%2F%2Fv%3A8&a9=Channels%2F%2Fv%3A0&a8=O ffset+Voltage%2F%2Fv%3A8&c1=e%3A0%2F%2FSubCategory %2F%2F%3Aeq%2F%2FOperational+Amplifiers%3AGeneral+ Purpose&c0=e%3A0%2F%2FCategory%2F%2F%3Aeq%2F%2FAna log+-+Amplifiers&c2=n%3A0%2F%2FChannels%2F%2F%3Aeq%2F%2 F2..0&i=PNumber&s1=PNumber%2F%2F1&s0=Gain+Bandwidt h%2F%2F1&q=200&s=867920300846&m1=SubCategory&m0=Ca tegory&m2=Bpn&t=0&as=0&render=1&c=&domains=PNumber
Edited by - Michael 2727 on 1/23/2006 6:31:33 AM
BeanieBots
23-01-2006, 08:19
As your application will not exceed 5v under normal conditions, I would opt for the simplest solution. For my money, that would be a resistor of about 2k2 between op-amp output and PICAXE input plus clamp diodes between input and both power rails.
To answer your question about where to fit the zener (should you wish to take that route):-
Fit a resistor (1k - 3k) between op-amp output and ALL other components.
The zener then goes between what was the op-amp output and 0v.
Please note, that method of zener clamping is only valid when the op-amp is used with negative feed back. It works by increasing the output impedance such that only a small current is possible. Accuracy is NOT compramised because the increased impedance is BEFORE the negative feedback. Hence, the impedance seen by the PICAXE (and zener) is the normal op-amp impedance (plus added resistor) divided by the op-amp open-loop gain. That is, very low. However, the added resistor limits the current, so when the op-amp reaches saturation, the impedance increases to a value close to that which has been added in and the zener clamps the voltage.
The use of comparitor clamps would be difficult to apply to that configuration without the use of buffers and would be overkill for your needs.
Hi All, i have reduced the voltage that i am runing my opamp at to +/- 5v, and everything is working OK.
Thank you all for your help
Mark
bobrayner
23-01-2006, 09:06
Markdem
How high an impedancew do you need? An LMx58 configured as a voltage follower is pretty much infinity for all intents and purposes. Probably high enough for anything you are likely to encounter here.
Simply connect your device to the non inverting input of the opamp and connect the output to the inverting input then connect the output to picaxe. All there is to it. If the opamp is run from the same 5V the output can never go higher than this.
cheers BobR
BeanieBots
23-01-2006, 09:14
A PH probe can have a source impedance in the region of 500 MegOhm! A high impedance op-amp really is required.
Mark
Pleased to hear you have things working off +/- 5V. However, for future reference, you can generate a phantom ‘ground’ point by placing a potential divider across the pixaxe supply and buffering it with a rail-to-rail opamp. Provided you don’t try to draw excessive current from this opamps output, it can provide a very low (ground) impedance biased at the mid-rail point.
This will allow all your analog circuitry to swing +/-2.5V relative to this phantom ‘ground’ but remain within the picaxe supply limits. The MC 33204 (for example) quad single rail, rail-to-rail I/O low cost opamp will work fine down at these low voltages
Beaniebots is spot on here.
Although opamps are getting better, you need the highest input impedance you can afford. A pH probe is trying to measure hydrogen ions in solution. The source impedance is extremely high and requires the best front end you can achieve. The most serious setups have teflon insulation arount the input connections. The input leg of the opamp is often raised off the pcb onto a teflon insulated post and guard rings are placed around the device. The whole thing must be kept clean and free of solvents etc that could degrade the insulation.
For those interested, do a google. there must be a ton of info on this topic.
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.