Hackster is hosting Hackster Holidays, Finale: Livestream & Giveaway Drawing. Watch previous episodes or stream live on Tuesday!Stream Hackster Holidays, Finale on Tuesday!
Abid hossain
Published © GPL3+

Long term dust monitoring system

Monitor the surrounding dust and large particle (>0.5µm) for long time using Blynk IOT and plot the data for further research.

IntermediateFull instructions provided3 hours8,080
Long term dust monitoring system

Things used in this project

Hardware components

Arduino UNO
Arduino UNO
×1
ESP8266 ESP-01
Espressif ESP8266 ESP-01
×1
SHARP GP2Y1014AU0F Dust Sensor
×1

Software apps and online services

Arduino IDE
Arduino IDE
Blynk
Blynk

Hand tools and fabrication machines

Breadboard, 270 Pin
Breadboard, 270 Pin
Soldering iron (generic)
Soldering iron (generic)
Premium Female/Male Extension Jumper Wires, 40 x 6" (150mm)
Premium Female/Male Extension Jumper Wires, 40 x 6" (150mm)

Story

Read more

Schematics

Dust_density monitor

Code

Dust_density monitor

Arduino
#define BLYNK_PRINT Serial
#include <ESP8266_Lib.h>
#include <BlynkSimpleShieldEsp8266.h>
#include <SimpleTimer.h>

char auth[] = "fI1Hhyw20XUE7WmUhcJhJ_QAFHVYkPxQ";  //The authentication token send to your email 
//Your WIFI credentials
char ssid[] = "ABID";                             
char pass[] = "8901234567";

#define ESP8266_BAUD 115200    
ESP8266 wifi(&Serial);

int SensorPin = A5;
int led = 7;  
float SensorOut = 0;
float SensorVo = 0;
float Dust = 0;
float Voltage_noDust = 0.12;      //calibrate by changing this
float K = 0.5;                    //Sensitivity from the datasheet 0.5V/ugm/m^3
SimpleTimer timer;

void sendSensor(){  
  digitalWrite(led,LOW);                     //turning on the led
  delayMicroseconds(280);                    //wait for 0.28ms
  SensorOut = analogRead(SensorPin);         //read the sensor output voltage
  delayMicroseconds(50);                     //wait for 50us
  digitalWrite(led,HIGH);                    //turning off the led
  delayMicroseconds(9670);                   //wait for (10000-280-50)=9670us
  SensorVo = SensorOut*(5.0/1024);           //calculating sensor output voltage
  Dust = (SensorVo-Voltage_noDust)*100/K;    //calculating Dust density(ugm)/m^3
 
  if ( Dust < 0)
  {
    Dust = 0.00;
  }
  Blynk.virtualWrite(V1,Dust);  //sending data to the cloud
}

void setup()
{
 pinMode(led,OUTPUT);
 Serial.begin(115200);
 delay(10);
 Serial.begin(ESP8266_BAUD);
 delay(10);
 Blynk.begin(auth, wifi, ssid, pass);
 timer.setInterval(1000L, sendSensor);     //set timer interval of 1s
}

void loop()
{
 Blynk.run();
 timer.run();
}

Credits

Abid hossain
4 projects • 50 followers
Student of BSEEE in United International University, Bangladesh. Loves to learn and make new stuff.

Comments