🚙 Bluetooth RC Car
Build a smartphone-controlled rover using an Arduino and Bluetooth module.
Overview
The HC-05 module allows the Arduino to receive serial commands over Bluetooth from a smartphone app. You will parse these commands to control a dual-motor driver (L298N).
What you'll learn: Bluetooth serial communication, H-Bridge motor drivers, and basic command parsing.
Estimated time: 2-3 hours. Difficulty: ⭐⭐⭐ Intermediate.
Components Needed
| Component | Specification | Qty | Notes |
|---|---|---|---|
| Arduino Uno R3 | 5V | 1 | |
| HC-05 Bluetooth | Serial module | 1 | |
| L298N Motor Driver | Dual H-Bridge | 1 | |
| 2WD Car Chassis | Includes 2 DC motors | 1 | |
| Battery Pack | 9V or 2S LiPo | 1 | For motors |
Step-by-Step Tutorial
1
Motor Driver Wiring
Connect Motors to OUT1/2 and OUT3/4. Connect 9V to L298N 12V input, and 5V output to Arduino 5V.
2
Arduino to Driver
Connect IN1, IN2, IN3, IN4 to digital pins 4, 5, 6, 7.
3
Bluetooth Wiring
Connect HC-05 TX to Arduino RX (Pin 0), and RX to Arduino TX (Pin 1) via a voltage divider (Bluetooth RX requires 3.3V).
4
Important Upload Step
Disconnect the Bluetooth TX/RX wires when uploading code, otherwise it interferes with USB communication.
Always use a voltage divider (e.g. 1k and 2k resistors) between Arduino TX (5V) and HC-05 RX (3.3V) to prevent module damage over time.
Code / Configuration
bt_car.ino
INO
// Bluetooth RC Car
int IN1 = 4, IN2 = 5, IN3 = 6, IN4 = 7;
char cmd;
void setup() {
Serial.begin(9600); // Bluetooth default baud rate
pinMode(IN1, OUTPUT); pinMode(IN2, OUTPUT);
pinMode(IN3, OUTPUT); pinMode(IN4, OUTPUT);
}
void loop() {
if (Serial.available() > 0) {
cmd = Serial.read();
if (cmd == 'F') { forward(); }
else if (cmd == 'B') { backward(); }
else if (cmd == 'S') { stopCar(); }
}
}
void forward() {
digitalWrite(IN1, HIGH); digitalWrite(IN2, LOW);
digitalWrite(IN3, HIGH); digitalWrite(IN4, LOW);
}
void backward() {
digitalWrite(IN1, LOW); digitalWrite(IN2, HIGH);Reviews & Ratings
—0 reviews
Sign in to leave a review
Loading reviews...