Go Down

Topic: Input protection (Read 376 times) previous topic - next topic

donperry

Apr 21, 2019, 02:13 am Last Edit: Apr 21, 2019, 02:46 am by donperry
Having had customer send near 15 volts through the input pins of the device, I was on the search for proper input pin protection for such scenarios.

i started off with this circuit (multisim file attached)

and ended up with the SP721 used alongside it.

the Sp721 is good for protection of spikes, and even negative polarity (i think..)

But I'm not sure if it would protect against a 5V input on a pin while the device itself is off.

Thoughts?

JohnRob

#1
Apr 21, 2019, 02:50 am Last Edit: Apr 21, 2019, 02:50 am by JohnRob
Using just a TVS is a brute force method and will not make the inputs safe for steady state overvoltages that comes from a power supply with.... say a 5A capability.

The key is to use the low current required by the Arduino inputs to your advantage.

As they say there is more than one way to skin a cat....

My suggestion is below.  It will withstand 15V input for an unlimited time, as well as input spikes and reverse voltage.  The resistor values are not critical and the Zener doesn't have to be a TVS, it can be just a regular zener diode.



         
Please do not PM me with thread based messages.  If your thoughts are worth responding,  the group should benefit from your insight.

donperry

yes, i had been using something very similar, but my problem was with the knee of the Zener diode.

hammy

Not clear , but if this is digital input an opto isolator is a simple and reliable option or even a relay .


MarkT

Using just a TVS is a brute force method and will not make the inputs safe for steady state overvoltages that comes from a power supply with.... say a 5A capability.

The key is to use the low current required by the Arduino inputs to your advantage.

As they say there is more than one way to skin a cat....

My suggestion is below.  It will withstand 15V input for an unlimited time, as well as input spikes and reverse voltage.  The resistor values are not critical and the Zener doesn't have to be a TVS, it can be just a regular zener diode.



         
The standard clamp circuit is series resistor into schottky diodes that bolster/take over from the
internal diodes.  This will protect whether or not the Arduino is powered, the zener circuit
cannot protect at all if powered down and doesn't protect against undervoltage either.

The circuit here is an example, just ignore the "zener or schottky" labels, definitely only schottky diodes
work.
https://electronics.stackexchange.com/questions/234308/how-to-make-clamping-circuit-to-clamp-exactly-at-3-3-volts
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

JohnRob

Quote
The circuit here is an example, just ignore the "zener or schottky" labels, definitely only schottky diodes
I respectfully disagree with the deletion of the of the bottom zener.   I agree the top diode might be needed for some application.

In the OP's case, the application of 15V to the circuit you suggest could easily overvoltage the board (depending on other loads on the 3.3V rail).

In my proposal, the series resistor to the board will deal with voltage applied to the input when the board is not powered.

All our automotive designs were required to be capable of 18V on any pin for an unlimited period of time.  We found the zener works best.

Please do not PM me with thread based messages.  If your thoughts are worth responding,  the group should benefit from your insight.

donperry

#6
Apr 21, 2019, 06:26 pm Last Edit: Apr 21, 2019, 06:30 pm by donperry
I respectfully disagree with the deletion of the of the bottom zener.   I agree the top diode might be needed for some application.

In the OP's case, the application of 15V to the circuit you suggest could easily overvoltage the board (depending on other loads on the 3.3V rail).

In my proposal, the series resistor to the board will deal with voltage applied to the input when the board is not powered.

All our automotive designs were required to be capable of 18V on any pin for an unlimited period of time.  We found the zener works best.


Thanks for your participation,JohnRob

You mentioned your design will protect even if the MCU is off? Can you elaborate how? IF 2.5V is applied wouldn't it still run into the MCU?

 I know the resistor can limit current, is it that the current protection alone and not necessarily a voltage protection would be sufficient? Or is it that the current would be limited enough so the internal diodes won't be over burdened?

With that resistor can it accurately read a 0-5V input?

donperry

The standard clamp circuit is series resistor into schottky diodes that bolster/take over from the
internal diodes.  This will protect whether or not the Arduino is powered, the zener circuit
cannot protect at all if powered down and doesn't protect against undervoltage either.

The circuit here is an example, just ignore the "zener or schottky" labels, definitely only schottky diodes
work.
https://electronics.stackexchange.com/questions/234308/how-to-make-clamping-circuit-to-clamp-exactly-at-3-3-volts
Hey MarkT, thanks for dropping in.

So the extra schottky diodes would take over from the weaker internal ones. If the devices is powered off the 5V VDD rail would be 0V, and the current would flow through the zener towards the VDD.

I have one problem, wouldn't it be better to put the resistor AFTER the diodes assuming current would take path of least resistance

donperry

Not clear , but if this is digital input an opto isolator is a simple and reliable option or even a relay .


When the Z-diode starts to clamp, say a 4.90V may read as only 4.85 volts, depending on the knee curve of the Z diode.

wvmarle

Schottky diodes are right at the pin, resistor between pin and input. So current from the input gets limited by that resistor, and then any over (or under) voltage is syphoned off by the Schottky diodes.

That 5.2V zener in #1 is simply redundant and serves no function, the 0.1µF cap is also better removed as it slows the reaction of the pin (with a 5k cap the reaction time is down to about 0.5 ms) which may be an issue for fast changing signals.

If higher voltage spikes are possible (>100V) an optocoupler may be the proper solution.


When the Z-diode starts to clamp, say a 4.90V may read as only 4.85 volts, depending on the knee curve of the Z diode.
Irrelevant for a digital input. Anything over 2.7V or so (have to check data sheet for the exact number) reads as HIGH.
Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.

donperry

Irrelevant for a digital input. Anything over 2.7V or so (have to check data sheet for the exact number) reads as HIGH.
Yeah, this thread is about analog input.

 
Schottky diodes are right at the pin, resistor between pin and input. So current from the input gets limited by that resistor, and then any over (or under) voltage is syphoned off by the Schottky diodes.

That 5.2V zener in #1 is simply redundant and serves no function, the 0.1µF cap is also better removed as it slows the reaction of the pin (with a 5k cap the reaction time is down to about 0.5 ms) which may be an issue for fast changing signals.

If higher voltage spikes are possible (>100V) an optocoupler may be the proper solution.
OK. I understand.

wvmarle

Image referenced to in #3:

That's the proper clamping circuit, and it will not affect an ADC reading.
No zener indeed, that should be Schottky diodes.
The 470Ω resistor may be larger - up to about 10k - and the reading of the ADC is still not affected. Reaction time is also not slowed down.
The 3.3V is the Vcc of the controller, so this circuit will ALSO protect when it's not powered up and Vcc is at ground potential. The zener solution does NOT protect when not powered up as the pin can still be lifted to 5.2V over Vcc in that situation, which is damaging.

Yeah, this thread is about analog input.
Only now you mention this...
Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.

JohnRob

#12
Apr 21, 2019, 06:53 pm Last Edit: Apr 21, 2019, 07:00 pm by JohnRob
Quote
You mentioned your design will protect even if the MCU is off? Can you elaborate how? IF 2.5V is applied wouldn't it still run into the MCU?

 I know the resistor can limit current, is it that the current protection alone and not necessarily a voltage protection would be sufficient? Or is it that the current would be limited enough so the internal diodes won't be over burdened?
Here it is best to know the your processor board loads.  The input "clamping diodes" have some current capability.  The current specification of these diodes is not in the Atmel specification.  I've read current capabilities from 1 ma to 10 ma.  If your board takes less than this, then you don't need the upper diode MarkT suggested.  If you board takes more current then the upper diode is recommended.
With this diode in place, the processor board will be powered through this upper diode and not the internal clamping diode.

Note: If you have a 3.3v board the zener should be lowered accordingly.


Quote
With that resistor can it accurately read a 0-5V input?
From the Atmel  Specification:

Quote
The ADC is optimized for analog signals with an output impedance of approximately 10 k or less. If such a
source is used, the sampling time will be negligible. If a source with higher impedance is used, the sampling
time will depend on how long time the source needs to charge the S/H capacitor, with can vary widely. The user
is recommended to only use low impedance sources with slowly varying signals, since this minimizes the
required charge transfer to the S/H capacitor.
UPDATE (didn't catch the above posts as I was in the process of writing this one).
So we see there is no one "ideal" solution.  A 10k in place of the 470 ohm resistor and the addition of two diodes will work fine.  However I strongly recommend some resistance between the diodes and the processor input and the addition of a capacitor at the diodes.  The capacitor of course is not for static voltages but spikes and noise, in general it is a good practice to add it to your circuit.
Please do not PM me with thread based messages.  If your thoughts are worth responding,  the group should benefit from your insight.

donperry

#13
Apr 21, 2019, 07:06 pm Last Edit: Apr 21, 2019, 07:29 pm by donperry
Thanks.

Yeah, i've learned through experience that even when you want to omit those little 100nf caps, they are best left in place. I generally have them on every input. Most cases a 47nf works too.


Now, it would seem, after reading the SP721 datasheet that it's current handling abilities are farther than near to what would be ideal.

I might have to just go back to the BAS 40-04 schottky

wvmarle

The capacitor of course is not for static voltages but spikes and noise, in general it is a good practice to add it to your circuit.
The problem is when those spikes ARE your signal... as is often the case with digital signals, sometimes also with analog signals (a 1 kHz signal will be very much affected by a 100 nF capacitor). That's why adding capacitors to an input is generally not a good idea.
Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.

Go Up