cancel
Showing results for 
Search instead for 
Did you mean: 

Current sensitivity for Analog input

SBaro.11
Associate III

Hi all,

I'm working with an STM32WL and I'm looking for an information I can't found. I have a voltage divider with 2 resistors to meseaure the battery voltage. I'd like to know what is the minimum current that the stm32wl can have on an analog input pin ?

For the moment my resistors are higt (1,5M et 2,2m do current is low for 5v max in enter)

 

Thanks

6 REPLIES 6
RhSilicon
Lead

It must be described in the STM32 datasheet in question:

"I/O input leakage current"

STM32_input_leakage_current.png

 

TDK
Guru

It depends on how long the sampling capacitor will take to charge up. Generally, max impedance of around 1 MΩ. Slowing down ADC clock and increasing sampling time will help.

TDK_0-1691408678167.png

RADC, CADC and RAIN can be found in the datasheet.

If you feel a post has answered your question, please click "Accept as Solution".
ONadr.1
Senior III

For measuring almost static voltages from the battery, it helps a lot if you connect an auxiliary capacitor of approx. 1uF-10uF between the analog pin and GND. This will help cover the current between the internal CADC and the voltage on the divider at the time of sampling. The resistors can then be large enough, but you have to wait for the first measurement until the auxiliary capacitor is charged.

SBaro.11
Associate III

Nice thanks a lot for all answers. :grinning_face:

Good idea, I think I'll add a capacitor between ground and analog pin input. I don't need a big sample rate, I'll check my battery level every 2 minute I think...

LCE
Principal

Check the STM ADC input impedance, it's might be quite low (from a mega ohm standpoint ;) ), so you have check how your resistive divider is influenced by that.