Arduino UNO and L298N Motor Driver-Based Bluetooth-Controlled Robotic Car with Ultrasonic Sensor
View and Edit Project In Cirkit Designer
Circuit Documentation
Summary
This document provides a detailed overview of a circuit designed to control multiple DC motors using an Arduino UNO, an L298N motor driver, an HC-05 Bluetooth module, and an ultrasonic sensor. The circuit is powered by a 12V battery and includes connections for power, ground, and signal lines between the components. The Arduino UNO is programmed to control the motor driver and read data from the Bluetooth module and ultrasonic sensor.
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
HC-05 Bluetooth Module
- Description: A Bluetooth module used for wireless communication.
- Pins: Key, VCC, GND, TXD, RXD, State
12V Battery
- Description: A power source providing 12V DC.
- Pins: VCC, GND
DC Motor
- Description: A motor that converts electrical energy into mechanical energy.
- Pins: pin 1, pin 2
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
Wiring Details
L298N DC Motor Driver
- 5V connected to Vin of Arduino UNO
- GND connected to GND of Arduino UNO and GND of 12V Battery
- 12V connected to VCC of 12V Battery
- IN1 connected to D10 of Arduino UNO
- IN2 connected to D11 of Arduino UNO
- IN3 connected to D12 of Arduino UNO
- IN4 connected to D13 of Arduino UNO
HC-05 Bluetooth Module
- VCC connected to 5V of Arduino UNO
- GND connected to GND of Arduino UNO
- TXD connected to D0 of Arduino UNO
- RXD connected to D1 of Arduino UNO
12V Battery
- VCC connected to 12V of L298N DC Motor Driver
- GND connected to GND of Arduino UNO and GND of L298N DC Motor Driver
DC Motor
- pin 1 and pin 2 connected to OUT1 and OUT2 of L298N DC Motor Driver (for one motor)
- pin 1 and pin 2 connected to OUT3 and OUT4 of L298N DC Motor Driver (for another motor)
Arduino UNO
- 3.3V connected to +VCC of Ultrasonic Sensor
- 5V connected to VCC of HC-05 Bluetooth Module
- GND connected to GND of HC-05 Bluetooth Module, GND of Ultrasonic Sensor, and GND of 12V Battery
- Vin connected to 5V of L298N DC Motor Driver
- D0 connected to TXD of HC-05 Bluetooth Module
- D1 connected to RXD of HC-05 Bluetooth Module
- D7 connected to Echo of Ultrasonic Sensor
- D8 connected to Trigger of Ultrasonic Sensor
- D10 connected to IN1 of L298N DC Motor Driver
- D11 connected to IN2 of L298N DC Motor Driver
- D12 connected to IN3 of L298N DC Motor Driver
- D13 connected to IN4 of L298N DC Motor Driver
Ultrasonic Sensor
- +VCC connected to 3.3V of Arduino UNO
- GND connected to GND of Arduino UNO
- Trigger connected to D8 of Arduino UNO
- Echo connected to D7 of Arduino UNO
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:
}
Additional Documentation (documentation.txt)
This document provides a comprehensive overview of the circuit, including a summary, component list, wiring details, and documented code.