Arduino UNO-Based Battery-Powered Robotic Car with Ultrasonic and IR 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, DC motors, a servo motor, and a Bluetooth module. The circuit is designed to interface with multiple sensors and actuators, providing a comprehensive setup for a robotics or automation project.
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
Ultrasonic Sensor
- Description: A sensor used to measure distance by using ultrasonic waves.
- Pins: +VCC, Trigger, Echo, GND
DC Motor
- Description: A motor that runs on direct current (DC) electricity.
- Pins: pin 1, pin 2
IR Sensor
- Description: An infrared sensor used for detecting objects.
- Pins: out, gnd, vcc
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
Micro Servo 9G
- Description: A small servo motor used for precise control of angular position.
- Pins: GND, +5V, PWM
LM393
- Description: A voltage comparator used in various sensor applications.
- Pins: A0, D0, GND, VCC
18650 Li-ion Battery x 2
- Description: Rechargeable lithium-ion batteries.
- Pins: +, -
HC-05 Bluetooth Module
- Description: A Bluetooth module used for wireless communication.
- Pins: Key, VCC, GND, TXD, RXD, State
Wiring Details
Arduino UNO
- 5V: Connected to VCC of IR sensors, Micro servo 9G, HC-05 Bluetooth Module, LM393 sensors, and Ultrasonic Sensor.
- GND: Connected to GND of IR sensors, Micro servo 9G, HC-05 Bluetooth Module, LM393 sensors, and Ultrasonic Sensor.
- A0: Connected to A0 of LM393 sensors.
- D10: Connected to ENB of L298N DC motor driver and Echo of Ultrasonic Sensor.
- D9: Connected to ENA of L298N DC motor driver and Trigger of Ultrasonic Sensor.
- D7: Connected to IN4 of L298N DC motor driver.
- D6: Connected to IN3 of L298N DC motor driver.
- D5: Connected to IN2 of L298N DC motor driver.
- D4: Connected to IN1 of L298N DC motor driver.
- D3: Connected to PWM of Micro servo 9G.
- D2: Connected to out of IR sensors.
- D1: Connected to RXD of HC-05 Bluetooth Module.
- D0: Connected to TXD of HC-05 Bluetooth Module and D0 of LM393 sensors.
Ultrasonic Sensor
- +VCC: Connected to 5V of Arduino UNO.
- GND: Connected to GND of Arduino UNO.
- Trigger: Connected to D9 of Arduino UNO.
- Echo: Connected to D10 of Arduino UNO.
DC Motor
- Motor 1:
- pin 1: Connected to OUT3 of L298N DC motor driver.
- pin 2: Connected to OUT4 of L298N DC motor driver.
- Motor 2:
- pin 1: Connected to OUT1 of L298N DC motor driver.
- pin 2: Connected to OUT2 of L298N DC motor driver.
IR Sensor
- VCC: Connected to 5V of Arduino UNO.
- GND: Connected to GND of Arduino UNO.
- out: Connected to D2 of Arduino UNO.
L298N DC Motor Driver
- ENB: Connected to D10 of Arduino UNO.
- ENA: Connected to D9 of Arduino UNO.
- IN4: Connected to D7 of Arduino UNO.
- IN3: Connected to D6 of Arduino UNO.
- IN2: Connected to D5 of Arduino UNO.
- IN1: Connected to D4 of Arduino UNO.
- OUT3: Connected to pin 1 of DC Motor 1.
- OUT4: Connected to pin 2 of DC Motor 1.
- OUT1: Connected to pin 1 of DC Motor 2.
- OUT2: Connected to pin 2 of DC Motor 2.
- 12V: Connected to + of 18650 Li-ion Battery x 2.
- GND: Connected to - of 18650 Li-ion Battery x 2.
Micro Servo 9G
- +5V: Connected to 5V of Arduino UNO.
- GND: Connected to GND of Arduino UNO.
- PWM: Connected to D3 of Arduino UNO.
LM393
- VCC: Connected to 5V of Arduino UNO.
- GND: Connected to GND of Arduino UNO.
- A0: Connected to A0 of Arduino UNO.
- D0: Connected to D0 of Arduino UNO.
18650 Li-ion Battery x 2
- +: Connected to 12V of L298N DC motor driver.
- -: Connected to GND of L298N DC motor driver.
HC-05 Bluetooth Module
- VCC: Connected to 5V of Arduino UNO.
- GND: Connected to GND of Arduino UNO.
- RXD: Connected to D1 of Arduino UNO.
- TXD: Connected to D0 of Arduino UNO.
Documented Code
Arduino UNO Code
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
This code is a basic template for the Arduino UNO. The setup() function is where you initialize your components and settings, and the loop() function is where the main logic of your program runs repeatedly.