Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
47 views27 pages

Varma

Uploaded by

2448784hr
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
47 views27 pages

Varma

Uploaded by

2448784hr
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 27

SUMMER INTERNSHIP REPORT

“ARDUINO BASED SMART STREET LIGHT CONTROLLING SYSTEM”


A report submitted in partial fulfillment of the requirements for the Award of Degree of

BACHELOR OF TECHNOLOGY
in
ELECTRONICS AND COMMUNICATION ENGINEERING
By

KALIDINDI SAI KOWSHIK VARMA

Regd. No.: 22B91A0495

BLACKBUCKS company Pvt Ltd, Hyd.

(Duration: 30th May2024 to 20th July, 2024)

DEPARTMENT OF ELECTRONICS ANDCOMMUNICATION ENGINEERING

S.R.K.R. ENGINEERING COLLEGE (AUTONOMOUS)


(Affiliated to JNTU, KAKINADA)
(Recognized by A.I.C.T.E., Accredited by N.B.A & N.A.A.C with ‘A+’ Grade,New Delhi)
CHINNA AMIRAM, BHIMAVARAM

1
SAGI RAMA KRISHNAM RAJU ENGINEERING COLLEGE
(Autonomous)
China Amiram, Bhimavaram
DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING

CERTIFICATE

This is to certify that the Summer Internship Report titled “ARDUINO BASED
SMART STREET LIGHT CONTROLLING SYSTEM” is the Bonafide work done by Mr.

KALINDI SAI KOWSHIK VARMA, holding the registration number 22B91A0495


and submitted during 2024 - 2025 academic year, in partial fulfillment of the
requirements for the award of the Summer Internship Program for Bachelor
of Technology in Electronics and Communication Engineering (ECE), at
Blackbuck Engineersfrom 30.05.2024 to 20.07.2024.

Department Internship Coordinator Dean -T & P Cell Head of the Department

2
Acknowledgement

I take immense pleasure in thanking Dr. N. Udaya Kumar, Professor & Head
of the Department ECE , and Dr. K. R. Satyanarayana, Dean Training &
Placement Cell, SRKR Engineering College, Bhimavaram for having
permitted me to carry out this project work .

I would like to extend my sincere acknowledgement to those who have


supported and encouraged me during this tough journey. Many people met
me during this endeavor and enriched me with their support and knowledge
both personally and professionally that resulted in the project being better than
it could possibly have been without them.

I express my sincere gratitude to my Internship Co-Ordinator Sir K N V


suresh Varma , who assistedme throughout this project. I Thank him for
providing me the reinforcement, confidence andmost importantly the track
for the project whenever I needed it.

I wish to record our sincere gratitude to Blackbucks Engineers PVT. Ltd.,


Coordinators for their constant support and encouragement in preparation of
this report and formaking available videos and interface facilities needed to
prepare this report.

3
4
CONTENTS

S.no. CONTENTS PAGENo.

1 Abstract 6

2 Problem statement and overview 7

3 7
Mention the tools and applications
4 Detail description of the sub models 8-17

5 Design or flow of the chart 18-21

6 Source Code 22-25

7 Result 26

8 Conclusion 27

GAS LEAKAGE DETECTION SYSTEM


5
ABSTRACT
Safety is a top priority in various settings, including homes, factories, and
laboratories. To ensure safety, it is necessary to monitor environmental parameters,
such as gas levels and its detection. This project proposes an Arduino Uno-based
system that utilizes sensors to detect and display these parameters. The system
employs an MQ-2 sensor an LCD display with an I2C module, and a buzzer to
monitor and alert users when dangerous levels of various harmful gases detected.
The project's code initializes sensors, the LCD display and buzzer in the setup
function. In the loop function, the system reads and displays gas levels and
detection on the LCD screen and serial monitor while checking if any readings
exceed threshold values and buzzer alert the user.

The proposed system is a reliable and cost-effective solution for safety


management in various settings. The use of an Arduino Uno, along with sensors
and display modules, makes it easy to implement and customize the system
according to specific requirements. The project provides a foundation for future
research on safety management and can be extended by adding more sensors or
integrating with other systems, such as internet-enabled platforms, to enableremote
monitoring and control.

In conclusion, this project provides an efficient and effective way to ensure safety
in different environments and can potentially prevent accidents or disasters. The
system's simplicity, reliability, and flexibility make it a valuable tool for safety
management and have significant implications for the future of safety monitoring.

6
Problem Statement and Overview
The primary issue addressed by this project is the lack of timely detection and

alert mechanisms for gas leaks in various environments. Many existing systems

are either too expensive, complicated, or lack the necessary sensitivity to detect

low concentration leaks early enough to prevent hazards. This project aims to

develop a cost-effective, user-friendly, and highly sensitive gas leakage

detection system using Arduino technology. The system is designed to detect

gas leaks, trigger alarms, display alert through lcd display and enhance safety.

Mention the Tools and applications used:


 1.Arduino Uno microcontroller
 2.LCD display 16*2 with I2C module
 3.MQ-2 Gas Sensor
 4.Buzzer (piezoelectric)

The main tool used in this project is the Arduino microcontroller, chosen for its
versatility, ease of use, and wide range of compatible sensors and modules. The
project also utilizes the MQ-2 gas sensor, which is highly sensitive to various
gases, including methane, butane, LPG, and smoke. Other components include a
buzzer for auditory alerts, an LCD display for real-time monitoring, and a relay
module for controlling the gas supply valve. The system's software is developed
using the Arduino Integrated Development Environment (IDE), leveraging
libraries for sensor data processing and alert mechanisms.

7
Detailed description of the sub modules:
1. Arduino Uno microcontroller

Arduino Uno is a microcontroller board based on the ATmega328P


microcontroller chip. It has 14 digital input/output pins (6 of which can be used
as PWM outputs), 6 analog inputs, a 16 MHz quartz crystal, a USB connection,
a power jack, an ICSP header, and a reset button. The board can be powered via
the USB connection or with an external power supply. The ATmega328P
microcontroller chip used in the Arduino Uno is a low-power, high-performance
8-bit AVR microcontroller. It has 32KB of flash memory for storing code, 2KB
of SRAM for data storage, and 1KB of EEPROM for storing non-volatile data.
The microcontroller can be programmed using the Arduino Integrated
Development Environment (IDE), which is based on the Processing programming
language.

The Arduino Uno is a popular choice for hobbyists and professionals alike due to
its versatility, ease of use, and low cost. It can be used for a wide range of projects,
from simple LED blinking programs to complex robotic systems. The open-
source nature of the Arduino platform also means that there is a large and

Figure 1 Arduino Uno


8
active community of developers and enthusiasts creating and sharing code,
tutorials, and resources. One of the key features of the Arduino Uno is its ability
to interface with a wide range of sensors and actuators. The digital and analog
input/output pins can be used to read data from sensors such as temperature
sensors, light sensors, and ultrasonic sensors, and to control actuators such as
motors, LEDs, and relays. The PWM output pins can be used to generate analog
signals for applications such as motor speed control and LED dimming. Overall,
the Arduino Uno is a versatile and powerful microcontroller board that provides
an accessible entry point for anyone interested in electronics and programming.
Its ease of use, low cost, and active community make it an attractive choice for
hobbyists, educators, and professionals alike

Specifications of the Arduino uno


Here are the specifications of the Arduino Uno:

- Microcontroller: ATmega328P

- Operating Voltage: 5V

- Input Voltage (recommended): 7-12V

- Input Voltage (limit): 6-20V

- Digital I/O Pins: 14 (of which 6 provide PWM output)

- Analog Input Pins: 6

- DC Current per I/O Pin: 20 mA

- DC Current for 3.3V Pin: 50 mA

- Flash Memory: 32 KB (ATmega328P)

- SRAM: 2 KB (ATmega328P)
9
- EEPROM: 1 KB (ATmega328P)

- Clock Speed: 16 MHz

- USB Interface: ATmega16U2

- Dimensions: 68.6 mm x 53.4 mm

- Weight: 25 g

2. LCD display 16*2 with I2C module


An LCD display 16x2 is a type of alphanumeric display that can show 16 columns
and 2 rows of characters. It is a common type of display used in many electronic
devices, including the Arduino microcontroller. The display consists of a
controller chip and a grid of liquid crystals that can change their orientation in
response to an electrical charge. When a voltage is applied to specific segments
of the grid, the liquid crystals align in a way that forms visible characters on the
display.

10
Figure 2 LCD 16*2

The display is usually controlled through a communication protocol, such as the


I2C protocol, which allows the microcontroller to send data to the controller chip
of the display. The data can include characters to be displayed, as well as
commands that control various aspects of the display, such as turning the
backlight on or off, clearing the screen, or setting the cursor position. The 16x2
display has a size of 84x48 pixels, which means that it can display up to 16
characters per row and up to 2 rows of characters. The characters are usually
displayed in a 5x8 dot matrix, which allows for the display of various
alphanumeric characters as well as some symbols and special characters. Overall,
the LCD display 16x2 is a simple and effective way to provide visual feedback to
the user of an electronic device, and it is widely used in many applications.

An LCD display 16x2 with I2C module is a popular combination for many
Arduino projects. I2C (Inter-Integrated Circuit) is a communication protocol that
allows two or more devices to communicate with each other using only two wires,
a clock line (SCL) and a data line (SDA). This makes it easy to connect multiple
devices to a microcontroller, like the Arduino Uno, without using up a lot of pins.

11
The I2C module for the LCD display is a small circuit board that is soldered onto
the back of the LCD display. It contains a chip called PCF8574, which actsas an
I/O expander. This chip allows the Arduino to communicate with the LCDdisplay
using only two pins (A4 and A5) instead of the normal 6 or 7 pins required to
control the LCD display.

Figure 3 I2C Module

To use the LCD display 16x2 with I2C module, you will need to install the
LiquidCrystal_I2C library in the Arduino IDE. This library contains functions
that simplify the process of controlling the LCD display, such as printing text on
the screen, clearing the display, and controlling the backlight.

To initialize the LCD display, you will need to create an instance of the
LiquidCrystal_I2C object, passing in the I2C address of the PCF8574 chip on the
module (usually 0x27 or 0x3F). Then, you can use the functions provided bythe
library to control the display.

Specifications of the LCD display 16*2 with I2C module


Here are the specifications of the LCD display 16x2 with I2C module:

1. Display size: 16 characters x 2 lines

2. Character size: 5 x 8 pixels

3. Backlight: White LED


4. Contrast adjustment: Potentiometer
12
5. Interface: I2C (TWI) Serial Interface

6. I2C address: 0x27 (can be changed with solder jumpers)

7. Supply voltage: 5V DC

8. Operating temperature range: -20°C to 70°C

9. Built-in character set supports English and Japanese text (other characters can
be programmed)

10. Comes with a 4-pin cable for easy connection to Arduino or other
microcontrollers

11. Compatible with Arduino Liquid Crystal library and other LCD libraries

3. MQ-2 Gas Sensor:


MQ-2 gas sensor is a gas detector module that can detect different gases in the air
such as smoke, propane, methane, alcohol, hydrogen, and many others. It isa
small and low-cost sensor that is widely used in gas leak detection systems, gas
alarms, and air quality monitoring systems. The MQ-2 gas sensor is basedon
the principle of a semiconductor sensor. It consists of a sensing element made of
a thin film of metal oxide which is heated to a high temperature. When the gas
comes in contact with the sensing element, it changes the resistance of the film,
which is then measured by the sensor. The change in resistance is proportional to
the concentration of the gas in the air.

The MQ-2 gas sensor has a high sensitivity and a fast response time. It can detect
gas concentrations in the range of 200 to 10000 ppm with an accuracy of
± 10%. The sensor has a long life and can operate at a temperature range of - 10°C
to 50°C and a humidity range of 5% to 95%. The MQ-2 gas sensor module has

13
two output pins, one analog and one digital. The analog pin provides a continuous
voltage output proportional to the gas concentration, while the digital pin
provides a high or low output depending on the gasconcentration. The module
also has a potentiometer to adjust the sensitivity of the sensor.

Figure 5 MQ-2 Sensor

The MQ-2 gas sensor can be easily interfaced with microcontrollers like Arduino,
Raspberry Pi, and others. It can be used in various applications such asgas leak
detection, fire detection, industrial process monitoring, and environmental
monitoring.

However, the MQ-2 gas sensor has some limitations, it can detect only certain
types of gases and is sensitive to humidity and temperature changes. It is also
affected by other gases and chemicals present in the air, which can lead to false
readings. Therefore, it is important to calibrate the sensor before use and regularly
check its performance.

Specifications of the MQ-2 Sensor


- Here are the specifications of the MQ-2 gas sensor: Operating voltage: 5V DC

- Detectable gases: LPG, i-butane, propane, methane, alcohol, hydrogen

14
andsmoke

- Analog output voltage: 0V to 5V

- Digital output: TTL high/low

- Preheat time: 20 seconds

- Sensitivity: adjustable via potentiometer on board

- Dimensions: 32mm x 22mm x 27mm

- Weight: 5g

- Detection range: 300 to 10,000 ppm for smoke, 100 to 10,000 ppm for
LPG,300 to 10,000 ppm for propane, and 200 to 10,000 ppm for methane

- Operating temperature: -10°C to 50°C

- Humidity range: 95% RH (non-condensing) at 25°C

- Response time: <10 seconds

- Recovery time: <30 seconds

- Stability: long-term and continuous operation

- Accuracy: ±10% of the detected gas concentration

- Lifespan: >5 years

- Output load resistance: 10 kOhm

4. Buzzer
A buzzer is a type of electronic audio signalling device that produces a loud and
distinctive sound. It is commonly used as an alerting device to notify people of
events or conditions that require attention. The buzzer works by converting
electrical energy into mechanical vibrations that produce sound waves in the air.
Buzzer technology has been around for many years, and the basic design of a
buzzer has remained the same. A typical buzzer consists of a coil of wire, a
15
diaphragm, and a magnet. When a current is passed through the coil of wire, it
creates a magnetic field that attracts the diaphragm towards the magnet. As the
diaphragm moves towards the magnet, it vibrates and produces sound waves.

Figure 7 Buzzer

There are different types of buzzers available in the market, including active and
passive buzzers. An active buzzer produces sound on its own when it is connected
to a power source, whereas a passive buzzer requires an external signal to produce
sound. The sound produced by a buzzer can vary in frequency and volume
depending on the design and specifications of the buzzer. Some buzzers produce
a continuous tone, while others produce a pulsed tone. Buzzer sound frequency is
usually measured in Hertz (Hz), and the range of frequency produced by a buzzer
can vary from a few hundred Hz to several kHz. In electronic circuits, buzzers are
commonly used as alarm devices, warning signals, or to indicate the presence of
a condition. They can be found in a variety of applications, including appliances,
automobiles, medical devices, security systems, and more. With their simple
design and ease of use, buzzers are a versatile and reliable solution for audio
signalling.

16
2.7.1 Specifications of the Buzzer
Here are some common specifications of a buzzer:

1. Operating voltage: This is the voltage range in which the buzzer can operate.
It is typically given as a range, such as 5-12 volts.

2. Frequency range: This is the range of frequencies at which the buzzer can
operate and produce sound. It is typically given in Hertz (Hz) and can range from
a few hundred Hz to tens of thousands of Hz.

3. Sound pressure level (SPL): This is a measure of the loudness of the buzzer,
typically given in decibels (dB). The SPL can range from around 60 dB to over
100 dB for a standard buzzer.

4. Current draw: This is the amount of current the buzzer requires to operate and
produce sound. It is typically given in milliamps (mA) and can range from a few
milliamps to several hundred milliamps.

5. Operating temperature range: This is the range of temperatures at which the


buzzer can operate reliably. It is typically given in degrees Celsius and can range
from -20°C to 70°C or more.

6. Housing material: This is the material used to construct the housing of the
buzzer. It can be plastic, metal, or other materials depending on the application.

7. Mounting style: This is how the buzzer is mounted or attached to a surface. It


can be through-hole (where the buzzer is inserted into a hole in a circuit board),
surface-mount (where the buzzer is soldered onto the surface of a circuit board),
or panel-mount (where the buzzer is mounted onto a panel or enclosure).

8. Size and shape: This is the physical size and shape of the buzzer. It can vary
widely depending on the application, from small, compact buzzers to larger, more
robust models.

17
9. Design or flow of the project:

MQ2
sensor

Implementation
The implementation of this project involves connecting the various components
to the Arduino Uno board and uploading the code to the board. The first step is to
connect the DHT11 temperature and humidity sensor to the digital pin 2 ofthe
Arduino Uno board. The MQ-2 gas sensor and the flame sensor are connected to
analog pin A0 and digital pin 3 respectively. The LED and buzzer are connected
to digital pins 4 and 13 respectively.

Next, the LCD display with the I2C module is connected to the Arduino Uno

18
board. The SDA and SCL pins of the I2C module are connected to analog pins
A4 and A5 of the Arduino Uno board respectively. The VCC and GND pins of
the I2C module are connected to the 5V and GND pins of the Arduino Uno board
respectively.

After connecting all the components, the code is uploaded to the Arduino Uno
board using the Arduino IDE. The code first initializes all the components and
sets the necessary pin modes. It then reads the temperature, humidity, gas level,
and flame detection values from the sensors. The temperature and gas level values
are displayed on the first row of the LCD display, while the flame detection value
is displayed on the second row of the LCD display.

The code then checks whether the temperature is above a threshold value or
whether gas or flame is detected. If any of these conditions are met, the LED
and buzzer are turned on to alert the user. If none of these conditions are met, the
LED and buzzer are turned off.

The implementation of this project requires basic knowledge of electronics and


programming. It is important to ensure that all the components are connected
correctly and that the code is uploaded to the board without any errors. Once the
implementation is complete, the project can be used to monitor the temperature,
humidity, gas levels, and flame detection in a room or environment and alert the
user in case of any anomalies.

Step-by-step instructions for assembling the hardware

Here are the step-by-step instructions for assembling the hardware of the project:

1. Gather all the necessary components such as Arduino Uno, LCD display 16x2
with I2C module, DHT11 temperature and humidity sensor, MQ-2 gas sensor,
flame sensor, LED, buzzer, breadboard, and jumper wires.

2. Connect the I2C module to the LCD display using the jumper wires. Connect
the SDA pin of the I2C module to the A4 pin of the Arduino and connect the SCL
19
pin of the I2C module to the A5 pin of the Arduino.

3. Connect the DHT11 sensor to the Arduino. Connect the positive pin of the
DHT11 sensor to the 5V pin of the Arduino, the negative pin to the GND pin of
the Arduino, and the data pin to the digital pin 2 of the Arduino.

4. Connect the MQ-2 gas sensor to the Arduino. Connect the VCC pin of the
sensor to the 5V pin of the Arduino, the GND pin to the GND pin of the Arduino,
and the A0 pin to the analog pin A0 of the Arduino.

5. Connect the flame sensor to the Arduino. Connect the VCC pin of the sensor
to the 5V pin of the Arduino, the GND pin to the GND pin of the Arduino, and
the digital pin 3 to the digital pin 3 of the Arduino.

6. Connect the LED to the Arduino. Connect the anode pin (longer pin) of the
LED to the digital pin 4 of the Arduino and connect the cathode pin (shorter pin)
of the LED to the GND pin of the Arduino through a 220-ohm resistor.

7. Connect the buzzer to the Arduino. Connect the positive pin of the buzzer to
the digital pin 13 of the Arduino and connect the negative pin of the buzzer to the
GND pin of the Arduino.

8. Connect the Arduino to the power supply using a USB cable.

9. Place all the components on the breadboard according to the connections

10. Connect the LED to the Arduino. Connect the anode pin (longer pin) of the
LED to the digital pin 4 of the Arduino and connect the cathode pin (shorter pin)
of the LED to the GND pin of the Arduino through a 220-ohm resistor.

11. Connect the buzzer to the Arduino. Connect the positive pin of the buzzer to
the digital pin 13 of the Arduino and connect the negative pin of the buzzer to the
GND pin of the Arduino.

20
12. Place all the components on the breadboard according to the connections
mentioned above.

13. Upload the code to the Arduino board using the Arduino IDE.

14. Power on the circuit and verify that the LCD is displaying the temperature,
humidity, gas level, and flame detection status.

15. Test the system by increasing the temperature, exposing the gas sensor to gas,
and bringing the flame sensor close to a flame. The LED should turn on and the
buzzer should make a sound when any of these events occur.

4.1 Testing the System

After assembling the hardware, testing the system is necessary to ensure that all
the components are functioning correctly. Follow the steps below to test the
system:

1. Power on the Arduino Uno by connecting it to a power source.

2. Open the Arduino IDE on your computer and upload the code to the Arduino
Uno.

3. Once the code is uploaded, open the Serial Monitor by clicking on the Serial
Monitor icon in the top right corner of the Arduino IDE.

21
4. Check if the values for temperature, humidity, gas, and flame are being displayed
correctly in the Serial Monitor.

5. Verify if the LCD is displaying the temperature, gas, and flame valuescorrectly.

6. Test the flame sensor by placing a flame near it and observe if the LED turns on and
the buzzer sounds.

7. Test the MQ-2 gas sensor by exposing it to gas and observe if the LED turns on and
the buzzer sounds.

8. Check if the LED and buzzer turn off when the gas or flame is no longer detected.

9. Test the DHT-11 sensor by blowing air on it or by changing the temperature and
humidity in the room and observing if the values displayed on the LCD and Serial Monitor
are changing.

10. Make any necessary adjustments to the hardware or software if any issues are
observed during the testing process.

Code
Arduino IDE code for the given project:

#include <LiquidCrystal_I2C.h>

// Definitions for sensor pins

#define MQ2PIN A0 // Analog pin connected to MQ-2 gas sensor

#define LEDPIN 4 // Pin connected to LED

#define BUZZERPIN 13 // Pin connected to buzzer

// Initialize LCD with I2C address 0x27 and dimensions 16x2

LiquidCrystal_I2C lcd(0x27, 16, 2);

void setup() {

22
Serial.begin(9600); // Start serial communication

pinMode(MQ2PIN, INPUT); // Initialize MQ-2 gas sensor pin as input

pinMode(LEDPIN, OUTPUT); // Initialize LED pin as output

pinMode(BUZZERPIN, OUTPUT);// Initialize Buzzer pin as output

lcd.init(); // Initialize LCD

lcd.backlight(); // Turn on the backlight

void loop() {

// Read gas sensor value

int gas = analogRead(MQ2PIN); // Read gas level from MQ-2 sensor

// Print gas level to serial monitor

Serial.print("Gas: "); Serial.println(gas);

// Check gas level and activate alerts

if (gas > 200) { // Check if gas level is above the threshold

digitalWrite(LEDPIN, HIGH); // Turn on the LED

tone(BUZZERPIN, 2000, 1000); // Make a sound with the buzzer for 1 second

// Display gas level and leak warning on LCD

lcd.setCursor(0, 0); // Set cursor to the first column of the first row

lcd.print("Gas Level: "); // Print "Gas Level: "

lcd.print(gas); // Print the gas level

lcd.setCursor(0, 1); // Set cursor to the first column of the second row

lcd.print("Gas is leaking"); // Print "Gas is leaking"

23
} else {

digitalWrite(LEDPIN, LOW); // Turn off the LED

noTone(BUZZERPIN); // Stop the buzzer sound

// Display gas level on LCD and clear the second row

lcd.setCursor(0, 0); // Set cursor to the first column of the first row

lcd.print("Gas Level: "); // Print "Gas Level: "

lcd.print(gas); // Print the gas level

lcd.print(" "); // Clear any leftover characters from previous message

lcd.setCursor(0, 1); // Set cursor to the first column of the second row

lcd.print(" "); // Clear the second row completely

delay(100); // Wait for 100 milliseconds

Code Explanation
Sure, here's an explanation of the code without any actual code snippets:

The Arduino project is designed to monitor gas levels using an MQ-2 gas sensor. It has three
main components: an LED, a buzzer, and an LCD display. The system works as follows:

1. *Initialization*:

- The Arduino sets up communication for debugging purposes.

- It configures the pins connected to the MQ-2 gas sensor, LED, and buzzer.

- The LCD display is also initialized and its backlight is turned on.

2. *Continuous Monitoring*:
24
- In a continuous loop, the Arduino reads the gas level from the MQ-2 sensor.

- The current gas level is printed to the serial monitor for debugging and observation.

3. *Gas Level Evaluation*:

- The Arduino checks if the gas level is above a specified threshold (in this case, 200).

- If the gas level is above the threshold:

- The LED is turned on.

- The buzzer sounds an alert.

- The LCD display shows the gas level and a warning message indicating that there is
a gas leak.

- If the gas level is below the threshold:

- The LED is turned off.

- The buzzer is silenced.

- The LCD display shows the gas level and clears any previous warning message.

4. *Delay*:

- The loop includes a short delay to avoid rapid repeated processing.

This setup ensures that any dangerous gas levels are quickly noticed and alerted through
multiple sensory signals (visual, auditory, and text).Sure, here's an explanation of the code
without any actual code snippets:

The Arduino project is designed to monitor gas levels using an MQ-2 gas sensor. It hasthree
main components: an LED, a buzzer, and an LCD display. The system works as follows:

to the serial monitor for debugging and observation.

This setup ensures that any dangerous gas levels are quickly noticed and alerted through
multiple sensory signals (visual, auditory, and text).

25
Results

The system has been designed to detect abnormal levels of temperature, gas,and flame
in the environment and alert the user through visual and audible alarms. The system also
displays the current temperature and gas levels on the LCD.
During normal operation, the LCD displays the temperature and gas levels in real-time.
The temperature and humidity sensor readings can help the user to maintain a comfortable
environment. If the temperature exceeds 45°C, the LED will light up and the buzzer will
sound an alarm for 1 second, alerting the user to the high temperature.

If the gas sensor detects the presence of a harmful gas, the LED will light up and the buzzer
will sound an alarm for 1 second. The user can take necessary precautions such as
ventilating the room or leaving the area immediately

Figure: Internal View of the Project

26
Conclusion
The expected output of this project is a fully functional gas leakage detection and

alert system that significantly enhances safety in residential, commercial, and

industrial settings. The Arduino-based solution offers a cost-effective, reliable, and

user-friendly approach to gas leak detection, providing timely alerts.

. The project uses an Arduino Uno microcontroller MQ-2 gas sensor measures gas
levels. An LCD display is used to show the measured parameters, and a LED and
buzzer are used to indicate any critical situation.
The project is easy to assemble and implement, and it can be used in various
applications such as in homes, offices, or industrial environments to ensure

safety and avoid accidents caused by gas. The project can be further improved by
adding more sensors or expanding the functionality to include automatic control of
appliances or triggering alarms or notifications.

Overall, the project demonstrates the potential of using microcontrollers and sensors
to create cost-effective and efficient monitoring systems, and it providesan excellent
opportunity for beginners and hobbyists to learn about electronics.

27

You might also like