Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Project Documentation

Arduino UNO Based Gas Detection System with LCD Display and Alert Buzzer

Image of Arduino UNO Based Gas Detection System with LCD Display and Alert Buzzer

Circuit Documentation

Summary of the Circuit

This circuit integrates an Arduino UNO microcontroller with an MQ-2 gas sensor, a buzzer, and an LCD Display (16x4 characters) with an I2C interface. The Arduino UNO serves as the central processing unit, interfacing with the gas sensor to detect the presence of gases and triggering the buzzer as an alarm. The LCD display provides a user interface to display messages or sensor readings. The circuit is powered by the Arduino's 5V output, and all components share a common ground.

Component List

Arduino UNO

  • Description: A microcontroller board based on the ATmega328P.
  • Purpose: Acts as the central controller for the circuit, reading sensor data, controlling the buzzer, and communicating with the LCD display.
  • Pins: UNUSED, IOREF, Reset, 3.3V, 5V, GND, Vin, Analog (A0-A5), SCL, SDA, AREF, Digital (D0-D13).

MQ-2 Gas Sensor

  • Description: A gas sensor capable of detecting a variety of gases including LPG, smoke, and alcohol vapor.
  • Purpose: Monitors the environment for the presence of gases and provides analog and digital signals.
  • Pins: VCC, GND, A0 (Analog output), D0 (Digital output).

Buzzer

  • Description: An electromechanical component that produces sound.
  • Purpose: Acts as an audible alert system when triggered by the Arduino.
  • Pins: PIN (signal input), GND.

LCD Display 16x4 I2C

  • Description: A 16x4 character LCD display with an I2C interface for communication.
  • Purpose: Displays information such as sensor readings and status messages.
  • Pins: SCL (I2C clock), SDA (I2C data), VCC, GND.

Wiring Details

Arduino UNO

  • 5V to:
    • MQ-2 Sensor VCC
    • LCD Display VCC
  • GND to:
    • Buzzer GND
    • MQ-2 Sensor GND
    • LCD Display GND
  • A1 to MQ-2 Sensor D0
  • D3 to Buzzer PIN
  • A4 (SDA) to LCD Display SDA
  • A5 (SCL) to LCD Display SCL

MQ-2 Gas Sensor

  • VCC to Arduino UNO 5V
  • GND to Arduino UNO GND
  • D0 to Arduino UNO A1

Buzzer

  • PIN to Arduino UNO D3
  • GND to Arduino UNO GND

LCD Display 16x4 I2C

  • SCL to Arduino UNO A5
  • SDA to Arduino UNO A4
  • VCC to Arduino UNO 5V
  • GND to Arduino UNO GND

Documented Code

Arduino UNO Code (sketch.ino)

void setup() {
  // put your setup code here, to run once:

}

void loop() {
  // put your main code here, to run repeatedly:

}

Note: The provided code is a template and does not include specific functionality. It should be expanded to initialize the I2C interface for the LCD, set up the buzzer and MQ-2 sensor, and include the main logic for reading the sensor data and triggering the buzzer and display updates.