Arduino UNO Gas Leak Detector with MQ6 Sensor and Piezo Speaker
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This circuit consists of an Arduino UNO microcontroller, an MQ6 gas sensor, and a Piezo Speaker. The Arduino UNO serves as the central control unit, interfacing with the MQ6 gas sensor to detect gas levels and triggering the Piezo Speaker to produce sound based on the sensor readings.
Component List
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
- Purpose: Acts as the main control unit for the circuit.
MQ6 Gas Sensor
- Description: A gas sensor used to detect the presence of LPG, isobutane, propane, methane, alcohol, hydrogen, and smoke.
- Pins: VCC, GND, A0, DO
- Purpose: Detects gas levels and sends analog and digital signals to the Arduino UNO.
Piezo Speaker
- Description: A simple speaker that produces sound when a voltage is applied.
- Pins: pin1, pin2
- Purpose: Produces sound based on signals from the Arduino UNO.
Wiring Details
Arduino UNO
- 5V: Connected to VCC of the MQ6 Gas Sensor.
- GND: Connected to GND of the MQ6 Gas Sensor and pin1 of the Piezo Speaker.
- A0: Connected to A0 of the MQ6 Gas Sensor.
- D2: Connected to DO of the MQ6 Gas Sensor.
- D12: Connected to pin2 of the Piezo Speaker.
MQ6 Gas Sensor
- VCC: Connected to 5V of the Arduino UNO.
- GND: Connected to GND of the Arduino UNO.
- A0: Connected to A0 of the Arduino UNO.
- DO: Connected to D2 of the Arduino UNO.
Piezo Speaker
- pin1: Connected to GND of the Arduino UNO.
- pin2: Connected to D12 of the Arduino UNO.
Code Documentation
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:
}
documentation.txt
This document provides a comprehensive overview of the circuit, including a summary, detailed component descriptions, wiring details, and the code used in the Arduino UNO.