Arduino UNO-Based Battery-Powered Robotic Car with Ultrasonic Sensor and Motor Control
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This document provides a detailed overview of a circuit that includes an Arduino UNO, an L298N DC motor driver, a 12V battery, a 2.1mm DC barrel jack, multiple DC motors, a buzzer, an HC-SR04 ultrasonic sensor, and a micro servo. The circuit is designed to control the DC motors and the servo, read distance measurements from the ultrasonic sensor, and produce sound using the buzzer. The Arduino UNO serves as the main microcontroller, interfacing with the components through an Arduino Sensor Shield v5.0.
Component List
L298N DC Motor Driver
- Description: A dual H-Bridge motor driver that allows control of the speed and direction 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
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
Arduino Sensor Shield v5.0
- Description: A shield that simplifies the connection of sensors and actuators to the Arduino UNO.
- Pins: VCC, SD-VCC, SD-GND, SD-D11, SD-D10, SD-D13, SD-D12, URF01-VCC, URF01-A0, URF01-A1, URF01-GND, GND, SEL1, SEL2, A0-SIG, A0-VCC, A0-GND, A1-SIG, A1-VCC, A1-GND, A2-SIG, A2-VCC, A2-GND, A3-SIG, A3-VCC, A3-GND, A4-SIG, A4-VCC, A4-GND, A5-SIG, A5-VCC, A5-GND, IIC-SCL, IIC-SDA, IIC-GND, IIC-VCC, COM-TX, COM-RX, COM-GND, COM-VCC, APC220-, APC220-D0, APC220-D1, APC220-VCC, APC220-GND, BLUETOOTH-3V3, BLUETOOTH-GND, BLUETOOTH-D0, BLUETOOTH-D1, BLUETOOTH-VCC, AREF-S, AREF-V, AREF-G, GND-S, GND-V, GND-G, 13-S, 13-V, 13-G, 12-S, 12-V, 12-G, 11-S, 11-V, 11-G, 10-S, 10-V, 10-G, 9-S, 9-V, 9-G, 8-S, 8-V, 8-G, 7-S, 7-V, 7-G, 6-S, 6-V, 6-G, 5-S, 5-V, 5-G, 4-S, 4-V, 4-G, 3-S, 3-V, 3-G, 2-S, 2-V, 2-G, 1-S, 1-V, 1-G, 0-S, 0-V, 0-G, ParallelLCD-VCC, ParallelLCD-D13, ParallelLCD-GND, ParallelLCD-D12, ParallelLCD-D2, ParallelLCD-D11, ParallelLCD-D3, ParallelLCD-D10, ParallelLCD-D4, ParallelLCD-D9, ParallelLCD-D5, ParallelLCD-D8, ParallelLCD-D6, ParallelLCD-D7, SerialLCD-D4, SerialLCD-VCC, SerialLCD-D3, SerialLCD-, SerialLCD-D2, SerialLCD-GND
Battery 12V
- Description: A 12V battery used to power the circuit.
- Pins: +, -
2.1mm DC Barrel Jack
- Description: A barrel jack used to connect the 12V battery to the circuit.
- Pins: switch, sleeve, center
DC Motor
- Description: A DC motor used for various mechanical movements.
- Pins: pin 1, pin 2
Buzzer
- Description: A buzzer used to produce sound.
- Pins: PIN, GND
HC-SR04 Ultrasonic Sensor
- Description: An ultrasonic sensor used to measure distance.
- Pins: VCC, TRIG, ECHO, GND
Micro Servo 9G
- Description: A small servo motor used for precise control of angular position.
- Pins: GND, +5V, PWM
Wiring Details
L298N DC Motor Driver
- OUT1 connected to pin 2 of two DC Motors
- OUT2 connected to pin 1 of two DC Motors
- OUT3 connected to pin 2 of two other DC Motors
- OUT4 connected to pin 1 of two other DC Motors
- 12V connected to center of 2.1mm DC Barrel Jack and + of 12V battery
- GND connected to sleeve of 2.1mm DC Barrel Jack and - of 12V battery
- ENA connected to 3-S of Arduino Sensor Shield
- IN1 connected to 7-S of Arduino Sensor Shield
- IN2 connected to 8-S of Arduino Sensor Shield
- IN3 connected to 12-S of Arduino Sensor Shield
- IN4 connected to 13-S of Arduino Sensor Shield
- ENB connected to 5-S of Arduino Sensor Shield
Arduino UNO
- Connected to Arduino Sensor Shield v5.0
Arduino Sensor Shield v5.0
- 3-S connected to ENA of L298N DC Motor Driver
- 7-S connected to IN1 of L298N DC Motor Driver
- 8-S connected to IN2 of L298N DC Motor Driver
- 12-S connected to IN3 of L298N DC Motor Driver
- 13-S connected to IN4 of L298N DC Motor Driver
- 5-S connected to ENB of L298N DC Motor Driver
- 11-S connected to ECHO of HC-SR04 Ultrasonic Sensor
- 11-V connected to VCC of HC-SR04 Ultrasonic Sensor
- 11-G connected to GND of HC-SR04 Ultrasonic Sensor
- 9-S connected to PIN of Buzzer
- 9-G connected to GND of Buzzer
- 6-S connected to PWM of Micro Servo 9G
- 6-V connected to +5V of Micro Servo 9G
- 6-G connected to GND of Micro Servo 9G
- 2-S connected to TRIG of HC-SR04 Ultrasonic Sensor
Battery 12V
- + connected to center of 2.1mm DC Barrel Jack and 12V of L298N DC Motor Driver
- - connected to sleeve of 2.1mm DC Barrel Jack and GND of L298N DC Motor Driver
2.1mm DC Barrel Jack
- center connected to + of 12V battery and 12V of L298N DC Motor Driver
- sleeve connected to - of 12V battery and GND of L298N DC Motor Driver
DC Motor
- pin 1 of two DC Motors connected to OUT2 of L298N DC Motor Driver
- pin 2 of two DC Motors connected to OUT1 of L298N DC Motor Driver
- pin 1 of two other DC Motors connected to OUT4 of L298N DC Motor Driver
- pin 2 of two other DC Motors connected to OUT3 of L298N DC Motor Driver
Buzzer
- PIN connected to 9-S of Arduino Sensor Shield
- GND connected to 9-G of Arduino Sensor Shield
HC-SR04 Ultrasonic Sensor
- ECHO connected to 11-S of Arduino Sensor Shield
- VCC connected to 11-V of Arduino Sensor Shield
- GND connected to 11-G of Arduino Sensor Shield
- TRIG connected to 2-S of Arduino Sensor Shield