cancel
Showing results for 
Search instead for 
Did you mean: 

How to achieve ADC accuracy?

GAGGA.1
Associate II

Hi!

I am using STM32F373RCT6 in custom board. I have used internal SAR ADC channel numbers 0, 2 & 14 at ADC clock frequency 14MHz and configured regular channels for conversion sample time 1.5 samples for power monitoring. I need an accuracy of 1mv.

Currently there is an non linear error of 20 to 60mv.

Kindly suggest any best way to achieve accuracy of 1mv. I have multiple custom boards.

Will the same calibration data work for all boards? My client needs only one firmware and accuracy should come in all boards with same firmware code.

If any other information required, please let me know.

Regards,

Gaurav

5 REPLIES 5
Imen.D
ST Employee

Hello @GAGGA.1​ ,

I advise you to have a look at this application note AN2834, How to get the best ADC accuracy in STM32 microcontrollers.

This ADC document aim is to help understand ADC errors and explain how to improve ADC accuracy.

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
Ozone
Lead

> ... and configured regular channels for conversion sample time 1.5 samples for power monitoring.

First, use the longest possible sampling time your application allows.

It seems you are not quite aware of a SAR's working principle.

> Will the same calibration data work for all boards?

Calibration is internal, as a functionality of the ADC peripheral.

Run the same code, and each board is individually calibrated.

Imen.D
ST Employee

​Hi @GAGGA.1​ ,

Do you have still this problem to solve?

If you still need help, feel free to ask your question in more detail.

Do not hesitate to share the solution you found.  Then, please mark the reply as Best answer, by clicking on the "Select as Best" button.

This can be very helpful for Community users to find this solution more quickly.

Thanks by advance

Imen.

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
GAGGA.1
Associate II

Hi @Imen DAHMEN​ ,

I am unable to check due to non availability of hardware. Still this problem is open. I will update the solution once I will check with hardware.

Thanks,

Gaurav

As of now, I have done internal calibration and +- 5mv error is there without any average and with sampling time 1.5 cycles of ADC clock.

After taking average of 200 samples and sampling time of 239,5 cycles of ADC clock, error has came down to +-0.5mv.

In achieving the ADC accuracy, these three steps are very useful. Moving average is very useful in ADC accuracy. I have not used moving average as of now.

Regards,

Gaurav