cancel
Showing results for 
Search instead for 
Did you mean: 

ADC Fluctuation

ytshin0877
Associate II

Hello,

I have a ADC clock running at 96MHz prescaler divided by 10, 12bit, Sampling time 47.5 Cycles. I am just trying to sample this DC volgtages.  I have a battery that has around 20Volts, and I am stepping this voltage down using the voltage divider as U8, U1, U2 to be sampled by the ADC. I have two ADC measuring BN, and Vref to measure the current across the 1Ohm resistor. I am getting consistently accurate values, but I have this random 5mv difference or 30mV spikes that happens out of no where. I am not sure how to fix this to improve my ADC resolution. Could you please give me an idea how to proceed? 

I really appreciate the time and effort for this matter

 

Thank you

ytshin0877_4-1758084688725.png

 

ytshin0877_0-1758083861526.png

ytshin0877_3-1758084135450.png

 

 

 

 

 

10 REPLIES 10
TDK
Super User

You will always have some amount of noise in the ADC reading. You can't get 12 noise-free bits from the STM32 ADC. It looks like you only get a few counts of noise which is about as good as you can do.

 

General tips for improving accuracy here:

How to optimize the ADC accuracy in the STM32 MCUs - Application note

If you feel a post has answered your question, please click "Accept as Solution".