This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nrf52840 saadc calibration error

After starting the program, I do the first calibration and read the data 30 times.
The standard deviation is between 2.0 and 2.3.

Perform 30 "Calibration -> Read Data" each time
The standard deviation is 3.8 to 4.7 degrees.

The offset varies with each calibration.
How can I minimize this?

I use the internal reference(0.6V) and 1/6 gain

Parents
  • Hi 

    I will help Stian out with this case. 

    Can you let me know how you calibrate the ADC and trigger the sample? 

    Are you able to share a code sample, or a reference to the code used?

    Best regards
    Torbjørn

  • I thought about additional correction methods.
    After executing nrfx_saadc_calibrate_offset(), it reads the analog pin set by pull-down and stores the value in cal_val.
    Ideally cal_val would be 0, but the value actually read is not 0.

    Now subtract the cal_val value every time adc sampling data is taken.
    In this way, more stable data with standard deviations of 1.63~2.6 were obtained.

    Is this the best?
    Please reply

  • Hi

    Yes, it is possible to do a manual offset calibration in the way that you describe. 

    The advantage of doing this is that you can sample the offset with higher resolution, and also sample multiple times and do averaging/filtering of the result in order to get a more reliable result. 

    If you run standard calibration for every sample it is expected that you will get higher standard deviation, since calibration is run at 10-bit only, and if the calibrated value keeps jumping between two calibration settings it can introduce noise to the measurements. 

    Normally it should only be necessary to recalibrate if you see a large change in temperature, so if possible you can also trigger calibration based on the temperature provided by the temp sensor in the nRF device. 

    Best regards
    Torbjørn

Reply
  • Hi

    Yes, it is possible to do a manual offset calibration in the way that you describe. 

    The advantage of doing this is that you can sample the offset with higher resolution, and also sample multiple times and do averaging/filtering of the result in order to get a more reliable result. 

    If you run standard calibration for every sample it is expected that you will get higher standard deviation, since calibration is run at 10-bit only, and if the calibrated value keeps jumping between two calibration settings it can introduce noise to the measurements. 

    Normally it should only be necessary to recalibrate if you see a large change in temperature, so if possible you can also trigger calibration based on the temperature provided by the temp sensor in the nRF device. 

    Best regards
    Torbjørn

Children
No Data
Related