Smoke and gas detecting using MQ-6 sensor & Arduino
"The consequences of fire disasters go beyond flames—
they affect people, communities, and the environment."
1)Threat to Life:
Fires can cause severe injuries or fatalities due to burns, smoke
inhalation, or panic.
Even a small fire can quickly become dangerous if not detected early.
2)Property Damage
Homes, offices, factories, and vehicles can be partially or completely
destroyed.
Furniture, electronics, documents, and valuables often cannot be
recovered.
3)Economic Losses:
Businesses may lose inventory, machinery, and production time,
leading to financial setbacks.
Individuals face repair and replacement costs for their damaged
property.
4)Environmental Impact:
Fires release toxic smoke and gases that pollute air and water.
Forest or grass fires destroy habitats, kill animals, and contribute to
climate change.
5)Social Hardships:
Families may be displaced due to home destruction.
Victims often suffer psychological stress, trauma, or anxiety.
Fire emergencies put pressure on hospitals, fire departments, and relief
organizations.
6)Infrastructure Damage:
Fires can damage roads, power lines, and communication networks,
disrupting daily life.
Essential services like electricity, water, and transport may be
temporarily unavailable.
7)Industrial Hazards:
Fires in factories, chemical plants, or fuel storage areas can cause
explosions or chemical contamination.
Such incidents may have long-term environmental and health
consequences.
[If you want you may add some practical examples from your experience.]
Purposes of the project:
To design and implement a low-cost fire alarm system
using an Arduino and MQ-6 smoke sensor.
Aims to detect smoke or fire early and alert people through a buzzer and LED.
This system can help prevent loss of life, property damage, and reduce fire-related
risks in homes, offices, and industries.
Goal: Sending sms,alarms as soon as the gas leakage, smoke or fire is
noticed.
Importance:
OR,
Why choosing Arduino system not traditional alarms?
Customizable: Arduino allows you to set your own thresholds, add extra sensors, or
change the alert system according to your [Link] alarms are fixed and cannot
be easily modified.
Low Cost: Affordable for small projects.
Educational: Teaches electronics and programming, which traditional alarms doesn't
offer.
Expandable: can connect it to GSM, Wi-Fi, or LCD displays, or trigger multiple
alerts, which traditional alarms may not support.
Objective:
Detecting fire/smoke/any gas leakage
Affordable
Sends alert
Components :
ESP32
16x2 lcd display
i2c module
2x 3.7V battery
2s battery case
Veroboard
flame sensor
MQ6 gas sensor
dht11
buzzer
jumper wire
MP1484
Charging case and tp4056
PVC white board
power switch
bc547
1k resistor
Working Principle:
Working Procedure of MQ-6 with Arduino Fire Alarm
1. Power Supply
o The Arduino board and MQ-6 gas sensor are powered by a 5V supply through the
Arduino (USB or external power).
2. Gas Sensing
o The MQ-6 sensor detects combustible gases (LPG, propane, butane) in the
surrounding air.
o When these gases are present, the sensor’s internal resistance decreases,
producing a higher output voltage.
3. Signal to Arduino
o The sensor sends an analog voltage signal proportional to the gas concentration
to the Arduino’s Analog Input pin (A0).
4. Reading & Comparing
o Arduino reads the analog value (0–1023).
o This value is compared with a predefined threshold (e.g., 350 or higher).
5. Decision Making
o If value < threshold, system stays idle (normal condition).
o If value ≥ threshold, Arduino considers it as a possible gas leak or fire
condition.
6. Triggering Alarm
o Arduino activates the buzzer and LED to alert immediately.
o Optional:
Display warning on an LCD screen.
Send SMS alert using GSM module.
Activate a relay to control an exhaust fan or cut off power supply.
7. Resetting the System
o When gas concentration drops below the threshold, the alarm stops and the
system returns to monitoring mode.
Calibration :
Calibration of the MQ-6 sensor is crucial because its resistance changes with temperature,
humidity, and air quality. Here’s a clear explanation:
What is Calibration?
Calibration means adjusting or interpreting the sensor readings so they accurately represent the
actual gas concentration. For MQ sensors, it usually involves determining the clean air
resistance (Ro) and using it to calculate gas levels.
Steps to Calibrate MQ-6 Sensor
1. Power the Sensor and Warm-up:
o Connect the MQ-6 sensor to Arduino.
o Allow the sensor to warm up for 20–30 minutes for stable readings.
2. Read Baseline Value (Ro):
o Place the sensor in clean air (no gas).
o Use Arduino Serial Monitor to read the analog value (usually between 200–300).
o Record this as your baseline resistance.
3. Set Threshold Value:
o Analyze readings when gas (LPG or smoke) is present.
o Choose a threshold slightly higher than the clean air value.
Example: If clean air = 200, threshold = 350 or 400.
4. Fine-Tune by Testing:
o Expose the sensor to gas (but safely, using a small amount like LPG near the
sensor).
o Observe when the alarm triggers.
o Adjust threshold in code if needed.
Why is Calibration Important?
Avoids false alarms in normal conditions.
Ensures early detection of actual gas leaks.
Adapts to environmental changes.
Example Serial Monitor Output:
MQ-6 Sensor Warm-up...
Sensor Ready. Reading Values:
Gas Level: 210
Gas Level: 215
Gas Level: 220
Gas Level: 225
Gas Level: 230
Gas Level: 600 <-- Gas detected!
Gas Level: 620 <-- Above threshold (350), ALARM ON!
Gas Level: 250
Gas Level: 220 <-- Back to normal
How It Works:
First few readings (210–230) = Clean air baseline.
When gas is detected, values rise above 350 threshold.
Arduino code checks these values in real-time and triggers the buzzer/LED if threshold
is crossed.
When it drops back below threshold, alarm stops.
Demo: live / visual explaination
Application :
Home safety
Industrial safety
Automobile safety
Restaurant and commercial kitchen
Smart home and IoT project
Warehouses and storage units
Hospital safety
Future Enhancement :
IoT Integration: Send alerts via SMS,emergency call, email, or mobile app.
Automatic Fire Suppression: Add sprinkler or extinguisher system.
Battery Backup: Ensure system works during power outages.
AI-based Analysis: Distinguish between harmless smoke and real danger.
Multi-Sensor Upgrade: Include temperature, flame, and smoke sensors.
Voice Alerts: Multi-language voice warnings instead of buzzer.
Mobile App Dashboard: Real-time gas level monitoring on smartphone.
Conclusion:
Our Arduino-based fire alarm system using the MQ-6 sensor provides a low-
cost, efficient, and reliable solution for detecting harmful gases and
potential fire hazards. By setting a proper threshold, the system can alert
users instantly, reducing the risk of accidents. With its simple design and
capability for future upgrades like IoT connectivity and automation, this
project demonstrates how modern technology can enhance safety and
prevent disasters.
Gain an in-depth understanding
What is Arduino?
Arduino is an open-source electronics platform that combines a
microcontroller board with easy-to-use programming software. It allows users
to read inputs from sensors (like the MQ-6 smoke sensor) and control
outputs (like LEDs, buzzers, or motors) based on programmed instructions.
Arduino is beginner-friendly, low-cost, and highly versatile, making it
ideal for DIY electronics, automation, and robotics projects.
What is MQ-6 sensor?
The MQ-6 sensor is a gas sensor module commonly used for
detecting LPG (Liquefied Petroleum Gas), butane, propane,
and other combustible gases in the air. It’s part of the MQ series
of gas sensors, which are widely used in Arduino, Raspberry Pi,
and other microcontroller projects for gas leakage detection
systems.
Key Features
Detects: LPG, butane, propane (also responds to natural gas and smoke to some extent)
What is the threshold?
The threshold is a predefined value that tells your Arduino when to consider the smoke level
“dangerous” and activate the alarm.
How it works with MQ-6:
o MQ-6 outputs an analog value between 0 and 1023 depending on the smoke
concentration.
o In clean air, the sensor usually reads around 150–250.
o When there is smoke, the reading increases (e.g., 500–900).
o You set a threshold value somewhere between clean air and smoky air (e.g.,
350).
If the reading of threshold exceeds 350, then it will be me a smoke detecting alarm.
Why it’s important:
The threshold prevents false alarms from minor air particles or dust. Only when smoke crosses
the threshold, the alarm is triggered.