Circuit Documentation
Summary
This circuit is designed to interface various sensors and actuators with an Arduino UNO microcontroller. It includes IR sensors for detecting objects, a DHT22 sensor for measuring temperature and humidity, an HC-SR04 ultrasonic sensor for distance measurement, a 12V 7Ah battery for power supply, and a L298N DC motor driver to control two DC motors. The circuit is powered by the 12V battery, with voltage regulation provided by the Arduino UNO and the L298N motor driver for the different components.
Component List
Arduino UNO
- Microcontroller board based on the ATmega328P
- It has 14 digital input/output pins, 6 analog inputs, a 16 MHz quartz crystal, a USB connection, a power jack, an ICSP header, and a reset button.
IR Sensor
- An infrared sensor capable of detecting obstacles and measuring distances.
- It has three pins: out, gnd, and vcc.
12V 7Ah Battery
- A rechargeable battery providing a 12V power source for the circuit.
- It has two pins: 12v + and 12v -.
DHT22
- A sensor for measuring ambient temperature and humidity.
- It has three pins: +, Out, and -.
L298N DC Motor Driver
- A module for controlling up to two DC motors with direction and speed control.
- It has multiple pins for motor outputs, power supply, and control signals.
DC Motor
- An electric motor that runs on direct current (DC) electricity.
- It has two pins: pin 1 and pin 2.
HC-SR04 Ultrasonic Sensor
- A sensor for measuring distances using ultrasonic waves.
- It has four pins: VCC, TRIG, ECHO, and GND.
Wiring Details
Arduino UNO
- 5V: Connected to VCC of HC-SR04, DHT22, and both IR sensors.
- GND: Common ground with HC-SR04, 12V Battery, L298N, both IR sensors, and DHT22.
- D2: Connected to TRIG of HC-SR04.
- D4: Connected to ECHO of HC-SR04.
- D5: Connected to OUT of one IR sensor.
- D10: Connected to Out of DHT22.
- D11: Connected to OUT of the other IR sensor.
- D13, D12, D9, D8, D7, D3: Connected to IN1, IN2, ENA, IN3, IN4, ENB of L298N respectively.
IR Sensors
- VCC: Connected to 5V on Arduino UNO.
- GND: Connected to common ground.
- OUT: Connected to D11 and D5 on Arduino UNO (for two different sensors).
12V 7Ah Battery
- 12v +: Connected to 12V on L298N.
- 12v -: Connected to common ground.
DHT22
- +: Connected to 5V on Arduino UNO.
- Out: Connected to D10 on Arduino UNO.
- -: Connected to common ground.
L298N DC Motor Driver
- 12V: Connected to 12v + of the 12V Battery.
- GND: Connected to common ground.
- 5V: Provides regulated 5V when enabled.
- ENA, ENB: Connected to D9 and D3 on Arduino UNO for enabling motor outputs.
- IN1, IN2, IN3, IN4: Connected to D13, D12, D8, D7 on Arduino UNO for motor control signals.
- OUT1, OUT2, OUT3, OUT4: Connected to the two DC motors.
DC Motors
- Each motor has two pins connected to OUT1, OUT2 for one motor and OUT3, OUT4 for the other motor on the L298N.
HC-SR04 Ultrasonic Sensor
- VCC: Connected to 5V on Arduino UNO.
- TRIG: Connected to D2 on Arduino UNO.
- ECHO: Connected to D4 on Arduino UNO.
- GND: Connected to common ground.
Documented Code
Arduino UNO Code (sketch.ino)
void setup() {
}
void loop() {
}
Note: The provided code is a template and does not include specific functionality. It should be populated with the setup and loop functions to control the connected components based on the requirements of the circuit's application.