Arduino UNO-Based Gas Detection and Motor Control System with Battery Power
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, an L298N DC motor driver, a 9V battery, a DC motor, an MQ-5 gas sensor, and a Micro servo 9G. The circuit is designed to control a DC motor and a servo motor, and to read data from a gas sensor.
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
L298N DC Motor Driver
- Description: A dual H-bridge motor driver that allows control of two DC motors.
- Pins: OUT1, OUT2, 12V, GND, 5V, OUT3, OUT4, 5V-ENA-JMP-I, 5V-ENA-JMP-O, +5V-J1, +5V-J2, ENA, IN1, IN2, IN3, IN4, ENB
9V Battery
- Description: A standard 9V battery used to power the circuit.
- Pins: -, +
DC Motor
- Description: A simple DC motor.
- Pins: positive, negative
MQ-5 Gas Sensor
- Description: A gas sensor module that detects LPG, natural gas, and coal gas.
- Pins: VCC, GND, Digi Out, Analog out
Micro Servo 9G
- Description: A small servo motor used for precise control of angular position.
- Pins: GND, +5V, PWM
Wiring Details
Arduino UNO
5V connected to:
- Micro servo 9G (+5V)
- MQ-5 Gas Sensor (VCC)
GND connected to:
- MQ-5 Gas Sensor (GND)
- Micro servo 9G (GND)
- L298N DC Motor Driver (GND)
- 9V Battery (-)
A0 connected to:
- MQ-5 Gas Sensor (Analog out)
D13 connected to:
- MQ-5 Gas Sensor (Digi Out)
D11 connected to:
- L298N DC Motor Driver (IN1)
D10 connected to:
- L298N DC Motor Driver (IN2)
D9 connected to:
- L298N DC Motor Driver (ENA)
D6 connected to:
- Micro servo 9G (PWM)
L298N DC Motor Driver
OUT1 connected to:
- DC Motor (positive)
OUT2 connected to:
- DC Motor (negative)
5V connected to:
- 9V Battery (+)
9V Battery
- connected to:
- Arduino UNO (GND)
- L298N DC Motor Driver (GND)
+ connected to:
- L298N DC Motor Driver (5V)
DC Motor
positive connected to:
- L298N DC Motor Driver (OUT1)
negative connected to:
- L298N DC Motor Driver (OUT2)
MQ-5 Gas Sensor
VCC connected to:
- Arduino UNO (5V)
GND connected to:
- Arduino UNO (GND)
Analog out connected to:
- Arduino UNO (A0)
Digi Out connected to:
- Arduino UNO (D13)
Micro Servo 9G
GND connected to:
- Arduino UNO (GND)
+5V connected to:
- Arduino UNO (5V)
PWM connected to:
- Arduino UNO (D6)
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:
}
Additional Documentation (documentation.txt)
This document provides a comprehensive overview of the circuit, including a summary, component list, wiring details, and documented code.