Environmental monitoring with IoT


House dust is an asthma trigger. Pollution caused by dust particles causes respiratory illness in children and older people. Dust kicked up by vehicles moving on roads make up to 33 percent of  air pollution. Dust and pollution particles mix in the atmosphere and can travel for days across continents and countries before settling on the ground’s surface. People with heart or lung diseases and other chronic diseases are at increased risk from dust and particle pollution. Pollution can aggravate the disease. Let us create an  IoT based device to measure dust concentration so we can prevent respiratory illness by taking precautions.

Dust Sensor

This Dust Sensor gives a good indication of the air qualit is in an environment by measuring the dust concentration. The Particulate Matter level (PM level) in the air is measured by counting the Low Pulse Occupancy time (LPO time) ina given time unit. LPO time is proportional to PM concentration. This sensor can provide reliable data for air purifier systems; it is responsive to PM of diameter 1μm.

sensor

sensor

Features

  • Stable and sensitive detection of not only cigarette smoke but house dust which are indoor asthma triggers.
  • Air is self-aspirated with the current of air generation mechanism with a built-in heater.
  • Easy maintenance. High sensitivity lasts long term.
  • Dual output for the particle size over 1 micron and 2.5 micron (approx).
  • More compact and lighter, and easy installation.

Connections

  • Connect the Edison board to computer via USB cables.
  • Stack the grove base shield.
  • Plug in Grove Dust Sensor to D8 port of base shield.
  • Copy and paste the code in Arduino IDE.
  • Deploy it and monitor the results in serial monitor.

Code

  1. int pin = 8;
  2. unsigned long duration;
  3. unsigned long starttime;
  4. unsigned long sampletime_ms = 2000;//sampe 30s ;
  5. unsigned long lowpulseoccupancy = 0;
  6. float ratio = 0;
  7. float concentration = 0;
  8. void setup() {
  9.   Serial.begin(9600);
  10.   pinMode(8,INPUT);
  11.   starttime = millis();//get the current time;
  12. }
  13. void loop() {
  14.   duration = pulseIn(pin, LOW);
  15.   lowpulseoccupancy = lowpulseoccupancy+duration;
  16.   if ((millis()-starttime) >= sampletime_ms)//if the sampel time = = 30s
  17.   {
  18.     ratio = lowpulseoccupancy/(sampletime_ms*10.0);  // Integer percentage 0=>100
  19.     concentration = 1.1*pow(ratio,3)-3.8*pow(ratio,2)+520*ratio+0.62; // using spec sheet curve
  20.     Serial.print(“concentration = “);
  21.     Serial.print(concentration);
  22.     Serial.println(” pcs/0.01cf”);
  23.     Serial.println(“\n”);
  24.     lowpulseoccupancy = 0;
  25.     starttime = millis();
  26.   }
  27. }

sensor

Cautions

 

  • Please keep it upright.
  • 3 min preheat time is required while using for the first time.
  • Arbitrary operation may cause unexpected damage.
  • The onboard potentiometers are used only for the factory setting. Please do not change the default configuration.

Leave a comment

Your email address will not be published. Required fields are marked *