2017-07-24 7:23 AM
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
2017-07-24 7:28 AM
You'd really want to design a circuit that doesn't violate the input specifications.
2017-07-24 7:30 AM
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 ...
2017-07-24 9:44 AM
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
2017-07-24 10:19 AM
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.
2017-07-24 2:25 PM
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
2017-07-25 2:41 AM
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
2017-07-25 4:25 AM
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
2017-07-25 5:19 AM
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
2017-07-25 10:21 AM
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