Author Topic: How to calculate calibration coefficient for PIC18 ADC  (Read 1165 times)

0 Members and 1 Guest are viewing this topic.

Offline sangarTopic starter

  • Regular Contributor
  • *
  • Posts: 125
  • Country: in
How to calculate calibration coefficient for PIC18 ADC
« on: August 04, 2017, 01:25:46 pm »
Hello all,

I have PIC18.With the ADC of PIC18, I am measuring sensors.Right now, I am doing this without calibration.For doing calibration, I don't have very accurate voltage source to apply full scale voltage and Zero scale voltage.
Q1:Is there any other way to do this ?
Q2:How should apply calibration coefficients on Sensor readings? suggest formulas..



Thanks,
Sangar
« Last Edit: August 04, 2017, 01:54:38 pm by sangar »
 

Offline Kalvin

  • Super Contributor
  • ***
  • Posts: 2145
  • Country: fi
  • Embedded SW/HW.
Re: How to calculate calibration coefficient for PIC18 ADC
« Reply #1 on: August 04, 2017, 02:19:04 pm »
You do not need an accurate voltage source, but you need a stable voltage source whose voltage you know. Just use a regular multimeter to measure the voltage and use that value as your reference voltage. Probably PIC18 contains some sort of internal reference and you can use that as a reference voltage after you have calibrated that with your multimeter using known voltage.
 

Offline alm

  • Super Contributor
  • ***
  • Posts: 2881
  • Country: 00
Re: How to calculate calibration coefficient for PIC18 ADC
« Reply #2 on: August 04, 2017, 02:26:46 pm »
You could generate two voltages within range of your ADC input. Measure the voltage with your DMM, then with the ADC, and record the results from both. From these point you can find a linear equation that gives you offset and gain (or zero point and full scale point). As Kalvin says, the voltages do not have to be accurate (it could be 1.232 V and 4.129 V for all you care), as long as they are stable for the few minutes it takes to measure them with a DMM and ADC. Batteries could work for this. One AA/AAA battery for 1.something V, and three in series, or a CR2032 3V lithium battery, for approximately 3 V.

Offline fourtytwo42

  • Super Contributor
  • ***
  • Posts: 1185
  • Country: gb
  • Interested in all things green/ECO NOT political
Re: How to calculate calibration coefficient for PIC18 ADC
« Reply #3 on: August 04, 2017, 02:58:40 pm »
The first question I would ask is where are you deriving the ADC reference from and what is it's accuracy as this will have a marked effect on calibration.
Second question, whats your source impedance.
Third question if you are selecting among channels is your acquisition time within specification.

 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf