SENSOR ARRAY AND ITS
DEVELOPMENT
Introduction
The goal of this project is to build a simple and reliable gas leakage
detection system. It uses multiple gas sensors from the MQ series (MQ-2,
MQ-4, MQ-5, MQ-6, and MQ-7), along with a flame sensor and a DHT11
temperature sensor. These sensors help in detecting the presence of harmful
or flammable gases and temperature changes. The system is built using an
Arduino Nano, which allows real-time monitoring and gives alerts when gas
levels become unsafe. It can be used in homes, industries, or any place where
gas safety is important.
COMPONENTS USED
MQ-Series Gas Sensors (MQ-2, MQ-4, MQ-5, MQ-6, MQ-7) detect various flammable and toxic gases through
changes in sensor resistance. MQ-2 senses smoke, methane, hydrogen, and LPG. MQ-4 targets methane and CNG.
MQ-5 is used for LPG, natural gas, and coal gas. MQ-6 specializes in detecting LPG, propane, and butane. MQ-7
detects carbon monoxide and requires a specific heating cycle for accurate results. These sensors form the
backbone of gas safety systems in residential and industrial settings.
DHT11 Temperature & Humidity Sensor monitors ambient temperature and humidity levels. It's a low-cost,
commonly used sensor for basic environmental data. The collected data helps correlate gas readings with
atmospheric changes, enhancing system accuracy.
Flame Sensor Module detects the presence of a flame or infrared radiation. It plays a critical role in early fire
detection, providing fast and responsive alerts in case of sudden ignition.
16x2 LCD Display with I2C is used to display sensor values in real time. It is compact, reduces wiring complexity,
and offers a clear and user-friendly interface for monitoring live data.
LM2596 Buck Converter is an efficient voltage regulator that steps down higher input voltage (like 7.4V from Li-ion
batteries) to a stable 5V. It runs cooler and more efficiently than traditional linear regulators like the 7805, making
it ideal for circuits powered by 18650 batteries
CIRCUIT OVERVIEW
The circuit is built around the Arduino Nano, which acts as the
central microcontroller, receiving data from various sensors and
displaying outputs.
Sensors Connected:
MQ-Series Gas Sensors (MQ2, MQ6, MQ7): Connected to
analog pins A0, A1, and A2. These sensors detect various gases
and send analog signals to the Nano.
DHT11 Temperature and Humidity Sensor: Connected to digital
pin D2. It provides temperature and humidity readings.
Flame Sensor (HW201): Connected to digital pin D3. It detects
the presence of flame through IR.
LCD Display (16x2 with I2C): Connected via SDA (A4) and SCL
(A5) pins to display sensor data in real time.
Power Supply:
The system is powered by two 18650 Li-ion batteries (7.4V combined).
A LM2596 buck converter steps this voltage down to 5V to safely power the Arduino and sensors.
Power is distributed from the buck converter’s output to the Arduino Nano and all connected components.
WORKING OF THE CIRCUIT
This circuit is designed to detect gas leaks, flames, and monitor environmental conditions in
real-time.
The MQ-series gas sensors continuously sense the presence of harmful or flammable
gases like LPG, methane, carbon monoxide, etc. Each sensor sends analog signals to the
Arduino Nano, which are processed and compared to set thresholds.
The DHT11 sensor measures the current temperature and humidity. These values help
understand environmental conditions that might affect gas concentration or sensor
performance.
The flame sensor actively monitors for any flame or fire-like infrared signature. If
detected, the sensor sends a digital signal to the Arduino for immediate response.
All processed sensor readings are displayed live on the 16x2 LCD screen, giving the user
clear and quick updates.
The system is powered efficiently by a 7.4V Li-ion battery, stepped down to 5V using a
LM2596 buck converter, which ensures the entire circuit receives a stable voltage with
minimal heat.
Overall, the circuit provides a compact, low-power, and effective way to detect hazardous
gas leaks, fire risks, and monitor ambient conditions — suitable for home and industrial use.
PCB & ENCLOSURE DESIGN
To make the circuit more compact, durable, and user-friendly, we designed a
custom Printed Circuit Board (PCB) to replace the temporary breadboard setup.
This helped in:
Reducing wire clutter and minimizing chances of loose connections
Improving reliability by securely mounting all components
Simplifying assembly, making it easier to deploy or reproduce the system
In addition, we built a protective enclosure (box) to house the PCB and
components. This enclosure:
Shields the system from dust, moisture, and accidental damage
Includes cutouts for easy access to the power switch, sensor exposure, and
display view
Enhances the device’s portability, making it suitable for real-world field use
(e.g., homes, industrial zones)
Together, the PCB and enclosure make the system neater, safer, and more practical
for everyday deployment.
HANDLING CALIBRATION GAPS IN GAS DETECTION
In our project, we didn’t have clean-air (Ro) calibration for the MQ sensors, so we
initially used ratioing — comparing how strongly each sensor responded relative to
others when exposed to the same gas. This helped us understand sensor behavior
and identify which ones were more sensitive.
However, ratioing isn’t reliable for accurate detection. The patterns vary with
temperature, humidity, and gas mixtures, and it can’t give ppm values. Our professor
advised against using it for proper calibration.
Alternatives without clean air:
Use known gas concentrations (like butane or LPG) to estimate sensor response.
Perform controlled lab testing with reference detectors.
Use machine learning to classify gases based on multi-sensor patterns.
Collect long-term field data to set empirical thresholds.
Until Ro values are available, these options offer practical ways to improve detection
without full calibration.
PROBLEMS FACED & HOW WE ADDRESSED THEM
1. Arduino Nano Upload Error - Upload failures occurred due to selecting the wrong processor and
missing CH340 drivers. Identifying the ATmega168 chip and installing the correct driver resolved the
issue.
2. DHT11 Not Responding - The sensor wasn’t producing data due to a wrong I2C address. We used
an I2C scanner to find and update the correct address in the code.
3. MQ Sensor Instability - Sensors gave erratic readings initially because they weren’t preheated.
After powering them continuously for 24–48 hours, the readings stabilized.
4. Weak 9V Battery - The 9V battery couldn’t supply enough current, causing unstable behavior.
Switching to 18650 Li-ion batteries solved the power issue.
5. 7805 Overheating - The 7805 regulator overheated due to inefficient voltage drop. Replacing it
with an LM2596 buck converter ensured stable and cooler operation.
6. PCB Design Issues - As beginners, we struggled with layout and spacing. The board had incorrect
pin headers and lacked room for some sensors. The next version will include proper spacing and
alignment.
7. Box Design Fit - We didn’t plan holes for wire exits and connectors, leading to manual adjustments.
We'll finalize placement before fabricating the next enclosure.
8. Ratioing Limitations - Ratioing was used due to lack of clean-air data but didn’t help in accurate
calibration. We now plan proper calibration using clean air and standard gas value
FUTURE IMPROVEMENTS
Calibrate each sensor using standard gas samples and clean-air baselines (Ro) for
accurate gas concentration detection.
Redesign the PCB with correct pin spacing and layout to ensure easier assembly and
compatibility with all sensors.
Improve enclosure design by planning precise cutouts for wiring, sensor exposure, and
ventilation before fabrication.
Explore data-driven methods or machine learning to classify gases based on sensor
response patterns.
To enhance usability, we have added a Wi-Fi module for real-time monitoring. This allows
sensor data to be transmitted wirelessly to a remote dashboard or cloud service, enabling
continuous supervision from a central control room or mobile device. It significantly
improves the system’s scalability and practicality for large-scale deployments, such as
events or industrial use, where on-site access to each device may not be feasible.
REAL-WORLD APPLICATIONS
Our gas detection system can be adapted to various real-life safety and environmental use-
cases:
Forest Fire Detection - The combination of flame and gas sensors enables early
identification of smoke and combustion gases, allowing authorities to respond quickly
before a fire escalates.
Methane Gas Detection in Sewers - Methane buildup in closed underground environments
is dangerous. This system can provide alerts in real-time, helping maintenance teams take
preventive measures and avoid health hazards or explosions.
Odor Monitoring in Public Toilets - By detecting hydrogen sulfide and ammonia levels, the
system can automatically trigger ventilation systems or cleaning notifications, improving
hygiene and user comfort.
LPG Leak Detection in Kitchens and Restaurants - Ensures early detection of gas leaks to
prevent fire hazards, especially in commercial kitchens with heavy cylinder use.
Air Quality Monitoring in Industrial Zones - Tracks pollutant gases and temperature-
humidity levels, helping industries stay compliant with environmental standards and
ensure worker safety.
These applications demonstrate the adaptability of our system for both small-scale (homes,
toilets) and large-scale (industries, public infrastructure) deployments
Thank you.