Protecting micro input from opamp with negative rail - Page 1
Forum section: electronics / projects

author: lk
author_rank: Regular Contributor
timestamp: November 20, 2012, 06:09:41 pm
content: Greetings,I am unsure how to protect my micro controller input against both the positive and the negative voltage produced by the U4, if you take a look at the enclosed pdf. If it was just a positive voltage I'm sure a resistor and a zener could do the trick, but here with the negative rail I'm not so sure.The op amp is configured to amplify the voltage drop over R13-R22, the reason i have chosen the TL071 seemed to be the one with the least error, of the generic op amps i have tried, but as I'm ordering stuff at digikey again, i might be persuaded to change it.-lk

author: ciccio
author_rank: Frequent Contributor
timestamp: November 20, 2012, 09:25:18 pm
content: A simple diode, with anode connected to input and cathode to ground will provide sufficient protection.If you plan to use a zener, a 5.1 V one, with suitable current limiting series resistor, will limit input to the +5.1 / -0.7 V range, that is surely safe ( a direct biased zener can be seen as a diode....)Best regards

author: AlfBaz
author_rank: Super Contributor
timestamp: November 20, 2012, 09:44:21 pm
content: If you expect the output to be mostly positive and don't care to measure the values of any negaitve incursions then you could use the spare U6:B on the out put as a half wave rectifier.Just google opamp rectifier and you should get plenty of hits, all you'll neeed extra is 2 diodes and 2 resistors

author: hlavac
author_rank: Frequent Contributor
timestamp: November 21, 2012, 10:38:37 am
content: I'd say a simple current limiting resistor (10k max due to ADC input impedance requirements) will do due to internal input protection diodes already present on the micro input.If you want to be really extra safe or the opamp output spends a lot of time outside the 0-5V range, add two diodes after the resistor, one with anode to gnd and one with cathode to micros Vcc.

author: jeroen74
author_rank: Frequent Contributor
timestamp: November 21, 2012, 11:21:51 am
content: There are dual diodes in SOT23 package that are ideal for this. Like the BAT54 that comes in a lot of configurations.

author: lk
author_rank: Regular Contributor
timestamp: November 21, 2012, 12:49:03 pm
content: Thanks for all the replies,i have made a little schematic in circuitlabs, its easier for me when talking about anodes and cathodes to have it visualised, would it be something like this thing?-lk

author: jeroen74
author_rank: Frequent Contributor
timestamp: November 21, 2012, 12:55:29 pm
content: Yes. But you can also put a diode in the feedback path of the opamp circuit so it does not produce negative voltages.

author: lk
author_rank: Regular Contributor
timestamp: November 21, 2012, 01:16:50 pm
content: Jeroen: that diode wont affect the offset of the op amp?, i played around with a lot of op amps before i found one that was affordable and did not cause errors in the output. the tl071 that i use was the only one that was accurate over the entire range from 0-5 volt, in this case the measured current.EDIT: and should i use schottkeys instead of the zeners i use?-LK

author: jeroen74
author_rank: Frequent Contributor
timestamp: November 21, 2012, 01:23:53 pm
content: You should not use zeners.

author: Psi
author_rank: Super Contributor
timestamp: November 21, 2012, 01:31:49 pm
content: I've not read your circuit so i dunno if this applies but, be careful with 5.1V zeners/TVS on high impedance 5V analog inputs.If you have like, 20K in series as a current limit, followed by the diode to ground you may find a 5V input signal is only 4.8V when it gets to the microcontroller. Even a 5.6V zener sometimes isn't high enough.A zener will start to draw a little current well before its specified breakdown voltage and this can couple with outer resistances to form a voltage divider

author: lk
author_rank: Regular Contributor
timestamp: November 21, 2012, 06:43:34 pm
content: Thanks again every one, i was brave and searched the datasheet, seems like hlavac said there is already input protection on the ADC inputs, so looks like i get away with just the resistor-lk

author: AlfBaz
author_rank: Super Contributor
timestamp: November 21, 2012, 11:55:53 pm
content: Quote from: lk on November 21, 2012, 06:43:34 pmIf you continue searching the data sheet you will also find in the "Absolute Maximum Ratings" that the voltage on most pins should not exceed -0.3 to Vdd+0.3 or there abouts so even placing shottky's externally you will have to find some with very low forward bias voltage.Granted it will probably work with just a resistor but the chip manufacturer has warned you that it may cause the device to fail or degrade in its performance.Also keep in mind that when schematics are shown in data sheets about the devices internals, it is almost always reprasentative of whats inside, what is actually in there, only they know, so I peronally, like to heed their warnings