Protecting op amp input from negative voltages - Page 1
Forum section: electronics / beginners

author: guymo
author_rank: Regular Contributor
timestamp: July 16, 2018, 08:49:34 pm
content: I'm playing with a circuit in which I use an LM324 powered from 12V and 0V. The negative rail needs to be 0V for this purpose because one thing I am interested in is getting a "good zero" from the op amp in a comparator configuration.The plan, however, is to expose one input to the outside world. The LM324 data sheet gives the "absolute maximum" low input voltage as -0.3V. It's possible that someone could accidentally connect a signal that goes to -5V or so there.How should I go about protecting the input? A simple diode from ground will clamp at -0.7V -- is that good enough in practice? I'd like to avoid adding a further input conditioning stage if I can but happy to be told that I have to!

author: David Hess
author_rank: Super Contributor
timestamp: July 17, 2018, 07:11:45 pm
content: Adding a series resistance to limit the current is a good place to start. A schottky diode will make a better clamp because of its lower forward voltage drop.

author: Kleinstein
author_rank: Super Contributor
timestamp: July 17, 2018, 07:22:06 pm
content: For the LM324 the negative input limit at -0.3 V is rather conservative for high temperature. At least in the NS data-sheet, there is another line: up to 50 mA of current is allowed when the voltage is negative. There is a kind of internal clamping diode and this "diode" can be used to 50 mA. The -0.3 V are only a safe limit not to reach this current even at high temperature. So the main part would be to have a series resistor to limit the current to a safe level (e.g. 20 mA) when it turns too negative. There is little need for an extra diode with the LM324/LM358 - this could be different for another type.

author: hugo
author_rank: Regular Contributor
timestamp: July 17, 2018, 10:41:27 pm
content: By adding a (5K) resistor in series with the input pin, when the signal accidentally goes to -5V, the current is then limited to less than 1mA ( there is a .65V voltage drop on the bottom steering diode inside LM324).

author: guymo
author_rank: Regular Contributor
timestamp: July 18, 2018, 02:08:48 pm
content: Thanks everybody. I’m now much more confident about the circuit I have in mind: the input goes via a (Thevenin equivalent) 50k resistor so the current is limited already. Great!

author: Zero999
author_rank: Super Contributor
timestamp: July 18, 2018, 02:56:54 pm
content: Quote from: guymo on July 16, 2018, 08:49:34 pmIs there any reason why you can't use a comparator IC, such as the LM339, which is designed to be a comparator, rather than the LM324?

author: guymo
author_rank: Regular Contributor
timestamp: July 19, 2018, 08:14:18 am
content: Quote from: Hero999 on July 18, 2018, 02:56:54 pmIt's the "good zero" that I'm after. The LM339 data sheet suggests V_OL around 150mV while the LM324 delivers 5mV. The circuit I'm putting together will have 8 of these stages in it and I am keen to avoid too much trimming and scaling so getting a good value straight out of the IC is appealing.Really all I want is an analog comparator circuit that reliably gives me 0V and 5V outputs within 1% or so. This seems to be tricky to achieve without lots of parts. The LM324 and a zener shunt on the output seems a decent option at the moment but I would be very keen to hear of other approaches. And I prefer to keep it all analog, partly for the personal challenge, and partly because the overall thing I am building would be trivially easy on a micro controller

author: mikerj
author_rank: Super Contributor
timestamp: July 19, 2018, 09:44:25 am
content: Quote from: guymo on July 19, 2018, 08:14:18 amCheck the output current under which these voltages are measured! The TI datasheets gives Vol for the LM324 with a supply of 5v and a load of 10k i.e. a maximum output current of0.5mA. The LM339 datasheet shows a typical Vol of 150mV whilst sinking4mA.If you check the characteristic curves you'll see that the LM339 will get much closer to 0v than the LM324 for the same output current. Using the figures above, an LM324 sinking 4mA will have a Vol of almost 1v.

author: David Hess
author_rank: Super Contributor
timestamp: July 19, 2018, 09:59:35 am
content: The 324/358 output uses a PNP emitter follower in parallel with a 50 microamp NPN current sink so the maximum output current for "zero volts" is less than 50 microamps and even that will suffer from a relatively high collector-emitter saturation voltage. The 339/393 has an open collector NPN output which will saturate at a much higher current so will deliver an output much closer to zero.In a comparator application, you can do much better driving a common emitter/source transistor on the output and reversing the inputs or using a better part.

author: guymo
author_rank: Regular Contributor
timestamp: July 19, 2018, 10:00:42 am
content: Quote from: mikerj on July 19, 2018, 09:44:25 amThanks -- as it happens I was just coming back to post that I had noticed this, but you beat me to it. The 339 ought to do pretty well in the setup I have. It is definitely worth experimenting with an LM339 in my circuit now that I am aware of this.I will have to have a careful think about the pullup resistor and its impact on the LM339 output current requirement when the output is low (higher pullup is better) vs its impact on the voltage delivered to the next stage when the output is high (lower pullup is better).The LM339 input is also not supposed to go below -0.3V -- are the protection concerns the same as for the op amp as discussed in this thread? The schematic of the input stage looks roughly similar so I suppose they are but worth asking!

author: David Hess
author_rank: Super Contributor
timestamp: July 19, 2018, 10:24:51 am
content: Quote from: guymo on July 19, 2018, 10:00:42 amAlthough it is not shown in the simplified schematics, the 324 and 339 do not use identical input stages but the difference is irrelevant; the 324 includes transconductance reduction which is required for stable linear operation (there is an extra set of collectors drawing current out of the input transistors) and the 339 does not.The input protection concerns all the same; avoid drawing excessive current out of the input by using a series resistor and if necessary, a clamping diode. If you do draw excessive current, abnormal behavior like phase inversion or weirder is possible.

author: Zero999
author_rank: Super Contributor
timestamp: July 19, 2018, 12:41:21 pm
content: You could also use a comparator with a push-pull output, such as the TSX3702 or LMC6762 (dual) or TSX3704 or TLC3704 (quad). The output stage is a couple of MOSFETs which looks like a resistor and will have less voltage loss, than a bipolar transistor output stage, at very low currents.http://www.ti.com/lit/ds/symlink/lmc6762.pdfhttps://www.st.com/resource/en/datasheet/tsx3702.pdfhttps://www.st.com/resource/en/datasheet/tsx3704.pdfhttp://www.ti.com/lit/ds/symlink/tlc3704.pdf

author: guymo
author_rank: Regular Contributor
timestamp: July 19, 2018, 02:36:41 pm
content: Thanks again. I had looked at those kinds of devices before, but didn't read the data sheets beyond the headline output voltage level specs which are for way more current than I need. These things might actually be perfect, powered from 5V and 0V and feeding a summing op amp with reasonably high valued resistors to keep the current draw low.I really appreciate all the suggestions in this thread and the chance to draw on the experience, knowledge and kindness of people in this forum. Thanks!

author: David Hess
author_rank: Super Contributor
timestamp: July 19, 2018, 03:43:40 pm
content: The usual solution in the past if there was no other way was to drive an analog switch with a comparator. CMOS output comparators are almost as good.

author: Zero999
author_rank: Super Contributor
timestamp: July 20, 2018, 09:46:39 am
content: Quote from: guymo on July 19, 2018, 02:36:41 pmIf you only need it to be powered from 5V maximum, the list of CMOS comparators expands considerably, as they're optimised of interfacing with digital logic.MCP6541/1R/1U/2/3/4http://ww1.microchip.com/downloads/en/DeviceDoc/21696e.pdfTS3022https://www.st.com/resource/en/datasheet/ts3022.pdfMCP6561/1R/1U/2/4http://ww1.microchip.com/downloads/en/DeviceDoc/22139C.pdfTLC3702/4http://www.tij.co.jp/jp/lit/ds/symlink/tlc3704m.pdfhttp://www.tij.co.jp/jp/lit/ds/symlink/tlc3702m.pdfMAX976/MAX978/MAX998https://docs-emea.rs-online.com/webdocs/12b1/0900766b812b1435.pdf

author: guymo
author_rank: Regular Contributor
timestamp: July 23, 2018, 12:42:08 pm
content: Quote from: Hero999 on July 20, 2018, 09:46:39 amThanks again. Just to check my understanding of these devices: if I want the outputs to be 0V and 5V, I had better run them from a 0V--5V power supply, right? In that case, yes, these 5V-powered devices are all potential winners.I have ordered some TLC3704 to experiment with -- chosen for no better reason than that they are available in DIP which makes prototyping easier, at least for me.

author: Peabody
author_rank: Super Contributor
timestamp: July 23, 2018, 01:54:37 pm
content: With respect to the excessive negative input voltage, I think it might help if the input in question is the inverting input, and the feedback resistor from the output connects there too. As the input goes negative, the output goes positive, and the feedback resistor allows the "-" input to stay near the negative rail. Ideally, it's supposed to stay at 0V up to a certain point, but it doesn't really stay there.I had the same issue driving an LM358 from the audio output of a walkie-talkie. Volume is supposed to be set to 1, but several times I've found it at 4 or 5, and so far the LM358 has survived. The input resistors are mainly responsible, but I think the feedback also helps. Circuit attached.I should say that I'm not an EE, so if this is completely wrong, I hope someone will correct me.