1
Frequently Asked Questions / Re:How to scale an analog input data
« on: March 12, 2004, 08:56:15 PM »
I just posted in "Technical" about a sensor that has a 32 to 200 Deg. F range. This is what I know about scaling I hope it helps.
We know that our ADC is 0-5volts and will send a count of 0 to 4092
So a 5 volt signal will be counted as 4092, and 0 volts will be a count of 0. Lets say our sensor outputs a signal thats proportional to temp. say .010v per'F and at 32 DegF we have an output of .32 volts.......... (.32 / .010v)=32'F and 200'F is an output, from the sensor, as 2 volts.......(2/.010v)=200'F
|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 .32v 2v 5v ' ADC volts
| |
0 261 1637 4092 ' Converter count
[-- Our Sensor--]
In order to get the Converter count of 261 and 1637 I use the formula
count=4092/5*ADC(voltage)
So count=4092/5*.32
count=818*.32
count=261
Once you have your converter counts then use the above formulas to read temps. EG. temp=168*(ADC(n)-261)/1376+32
This is how I do it, keep in mind I'm no engineer and self taught.
We know that our ADC is 0-5volts and will send a count of 0 to 4092
So a 5 volt signal will be counted as 4092, and 0 volts will be a count of 0. Lets say our sensor outputs a signal thats proportional to temp. say .010v per'F and at 32 DegF we have an output of .32 volts.......... (.32 / .010v)=32'F and 200'F is an output, from the sensor, as 2 volts.......(2/.010v)=200'F
|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 .32v 2v 5v ' ADC volts
| |
0 261 1637 4092 ' Converter count
[-- Our Sensor--]
In order to get the Converter count of 261 and 1637 I use the formula
count=4092/5*ADC(voltage)
So count=4092/5*.32
count=818*.32
count=261
Once you have your converter counts then use the above formulas to read temps. EG. temp=168*(ADC(n)-261)/1376+32
This is how I do it, keep in mind I'm no engineer and self taught.