Pollution Monitoring System using Arduino and various gas sensor

50 %
50 %
Information about Pollution Monitoring System using Arduino and various gas sensor

Published on November 21, 2019

Author: UtkarshJaiswal39

Source: slideshare.net

1. i IOT BASED SMART POLLUTION MONITORING AND CONTROLLING SYSTEM Submitted in partial fulfillment of the requirements for the degree of B.Tech in Electronics and Communication Engineering. By: Srishti Singh (1602700103) Shakti Jaiswal (1602731127) Utkarsh Jaiswal (1602731166) Vishwas Singh (1602731177) Under the supervision of Asst. Prof. Uma Sharma Department Of Electronics and Communication Engineering Ajay Kumar Garg Engineering College, Ghaziabad 27th Km Stone, Delhi-Hapur Bypass Road, Adhyatmik Nagar, Ghaziabad-201009 Dr. APJ Abdul Kalam Technical University, Lucknow December 2019

2. ii ii DECLARATION We hereby declare that this submission is our own work and that, to the best of our knowledge and belief, it contains no material previously published or written by another person, nor material which to a substantial extent has been accepted for the award of any other degree or diploma by the university or other institute of higher learning, except where due acknowledgement has been made in the text. Signature: Signature: Srishti Singh Shakti Jaiswal Roll No: 1602700103 Roll No: 1602731127 Signature: Signature: Utkarsh Jaiswal Vishwas Singh Roll No: 1602731166 Roll No: 1602731177

3. iii iii CERTIFICATE This is to certify that Project Report entitled “IoT based air pollution monitoring and controlling system” which is submitted by Srishti Singh, Vishwas Singh, Utkarsh Jaiswal, Shakti Jaiswal in the partial fulfillment of requirement for the award of degree of Bachelor of Technology (Electronics and Communication Engineering) submitted to Dr. APJ Abdul Kalam Technical University, Lucknow is a record of students’ own work carried out under my supervision. The matter in this report has not been submitted to any University or Institution for award of any degree. Supervisor: Asst. Prof. Uma Sharma ECE Department HoD: Dr. P.K. Chopra Date:

4. iv iv ACKNOWLEDGEMENTS We take this opportunity to express our deep sense of gratitude and regard to Ms. Uma Sharma Asst. Prof. (ECE Dept.), Ajay Kumar Garg Engineering College, Ghaziabad for her continuous encouragement and able guidance, we needed to complete this project. We would pay our sincere gratitude to the Head of the Dept. (ECE & EI), Dr. P.K. Chopra for his precious and enlightening words of wisdom which motivated us throughout our project work.

5. v ABSTRACT Now-a-days air pollution is one of the most important concern of the world. Air pollution may evolve from anthropogenic or natural sources. Air pollutants of atmospheric substances like CO, CO2, SO2, NO2, and O3 suspended particulate matter (SPM), repairable suspended particulate matter (RSPM), and volatile organic compounds (VOC’s) have a great effect on the people health. Most of the major cities in developing countries and most cities of the developed countries are suffering from it. Thus to develop a real time air quality and pollution monitoring system is critical. We have developed an arduino based air pollution detector which combined a small-sized, minimum-cost sensor to an arduino micro-controller unit.

6. vi TABLE OF CONTENTS Declaration ii Certificate iii Acknowledgement iv Abstract v Chapter 1. Introduction 1-2 1.1 Introduction 1 1.2 Problem Statement 2 1.3 Project Idea 2 Chapter 2. Working of the project 3-8 2.1 Block diagram 6 2.2 Images of Module 7 2.3 Code 8 Chapter 3. Hardware Specifications 9-18 3.1 Arduino Uno 9 3.2 Resistors 10 3.3 MQ7 Sensor 11-12 3.4 MQ6 Sensor 12-13 3.5 LED Light 13-14 3.6 16*2 LCD 15-16 Chapter 4. Software Used 17 4.1 Arduino IDE 17 4.2 Proteus 17 Chapter 5. Merits and Demerits 18 5.1 Merits 18 5.2 Demerits 18 Chapter 6. Future Scope 19 References 20

7. vii

8. 1 CHAPTER 1 INTRODUCTION 1.1 INTRODUCTION The beginning of the 21st century was the time when importance for Environmental awareness was instigated. One of the major concerns regarding the environment is air pollution. Air pollution contributes to the green houses gases, which causes the green house effect, whose side effects are now well known to all of us after the findings about the hole in the ozone layer. Air pollution is not only harmful to the environment but, also to all other living beings on earth. Air pollutants that are inhaled have serious impact on human health affecting the lungs and the respiratory system. These pollutants are also deposited on soil, plants, and in the water, further contributing to human exposure and also affecting the sea life. Vehicles are one of the major contributors to air pollution apart from industries. The main pollutants from vehicles are the oxides of carbon and nitrogen, which can be easily detected these days with the help of semi conductor gas sensors. Therefore, in this project an idea is suggested, which would be very helpful in reducing the amount of pollution from vehicles. The sensing of the emitted gases are done using various sensors and devices. The past decade, has seen several research activities that have been taking place to develop semiconductor gas sensors. In the paper, the quality of air in the car cabin was analyzed using semiconductor (MOS) gas sensors. In this paper, the semiconductor sensors have been used to detect the pollutant level of the vehicles. This paper concentrates mainly on three blocks: smoke detector, micro-controller and fuel injector. The smoke detector detects the pollutants (CO, NOx, etc.) continuously. The micro-controller compares the level of pollutants with the stipulated level allowed by the government. If it exceeds the threshold level, the system gets triggered and then it sends SMS about this to the Owner/Driver of the car through GSM.

9. 2 1.2 PROJECT STATEMENT India is a country of 1.5 billion and is the biggest customer of motor vehicles and automobiles. These vehicle either operated by petrol or diesel, which extremely affect the environment, ecosystem and health. According to Environmental Defence Fund (EDF) on road vehicles causes 1/3rd of the air pollution and all transportation causes 27% of greenhouse gas emission. 1.3 PROJECT IDEA The scope of this project is to ensure that car owner are aware of the health of his/her car and take necessary measures to avoid it, the following objectives are envisioned: ● Real time air pollution monitoring can be done using an IoT based air pollution monitoring system, an Arduino UNO based gadget with Wifi module which sends the pollutant’s level value to the server. ● Regular monitoring of the pollution level can be done from the saved data over the server. ● The vehicle’s owner will also receive a message if the value exceeds the defined threshold.

10. 3 CHAPTER 2 WORKING OF PROJECT A wireless distributed mobile air pollution monitoring system using General Packet Radio Service (GPRS) sensors is used till yet. Advancements in wireless communication and sensor technology are rapidly changing air pollution monitoring paradigm. Internet of Things (IoT) also allows the creation of smart environments in which objects interact and cooperate with each other. A lot of improvements have been made to existing air pollution monitoring systems. For example, it proposed a system for monitoring the pollution level from a vehicle. The system transmits sensor data wirelessly by making use of the “request and respond” protocol along with a combination of address and data centric protocols. Various gas sensors are used in the system to sense the gases content and then send it to the Arduino Uno where processing is done according to the code feeded into it. We’re using a Cloud platform i.e, ThingsPeak channel where Data Analytics is performed. In more detail, Thing-speak is an open source internet of things application programming interface used to store and retrieve data from interconnected things using the hypertext protocol over the internet or via a local area network. It also provides access to a broad range of embedded devices and web services. This enables the creation of sensor logging applications that can be updated regularly to the user. An glimpse of how Sample Data looks like:

11. 4 Figure1.1 Shows that there was a minimal level of pollutant before the sensor started reading the sample aerosol. However, when the sensor detected the aerosol, the air quality dropped rapidly from 0 to 100 ppm. After several readings on different days, it can be seen that there was significant reduction of the sample aerosol level in the air by the 27th of March. Figure 1.2 Shows that the dust level in the environment was at the minimum on the 28th of February but increased gradually with each passing day. On some particular days, there was a gradual and on other days there were no changes in the quality of the air. The level of the dust measured in the air is dependent on a lot of factors that are beyond the scope of this work. Figure 1.3 Shows the air quality level was significantly low in comparison to the previous pollutants mused. It can be seen the air quality level dropped rapidly after only a few days of taking measurements. This is so because gases are high level air pollutants.

12. 5 Figure 1.4 Shows that the air quality decreased gradually from 8 ppm to about 70 ppm depending on the level of concentration smoke in the air. Figure 1.5 Air Quality on Selected Days with Biogas as Sample Pollutant“Thing-speak” was configured to receive data from a remote system. The data was analyzed and published in the form of a scatter line graphs or bar charts on a channel. The channel corresponds to the air quality level as shown in Figure 10. The channel receives update every time from the remote sensor via the internet and represents the data received as a scatter line graph online.

13. 6 Figure 1.6: The visual representation of data on “thing-speak” corresponded with the measured air quality. The rate at which data displayed on “Thing-speak” changes was dependent on the network traffic and speed of internet connection. The status of the air quality can be accessed at any time, with automatic updates occurring at defined time intervals. 2.1 BLOCK DIAGRAM Figure 1.7 Block Diagram of Project

14. 7 2.2 IMAGES OF MODULE Figure 1.8 Actual working module Figure 1.9 Sensor providing values of CO

15. 8 2.3 CODE The code which we need to upload to the Arduino. So, that it can measure carbon monoxide levels is shown below: /*MQ-7 Carbon Monoxide Sensor Circuit With Arduino */ #include<LiquidCrystal.h> LiquidCrystal lcd(2,8,3,10,4,6); float RS_gas = 0; float ratio = 0; float sensorValue = 0; float sensor_volt = 0; float R0 = 7200.0; int ledpin=0; int threshold=1000; void setup() { Serial.begin(9600); pinMode(ledpin, OUTPUT); lcd.begin(16,2); lcd.clear(); } void loop() { lcd.setCursor(0,0); sensorValue = analogRead(A0); sensor_volt = sensorValue/1024*5.0; RS_gas = (5.0-sensor_volt)/sensor_volt; ratio = RS_gas/R0; //Replace R0 with the value found using the sketch above float x = 1538.46 * ratio; float ppm = pow(x,-1.709); Serial.print("PPM: "); Serial.println(ppm); lcd.print("CO value in ppm: "); lcd.print(ppm); delay(1000); if (ppm>threshold) { digitalWrite(ledpin, HIGH); } else { digitalWrite(ledpin, LOW); } }

16. 9 CHAPTER 3 HARDWARE SPECIFICATION 3.1 ARDUINO UNO Arduino UNO is an open-source micro-controller board based on the Microchip ATmega328P micro-controller and developed by Arduino.cc. The board is equipped with sets of digital and analog input/output (I/O) pins that may be interfaced to various expansion boards (shields) and other circuits. The board has 14 Digital pins, 6 Analog pins, and programmable with the Arduino IDE (Integrated Development Environment) via a type B USB cable. It can be powered by a USB cable or by an external 9 volt battery, though it accepts voltages between 7 and 20 volts. It is also similar to the Arduino Nano and Leonardo. The hardware reference design is distributed under a Creative Commons Attribution Share-Alike 2.5 license and is available on the Arduino website. Layout and production files for some versions of the hardware are also available. "Uno" means one in Italian and was chosen to mark the release of Arduino Software (IDE) 1.0. The Uno board and version 1.0 of Arduino Software (IDE) were the reference versions of Arduino, now evolved to newer releases. The Uno board is the first in a series of USB Arduino boards, and the reference model for the Arduino platform. The ATmega328 on the Arduino Uno comes pre-programmed with a boot loader that allows uploading new code to it without the use of an external hardware programmer. It communicates using the original STK500 protocol. The Uno also differs from all preceding boards in that it does not use the FTDI USB-to-serial driver chip. Instead, it uses the Atmega16U2 (Atmega8U2 up to version R2) programmed as a USB-to-serial converter. As shown in figure 3.4. Figure 2.0 Arduino Uno

17. 10 3.2 RESISTORS (10KΩ, 1KΩ): A resistor is a passive two-terminal electrical component that implements electrical resistance as a circuit element. In electronic circuits, resistors are used to reduce current flow, adjust signal levels, to divide voltages, bias active elements, and terminate transmission lines, among other uses. High-power resistors that can dissipate many watts of electrical power as heat, may be used as part of motor controls, in power distribution systems, or as test loads for generators. Fixed resistors have resistances that only change slightly with temperature, time or operating voltage. fig 3.12 Variable resistors can be used to adjust circuit elements (such as a volume control or a lamp dimmer), or as sensing devices for heat, light, humidity, force, or chemical activity. Resistors are common elements of electrical networks and electronic circuits and are ubiquitous in electronic equipment. Practical resistors as discrete components can be composed of various compounds and forms. Resistors are also implemented within integrated circuits. Figure 2.1 Resistors

18. 11 3.3 MQ7 SENSOR: MQ-7 is a Carbon Monoxide (CO) sensor, suitable for sensing Carbon Monoxide concentrations (PPM) in the air. The MQ-7 sensor can measure CO concentrations ranging from 20 to 2000 ppm. This sensor has high sensitivity and fast response time. The sensor's output is an analog resistance. The drive circuit is very simple just a voltage divider. All you need to do is power the heater coil with 5V DC or AC, add a load resistance and connect the output to an ADC or a simple OPAMP comparator. This sensor comes in a package similar to our MQ-3 alcohol sensor and can be used with the rhydoLABZ breakout board. Sensitive material of the MQ-7 gas sensor is SnO2, which with lower conductivity in clean air. It makes detection by method of cycle high and low temperature and detects CO when low temperature (heated by 1.5V). When the high temperature (heated by 5.0V), it cleans the other gases adsorbed under low temperatures. Important, it is recommended that you do not obtain the standalone sensor but the whole MQ- 7 board. This is because if you buy the standalone sensor, you will have to finish building the whole schematic before you can connect it to the Arduino. So that less work is required for integrating it with the Arduino. It is recommended that you buy the complete MQ-7 sensor circuit. This you can see below: Figure 2.2 MQ-7 Sensor There 4 leads are +5V, AOUT, DOUT, and GND. The +5V and GND leads establishes power for the alcohol sensor. The other 2 leads are AOUT (analog output) and DOUT (digital output). How the sensor works is the terminal AOUT gives an analog voltage output in

19. 12 proportion to the amount of carbon monoxide the sensor detects. The more CO it detects, the greater the analog voltage it will output. Conversely, the less CO it detects, the less analog voltage it will output. If the analog voltage reaches a certain threshold. 3.4 MQ6 SENSOR: Using an MQ6 sensor it detects a gas is very easy. We can either use the digital pin or the analog pin to accomplish this. Simply power the module with 5V and you should notice the power LED on the module to glow and when no gas is detected the output LED will remain turned off meaning the digital output pin will be 0V. Remember that these sensors have to be kept on for per-heating time (mentioned in features above) before you can actually work with it. Now, introduce the sensor to the gas you want to detect and we should see the output LED to go high along with the digital pin, if not use the potentiometer until the output gets high. Now every time your sensor gets introduced to this gas at this particular concentration the digital pin will go high (5V) else will remain low (0V). Figure 2.3 MQ6 Sensor We can also use the analog pin to achieve the same thing. Read the analog values (0-5V) using a micro-controller, this value will be directly proportional to the concentration of the gas to which the sensor detects. You can experiment with this values and check how the sensor reacts to different concentration of gas and develop your program accordingly. If we are looking for some accuracy with your readings then measuring the PPM would be the best way to go with it. It can also help us to distinguish one gas from another. So to measure PPM we can directly use a module. Basic wiring for the sensor shown below.

20. 13 Figure 2.3 Wiring Diagram of MQ6 Sensor 3.5 LED: A light-emitting diode (LED) is a two-lead semiconductor light source. It is a p–n junction diode that emits light when activated. When a suitable current is applied to the leads, electrons are able to recombine with electron holes within the device, releasing energy in the form of photons. This effect is called elector-luminescence, and the color of the light (corresponding to the energy of the photon) is determined by the energy band gap of the semiconductor. LED's are typically small (less than 1 mm 2) and integrated optical components may be used to shape the radiation pattern. Appearing as practical electronic components in 1962, the earliest LEDs emitted low-intensity infrared light as hsown in fig 3.19. Infrared LEDs are still frequently used as transmitting elements in remote-control circuits, such as those in remote controls for a wide variety of consumer electronics. The first visible-light LEDs were of low intensity and limited to red. Modern LEDs are available across the visible, ultraviolet, and infrared wavelengths, with very high brightness. Early LEDs were often used as indicator lamps for electronic devices, replacing small incandescent bulbs. They were soon packaged into numeric readouts in the form of seven segment displays and were commonly seen in digital clocks. Recent developments have produced LEDs suitable for environmental and task lighting. LEDs have led to new displays and sensors, while their high switching rates are useful in advanced communications technology.

21. 14 Figure 2.4 LED 3.6 16*2 LCD: LCDs are pretty much the standard now in order to display text to users of a device. Almost all electronic devices which give a readout to users of some type of data use LCDs to do so. This includes CD players, microwaves, thermostats, ovens, all come with LCDs which display some type of readout so that users can obtain some type of data. For thermostats, it's the temperature. For microwaves, it's how much time until it shuts off. For CD players, it's what track in the CD is currently playing. LCDs are so important in electronics today that learning as much about them is a smart way to keep yourself up with the industry. So in our project, learning how to write text to LCDs is a great way to eventually learning how to build electronic devices that can display data out to an LCD so that a consumer can obtain the data he or she needs. There are plain text LCDs and graphical LCDs (GLCDs). Graphical LCDs can display fine graphical detail better than text. They are available for a small price premium over text displays. Figure 2.5 LCD display

22. 15 The Setup Figure 2.5 Interfacing of LCD pins with Arduino via Bread Board Interfacing of LCD pins with Arduino is shown below: 1. Insert your LCD screen into your breadboard vertically such that each pin has its own separate line on the board. 2. Insert your potentiometer in the same way. 3. Connect 5v and GND from Arduino to the + / - rails on your breadboard. This will ground your Backlight and LCD. 4. Connect Pins 1 and 16 from the LCD screen to the negative power rail. This will power your Backlight and LCD. 5. Connect Pins 2 and 15 from the LCD to the positive power rail. This will power your Backlight and LCD. 6. Connect Pin 3 to the center pin of your potentiometer, this will control the contrast.

23. 16 7. Connect the top and bottom pins on your potentiometer to GND and 5v rails. As you twist this potentiometer you will control contrast. 8. Connect Pin 4 of the LCD to pin 12 on your Arduino. This will be the register select pin we output to from the Arduino later. 9. Connect Pin 5 of the LCD to ground. 10. Connect Pin 6 of the LCD to pin 10 on your Arduino. This is the data enable pin that we will use later. 11. We will be using data pins 4,5,6,7 for our LCD screen. This represents 4 bits of data, known as a nibble. The LCD screen has the capability for 8-bit parallel communication but 4 bit will be adequate for our project. 12. Connect those pins to 4 pins on your Arduino, we use 5,4,3,2 respectively. 13. Connect your Arduino to the PC and move on!

24. 17 CHAPTER 4 SOFTWARE USED 4.1 ARUINO IDE: The Arduino Integrated Development Environment (IDE) is a cross-platform application (for Windows, macOS, Linux) that is written in functions from C and C++. It is used to write and upload programs to Arduino compatible boards, but also, with the help of 3rd party cores, other vendor development boards. The source code for the IDE is released under the GNU General Public License, version 2. The Arduino IDE supports the languages C and C++ using special rules of code structuring. The Arduino IDE supplies a software library from the Wiring project, which provides many common input and output procedures. User-written code only requires two basic functions, for starting the sketch and the main program loop, that are compiled and linked with a program stub main() into an executable cyclic executive program with the GNU toolchain, also included with the IDE distribution. 4.2 PROTEUS: The Proteus Design Suite is a proprietary software tool suite used primarily for electronic design automation. The software is used mainly by electronic design engineers and technicians to create schematics and electronic prints for manufacturing printed circuit boards. It was developed in Yorkshire, England by Labcenter Electronics Ltd and is available in English, French, Spanish and Chinese languages.

25. 18 CHAPTER 5 MERITS AND DEMERITS MERITS 1: Low cost. 2: Helps to monitor health of Vehicle in real time. 3: Simple, compact & Easy to handle. 4: Visual Output on LCD Screen. 5: Reduces the risk of airborne diseases. DEMERITS 1: Proper maintenance of setup will be required. 2: Due to excess heat of vehicle, sensor could be melted.

26. 19 CHAPTER 6 FUTURE SCOPE FUTURE SCOPE 1. Device can be integrated with the vehicle during manufacturing in coming years. 2. Help in reduction of air pollution due to vehicles. 3. Can be given to traffic police to get instant check of vehicle health. 4. Fitted in homes to get real time air quality index value.

27. 20 REFERENCE [1] 4:MQ7 Senser, arduinodev - http://arduinodev.woofex.net/2012/12/01/standalone-sharp-dust-sensor/ [2] Raipure,S., Mehetre,D.(2015). Wireless Sensor Network Based Pollution Monitoring System in Metropolitan Cities [3] Leman,A.M., Omar, A.R., Jung,W., Yusof, M.Z.M. (2010). The development of an industrial air pollution monitoring system for safety and health enhancement and a sustainable work environment using QFD approach [4] Kularatna,N. (2008). An Environmental Air Pollution Monitoring System Based on the IEEE 1451 Standard for Low Cost Requirements [5] World Health Organization. Occupational and Environmental Health Team. (2006). WHO Air quality guidelines for particulate matter, ozone, nitrogen dioxide and sulfur dioxide: global update 2005: summary of risk assessment.

28. 21

Add a comment