2023-10-25 08:09 AM - edited 2023-10-25 08:10 AM
Hi all,
I am using an stm32wb55 neucleo board for a wearable based project. I am using ADC1-IN1 to read the adc raw value from MCU pin PC0 of wb55 board. A voltage divider circuit was connected to scale down the BAT voltage from (4.2-3.7) to (1.8-1.585).
Vref = 3.3v.
Below are readings i got
BAT ADC_BATT read_raw
0 0 1420 ( Expected = 0 )
3.7 1.577 2030 ( Expected = 1960 )
4.2 1.8 2120 ( Expected = 2230 )
Is there any way to rectify this?
2023-10-25 08:16 AM
1. did you run adc calibration ?
2. impedance of divider high? use long sampling time for adc.
3. connect 100nF on adc-in to gnd .
2023-10-25 08:45 AM
1. Yes, Calibration is done.
2. Yes, 100k and 75k resistors in dividor network.
sampling time : ADC_SAMPLETIME_12CYCLES_5
3. There are decoupling capacitors mounted to Vref+ pin.
2023-10-25 09:03 AM
so try sampletime 160 cyc.
+
connect 100nF on adc-in to gnd .
2024-03-14 07:47 AM
Hi, did you find a solution for this? I am having the same problem with a STM32WB55RGV7. I have two ADC channels connected to ground and they read diferent values. One reads 1491mv and the other one 1048mv.