Skip to main content
d23
Associate II
July 24, 2017
Question

Overvoltage at ADC input

  • July 24, 2017
  • 14 replies
  • 4472 views
Posted on July 24, 2017 at 16:23

Hello,

I am using a STM32L051C8. In my circuitry there is an OPAmp's output leading via a 2k2 resistor to an input of the STM-chip which is configured as ADC input. The STM-chip is supplied by 3.3 V and the OP by 5 V, rail-to-rail.

As long as the OP's output voltage is below 3,3 V everything is okay. Slightly above 3,3 V I still get values of 4095, but from 4 V on or more the ADC-values are decreasing again, about 3800 or so.

Is my resistor with 2k2 to small to keep the limit under 4095? Or how can I maintain a limitation without supplying the OP by 3.3 V?

Thanks

Dieter

    This topic has been closed for replies.

    14 replies

    Tesla DeLorean
    Guru
    July 24, 2017
    Posted on July 24, 2017 at 16:28

    You'd really want to design a circuit that doesn't violate the input specifications.

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    AvaTar
    Senior III
    July 24, 2017
    Posted on July 24, 2017 at 16:30

    I guess only ST can explain what happens internally, but ADC inputs (GPIOs with analog capability) are definitely not 5V-tolerant.

    For my (private) designs, I used a zener diode to limit the ADC input level.

    BTW, with other devices, I experienced much more troublesome behavior in similar cases ...

    d23
    d23Author
    Associate II
    July 24, 2017
    Posted on July 24, 2017 at 16:44

    Hello, up to now I assumed, that the STM-chip provides input diodes to GND and Vdd, so I only have to make sure that the input current is sufficiently limited. Then, so I hoped, the 4095 limit is kept even if there are 5 Volts before the resistor. Maybe 2k2 is simply too less.

    Dieter

    Tesla DeLorean
    Guru
    July 24, 2017
    Posted on July 24, 2017 at 17:19

    If five volts is getting to the pin it's clearly an inadequate solution. There may be diode on the input/output cell, but with the five volt tolerant inputs it's not clamping to VDD but some other level floated to whatever your maximal input is. A diode to VDD might be a better solution.

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    STOne-32
    ST Technical Moderator
    July 24, 2017
    Posted on July 24, 2017 at 23:25

    Dear

    Stotz.Dieter

    ‌,

    For STM32L0 MCUs, In each Adc input pin, We have a diode to VDDA . So here a current injection will happen on VDDA rail from your source and will go to our Vref+ bloc via the substrate. Conversion will be wrong with many LSB...

    Please use a Schottky diode to avoid such situation. Behavior explained in our datasheets (injection/suceptibility section).

    Cheers

    STOne -32

    d23
    d23Author
    Associate II
    July 25, 2017
    Posted on July 25, 2017 at 11:25

    Hello,

    thanks a lot, I will heed that advice with the Schottky diodes to keep the input current away from the chip. I already had the same idea with the current through the substrate.

    Dieter

    waclawek.jan
    Super User
    July 25, 2017
    Posted on July 25, 2017 at 11:41

    I'd also guess VDDA/VREF went up as the result of positive injection. This is usually taken as rock stable if fed from an LDO, but many (if not most) LDOs can't handle extra voltage being pushed onto their output. This is regardless of whether the protection diode is internal or external.

    JW

    d23
    d23Author
    Associate II
    July 25, 2017
    Posted on July 25, 2017 at 12:19

    Good idea, but the input voltage would move to the same positive direction and would be always higher than the VDDA, so the 4095 value should be kept.

    But before the design change by adding Schottky diodes I will test it exactly.

    Dieter

    Vangelis Fortounas
    Associate II
    July 25, 2017
    Posted on July 25, 2017 at 17:21

    Hello!!

    At your opamp output,  Put two metal film resistors as voltage Divider R1, R2 .

    R1/R2 must be equal 1.9/3.1  (not to have saturation)

    R1 must connected between  opamp out and input pin  and R2 must connected between GND and input pin

    So the maximum Voltage at your pin wil be ~3.1 v

    Eg :R1=20k  R2= 33K OHM

    You need only to make the calulations depending on R1 , R2 values

    Regards

    valentin
    Associate III
    July 25, 2017
    Posted on July 25, 2017 at 23:33

    That's why I usually try to supply the adc amplifier from VDDA so no matter what happens, the ADC can never get any voltage higher than VDDA.

    That requires of course to adjust the opamp gain accordingly. Maybe you don't even need an opamp? The appnote somewhere specifies the input current drawn from the ADC so you can calculate how many LSBs error you'd have to expect.

    Saves you the money and board space for the opamp and gets rid of the overvoltage issue.