Skip to main content
Visitor II
October 25, 2023
Question

stm32wb55 ADC read error

  • October 25, 2023
  • 2 replies
  • 1629 views

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?

    This topic has been closed for replies.

    2 replies

    Super User
    October 25, 2023

    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 .

    Visitor II
    October 25, 2023

    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.


    swamy_8065_0-1698248670709.png

     

    Super User
    October 25, 2023

    so try sampletime 160 cyc.

    +

    connect 100nF on adc-in to gnd .

    Visitor II
    March 14, 2024

    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.