Electrical – How to calibrate Unipolar ADC in software

adcdspmicrocontroller

My ADC manufacturer have given the value of following error, value for Avrefm = 0V & AVREFP = 2.7V :–

  1. Zero-scale error
  2. Full-scale error
  3. Integral linearity error
  4. Differential linearity error

ADC electrical characteristics

what is Zero-scale error is given in this link :–
http://www.edn.com/design/test-and-measurement/4430080/Measure-an-ADC-s-offset-and-gain-error

As per this link, full scale error contains information about gain & offset error :–
https://www.maximintegrated.com/en/app-notes/index.mvp/id/641

Full-scale error = offset error + gain error

FSR = full scale voltage range :—

FSR = AVrefP - AvrefN

This link states that accuracy of the ADC can be derived from ADC Specifications :–
http://www.embedded.com/design/configurable-systems/4025078/Understanding-analog-to-digital-converter-specifications

The ADC specifications that describe this type of accuracy are offset error,
 full-scale error, differential nonlinearity (DNL), and integral nonlinearity
 (INL). These four specifications build a complete description of an ADC's absolute accuracy.

Atmel link says a lot about ADC errors :–
http://www.atmel.com/images/atmel-8456-8-and-32-bit-avr-microcontrollers-avr127-understanding-adc-parameters_application-note.pdf

I read many tutorials on google but none of the above link tells, how we can calibrate ADC in firmware?
Can we use these above data from manufacturer to calibrate my ADC in firmware ?
What exacltly is use of above ADC error data from manufacturer to end user ?

Or i have to use the technique mentioned in this link to calibrate Unipolar ADC for Gain error & offset error in firmware ?
http://www.microchip.com/forums/m391768.aspx

Please suggest i am bit confused.

Best Answer

What exacltly is use of above ADC error data from manufacturer to end user ?

A zero offset error of +/-0.25% in a full scale of (say) 2.5 volts means that a digital value of zero may be produced even when the input voltage is as high as +6.25 mV above 0V.

This tells me that I can't rely on the ADC converting accurately below this value.

The gain error of +/- 0.25% in a full scale of (say) 2.5 volts means, I can't rely on using the top 6.25 mV of the ADCs input range.

This means I have to restrict my signal to a range slightly less than 2.5 V.

Can we use these above data from manufacturer to calibrate my ADC in firmware ?

No you can't - you have to do it as a physical test for each ADC.