STM32F1 ADC Weirdness
That one had me scratching my head for a while.
Depending on the speed of the ADC, there is a small current being eaten by the ADC itself,
in the range of 0.5uA to 3 uA.
Why is that a problem ?
1- It happens even if the ADC is not sampling, which is really weird. When using high current ( a few mA), it is not visible at all.
2- But when using a large resistor (i.e. 300kOhm), that small current is enough to cause a voltage drop of sever tenth of a volt, ruining the measures.
For reference, with the 300 kOhm (or 2x300 kOhm) the current is ~ 10 uA (or 5uA) , so a ADC leaking 2uA is not neglectable at all.
At the fastest speed (worse effect), it causes the capacitor to cap at 3v (or 2.5v) rather than ~3.3v which ruins the estimation.
To confirm, i cut the ADC wire and voila, back to ~ 3.3 v
The estimation of the current is as follows (the different rates/scales of the ADC clock can yield different result for the same sampling period) :
I really dont understand why.
Oh well, time to put a small op-amp in the middle as a follower and hope it will not cause more problems than it solves.
Let's try first with a LMV324i to avoid messing with 5v and voltage inverter.
Edit : did a quick test with LMV324i, seems to work fine
Does the GD32F1 ADC also draw some current? Thanks for your work and posts on the STM32 component tester. I am looking forward to try it!
ReplyDeleteyes, it is due to the way it works i.e. charge an internal cap , disconnect, then measure that cap.
ReplyDeleteThat cap is very small ( a few pF) but depending on what you do, it might be a problem if a very small current is a problem.
in other words : GD32F1, GD32F3 and STM32F1 all behave the same, just the internal cap differs a bit
ReplyDelete