Hello everyone,
I am working on a project using the STM32F030C6
https://www.st.com/en/microcontrollers-microprocessors/stm32f030c6.html microcontroller to measure mains RMS voltage. The voltage divider output is connected to the ADC (channel 0 pin), and I am taking 800 samples at a 125µs interval to calculate the RMS value.
The issue I am facing is that after restarting the microcontroller, the ADC readings seem to deviate, which impacts the accuracy and precision of the RMS voltage calculation. Here's what I have tried so far:
1) ADC Calibration: I perform ADC calibration on power-up in my code.
2)Increased ADC Sampling Time: I changed the ADC sampling time from 1.5 cycles to 71.5 cycles, but this did not resolve the issue.
Despite these steps, the problem persists. My question is:
1) Could this issue be related to my schematic?
2) What other potential causes or troubleshooting steps should I consider for stabilizing the ADC values?
Thank you for any insights or suggestions!
Schematic:
