Converting MQ-135 output to understandable AQI

I used this code for driving my MQ-135 :

#define SENSOR_PIN 9 

void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600); 
  Serial.println("Welcome to home AQI station!");

}

void loop() {
  // put your main code here, to run repeatedly:
  int aqi = analogRead(SENSOR_PIN); 
  delay(5000); 
  Serial.print("Air Quality Index: ");
  Serial.print(aqi, DEC); 
  Serial.print(" PPM");

  if(aqi < 500){
    Serial.println(", Fresh Air");
    } else if(aqi > 500 && aqi <= 1000){
      Serial.println(", Poor Air");
    } else if(aqi > 1000){
      Serial.println(", Very Poor"); 
      }

}

And I got these results (image attached). But I found in Iran, we use similar indexing system as China and India (which is not surprising, as most of air-quality monitoring equipment imported from China) and I’m curious how can I convert these, into those type of ranges.

photo_2019-12-29_03-41-39.jpg

The MQ-135 can inform you that the concentration of one or more of several gases in the environment has changed, but not which gas(es). The measurement is not quantitative.

One could interpret such a change to mean that "air quality" has changed.

Be sure to burn in the sensor for 48-72 hours. It is a good idea to test or calibrate the sensor using a known concentration of one of the indicated gases or air contaminants, as described in the data sheet.

yeah. Ironic i was planning a montioring sys today and came to ask... umm, but if you use several sensors and calculate the curves for every gas and track each one u can figure what gas it is.

That would only work if you can be sure the reading is due to one and only one gas all sensors are sensitive to. The moment there are two or more gases in the mix (as with typical ambient air) all bets are off.

Proper AQI calculation requires the individual detection of various gases such as ozone and NOx, but also the PM50 solid particles measurement.

You're not going to get anything resembling an AQI reading with a few cheap sensors. Those MQ type sensors are probably best used as alarm for situations where a gas leak may occur, and where you don't care too much about the concentration and it's very unlikely to see much of any of the other gases that the sensor reacts to.

Yeah... Can't think clearly...

My example works to estimate one gas at best... I really want H2S, cl, and co, and methane. Since somefloat and others heavy it'd be in ac return duct since it's vents pull from low and high.

When there are air currents I wouldn't be too sure about them floating high or low. Gases do tend to mix quite easily.

wvmarle:
That would only work if you can be sure the reading is due to one and only one gas all sensors are sensitive to. The moment there are two or more gases in the mix (as with typical ambient air) all bets are off.

Proper AQI calculation requires the individual detection of various gases such as ozone and NOx, but also the PM50 solid particles measurement.

You're not going to get anything resembling an AQI reading with a few cheap sensors. Those MQ type sensors are probably best used as alarm for situations where a gas leak may occur, and where you don't care too much about the concentration and it's very unlikely to see much of any of the other gases that the sensor reacts to.

with burn in, Ro calibration, known ppm calibration... I don't know. PCA or an algorithm known as Principal component analysis seems to have produced concns in experiments w/ MOS sensors with decent results.

I need to learn feature extraction, normalization, & recognition...