Battery-Powered Gas Leak Detector with Alarm Using MQ-2 Sensor and Relay
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This document provides a detailed description of a circuit that includes a gas sensor (MQ-2), a power supply (2x 18650 batteries), a rocker switch, a voltage regulator (7805), a 1-channel relay, and a piezo buzzer. The circuit is designed to detect gas and trigger an alarm using the piezo buzzer when gas is detected.
Component List
MQ-2 Gas Sensor
- Pins: GND, VCC, ANALOG, Digital
- Description: A gas sensor used to detect the presence of gases such as LPG, i-butane, propane, methane, alcohol, hydrogen, and smoke.
- Purpose in Circuit: Detects gas and sends a digital signal to the relay.
2x 18650 Batteries
- Pins: vcc, gnd
- Description: A pair of 18650 lithium-ion batteries used as the power source for the circuit.
- Purpose in Circuit: Provides power to the entire circuit.
Rocker Switch
- Pins: 1, 2
- Description: A switch used to control the power supply to the circuit.
- Purpose in Circuit: Turns the circuit on and off.
7805 Voltage Regulator
- Pins: Vin, Gnd, Vout
- Description: A voltage regulator that converts the battery voltage to a stable 5V output.
- Purpose in Circuit: Provides a stable 5V power supply to the components.
1 Channel Relay 5V
- Pins: VCC, GND, IN, NC, COM, NO
- Description: A relay module used to control the piezo buzzer.
- Purpose in Circuit: Activates the piezo buzzer when gas is detected.
Piezo Buzzer
- Pins: pin 1, pin 2
- Description: A buzzer used to produce an audible alarm.
- Purpose in Circuit: Sounds an alarm when gas is detected.
Wiring Details
MQ-2 Gas Sensor
- GND is connected to the common ground.
- VCC is connected to the 5V output from the 7805 voltage regulator.
- Digital is connected to the IN pin of the 1 Channel Relay 5V.
2x 18650 Batteries
- vcc is connected to pin 1 of the Rocker Switch.
- gnd is connected to the common ground.
Rocker Switch
- Pin 1 is connected to the vcc of the 2x 18650 Batteries.
- Pin 2 is connected to the Vin of the 7805 voltage regulator.
7805 Voltage Regulator
- Vin is connected to pin 2 of the Rocker Switch.
- Gnd is connected to the common ground.
- Vout is connected to the VCC of the 1 Channel Relay 5V and the VCC of the MQ-2 Gas Sensor.
1 Channel Relay 5V
- VCC is connected to the Vout of the 7805 voltage regulator.
- GND is connected to the common ground.
- IN is connected to the Digital pin of the MQ-2 Gas Sensor.
- NO is connected to pin 1 of the Piezo Buzzer.
- COM is connected to the Vout of the 7805 voltage regulator.
Piezo Buzzer
- Pin 1 is connected to the NO pin of the 1 Channel Relay 5V.
- Pin 2 is connected to the common ground.
Code
There is no code provided for this circuit.