Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

Arduino UNO-Based LPG and Flame Detection System with Automatic Pump Activation

View and Edit Project In Cirkit DesignerImage of Arduino UNO-Based LPG and Flame Detection System with Automatic Pump Activation

Circuit Documentation

Summary

This document provides a detailed overview of an LPG and Flame Detection System. The system uses an Arduino UNO microcontroller to monitor a flame sensor and an MQ6 gas sensor. When a flame or high levels of LPG gas are detected, the system activates a buzzer and a pump. The following sections provide a comprehensive list of components, wiring details, and the embedded code used in the system.

Component List

  1. Arduino UNO

    • Description: A microcontroller board based on the ATmega328P.
    • Pins: UNUSED, IOREF, Reset, 3.3V, 5V, GND, Vin, A0, A1, A2, A3, A4, A5, SCL, SDA, AREF, D13, D12, D11, D10, D9, D8, D7, D6, D5, D4, D3, D2, D1, D0
  2. Flame Sensor

    • Description: A sensor used to detect flame or fire.
    • Pins: VCC, GND, D0, A0
  3. MQ6

    • Description: A gas sensor used to detect LPG.
    • Pins: VCC, GND, A0, DO
  4. Pump

    • Description: A pump used to extinguish fire.
    • Pins: +, -
  5. Buzzer

    • Description: An audio signaling device.
    • Pins: PIN, GND

Wiring Details

Arduino UNO

Flame Sensor

MQ6

Pump

Buzzer

Code Documentation

sketch.ino

//LPG & Flame Detection System  
#define buzzar 7
#define flame_sensor_pin A5
#define lpg_pin A1
#define pump 2

void setup() {
  pinMode(flame_sensor_pin, INPUT);
  pinMode(lpg_pin, INPUT);
  pinMode(buzzar, OUTPUT);
  pinMode(pump, OUTPUT);
}

void loop() {
  digitalWrite(pump, LOW);
  digitalWrite(buzzar, LOW);
  lpg();
  Fire();
}

void Fire() {
  int flame_pin = analogRead(flame_sensor_pin); // reading from the sensor
  if (flame_pin < 100) { // applying condition
    digitalWrite(buzzar, HIGH); // if state is high, then turn high the led
    delay(1000);
    digitalWrite(pump, HIGH);
    delay(2000);
  }
}

void lpg() {
  int GAS_VAL = analogRead(lpg_pin);
  if (GAS_VAL > 500) {
    digitalWrite(buzzar, HIGH);
    delay(2000);
  }
}

documentation.txt

//Kawshik Ahmed Ornob

This document provides a comprehensive overview of the LPG and Flame Detection System, including the components used, their wiring, and the embedded code.