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

Discussion in 'Electronic Basics' started by Hamza, Oct 1, 2007.

  1. Hamza

    Hamza Guest

    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.
     
    Hamza, Oct 1, 2007
    #1
    1. Advertising

  2. Hamza

    Bob Masta Guest

    On Mon, 01 Oct 2007 04:00:18 -0700, Hamza <>
    wrote:

    >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!
     
    Bob Masta, Oct 1, 2007
    #2
    1. Advertising

  3. On Oct 1, 9:00 pm, Hamza <> wrote:
    > 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.
     
    David L. Jones, Oct 1, 2007
    #3
  4. Hamza

    Bob Monsen Guest

    "Hamza" <> wrote in message
    news:...
    > 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
     
    Bob Monsen, Oct 1, 2007
    #4
  5. Hamza

    DJ Delorie Guest

    DJ Delorie, Oct 1, 2007
    #5
  6. Hamza

    Traver Guest

    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.
     
    Traver, Oct 2, 2007
    #6
  7. Hamza

    Hamza Guest

    On Oct 1, 1:25 pm, (Bob Masta) wrote:
    > On Mon, 01 Oct 2007 04:00:18 -0700, Hamza <>
    > wrote:
    >
    >
    >
    >
    >
    > >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!- 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.
     
    Hamza, Oct 2, 2007
    #7
  8. Hamza

    Eeyore Guest

    Hamza wrote:

    > 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
     
    Eeyore, Oct 2, 2007
    #8
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Myauk

    Catch Diodes, Clamping Capacitors, Snubbers!

    Myauk, Oct 23, 2006, in forum: Electronic Repair
    Replies:
    1
    Views:
    610
    propman
    Oct 23, 2006
  2. Joerg

    Low-C input protection diodes

    Joerg, Oct 22, 2007, in forum: Electronic Design
    Replies:
    31
    Views:
    1,090
    John Larkin
    Oct 24, 2007
  3. Hammy

    Useing Inverter ESD clamping diodes?

    Hammy, Mar 25, 2009, in forum: Electronic Design
    Replies:
    5
    Views:
    333
  4. adamp524

    Zener diodes for input protection

    adamp524, Apr 28, 2010, in forum: Circuit Help
    Replies:
    6
    Views:
    6,451
    (*steve*)
    Apr 30, 2010
  5. osterchrisi

    Signal Input Protection through clamping diodes

    osterchrisi, May 13, 2011, in forum: Circuit Help
    Replies:
    3
    Views:
    1,279
    (*steve*)
    May 16, 2011
Loading...

Share This Page