2023-07-09 10:35 PM
I am using ADC to read a potentiometer . every time I read 20 data and calculate the average to get a better result. Although the voltage on the ADC pin is stable, the ADC result is not. the final result will be acceptable by reading 100 data each time and calculating the average but it is too slow for my application. How can I get a stable and fast result from ADC?
2023-07-10 01:56 AM
2023-07-10 02:12 AM
Hello @Zakba.1
I can suggest you to refer to AN2834, How to get the best ADC accuracy in STM32 microcontrollers.
In addition, before starting ADC conversions, you should perform ADC calibration as described in RM0008 in section 11.4 and as explained by @ONadr.1, be sure the VDDA voltage is stable using recommended decoupling schematic.
Best regards,
Romain,
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.