Docsity

IOT Practical 4 write-up TE AIDS SPPU 2024 Pattern, Study Guides, Projects, Research of Internet and Information Access

Toggle sidebar
bg1
PRACTICAL EXPERIMENT NO. 4
Title: Detection of gas leakage in the surrounding environment.
Problem Statement: Develop a program to detect the gas leakage in the surrounding environment.
Aim: Write a program to detect the gas leakage in the surrounding environment.
Objectives:
• To study and understand Gas Sensors.
• To understand the connectivity of Raspberry-Pi / Arduino with Gas sensor.
• To understand the detection of gas leakage in the surrounding environment.
Prerequisites:
• Knowledge of C, C++, Java and Python Programming.
• Knowledge of Arduino IDE/Raspbian, LEDs, Sensors.
Outcome: An application(program) which detect the gas leakage in the surrounding environment.
Software requirements: 64-bit Open Source Operating System (Windows/Ubuntu), ardOS/Arduino IDE,
Raspbian OS
Hardware requirements: Arduino Uno/Raspberry Pi Board and Sensors.
Theory:
Gas Sensor
Gas sensors are tuned to detect the presence of combustible, toxic, or flammable gas in the vicinity of the
sensor. Gas sensors are devices that detect the presence of gases and measure their concentration by
converting physical or chemical interactions into electrical signals. These signals are processed and
expressed in standard units such as ppm, %LEL, or %Vol. A gas sensor detects a specific gas and measures
whether the gas is present near the sensor, or its content in the air. There are sensors that measure non-toxic
gases such as oxygen and carbon dioxide, and sensors that detect toxic gases such as carbon monoxide,
TVOC, and ammonia. Gas sensors are often used in flammable, explosive and toxic places to protect
workers.
Mainly a gas sensor consists of three parts: analyte, sensing material, and transducer. In general, a gas sensor
is called with the type of gas such as hydrogen sensor, carbon monoxide sensor, oxygen sensor, volatile
organic compound sensor, etc. Also, a gas sensor can be classified by sensing material type, transducer type,
physico-chemical detection mechanism, signal type, etc.
pf3
pf4
pf5

Partial preview of the text

Download IOT Practical 4 write-up TE AIDS SPPU 2024 Pattern and more Study Guides, Projects, Research Internet and Information Access in PDF only on Docsity!

PRACTICAL EXPERIMENT NO. 4

Title : Detection of gas leakage in the surrounding environment. Problem Statement: Develop a program to detect the gas leakage in the surrounding environment. Aim: Write a program to detect the gas leakage in the surrounding environment. Objectives:

  • To study and understand Gas Sensors.
  • To understand the connectivity of Raspberry-Pi / Arduino with Gas sensor.
  • To understand the detection of gas leakage in the surrounding environment. Prerequisites:
  • Knowledge of C, C++, Java and Python Programming.
  • Knowledge of Arduino IDE/Raspbian, LEDs, Sensors. Outcome: An application(program) which detect the gas leakage in the surrounding environment. Software requirements: 64 - bit Open Source Operating System (Windows/Ubuntu), ardOS/Arduino IDE, Raspbian OS Hardware requirements: Arduino Uno/Raspberry Pi Board and Sensors. Theory: Gas Sensor Gas sensors are tuned to detect the presence of combustible, toxic, or flammable gas in the vicinity of the sensor. Gas sensors are devices that detect the presence of gases and measure their concentration by converting physical or chemical interactions into electrical signals. These signals are processed and expressed in standard units such as ppm, %LEL, or %Vol. A gas sensor detects a specific gas and measures whether the gas is present near the sensor, or its content in the air. There are sensors that measure non-toxic gases such as oxygen and carbon dioxide, and sensors that detect toxic gases such as carbon monoxide, TVOC, and ammonia. Gas sensors are often used in flammable, explosive and toxic places to protect workers. Mainly a gas sensor consists of three parts: analyte, sensing material, and transducer. In general, a gas sensor is called with the type of gas such as hydrogen sensor, carbon monoxide sensor, oxygen sensor, volatile organic compound sensor, etc. Also, a gas sensor can be classified by sensing material type, transducer type, physico-chemical detection mechanism, signal type, etc.

Common gas sensing technologies include:

  • Metal Oxide Semiconductor (MOS): Detects flammable and reducing gases (e.g., LPG, methane, alcohol) by measuring changes in the electrical resistance of a heated sensing element. Widely used in Arduino and DIY IoT projects.
  • Electrochemical: Measures the current generated by a gas undergoing an oxidation-reduction reaction at the electrode. Ideal for tracking toxic gases at low concentrations.
  • Non-Dispersive Infrared (NDIR): Uses infrared absorption to detect gases like CO₂ by targeting their specific absorption wavelengths. Measuring Gases When measuring gases such as carbon dioxide, oxygen, or methane, the quantity of gas per volume of air is called concentration. 1 ppm can stand in a variety of ways depending on the chemical being tested. The most common measures for expressing ppm are milligrams per kilogram (mg/kg), microliters per liter (L/L), and micrograms per litre (g/L). The ratio of one gas to another is given in parts-per-million (ppm). For example, if methane is measured at 1 parts-per-million, one molecule will be methane, while the other molecules will be another gas present in the atmosphere. ppm = 1/10,00,000 = 0.0001% MQ-2 Gas Sensor MQ2 gas sensor is capable of detecting a wide range of gases, including hydrogen (H2), propane, liquefied petroleum gas (LPG), methane (CH4), carbon monoxide (CO), alcohol, smoke, and others. It is commonly used in household and industrial settings to identify gas leaks and avert potential hazards. MQ2 gas sensor is its high sensitivity and quick reaction time, which enable early detection of gas leaks. This expertise is essential since gas leaks may risk human life and safety, damage equipment, and contaminate the environment.

Features of MQ2 Gas Sensor

  • Suitable for use in both residential and industrial environments
  • The sensor is very sensitive, it can detect even small amounts of gases quite well.
  • The sensor reacts quickly, which helps in spotting gas leaks and possible dangers early on.
  • The sensor includes a potentiometer that lets users adjust its sensitivity by changing the reference voltage on the circuit board.
  • The sensor module contains a sensing element crafted from tin dioxide (SnO2) semiconductor that detect specific gases with high sensitivity. Implementation Apparatus: Arduino Uno board, USB Cable, 1 x 220 Ω Resistor, 1 x LED, MQ2 Gas Sensor. Interface/Connections: Procedure: Step 1: Connect the Arduino board to CPU using the FRC cable provided with the board. Step 2: Connect the Power supply adaptor and power on the circuit. Step 3: Open Arduino IDE and create a new sketch (program) using the connections.

Step 4: In the Arduino IDE go to tools →Port and select the appropriate COM port.

Step 5: In the Arduino IDE click on the upload button to compile and download the code into the Arduino UNO. When successfully downloaded, the code will start running.

Step 6: Open the serial monitor from Tools→ Serial Monitor. Set the baud rate to 9600.

Step 7: Put the MQ2 Sensor in a windy place and observe LED. Observations: When the MQ2 Sensor is put in a windy place, the LED of pin 13 on the Arduino board will turn ON. Observation Table: Conclusion: An application was developed for detecting the gas leakage in the surrounding environment successfully. Peripheral Arduino Pin LED Cathode (-ve) GND LED Anode (+ve) Resistor + D 13 MQ2 VCC 5V MQ2 GND GND MQ2 DOUT D MQ2 AOUT A Gas (ppm) Gas Value LED State 995 939 OFF 1000 940 ON

Viva Questions:

  1. What is a Gas Sensor?
  2. Which Gases are considered Safe and which are considered Unsafe?
  3. What are the different types of Gas Sensors?
  4. What is a MQ2 Sensor?
  5. What is the composition & pins of MQ2 Sensor?
  6. Explain working of MQ2 Sensor.
  7. What is the full form of MQ?
  8. What is INPUT & OUTPUT in pin Mode()?
  9. What is HIGH & LOW in digitalWrite()?