Arduino UNO Battery-Powered Robotic Car with Ultrasonic Sensor and Motor Driver
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This circuit involves an Arduino UNO microcontroller, an L298N DC motor driver, four hobby motors, an ultrasonic sensor, a servo motor, and a 18650 Li-ion battery pack. The Arduino UNO serves as the central controller, interfacing with the motor driver to control the motors, the ultrasonic sensor for distance measurement, and the servo motor for precise angular control. The battery pack provides the necessary power to the motor driver and the Arduino.
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 module.
- 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
Motor amarillo motorreductor hobby (4 units)
- Description: A small DC motor with a gearbox.
- Pins: vcc, GND
Ultrasonic Sensor
- Description: A sensor used for distance measurement.
- Pins: +VCC, Trigger, Echo, GND
Tower Pro SG90 Servo
- Description: A small servo motor for precise angular control.
- Pins: Signal, +5V, GND
18650 Li-ion Battery x 2
- Description: A pair of rechargeable lithium-ion batteries.
- Pins: +, -
Wiring Details
Arduino UNO
5V connected to:
- Tower Pro SG90 servo (+5V)
- Ultrasonic Sensor (+VCC)
GND connected to:
- Tower Pro SG90 servo (GND)
- 18650 Li-ion Battery x 2 (-)
- L298N DC motor driver (GND)
- Ultrasonic Sensor (GND)
Vin connected to:
- L298N DC motor driver (5V)
D12 connected to:
- Ultrasonic Sensor (Echo)
D11 connected to:
- Ultrasonic Sensor (Trigger)
D9 connected to:
- Tower Pro SG90 servo (Signal)
D8 connected to:
- L298N DC motor driver (ENB)
D7 connected to:
- L298N DC motor driver (IN4)
D6 connected to:
- L298N DC motor driver (IN3)
D5 connected to:
- L298N DC motor driver (IN2)
D4 connected to:
- L298N DC motor driver (IN1)
D3 connected to:
- L298N DC motor driver (ENA)
L298N DC Motor Driver
OUT1 connected to:
- Motor amarillo motorreductor hobby (GND)
- Motor amarillo motorreductor hobby (GND)
OUT2 connected to:
- Motor amarillo motorreductor hobby (vcc)
- Motor amarillo motorreductor hobby (vcc)
OUT3 connected to:
- Motor amarillo motorreductor hobby (vcc)
- Motor amarillo motorreductor hobby (vcc)
OUT4 connected to:
- Motor amarillo motorreductor hobby (GND)
- Motor amarillo motorreductor hobby (GND)
12V connected to:
- 18650 Li-ion Battery x 2 (+)
Motor amarillo motorreductor hobby
GND connected to:
- L298N DC motor driver (OUT1)
- L298N DC motor driver (OUT4)
vcc connected to:
- L298N DC motor driver (OUT2)
- L298N DC motor driver (OUT3)
Ultrasonic Sensor
+VCC connected to:
- Arduino UNO (5V)
Trigger connected to:
- Arduino UNO (D11)
Echo connected to:
- Arduino UNO (D12)
GND connected to:
- Arduino UNO (GND)
Tower Pro SG90 Servo
Signal connected to:
- Arduino UNO (D9)
+5V connected to:
- Arduino UNO (5V)
GND connected to:
- Arduino UNO (GND)
18650 Li-ion Battery x 2
+ connected to:
- L298N DC motor driver (12V)
- connected to:
- Arduino UNO (GND)
- L298N DC motor driver (GND)
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.txt