BTDrive: Bluetooth Controlled Car using Arduino UNO
This project demonstrates how to build a Bluetooth Controlled Car using Arduino UNO.
The car is operated via a smartphone app that sends commands through Bluetooth to control the
movement of the car.
Components Required:
- 4 x DC gear motors
- 1 x 4 Wheel Chassis
- 1 x Arduino Uno
- 1 x L298N Motor Driver
- 1 x HC-05 Bluetooth module
- Jumper wires
- 1 x Double battery holder with switch
- 2 x Lithium-ion cells
- 1 x USB cable
- 1 x Smartphone
Step-by-Step Instructions:
1. Assemble the Chassis:
Mount motors, wheels, Arduino, and battery holder on the chassis.
2. Connect Motors to L298N:
- Left Motors OUT1 & OUT2
- Right Motors OUT3 & OUT4
3. Connect L298N to Arduino UNO:
- IN1 D8
- IN2 D9
- IN3 D10
- IN4 D11
- ENA/ENB 5V or PWM pins
- VCC Battery +ve
- GND Battery -ve and Arduino GND
4. Connect HC-05 Bluetooth Module:
- VCC 5V
- GND GND
- TXD RX (Pin 0)
- RXD TX (Pin 1) via voltage divider
5. Upload Code:
Upload Arduino sketch using Arduino IDE and USB cable.
6. Test Bluetooth App:
Connect to HC-05 using a smartphone Bluetooth app. Use commands:
F - Forward
B - Backward
L - Left
R - Right
S - Stop
Arduino Code:
char command;
void setup() {
Serial.begin(9600);
pinMode(8, OUTPUT);
pinMode(9, OUTPUT);
pinMode(10, OUTPUT);
pinMode(11, OUTPUT);
}
void loop() {
if (Serial.available() > 0) {
command = Serial.read();
if (command == 'F') {
digitalWrite(8, HIGH);
digitalWrite(9, LOW);
digitalWrite(10, HIGH);
digitalWrite(11, LOW);
} else if (command == 'B') {
digitalWrite(8, LOW);
digitalWrite(9, HIGH);
digitalWrite(10, LOW);
digitalWrite(11, HIGH);
} else if (command == 'L') {
digitalWrite(8, LOW);
digitalWrite(9, HIGH);
digitalWrite(10, HIGH);
digitalWrite(11, LOW);
} else if (command == 'R') {
digitalWrite(8, HIGH);
digitalWrite(9, LOW);
digitalWrite(10, LOW);
digitalWrite(11, HIGH);
} else if (command == 'S') {
digitalWrite(8, LOW);
digitalWrite(9, LOW);
digitalWrite(10, LOW);
digitalWrite(11, LOW);
}
}
}
Learning Outcomes:
- Assemble a four-wheel robot chassis.
- Make basic electronic and motor driver connections.
- Upload and debug Arduino programs.
- Use Bluetooth to wirelessly control a device.
- Develop foundational robotics and IoT skills.