Go Down

### Topic: How to convert sensor readings to PPM? (Read 1 time)previous topic - next topic

#### vmandin

##### Nov 30, 2012, 08:54 am
Hi guys! I have a CO2 sensor that has an analog output voltage of 0-4V which corresponds to 0-2000 PPM.

How can I display the Correct PPM units? Im getting around 1.15V as the lowest value? How can I get around 400PPM?

Pls help

#### bubulindo

#1
##### Nov 30, 2012, 10:14 am
4V = 2000PPM
1,15 = X

X = (1,15 * 2000) / 4 = 575 PPM.

Do you have another instrument, preferably calibrated, to verify how much CO2 you actually have?
This... is a hobby.

#### vmandin

#2
##### Dec 02, 2012, 03:46 pm
No I dont have one. How is that formula youve given, translated into arduino code? Pls supply pseudo code sir.

#### AWOL

#3
##### Dec 02, 2012, 03:53 pm
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.
I speak for myself, not Arduino.

#### retrolefty

#4
##### Dec 02, 2012, 04:22 pm

Hi guys! I have a CO2 sensor that has an analog output voltage of 0-4V which corresponds to 0-2000 PPM.

How can I display the Correct PPM units? Im getting around 1.15V as the lowest value? How can I get around 400PPM?

Pls help

The map() function is your friend.
So something like this should work:

Code: [Select]
`rawReading = analogRead(sensorPin);ScaledReading = map(rawReading, 0, 820, 0, 2000);`

Go Up