How to protect ADC of microcontroller from high voltages?

Discussion in 'The Projects Forum' started by Atagkh, Sep 16, 2018.

  1. Atagkh

    Thread Starter New Member

    Sep 8, 2018
    16
    0
    Hello,
    I am using a micro controller for my project and I need to read a voltage with its ADC. Each ADC can handle 3v, so my question is how to protect the ADC from high voltage spikes in the circuit? I am using op-amps to map the voltage between 0-3v, however I need to make sure that the voltage is not going above 3v. Is it possible to do it with Zener diode? If yes, could you please suggest a design for me?
    I appreciate your help.
    Regards,
    Ata
     
  2. ericgibbs

    Moderator

    Jan 29, 2010
    5,489
    1,023
    hi A,
    Which OPA type and what operating voltage will they be using.?
    E
     
  3. Atagkh

    Thread Starter New Member

    Sep 8, 2018
    16
    0
    I am using TL084ACN, and the circuit is DC/AC inverter so there might be spikes in the circuit but operating voltage ideally is under 5V.
     
  4. ericgibbs

    Moderator

    Jan 29, 2010
    5,489
    1,023
    hi,
    The datasheet for the TL084 shows the Vout will only reach approx Vsup -1.5v, so a 5Vsup will swing to 3.5V.
    You could add a series resistor and say a 3.3Vzener on the Vout of the OPA.
    E
     
  5. OBW0549

    Well-Known Member

    Mar 2, 2015
    2,490
    2,102
    You cannot operate a TL084 on such a low supply voltage; the minimum is ± 5V, or a total supply voltage (from V+ to V-) of 10V. Read the data sheet.
     
    ericgibbs likes this.
  6. Atagkh

    Thread Starter New Member

    Sep 8, 2018
    16
    0
    Thanks for the responses. I think I misunderstood the question before. The supply voltage for my op-amp is +Vcc=15v and -Vcc=-9v.
    What I want to do is that I want to give the output of my op-amps, which Ideally should be between 0v and 3v, to my ADC. I use resistors to limit the output of my op-amp in the above region but I want to have some sort of protection to make sure that if there are spikes in my circuit and output of my op-amp reaches for instance to 5v, the ADC would not burn! and the voltage is limited to 3v. I know that Zener diodes can limit the voltage but the problem is that I don't know how to use Zener diode so that when the voltage is under Vz, it goes into the ADC without any voltage drop, so that if the voltage is under 3v, I can read it correctly and if it goes above 3v, it is limited.
     
  7. ericgibbs

    Moderator

    Jan 29, 2010
    5,489
    1,023
    hi,
    The resistor is in series with the OPA vout to the ADC input pin, and the 3.3v Zener from the ADC input pin to 0V.
    A 330R resistor should be OK.
    Do you need a diagram.?
    E
     
    Atagkh likes this.
  8. Atagkh

    Thread Starter New Member

    Sep 8, 2018
    16
    0
    Thanks for your response. It solves the issue.
     
  9. ebp

    Well-Known Member

    Feb 8, 2018
    1,622
    554
    In general, zeners are very poor devices for protecting analog inputs if the maximum allowable voltage is close to the full-scale voltage.

    Up to something between about 5 and 6 volts, the devices we call zener diodes are in fact "true" zener diodes. The breakdown mechanism is quite different from that of diodes above that range which are actually avalanche diodes, even though we usually call them zeners.

    The reverse breakdown mechanism of true zener diodes means that they begin to conduct current at a voltage well below their nominal. If the relationship between current and voltage is graphed, the curve have a rounded "knee" instead of a nice clean sharp 90 degree angle. Add to that the normal tolerance of a zener, and it really becomes a problem.

    For example, the MMSZ5226B is nominally a 3.3 V device. It is characterized at 20 milliamps and the breakdown voltage range can be from 3.14 to 3.47 V. 3.47 V is certainly within the acceptable maximum voltage range for most ICs operating on 3.3 V - usually the absolute maximum is something around half a volt above the positive supply rail. But the 3.14 is a problem, and remember it is specified at 20 mA. There is a spec for "reverse leakage current" - 25 µA at 1 volt. But nothing numerically spec'd at say 2.5 V.

    You must use a series resistor to limit the current from the amplifier and through the zener. Suppose you choose 1000 ohms. At the 25 µA leakage current, that equates to 25 mV of error, or about 0.83% of full scale for the ADC. That's not too terrible for an 8 bit ADC, but it amounts to over 8 counts for a 10 bit and 34 counts for a 12 bit. And again, we don't know what to expect at 2 or 3 volts.

    It is hard to find curves for zeners that are very revealing at low currents. About all you see in most datasheets is a "hook" near the X axis.

    Generally the lower the power rating of a zener, the better behaved it is for this sort of application. The 52xx series is rated for half a watt. There are some 250 mW types that are better, but I can't recall the series.

    With many devices it is perfectly acceptable to use the internal protection diodes, but the datasheet must be reviewed carefully. The allowable current, assuming it is specified (and it usually is) can range from 2 mA to 20 mA or even 50 mA, with caveats for how many inputs can be overdriven. Again, a current limiting resistor is essential. While this may protect the inputs from damage, it may be completely unacceptable in terms of operation. I have used ADCs where all channels would be scrambled if any single channel voltage exceeded the positive supply rail by more than (as I recall) about 100 mV - far below a voltage that would be damaging. That made things very difficult.

    Schottky diodes, very carefully chosen for low reverse leakage characteristics, can be used to clamp signals to the positive supply rail (resistor required, as always) to keep the ICs internal protection diodes from conducting significant current, but this still may not fix problems with misoperation.

    There are techniques that can be used to clamp the output of op amps, but they are not simple either if the clamping voltage needs to be precise. You should be able to find info on such circuits on the web at sites like Analog Devices and Texas Instruments.

    If you have lots of money, Analog Devices makes some very nice clamping amps.

    While they are by no means perfect, rail-to-rail op amps run from the same supply voltage as the ADC can work reasonably well, but they never go truly to the rails so a bit of range can be lost at the bottom and top.

    I have an abhorrence for tying to do precision analog at 3 volts. It is not impossible, just much more difficult than even 5 V.
     
    Kjeldgaard and Atagkh like this.
  10. Atagkh

    Thread Starter New Member

    Sep 8, 2018
    16
    0
    Thanks for your detailed explanation.
    What do you think about using opto couplers? Are they useful for this application? Or they would just transfer the voltage that might be more than 3v and hence burn the ADC?
     
  11. ebp

    Well-Known Member

    Feb 8, 2018
    1,622
    554
    Optocouplers aren't useful for any sort of analog circuitry that requires any sort of accuracy, except for those designed specifically for analog applications. Even then, they require op amps to complete the circuit. They are quite expensive. The CNR200 or HCNR200 is a typical analog optocoupler that does work very well.

    Probably the least expensive solution is to use rail-to-rail op amps and, if necessary, run them on a "split" power supply. If you used supplies of say -0.5 V and +3.3 V, you would likely get a full 0 to 3 volt swing at the input to your ADC without exceeding the allowable limits. If you don't need to go right to zero or to 3.0 V, then you could just use 0 V and 3 V for the supplies. Of course you may still have to protect the amps' inputs from excessive voltage. Depending on the circuitry, that may be just as difficult as protecting the ADC inputs or considerably easier. With non-inverting amplifiers,using a resistor and relying on the protection diodes in the amp can work well - but always check the spec's to see what is allowable for the input diodes.
     
  12. danadak

    Well-Known Member

    Mar 10, 2018
    1,460
    300
    Look at UP datasheet for input Z considerations of the A/D. Some
    parts adding series R causes the sampling front end of the A/D not
    to settle as fast as you think it is just based on conversion time speced
    for A/D.

    Regards, Dana.
     
  13. Sensacell

    Moderator

    Jun 19, 2012
    1,903
    574
    A series resistor and a diode clamp to the MCU's Vdd has never failed me.
     
    ericgibbs likes this.
Loading...