Arduino UNO-Based Battery-Powered Robotic Vehicle with IR and Ultrasonic Sensors
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, various sensors, a motor driver, motors, and power sources. The circuit is designed to interface with multiple sensors and control motors using the L298N DC motor driver. The Arduino UNO serves as the central control unit, processing sensor inputs and controlling the motors accordingly.
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
Motor amarillo motorreductor hobby
- Description: A small DC motor with a gearbox.
- Pins: vcc, GND
L298N DC motor driver
- Description: A dual H-bridge motor driver.
- 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
IR Sensor
- Description: An infrared sensor for obstacle detection.
- Pins: out, gnd, vcc
Ultrasonic Sensor
- Description: A sensor for measuring distance using ultrasonic waves.
- Pins: +VCC, Trigger, Echo, GND
9V Battery
- Description: A standard 9V battery for power supply.
- Pins: -, +
3xAA Battery
- Description: A battery pack holding three AA batteries.
- Pins: VCC, GND
Pushbutton START
- Description: A pushbutton switch for starting the circuit.
- Pins: NC, NO
Comment
- Description: Placeholder for comments in the circuit.
- Pins: None
Wiring Details
Arduino UNO
- GND: Connected to the GND pins of IR sensors, Ultrasonic Sensor, 9V Battery, 3xAA Battery, and L298N DC motor driver.
- Vin: Connected to the NO pin of the Pushbutton START.
- A2: Connected to the out pin of one IR sensor.
- A3: Connected to the out pin of the other IR sensor.
- D9: Connected to the Echo pin of the Ultrasonic Sensor.
- D8: Connected to the Trigger pin of the Ultrasonic Sensor.
- D7: Connected to the ENA pin of the L298N DC motor driver.
- D6: Connected to the IN1 pin of the L298N DC motor driver.
- D5: Connected to the IN2 pin of the L298N DC motor driver.
- D4: Connected to the IN3 pin of the L298N DC motor driver.
- D3: Connected to the IN4 pin of the L298N DC motor driver.
- D2: Connected to the ENB pin of the L298N DC motor driver.
Motor amarillo motorreductor hobby
- vcc: Connected to the OUT3 pin of the L298N DC motor driver.
- GND: Connected to the OUT4 pin of the L298N DC motor driver.
L298N DC motor driver
- 5V: Connected to the vcc pins of both IR sensors and the +VCC pin of the Ultrasonic Sensor.
- GND: Connected to the GND pins of IR sensors, Ultrasonic Sensor, 9V Battery, 3xAA Battery, and Arduino UNO.
- OUT1: Connected to the vcc pin of one Motor amarillo motorreductor hobby.
- OUT2: Connected to the GND pin of one Motor amarillo motorreductor hobby.
- OUT3: Connected to the vcc pin of the other Motor amarillo motorreductor hobby.
- OUT4: Connected to the GND pin of the other Motor amarillo motorreductor hobby.
- 12V: Connected to the VCC pin of the 3xAA Battery.
IR Sensor
- vcc: Connected to the 5V pin of the L298N DC motor driver.
- gnd: Connected to the GND pin of the L298N DC motor driver.
- out: One connected to A2 pin and the other to A3 pin of the Arduino UNO.
Ultrasonic Sensor
- +VCC: Connected to the 5V pin of the L298N DC motor driver.
- GND: Connected to the GND pin of the L298N DC motor driver.
- Trigger: Connected to the D8 pin of the Arduino UNO.
- Echo: Connected to the D9 pin of the Arduino UNO.
9V Battery
- -: Connected to the GND pin of the Arduino UNO.
- +: Connected to the NO pin of the Pushbutton START.
3xAA Battery
- VCC: Connected to the 12V pin of the L298N DC motor driver.
- GND: Connected to the GND pin of the L298N DC motor driver.
Pushbutton START
- NO: Connected to the Vin pin of the Arduino UNO and the + pin of the 9V Battery.
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:
}
Documentation (documentation.txt)
This document provides a comprehensive overview of the circuit, including the components used, their wiring details, and the code for the Arduino UNO microcontroller.