QKZee Technologies

smoke sensor with arduino

A Comprehensive Guide to the Smoke Sensor MQ-2: Detection, Interfacing, and Applications

 

Introduction

The MQ-2 smoke sensor is a versatile and reliable module designed to detect a variety of gases, including methane, LPG, carbon monoxide, alcohol, propane, and hydrogen. Widely utilized in safety, security, and environmental monitoring projects, the MQ-2 is ideal for building smoke alarms, gas leak detectors, and air quality monitoring systems. Whether you’re a student, hobbyist, or professional, the MQ-2 sensor offers affordability, accuracy, and ease of use for your innovative projects.

What is the Smoke Sensor MQ-2?

The MQ-2 smoke sensor is a gas detection module that employs a semiconductor-based sensing element to identify the presence of harmful or flammable gases. It features:

Dual Output Modes:

 

 

Analog Output (AO):

Provides a continuous voltage signal proportional to gas concentration for precise monitoring.

Digital Output (DO):

 Delivers a simple HIGH or LOW signal when the gas concentration exceeds a predefined threshold, perfect for triggering alarms

Wide Range of Detection:

Capable of detecting gas concentrations from 300 ppm to 10,000 ppm.

Technical Specifications

  • Operating Voltage: 5V DC

  • Current Consumption: ≤150mA

  • Response Time: ≤10 seconds

  • Preheating Time: ~20 seconds

  • Detection Range: 300 ppm to 10,000 ppm


Pin Configuration

 
The MQ-2 sensor module comes with four essential pins:

 

  1. VCC: Connects to the 5V power supply.

  2. GND: Ground connection.

  3. DO (Digital Output): Outputs HIGH/LOW signals based on gas concentration.

  4. AO (Analog Output): Provides variable voltage proportional to gas concentration.

smoke sensor pin configration

How Does the MQ-2 Smoke Sensor Work?

The MQ-2 operates via a gas-sensitive resistor that changes resistance when exposed to gas molecules. This resistance variation is converted into an electrical signal, enabling accurate gas concentration monitoring


Interfacing the MQ-2 Sensor with Arduino Uno

 

Required Components:
 
  • MQ-2 smoke sensor module

  • Arduino Uno board

  • Jumper wires

  • Breadboard

  • LED (optional for visual indication)

Wiring Instructions:

  1. Connect VCC to the Arduino’s 5V pin.

  2. Connect GND to the Arduino’s GND pin.

  3. Connect AO to an analog input pin (e.g., A0) for analog readings.

  4. Connect DO to a digital pin (e.g., D2) for digital readings.

interfaceing of smoke detector sensor mq2 with arduino

Arduino code for smoke detection system 

This code reads the analog and digital values from the MQ-2 sensor. It lights up the LED if the gas concentration exceeds the threshold while displaying values on the Serial Monitor.

Applications of the MQ-2 Sensor

The MQ-2 sensor is highly versatile and finds applications in:

Smoke Alarm Detectors:

Early warning systems for fire hazards. Gas Leak Detectors: Monitoring LPG, methane,. other flammable gases.

Home Security Systems: 

Detecting hazardous gas leaks.

Environmental Monitoring:

Measuring air quality.

Science and Engineering Projects:

Ideal for school and final-year projects.

Buying MQ-2 Sensors from QKZee Technologies For authentic MQ-2 smoke sensors and other electronic components, visit QKZee Technologies at Hall Road, Lahore. Known for their reliable engineering services and high-quality products, QKZee Technologies is your one-stop shop for electronic components and project supplies in Pakistan.
 
 

Why Choose QKZee Technologies?

 

 

  1. Best Prices in Lahore: Affordable and genuine components for your projects.

  2. Wide Range of Products: From sensors to modules, catering to beginners and professionals alike.

  3. Exceptional Customer Service: Expert guidance for engineering and DIY projects.

  4. Convenient Location: Located at Hall Road, Lahore—a hub for electronics enthusiasts.

How to Connect with QKZee Technologies:

 

Scroll to Top