0

I bought an FC-22 (MQ135) gas sensor module which I plugged into my Arduino Uno. I connected it to the A0 analog port. Then created a code that reads the raw data from A0 (code below).

When I run the code on my Arduino Uno in my house I get values of about 30. If I blow over the sensor I get values until about 160. My question is now how I have to read / interpret these values.

According to the MQ135 specifications the sensor has a sesitivity for air quality, measuring benzene, alcohol and smoke.

How can I interpret the values I get? What is a good value and what isn't? Do I have to calculate something out of these values?

My code looks like this:

void setup() {
  Serial.begin(9600);
  pinMode(13, OUTPUT);
}

void loop() {
  int sensorValue = analogRead(0);
  Serial.print(sensorValue, DEC);
  delay(100);
  if (sensorValue > 50) {
    digitalWrite(13, HIGH);
  }
  else {
    digitalWrite(13, LOW);
  }
}
  • any reference for co2 calibration? – manish Nov 17 '17 at 6:43
  • @manish As for now the only info I have is from the answer below in the datasheet of the MQ135. – Socrates Nov 17 '17 at 23:35
2

According to the datasheet you have to calibrate it.

  • Thanks for the link to the datasheet. Yep, at the end of the document indeed it says to calibrate the sensor to either 100ppm NH3 or 50ppm Alcohol. Unfortunately, I haven't got the tools to create an atmosphere with these contents. Furthermore, I'd be more interested in CO2 values, even if I didn't state that in the initial question. – Socrates Nov 17 '17 at 23:34
  • @Socrates Any update on CO2? I'm struggling with it. Could you please help me out? – Aditya Ponkshe Jul 24 '18 at 6:12
  • @AdityaPonkshe I haven't got any update on this yes, sorry. Please post it here, if you get it running. – Socrates Jul 24 '18 at 9:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.