This project is a Fire Detection System built using an Arduino Uno, an MQ-2 smoke sensor, an LED, and a buzzer. It detects smoke levels and provides a local visual and audible alert, making it useful for fire safety and early-warning applications.
- πΉ Arduino Uno β Processes sensor data and controls outputs.
- πΉ MQ-2 Smoke Sensor β Detects smoke and combustible gases.
- πΉ LED (+ ~220β330 Ξ© resistor) β Visual alert when smoke is detected.
- πΉ Buzzer β Audible alert for fire warnings.
| Arduino Pin | Connects to |
|---|---|
| A0 | MQ-2 analog out (AO) (sensor VCC β 5V, GND β GND) |
| D7 | LED + via a ~220β330 Ξ© resistor (LED β β GND) |
| D8 | Buzzer + (buzzer β β GND) |
β οΈ MQ-2 sensors need their heater to warm up before readings are reliable. The sketch ignores the sensor for the first ~20 s after power-on (WARMUP_MS) to avoid boot-time false alarms, and uses a hysteresis band around the trip point so the alarm latches instead of chattering. The threshold (ALARM_ON/ALARM_OFF) is uncalibrated β tune it per sensor and environment.
1οΈβ£ After a short warm-up, the MQ-2 sensor continuously monitors the air.
2οΈβ£ If smoke concentration exceeds the trip point, the Arduino activates the LED and buzzer.
3οΈβ£ The alarm clears once the smoke level falls back below the lower threshold.
β
Detects smoke and combustible gases using an MQ-2 sensor
β
Local visual (LED) + audible (buzzer) alert
β
Sensor warm-up gate avoids false alarms at power-on
β
Hysteresis prevents alarm chatter near the threshold
πΉ Fire Alarm System β Early warning for fire hazards.
πΉ Gas Leak Detection β Detects combustible gases in homes and workshops.
πΉ Kitchen Safety β Alerts users of excess smoke while cooking.
πΉ Workshop / Garage Monitoring β A simple standalone smoke alert.
βΉοΈ This is a standalone local alert (LED + buzzer) with no networking. Remote/IoT monitoring or home-automation integration would be a future extension, not part of this build.