Arduino UNO-Based Battery-Powered Gas Detection and Motor Control System with LCD Display
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This document provides a detailed overview of a circuit that includes an Arduino UNO microcontroller, a DC motor controlled by an L293D motor driver, a Li-ion battery, a 9V battery, an MQ-5 gas sensor, a green LED, a rocker switch, and a 16x2 I2C LCD display. The circuit is designed to control the DC motor and display sensor readings on the LCD.
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
Li-ion battery 18650-2000mAh 3.7V 7.4WH
- Description: A rechargeable lithium-ion battery.
- Pins: +, -
DC Motor
- Description: A simple DC motor.
- Pins: pin 1, pin 2
L293D
- Description: A quadruple high-current half-H driver.
- Pins: Enable 1,2, Input 1, Output 1, GND, Output 2, Input 2, Vcc2, Vcc1, Input 4, Output 4, Output 3, Input 3, Enable 3,4
LED: Two Pin (green)
- Description: A green LED with two pins.
- Pins: cathode, anode
MQ-5
- Description: A gas sensor for detecting LPG, natural gas, and coal gas.
- Pins: VCC, GND, Digi Out, Analog out
9V battery
- Description: A standard 9V battery.
- Pins: +, -
Rocker Switch
- Description: A simple on/off rocker switch.
- Pins: 1, 2
16x2 I2C LCD
- Description: A 16x2 character LCD display with I2C interface.
- Pins: GND, VCC, SDA, SCL
Wiring Details
Arduino UNO
5V connected to:
- L293D (Enable 1,2)
- L293D (Vcc1)
- MQ-5 (VCC)
D5 connected to:
- L293D (Input 1)
GND connected to:
- Li-ion battery (18650-2000mAh 3.7V 7.4WH) (-)
- L293D (GND)
- MQ-5 (GND)
- Rocker Switch (1)
- 9V battery (-)
- LED (cathode)
Vin connected to:
- 9V battery (+)
A0 connected to:
- MQ-5 (Analog out)
A4 connected to:
- 16x2 I2C LCD (SDA)
A5 connected to:
- 16x2 I2C LCD (SCL)
D8 connected to:
- Rocker Switch (2)
D7 connected to:
- LED (anode)
D6 connected to:
- L293D (Input 2)
Li-ion battery 18650-2000mAh 3.7V 7.4WH
- + connected to:
- L293D (Vcc2)
DC Motor
pin 1 connected to:
- L293D (Output 1)
pin 2 connected to:
- L293D (Output 2)
L293D
Enable 1,2 connected to:
- Arduino UNO (5V)
Input 1 connected to:
- Arduino UNO (D5)
Output 1 connected to:
- DC Motor (pin 1)
GND connected to:
- Arduino UNO (GND)
- Li-ion battery (18650-2000mAh 3.7V 7.4WH) (-)
- MQ-5 (GND)
- Rocker Switch (1)
Output 2 connected to:
- DC Motor (pin 2)
Input 2 connected to:
- Arduino UNO (D6)
Vcc2 connected to:
- Li-ion battery (18650-2000mAh 3.7V 7.4WH) (+)
Vcc1 connected to:
- Arduino UNO (5V)
LED: Two Pin (green)
cathode connected to:
- Arduino UNO (GND)
anode connected to:
- Arduino UNO (D7)
MQ-5
VCC connected to:
- Arduino UNO (5V)
GND connected to:
- Arduino UNO (GND)
Analog out connected to:
- Arduino UNO (A0)
9V battery
+ connected to:
- Arduino UNO (Vin)
- connected to:
- Arduino UNO (GND)
Rocker Switch
1 connected to:
- Arduino UNO (GND)
2 connected to:
- Arduino UNO (D8)
16x2 I2C LCD
GND connected to:
- Arduino UNO (GND)
VCC connected to:
- Arduino UNO (5V)
SDA connected to:
- Arduino UNO (A4)
SCL connected to:
- Arduino UNO (A5)
Documented 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