Sunday, December 2, 2018

IoT Based Air Pollution & Gas Sensor Values Detection

Abstract: In this project we are going to use MQ-02 Sensor module to to detect the values of smoke and LPG in the air. This sensor module utilizes an MQ-02 as the sensitive component and has a protection resistor and also adjustable resistor on board. The MQ-02 sensor is sensitive to LPG, i-butane, propane, methane, alcohol, hydrogen and smoke. The resistance of the sensor changes as the concentration of the gas changes.



Server: In this project, we are sending the reading of sensor to the Android Application through the Google Firebase Database. Firebase is a mobile and web development platform developed by Firebase, inc in 2011. The real time database shows the data in real time in app.

Firebase Database

MQ-02 Sensor: The protection resistor (4.7Kohms) and the adjustable (0-50Kohms) are in serial which forms a load resistor RL (4.7-54.7Kohms). The sensor’s resistance RS and RL forms a voltage divider. The output voltage on the signal pin could be read by Arduino or MCU via ADC.  Given a value of RL , Power Supply Voltage, and output voltage, RS could be derived.  Based on the chart provided in the MQ-2 datasheet, RS in clean air under given temperature and humidity is a constant,which is the “initial” resistance of the sensor named RO. RO of the resistor could be derived from RS. The main job of the calibration is to calculate the RO by sampling and averaging the readings when the module is placed in the clean air. Once the RO is derived, the concentration of target gas could be calculated by using the RS/RO ratio as the input. To achieve more accuracy, a segmented look-up table should be used. However, in the demonstration, a linear formula is used as an approximation to the original curve.


Components:
  1. NodeMCU
  2. BreadBoard
  3. MQ-02 Sensor
  4. USB Cable
  5. Connecting Wires  
Connections:

  1. Connect Vcc of sensor to Vin of NodeMCU
  2. Connect GND to GND
  3. Connect A0 of sensor to A0 of NodeMCU

Code:
1. NodeMCU Code (Arduino IDE)
Download Code Here 

2. Android Application Code
Note: Check out 'PollutionDetector' module from project named 'Vprojetcs'
here is the link:
https://github.com/vikrammore246/VProjetcs


Check Out The Video:







Project Details:

Project by:
Vikram K. More
Amravati,Maharashtra.

Project done @ImbueDesk Internship as IoT Engineer.

ImbueDesk UID:
IOOC0303



5 comments: