PIC16F887 ADC calibration

Discussion in 'General Electronics Chat' started by buzaiandras, Jun 18, 2012.

  1. buzaiandras

    Thread Starter Member

    Jul 18, 2011
    54
    0
    Hi,

    Is there any way to get rid of the ADC errors (offset, gain, etc ...) for the PIC16F887 micro-controller (I am referring to the built in ADC )?
    How can the ADC for this device be calibrated to be as accurate as possible?

    Thank you,

    Buzai
     
  2. crutschow

    Expert

    Mar 14, 2008
    12,973
    3,219
    You apply a known range of voltages to the input (using an accurate digital voltmeter to determine the voltage value) and then use that to generate a calibration table that is stored in the PIC to correct the voltage readings the PIC converter generates. You extrapolate between voltage levels to generate the correction factor for any particular input voltage.
     
  3. buzaiandras

    Thread Starter Member

    Jul 18, 2011
    54
    0
    Hi,

    Isn't this method temperature dependent?
    Are there any other methods?

    Thank you,

    Buzai.
     
  4. colinb

    Active Member

    Jun 15, 2011
    351
    35
    That is going to be the basic idea for any calibration method. Sure, it will be somewhat temperature dependent but that inherent in the ADC itself. It should still be an improvement over the uncalibrated performance. And, you could add a discrete temperature sensor to do temperature compensation as well if you want to improve performance over a wider temperature range. If you really want more accuracy, you may need to consider an external I2C/SPI ADC.
     
  5. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    Since you asked I guess you have some problems with your setup. Perhaps it is better to tell us what these problems are. All ADCs have some inherent noise problems. The output will always flicker some. Around 1 to two LSB
     
  6. buzaiandras

    Thread Starter Member

    Jul 18, 2011
    54
    0
    No problems :). I am just interested in learning about the calibration of ADC modules from micro-controllers. I just picked the PIC16F887 randomly.

    Thank you,

    Buzai
     
  7. takao21203

    Distinguished Member

    Apr 28, 2012
    3,577
    463
    The reference voltage is important here. If you rely on the Vcc, you won't even get 8 bits resolution.

    One simple reference voltage source for instance is a 78l05 with voltage divider.

    So the first step for better accuracy is to improve the voltage reference.

    If you use switching regulators for supply you also may need an extra LC filter before the PIC.
     
Loading...