Measuring Dust Concentration - 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.    
  9. void setup() {  
  10.   Serial.begin(9600);  
  11.   pinMode(8,INPUT);  
  12.   starttime = millis();//get the current time;  
  13. }  
  14.    
  15. void loop() {  
  16.   duration = pulseIn(pin, LOW);  
  17.   lowpulseoccupancy = lowpulseoccupancy+duration;  
  18.    
  19.   if ((millis()-starttime) >= sampletime_ms)//if the sampel time = = 30s  
  20.   {  
  21.     ratio = lowpulseoccupancy/(sampletime_ms*10.0);  // Integer percentage 0=>100  
  22.     concentration = 1.1*pow(ratio,3)-3.8*pow(ratio,2)+520*ratio+0.62; // using spec sheet curve  
  23.     Serial.print("concentration = ");  
  24.     Serial.print(concentration);  
  25.     Serial.println(" pcs/0.01cf");  
  26.     Serial.println("\n");  
  27.     lowpulseoccupancy = 0;  
  28.     starttime = millis();  
  29.   }  
  30. }  
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.
Read more articles on Internet of Things (IoT):

Up Next
    Ebook Download
    View all
    Learn
    View all