2021-01-14 08:21 PM
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
2021-01-15 01:54 AM
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
2021-01-15 03:16 AM
> ... 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.
2021-01-27 02:24 AM
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.
2021-01-27 08:12 PM
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
2021-03-01 02:45 AM
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