Skip to main content
GAGGA.1
Associate III
January 15, 2021
Question

How to achieve ADC accuracy?

  • January 15, 2021
  • 5 replies
  • 2158 views

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

This topic has been closed for replies.

5 replies

ST Technical Moderator
January 15, 2021

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

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks
Ozone
Principal
January 15, 2021

> ... 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.

ST Technical Moderator
January 27, 2021

​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.

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks
GAGGA.1
GAGGA.1Author
Associate III
March 1, 2021

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

GAGGA.1
GAGGA.1Author
Associate III
January 28, 2021

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