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);
  }
}
2
  • any reference for co2 calibration?
    – manish
    Commented Nov 17, 2017 at 6:43
  • @manish As for now the only info I have is from the answer below in the datasheet of the MQ135.
    – Socrates
    Commented Nov 17, 2017 at 23:35

1 Answer 1

2

According to the datasheet you have to calibrate it.

3
  • 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
    Commented Nov 17, 2017 at 23:34
  • @Socrates Any update on CO2? I'm struggling with it. Could you please help me out? Commented Jul 24, 2018 at 6:12
  • @AdityaPonkshe I haven't got any update on this yes, sorry. Please post it here, if you get it running.
    – Socrates
    Commented Jul 24, 2018 at 9:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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