Shop OBEX P1 Docs P2 Docs Learn Events
calculate ppm of co2 module sensor — Parallax Forums

calculate ppm of co2 module sensor

ntrungtruc2003ntrungtruc2003 Posts: 2
edited 2011-03-05 13:29 in Accessories
Dear Sir
I have a CO2 module sensor(#27929)
I take the different voltages between P1 and P2 to display ppm

Following op-amp calculate:

Vtp1_tp2 = Vin*(R1+R2)/R1
R1 = 150k
R2=1M
Following chart datasheet MG811, I choose
10.000ppm <---> 0.264mV---->Vtp1_tp2=2.02V
400ppm <----> 0.323mV
>Vtp1_tp2=2.48V

It means we have two points to draw the linear scale ppm
y = -20869.562x + 52156.5112
y:ppm
x: voltages of Vtp1_tp2

when test with x=1 and x=3.35. I have the value is very large and very small
x=1 --->y = 31286.95ppm
x=3.35 --->y = -17756ppm
I think my calculating is wrong.

Can you give me an advice.
Thanks you so much

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2011-02-28 12:36
    TP1 is the output of the sensor buffer/amplifier. It's a voltage between 0V and around 3.35V. TP2 is just a ground connection.

    If your original calculations are correct (for Vtp1_tp2), then your formula may be correct. It may not be valid for voltages much more than 2.48V nor for voltages much below 2.02V. Look at the MG811 graphs. The output voltage of the sensor isn't going to be much below 0.250V nor above 0.350V.
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2011-02-28 14:09
    The sensor output is not linear. The mV output is proportional to the log of ppm (Nerst Equation, see equation from data sheet). Your linear equation will be correct at two points, but not at intermediate points and it will be way off for extrapolation.

    Also, there is lots of variation from sensor to sensor. The good folks on the Arliss project (Stamps-in-class forum) last year compared quite a few of them on one graph. I can't find that at the moment. The upshot is that each sensor has to be individually calibrated, at least one point (atmospheric).
    1024 x 370 - 55K
  • ntrungtruc2003ntrungtruc2003 Posts: 2
    edited 2011-03-04 20:21
    Nersnts' theory say that:

    EMF = E0 - R*T*logPco2/(2*F)

    Li2Co3----> 2Li+ + Co2 + 1/2O2 +2e- : E0 = 3.05
    2Na+ + 1/2O2 + 2e- ---->Na2O :E0 = -2.71
    LI2CO3 + 2Na+ ---->2Li+ + Na2O + CO2 :E0=3.05-1.71=0.34

    R gas constant = 8.31(volt-colomb/mol)
    F faraday =96500 colombs/mol
    E0=0.34
    PC02 ppm of CO2
    EMF (volts)
    T: absolute temperate(K)

    the result of co2 ppm
    PCO2 = 10exp(EMF*2F/(RT))

    The question is
    T is a surface temperature in MG811 or air temperature.
    If T is temperature in MG811 how can we measure it.

    thanks Tracy Allen. Arliss project help some helpful information.
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2011-03-05 13:29
    T would be the temperature at which the reaction occurs, that is, the MG811 sensor temperature. You can't measure it, I think, at least there is no way provided. The heater brings the temperature quite a bit above ambient without feedback. It will probably change some with ambient.

    Anyway, you can't use the formula directly. It will depend on calibration at a reference concentration. Say, ambient at ~390ppm or compared with a better instrument.
    Find EMFref at that reference concentration, Pco2ref, then when reading at a different concentration, (EMFx, Pco2x):
    EMFx - EMFref 
          = M * (log(Pco2x) - log(Pco2ref)) 
          = M * (log(Pco2x / Pco2ref))
    

    I rolled R*T and a fudge factor into the single constant M. If you do a single point calibration, assuming for example Pco2ref = 390 ppm in the atmosphere, then you can eyeball the slope of the graph in the MG811 data sheet (semilog graph of EMF against log ppm) and use that for M. Better, find a more concentrated CO2 source to use for a second calibration point or for a series of dilutions.
Sign In or Register to comment.