Maker Pro
Maker Pro

Analog input pin protection on a MCU pin using clamping diodes...

H

Hamza

Jan 1, 1970
0
Hi,

I am slightly worried about damaging the analog inputs of the
microcontroller I am using (Actually I am more concerned about other
people who like to stick random stuff at the analog inputs) and I was
wondering if something like the following circuit would give me enough
protection (so that I don't have to change the MCU every other week)

Analog
Input
o-------.-----.----------- To MCU
' '
| |
z V
3.3V Zener A - Schottky
| |
| |
=== ===
GND GND

( a nicer graphical version here: http://img258.imageshack.us/img258/281/zenerschottkywz7.png
)

I am not an expert so please bear with me while I mumble..

The 3.3V Zener would kick in if the input voltage exceeds 3.3V and
clamp it down to ground while the schottky diode prevents negative
voltages going in to the microcontroller (I am not so sure about the
direction of the schottky diode, is it connected wrong?). So the input
going to the analog channel of the mcu would be in the range of -0.3V
(because of the forward voltage drop of the schottky?) and 3.3V.


Yes, no, inefficient, horribly wrong? All comments would be much
appreciated :)


Regards,
Hamza.
 
B

Bob Masta

Jan 1, 1970
0
Hi,

I am slightly worried about damaging the analog inputs of the
microcontroller I am using (Actually I am more concerned about other
people who like to stick random stuff at the analog inputs) and I was
wondering if something like the following circuit would give me enough
protection (so that I don't have to change the MCU every other week)

Analog
Input
o-------.-----.----------- To MCU
' '
| |
z V
3.3V Zener A - Schottky
| |
| |
=== ===
GND GND

A common clamping arrangement (used inside
of many chips) is to connect reverse-biased ordinary
diodes to the rails at the input, and feed that point
from the outside world through a current-limiting resistor.
The diode from the input to the positive rail will thus
do nothing until the input tries to exceed the rail by
0.6 V, and anything above that will be clamped.
Same idea for the negative rail (or ground).
The value of the current-limit resistor must be
large enough to protect the diodes under the
worst anticipated input, and small enough to
not compromise the input signal due to the
low-pass filter formed with the chip's intrinsic input
capacitance.

Best regards,


Bob Masta

D A Q A R T A
Data AcQuisition And Real-Time Analysis
www.daqarta.com
Scope, Spectrum, Spectrogram, Signal Generator
Science with your sound card!
 
D

David L. Jones

Jan 1, 1970
0
Hi,

I am slightly worried about damaging the analog inputs of the
microcontroller I am using (Actually I am more concerned about other
people who like to stick random stuff at the analog inputs) and I was
wondering if something like the following circuit would give me enough
protection (so that I don't have to change the MCU every other week)

Analog
Input
o-------.-----.----------- To MCU
' '
| |
z V
3.3V Zener A - Schottky
| |
| |
=== ===
GND GND

( a nicer graphical version here:http://img258.imageshack.us/img258/281/zenerschottkywz7.png
)

I am not an expert so please bear with me while I mumble..

The 3.3V Zener would kick in if the input voltage exceeds 3.3V and
clamp it down to ground while the schottky diode prevents negative
voltages going in to the microcontroller (I am not so sure about the
direction of the schottky diode, is it connected wrong?). So the input
going to the analog channel of the mcu would be in the range of -0.3V
(because of the forward voltage drop of the schottky?) and 3.3V.

Yes, no, inefficient, horribly wrong? All comments would be much
appreciated :)

Regards,
Hamza.

Also add (or you can even use it on it's own) a series resistor, the
value of which is calculated based on the expected worse case voltage
and the maximum clamping current the chip can handle.
As always, make sure any input protection scheme doesn't affect the
desired analog performance.

Dave.
 
B

Bob Monsen

Jan 1, 1970
0
Hamza said:
Hi,

I am slightly worried about damaging the analog inputs of the
microcontroller I am using (Actually I am more concerned about other
people who like to stick random stuff at the analog inputs) and I was
wondering if something like the following circuit would give me enough
protection (so that I don't have to change the MCU every other week)

Analog
Input
o-------.-----.----------- To MCU
' '
| |
z V
3.3V Zener A - Schottky
| |
| |
=== ===
GND GND

( a nicer graphical version here:
http://img258.imageshack.us/img258/281/zenerschottkywz7.png
)

I am not an expert so please bear with me while I mumble..

The 3.3V Zener would kick in if the input voltage exceeds 3.3V and
clamp it down to ground while the schottky diode prevents negative
voltages going in to the microcontroller (I am not so sure about the
direction of the schottky diode, is it connected wrong?). So the input
going to the analog channel of the mcu would be in the range of -0.3V
(because of the forward voltage drop of the schottky?) and 3.3V.


Yes, no, inefficient, horribly wrong? All comments would be much
appreciated :)


Regards,
Hamza.

You don't say what microcontroller you are using. However, most of them have
input voltage protection diodes already. All you need to do is to limit the
current in or out. For example, PICs generally specify 20mA maximum input or
output for most pins. So, if you can somehow limit the current to that
value, you are all set; the onboard protection diodes will prevent any
damage. If you can't prevent the input current from exceeding 20mA, then you
can add external diodes which can take more current.

Adding a resistor in series with the port can limit current, but might also
cause problems with higher frequency inputs, as another poster suggested. If
your application does is not designed to handle frequencies above 100Hz or
so, you can use a 10k resistor in series to protect the port. That will
protect you to +-200V. Some microcontroller don't like input resistances
greater than that. A ~5k input resistor will give you +-100V of protection,
and that may be enough.

The formula is Vprotect = +- R/50

Regards
 
T

Traver

Jan 1, 1970
0
I my experience, zeners can affect the linearity of the input and are
not very accurate at clamping to a specific voltage. By adding
external diodes, you basically end up with protection in parallel with
the internal protection diodes of the chip. This means the internal
diodes can still end up hogging the current during a fault and being
damaged.

The best way I have found to portect analog inputs is to use a small
op amp as a buffer. The op amp output will not exceed its power supply
rails. If you power it with the same voltage as the I/O voltage on the
micro, it gives good protection. With a couple resistors this also
gives you the ability to scale the voltages coming in.
 
H

Hamza

Jan 1, 1970
0
A common clamping arrangement (used inside
of many chips) is to connect reverse-biased ordinary
diodes to the rails at the input, and feed that point
from the outside world through a current-limiting resistor.
The diode from the input to the positive rail will thus
do nothing until the input tries to exceed the rail by
0.6 V, and anything above that will be clamped.
Same idea for the negative rail (or ground).
The value of the current-limit resistor must be
large enough to protect the diodes under the
worst anticipated input, and small enough to
not compromise the input signal due to the
low-pass filter formed with the chip's intrinsic input
capacitance.

Best regards,

Bob Masta

D A Q A R T A
Data AcQuisition And Real-Time Analysis
www.daqarta.com
Scope, Spectrum, Spectrogram, Signal Generator
Science with your sound card!- Hide quoted text -

- Show quoted text -


Thank you all very much for your input.

After looking around for a bit, I came across the MAX3208E, which is a
"low-capacitance, ±15kV ESD-protection diode arrays with an integrated
transient voltage suppressor (TVS) clamp are suitable for high-speed
and general-signal ESD protection.", according to the datasheet.
Instead of using lots and lots of diodes on the board I'd prefer to
use something like this, maybe with an added resistor.

The following screenshot from the datasheet shows how it is internally
connected: http://img252.imageshack.us/img252/1659/max3208ol5.png

After reading Traver's comment on using an op-amp as a buffer I've
read a bit more on it and it looks like a safer solution than using
the diodes to do the clamping, for the reasons he has stated but I am
not convinced that it would be able to cope with the input voltages
exceeding the op-amp's rail voltage. Can the op-amp withstand huge ESD
transients or say 60V on a 3.3V power rail?


Thanks again for all your comments.


Kind Regards,
Hamza.
 
E

Eeyore

Jan 1, 1970
0
Hamza said:
Hi,

I am slightly worried about damaging the analog inputs of the
microcontroller I am using (Actually I am more concerned about other
people who like to stick random stuff at the analog inputs) and I was
wondering if something like the following circuit would give me enough
protection (so that I don't have to change the MCU every other week)

Analog
Input
o-------.-----.----------- To MCU
' '
| |
z V
3.3V Zener A - Schottky
| |
| |
=== ===
GND GND

The first thing you need to do is add some series resistance !

Graham
 
Top