Skip to main content
Visitor II
October 23, 2024
Solved

OPAMP -> ADC continuous reads reduces value. Using STM32G473CCU

  • October 23, 2024
  • 2 replies
  • 924 views

Hi,

We made a board with STM32G473CCU and we are using OPAMP2 as follower internally connected to ADC2 to read a thermistor currently at 720mV. We find that the value given by ADC reduces if we read continuously and only becomes stable if we wait at least 2000ms between reads. Code summary:

ADC_Enable(&hadc2);

HAL_Delay(2000); // needed or read value reduces

HAL_ADCEx_Calibration_Start(&hadc2, ADC_SINGLE_ENDED);

HAL_ADC_PollForConversion(&hadc2, 2000);

debug1 = 3300 * HAL_ADC_GetValue(&hadc2) / 0xFFF;

With 2000ms or more wait between reads we get ~1730mV, with more regular reads this drops and with continuous mode it drops to 60mV

We also found that 2450 - debug1 gives a reasonable reading with 2000ms delay in-between.

Why does the voltage of ADC drop when reading regularly despite the opamp buffer?

Thanks

    This topic has been closed for replies.
    Best answer by MasterT

    Post op-amp initialization code, is it started?

    2 replies

    MasterTAnswer
    Explorer
    October 23, 2024

    Post op-amp initialization code, is it started?

    Visitor II
    October 24, 2024

    Indeed we missed HAL_OPAMP_Start(&hopamp2);

    It works fine now!

    Thank you!