cancel
Showing results for 
Search instead for 
Did you mean: 

How to get the best precision from ADC in stm32f103c8t6?

Zakba.1
Senior

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?

2 REPLIES 2
ONadr.1
Senior III
Since Vref is equal to Vda, it is imperative to ensure the perfect quality of this power supply. Furthermore, it is advisable to use an RC integrator on the analog input (if this will not have a negative effect on the speed of signal changes). And then it also depends on the design of the PCB around the analog signal path.
 
RomainR.
ST Employee

Hello @Zakba.1

I can suggest you to refer to AN2834, How to get the best ADC accuracy in STM32 microcontrollers.

https://www.st.com/resource/en/application_note/an2834-how-to-get-the-best-adc-accuracy-in-stm32-microcontrollers-stmicroelectronics.pdf

In addition, before starting ADC conversions, you should perform ADC calibration as described in RM0008 in section 11.4 and as explained by @ONadr.1be 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.