# How to calibrate Unipolar ADC in software

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

what is Zero-scale error is given in this link :--

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


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.


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.

• I see you are on windows so I suggest you to use built in Snipping Tool to create screenshots. Also links can be embedded which is useful if you do not want your question to look like a mess. Sep 29, 2016 at 11:45
• Or just use ALT+Print Screen, which makes a picture of the current window.
– JRE
Sep 29, 2016 at 11:50

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.

• So i should follow same process as in this link microchip.com/forums/m391768.aspx ? Sep 29, 2016 at 14:38
• Yes, you need to calculate offset and gain constants that you use to modify the raw ADC values to make them more accurate. But, be aware of INL - it can "bulge" out (or in) the linearity of the device and cause another error. In your case, +/-3.5 LSBs (in 10 bits) is an error of 0.35% and bigger than either the zero or gain error specified in your picture. If you are concerned about zero or gain then you have to be concerned about INL and this needs a more thorough calibration across the whole range - almost a value-by-value look-up table. Sep 29, 2016 at 14:51
• Thanks for your reply .. is it 0.35% of Avrefp (as INLis the max deviation of an ADC's transfer function from a straight line)...please can you edit your reply to give an example.. how to create value by value look up table using INL & gain & offset error ? Sep 29, 2016 at 17:22
• I don't use a look up table so I'm unsure what it is you want. I just use the numbers in the data sheet and add up the potential errors based on what input voltage span the ADC uses. Sep 29, 2016 at 17:34