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);
}
}