Analog input circuit protection with a zener - Page 1
Forum section: electronics / projects

author: dmendesf
author_rank: Frequent Contributor
timestamp: April 23, 2025, 08:18:42 pm
content: I have a stm32 powered by 3V3 with VREF = 3V0. Analog pins are driven by operational amplifiers powered from +6V and -6V. Between both there's a RC low pass filter. I'd like to protect the stm pin with a 3V3 (or even 3V9) zener. Seems easy? I thought it was.I measured about 5 different zeners (3V3 and one 3V9). There seems to be two groups:Some draw uA before 3V3 is reached... and continue doing so after that. So, there's no protection.Others draw a few mA before 3V3 is reached and rise fast for hundreds of mA after that. Problem is that a few mA will play havoc with my signal because RC filter limits the available current.For now I AC coupled the signal so no continuous out of spec voltage reaches the STM pin, but I'm wondering what I'm doing wrong.DanielPS: all components from Digikey or Mouser

author: IconicPCB
author_rank: Super Contributor
timestamp: April 23, 2025, 08:47:28 pm
content: get a couple of schotkey dioes. Hook them up in series anode to cathode. Connect the mid point to the analog signal. connect the endpoints to the 3v3 and GND lines.

author: thm_w
author_rank: Super Contributor
timestamp: April 23, 2025, 11:15:54 pm
content: TVS or as Iconic says diodes. BAV199 is common for low leakage.https://www.eevblog.com/forum/projects/low-noise-front-end-protection/The STM32 has internal ESD diodes already, so if you can keep within the spec of those that is another option. You might want a TVS to clamp the main 3.3V rail though.https://www.analog.com/en/resources/technical-articles/protecting-adc-inputs.htmlhttps://www.ti.com/lit/an/slaa593/slaa593.pdf?ts=1745450124158https://www.eevblog.com/forum/beginners/adc-input-protection/

author: incf
author_rank: Frequent Contributor
timestamp: April 23, 2025, 11:32:57 pm
content: As you have found out, it's not so simple. All diodes are very imperfect.Can you divide (and or shift) the output of the amplifier so that it is always within the range of roughly 0.3V to 3.0V?

author: langwadt
author_rank: Super Contributor
timestamp: April 23, 2025, 11:34:49 pm
content: Quote from: thm_w on April 23, 2025, 11:15:54 pmsorta yes, but not the usual diodes to ground and supply, is more like ~4V zener to ground, the injection spec is -5mA/+0mA and a note that if you go below ground on analog input the analog stuff get disturbed

author: thm_w
author_rank: Super Contributor
timestamp: April 23, 2025, 11:45:31 pm
content: Quote from: langwadt on April 23, 2025, 11:34:49 pmSpec is +/-5mA for analog input, but yes, probably best not to do that unless you are penny pinching and just follow the advice of the posts and link above with a simple 2c diode.

author: incf
author_rank: Frequent Contributor
timestamp: April 23, 2025, 11:47:41 pm
content: Every ADC channel is likely to be unhappy whenever the signal goes even slightly above 3.3V or below 0V.Diodes can protect the device from damage, but they won't guarantee proper operation

author: PCB.Wiz
author_rank: Super Contributor
timestamp: April 24, 2025, 01:03:34 am
content: Quote from: dmendesf on April 23, 2025, 08:18:42 pmThose are not zeners.Quote from: dmendesf on April 23, 2025, 08:18:42 pmLow voltage zeners are very 'soft' look at the I-V curves in Zener data sheets.Simplest is diodes to GND and VCC, but if you want to avoid other channel interference from a clamping circuit, and also want to avoid pulling Vcc upwards for low MCU currents, more care is needed.eg a BAV199 and a 2v5 shunt regulator, will clamp a 3V signal by ~ 1.7uA at 60'C, or if driven from 6V, it will clamp 50k to 3.055V at 60'C

author: dmendesf
author_rank: Frequent Contributor
timestamp: April 24, 2025, 01:36:45 am
content: Unfortunately no. When "everything works", the signal is maybe 10% away from the rails (0V to 3V). Only when something very wrong happens then the amplifier output goes to its rails (6V or -6V).Daniel

author: incf
author_rank: Frequent Contributor
timestamp: April 24, 2025, 01:40:47 am
content: Can you buffer the signal with a rail to rail IO op-amp running from 3.3V?

author: dmendesf
author_rank: Frequent Contributor
timestamp: April 24, 2025, 01:44:40 am
content: Thanks, will test that route (BAV199, maybe splitting the low pass filter in two and putting it it the middle, so there's still more resistance in series with the internal diodes) and a TVS to clamp the 3V0.Daniel

author: dmendesf
author_rank: Frequent Contributor
timestamp: April 24, 2025, 01:47:26 am
content: I have 16 channels in one board and multiple boards, and they are battery powered, so trying to keep the circuit small and cheap. RRIO amplifier powered by 3V0 maybe won't like receiving 6V at input....

author: PCB.Wiz
author_rank: Super Contributor
timestamp: April 24, 2025, 02:38:40 am
content: Quote from: dmendesf on April 24, 2025, 01:44:40 amCheck the I-V curves of whatever clamp you choose.Another clamp option is a biased PNP transistor, which will shunt current to gnd when overdrive occurs.PNP + Blue LED may give the lowest idle current, or a low current shunt regulator with < 100uA bias ?

author: Smokey
author_rank: Super Contributor
timestamp: April 24, 2025, 03:04:59 am
content: You can maybe use a rail-to-rail-I-O-ish opamp run from 0-3V as a final buffer before the ADC.

author: PCB.Wiz
author_rank: Super Contributor
timestamp: April 24, 2025, 03:38:58 am
content: Quote from: dmendesf on April 24, 2025, 01:47:26 amAnother clamping choice is USB parts like SRV05 (etc), these can clamp 4 signal nodes with 8 internal diodes, so are much smaller per node than BAV199 and you can set the V+ externally pin to whatever you need (2.5-2.7V?)

author: ledtester
author_rank: Super Contributor
timestamp: April 24, 2025, 05:28:24 am
content: This old thread has some interesting ideas:https://www.eevblog.com/forum/projects/limiting-op-amp-output/Quote from: Smokey on April 24, 2025, 03:04:59 amSomething similar is discussed atReply #65of that thread.Quote from: thm_w on April 23, 2025, 11:15:54 pmThis TI white paper mentions the OPA698 which is a "voltage limiting" op-amp which has programmable output clamp levels. Too bad it's kinda pricey, though. Are there any other op-amps with this feature?Datasheet:https://www.ti.com/product/OPA698

author: Kleinstein
author_rank: Super Contributor
timestamp: April 24, 2025, 06:51:57 am
content: The µC has no problem going higher than the Vref of the ADC, the limit is the supply of the µC. Somehing like 200 mV below GND or above VCC would normally be OK with no issues. Beyound some 400 mV current starts to flow through µC internal "diodes" and this can disturb the function of adjecent pins, especially analog functions, like other ADC input and comparators. The next level of problem is than then the current gets too large - this may than damage the chip.There are a few more amplifiers with output clamping, but usually more expensive parts. As an example the ADA4945 and LMH6553 as an ADC drivers with low low noise, high speed. So even more overkill than the OPA698.An RR OP-amp that is powered from the same 3.3 V supply as the µC is likely the best easy solution. One would still need some clamping for that amplifier, but no other function is effected if slightly exceeding the supply.When clamping with a diode one may get extra errors in the transition region. So one may loose some 200 mV near the top where the clamping diode alread effect the signal. For the low side a schottky to ground is OK but may still reach some -300 mV and maybe effect on sensitive other functions.For the high side a single diode to an adjusted voltage ~ 2.5 V (depends on the diode) is probably best. Instead of the diode a PNP transistor could also work and get away with a voltage divider for the base to set the clamp voltage.

author: CurtisSeizert
author_rank: Regular Contributor
timestamp: April 28, 2025, 12:41:55 pm
content: I usually use a series pair Schottky diode like BAS40-04 at VDD and GND after the amp, as previously mentioned, but I usually add another layer of protection before that so that such fault states are transient. A very important thing to be cognizant of is that you may be pumping more current into your 3V3 rail than is being used, which will pull it up, possibly above the absolute max of the parts you have attached to it. After learning this the hard way, I have started adding this clamp to LV rails. The values here are for a 2.1V clamping voltage to be used on a +1V8 rail.[ Attachment Invalid Or Does Not Exist ]