cancel
Showing results for 
Search instead for 
Did you mean: 

How to calibrate ADC value on STM32F413 series micro controllers ? There is so much noise without giving analog signal on analog pin ?

MGami.1
Associate III

I am getting so much noise on analog pin without connecting any analog signal. I also tried by changing analog pin but still i am getting so much of noise in analog pin. I am calculating analog value for 50 Hz signal.

Is there any way to calibrate STM32F413 micro controllers ?

Is there any mathematical calculation available for calibration of 50 Hz signal or to reduce noise from signal ?

Please help regarding above topic.

Thanks in advance.

1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Guru

There's no automatic calibration for the STM32F4 ADC.

Read this for tips to improve accuracy. In general, there is no silver bullet:

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

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

View solution in original post

6 REPLIES 6
TDK
Guru

There's no automatic calibration for the STM32F4 ADC.

Read this for tips to improve accuracy. In general, there is no silver bullet:

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

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

"I am getting so much noise on analog pin without connecting any analog signal" congrats, you have made your first antenna...

RMcCa
Senior II

Use a biquad bandpass filter.​

gregstm
Senior III

Even a simple RC filter will cut noise considerably to the ADC, but make sure the resistance is fairly low so that the ADC can work properly (check specs). You can even get away with having two RC filters in series if you choose your R values carefully.

hello @Community member​ 

Can i know which value of resister we have to choose? currently We have taken 1 RC filter and in that r = 1K and C = 22nF. Is it ok? And as you said on more RC filter required for noise reduction?

Ideally you would speak to an electronics engineer (or get a copy of the book "Active Filter Cookbook" by Don Lancaster). A low pass filter with R=1K and C=22nF has a corner frequency of over 7KHz. If you want to reduce the noise in a 50 Hz signal you will need a much larger capacitor eg. 1uF will give a corner frequency of 159Hz. If you want to put two RC filters in series, then usually you make the first R value 10 times less than the second R value. So you could try R1=100, C1=10uF, R2=1000, C2=1uF - both having a corner frequency of 159Hz. Increasing the R value will allow you to reduce the C values, but again, be aware of the ADC's requirements - meanwhile - this site looks pretty educational -

http://www.learningaboutelectronics.com/Articles/Low-pass-filter-calculator.php#answer1