Hi guys,
so basically I'm doing a school project in which one of the components require me to use carbon dioxide sensor to sense the amount of carbon dioxide that a person is breathing out. As such, i recently purchase a CO2 sensor from DFRobot, where the model is SEN0219.
link --> https://www.dfrobot.com/wiki/index.php/Gravity:_Analog_Infrared_CO2_Sensor_For_Arduino_SKU:_SEN0219
Thus, as soon as i got the sensor, i had follow the tutorial as posted by the website (above link) for the setup and the coding (setup is done through direct connection to arduino nano 5v, ground, and A0 instead of a expansion board) (code is copy and paste).
But however, after the preheat time of 3 mins as stated and after running the sensor for more than 4 hours, the readings i got from the serial monitor are way off the chart. where the readings are hovering at about 1500 ppm on average. But however, it is known that typical acceptable CO2 levels are 350 - 800 ppm (image attached), thus the reading is wrong given since that I'm in a well ventilated room. i have also tried out in a open area outside my house.
So i would like to know what is the problem? isnt the sensor accuracy problem? or isnt the coding issue? or perhaps the way i set up the device is wrong
by the way, i have also notice that when i blow onto the CO2 infrared sensor, the readings from the sensor stay stagnant for quite awhile, approximately 5 to 10 secs, before the values start to increase. Are infrared sensor suppose to react this way? cause from what i believe, the readings from infrared sensor should quickly increase as soon as i blow into it, as compared to those chemical sensor such as MG811 carbon dioxide sensor.
Side note:
1) it was stated in the website that when the CO2 sensor get 5V power supply, it will output 0.4~2V analog value, corresponding to 0~5000 ppm, and when the sensor finds faults during the self-checking process, it will output 0V.
2) the code that i gotten from the website is:
3) attached images are the setup, readings I've got, and other relevant images
so basically I'm doing a school project in which one of the components require me to use carbon dioxide sensor to sense the amount of carbon dioxide that a person is breathing out. As such, i recently purchase a CO2 sensor from DFRobot, where the model is SEN0219.
link --> https://www.dfrobot.com/wiki/index.php/Gravity:_Analog_Infrared_CO2_Sensor_For_Arduino_SKU:_SEN0219
Thus, as soon as i got the sensor, i had follow the tutorial as posted by the website (above link) for the setup and the coding (setup is done through direct connection to arduino nano 5v, ground, and A0 instead of a expansion board) (code is copy and paste).
But however, after the preheat time of 3 mins as stated and after running the sensor for more than 4 hours, the readings i got from the serial monitor are way off the chart. where the readings are hovering at about 1500 ppm on average. But however, it is known that typical acceptable CO2 levels are 350 - 800 ppm (image attached), thus the reading is wrong given since that I'm in a well ventilated room. i have also tried out in a open area outside my house.
So i would like to know what is the problem? isnt the sensor accuracy problem? or isnt the coding issue? or perhaps the way i set up the device is wrong
by the way, i have also notice that when i blow onto the CO2 infrared sensor, the readings from the sensor stay stagnant for quite awhile, approximately 5 to 10 secs, before the values start to increase. Are infrared sensor suppose to react this way? cause from what i believe, the readings from infrared sensor should quickly increase as soon as i blow into it, as compared to those chemical sensor such as MG811 carbon dioxide sensor.
Side note:
1) it was stated in the website that when the CO2 sensor get 5V power supply, it will output 0.4~2V analog value, corresponding to 0~5000 ppm, and when the sensor finds faults during the self-checking process, it will output 0V.
2) the code that i gotten from the website is:
Code:
int sensorIn = A0;
void setup(){
Serial.begin(9600);
// Set the default voltage of the reference voltage
analogReference(DEFAULT);
}
void loop(){
//Read voltage
int sensorValue = analogRead(sensorIn);
// The analog signal is converted to a voltage
float voltage = sensorValue*(5000/1024.0);
if(voltage == 0)
{
Serial.println("Fault");
}
else if(voltage < 400)
{
Serial.println("preheating");
}
else
{
int voltage_diference=voltage-400;
float concentration=voltage_diference*50.0/16.0;
// Print Voltage
Serial.print("voltage:");
Serial.print(voltage);
Serial.println("mv");
//Print CO2 concentration
Serial.print(concentration);
Serial.println("ppm");
}
delay(100);
}
Attachments
-
10.8 KB Views: 3
-
27.4 KB Views: 3
-
42 KB Views: 4
-
37.9 KB Views: 4
-
38.6 KB Views: 5
-
37.4 KB Views: 3
-
202.1 KB Views: 4
-
178.3 KB Views: 4