WeatherDuino Forum

Full Version: CO² Calibration???
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Just been reading about in the Source code & saw this,
 
Code:
#if (CO2_SENSORTYPE != 0)
       server.on("/calib_CO2", HTTP_GET, calibrate_CO2);
    #endif

And then found it points to this,
 
Code:
//---------------------------------------------------------
//     Execute Forced CO2 Calibration Command
//---------------------------------------------------------
#if (ENABLE_WIFI == 1 && CO2_SENSORTYPE != 0)
  void calibrate_CO2()
  {
    String Data  = F("HTTP/1.0 200 OK\r\nContent-Type: text/html\r\nConnection: close\r\n");
    Data += F("\r\n\r\n");
    
    Data += F("<html><head><title>Air Quality Monitor</title>");
    Data += F("<meta http-equiv=\"Content-Type\" content=\"text/html;charset=UTF-8\">");  
    Data += F("<link rel=\"shortcut icon\" href=\"http://www.weatherduino.com/favicon.ico\" type=\"image/x-icon\" />");
    Data += F("<style type=\"text/css\">tab1 { padding-left: 1em; }</style></head>");    
    Data += F("<body bgcolor=\"#000000\">");
    Data += F("<table><tr><td width=\"800\" align=\"center\" bgcolor=\"#D2D2D2\">");
  
    Data += F("<h2>WeatherDuino<br>Air Quality Monitor III</h2><h3>");
    sprintf(CHAR_buf, "%d-%02d-%02d   %02d:%02d", timeinfo.tm_year +1900, timeinfo.tm_mon +1, timeinfo.tm_mday, timeinfo.tm_hour, timeinfo.tm_min);
    Data += CHAR_buf;
    Data += F("</h3></td></tr></table><br>");
      
    Data += F("<table><tr><td width=\"800\" bgcolor=\"#006666\">");
    Data += F("<font color=\"#D4FFFF\"><center><b>");
    Data += F("<br>FORCED CO2 CALIBRATION COMMAND EXECUTED<br><br>");
    Data += F("You can close this page now.<br>");    
    Data += F("</b><br><br></center></td></tr></table>");      
    Data += F("</body></html>");

    server.send(200, "text/html", Data);      
    Data = "";
  
    #if (CO2_SENSORTYPE == 1)
      SCD30sensor.setForcedRecalibrationFactor(408);
      delay(6);   // Minimum >3ms
    #endif

    #if (CO2_SENSORTYPE == 2)
      MH_Z19_ZerPointCal();
      read_Z19();
    #endif
          
  }
#endif

So I opened the URL 192.168.xx.xx/Calib_CO2 & see this,

[attachment=3097]

So what has that process actually done?
The device I executed it on has an SCD30, but also have another with an MH_19Z.

Is there any explanation posted anywhere or can you provide a basic outline.

Thanks

Phil
Hi Phill,

Usually for the SCD30 there is no need to perform a Forced Re-Calibration as the sensor is set by the software to do it automatically.
Take the opportunity to place a little explanation:

Forced Re-Calibration

This is the easiest approach. The SCD-30 is placed in an environment with a known CO2 concentration. Then the FRC routine is called and this known concentration value (in ppm) is supplied. But how do you come up with that known value? That is a caveat of this approach and Sensirion (see PDF linked above) suggests three approaches:

1- Using a separate secondary calibrated CO2 sensor to provide the value.
2- Exposing the SCD-30 to a controlled environment with a known value.
3- Exposing the SCD-30 to fresh outside air and using a value of 400 ppm.

Automatic Self-Calibration

The ASC feature has some requirements which should be considered to determine if it is suitable for any given end use application. If the conditions can not be met, then the FRC mentioned above should be used.

1- The SCD-30 should regularly be exposed to fresh air with CO2 concentration of 400 ppm.
2- The SCD-30 needs to operate in continuous mode, i.e. do not power it down.
3- The ASC needs 7 good readings separated by at least 18 hours (that's ~5 days).

FRC vs. ASC

Both the Forced Re-Calibration (FRC) and Automatic Self-Calibration (ASC) are ways of arriving at the same "Reference Value" which is then used in determining the CO2 ppm reading reported by the SCD-30. With the FRC approach, the Reference Value is specified. With the ASC approach, the Reference Value is determined algorithmically. Either one will overwrite the Reference Value from the other one. For example, running a FRC will immediately change to the new Reference Value. However, if ASC is enabled, then it may replace the Reference Value at a later time.


Regarding the MH-Z19, from time to time, specially if the outdoor CO2 readings are far from the expected values, a forced CO2 calibration may be helpful.
Any forced calibration should only be done after having the sensor exposed to fresh air for at least 20 minutes.


Rgs
Werk_AG