Building a Bluetooth robot is one of the most satisfying beginner-to-intermediate robotics projects you can tackle. Using an Arduino Uno, HC-05 Bluetooth module, and an L298N motor driver, you can build a fully remote-controlled robot that responds to commands from your Android smartphone in under an afternoon. In this guide, we cover everything — from understanding the parts to writing the Arduino code and pairing your phone — so you can get moving (literally) as fast as possible.
Table of Contents
Project Overview
A Bluetooth-controlled robot uses a microcontroller (Arduino) to interpret serial commands sent over Bluetooth from your phone, then drives motors accordingly. The HC-05 is a classic, affordable Bluetooth 2.0 serial module that pairs easily with Android apps. The L298N dual H-bridge motor driver lets the Arduino control two DC motors independently — giving you forward, reverse, left, and right steering. This project is ideal for anyone who has completed basic Arduino experiments and wants their first moving, interactive robot.
What makes this project great for Indian hobbyists is that all components are readily available and budget-friendly. The total cost sits comfortably under ₹800–₹1000 for the electronics, making it one of the best entry points into robotics.
Parts List
Here is everything you need to build your Bluetooth robot:
- Arduino Uno R3 — the brain of the robot
- HC-05 Bluetooth module — serial Bluetooth for Android communication
- L298N Motor Driver Module — controls 2 DC motors with direction and speed
- 2x BO Motors (or 4x for 4WD) — geared DC motors, typically 150–300 RPM
- 2WD or 4WD robot chassis — acrylic or plastic platform with motor mounts
- Li-ion battery pack or 4x AA batteries — 6–9V for motors, 5V for Arduino via USB or 9V via Vin
- Jumper wires — male-to-female and male-to-male
- Breadboard or PCB — for prototyping connections
- Optional: LED, buzzer — for horn and headlight features
HC-05 Bluetooth Module Setup
The HC-05 is a serial Bluetooth module that communicates with Arduino via UART (TX/RX pins). By default it operates at 9600 baud rate, which is what we will use in our code. The module has two modes:
- Data mode (default): Transparent serial bridge — sends/receives bytes
- AT command mode: Entered by holding the button on the module while powering on — used to change baud rate, device name, PIN
For a basic robot, you do not need to enter AT mode. The defaults work perfectly. The HC-05 default PIN is 1234 (sometimes 0000). The default device name is HC-05. You can change the device name to something like “MyRobot” via AT commands if you want.
HC-05 Pinout:
- VCC → 5V (the module regulates internally to 3.3V)
- GND → GND
- TXD → Arduino Pin 10 (SoftwareSerial RX)
- RXD → Arduino Pin 11 through a voltage divider (HC-05 RX is 3.3V logic — use 1kΩ + 2kΩ divider)
- STATE and EN pins are optional for basic use
We use SoftwareSerial on pins 10 and 11 so that pins 0 and 1 (hardware serial) remain free for USB debugging.
Wiring Diagram
Here is how to connect all the components:
Arduino to L298N:
- Arduino Pin 3 → L298N IN1 (Left motor direction)
- Arduino Pin 4 → L298N IN2 (Left motor direction)
- Arduino Pin 5 → L298N ENA (Left motor PWM speed — must be PWM pin)
- Arduino Pin 6 → L298N IN3 (Right motor direction)
- Arduino Pin 7 → L298N IN4 (Right motor direction)
- Arduino Pin 9 → L298N ENB (Right motor PWM speed — must be PWM pin)
- Arduino GND → L298N GND
- L298N 5V OUT → Arduino 5V (if using onboard regulator; remove jumper if supplying more than 12V)
L298N to Motors:
- OUT1, OUT2 → Left motor terminals
- OUT3, OUT4 → Right motor terminals
- 12V input → Battery positive (6–12V)
Arduino to HC-05:
- Arduino 5V → HC-05 VCC
- Arduino GND → HC-05 GND
- Arduino Pin 10 → HC-05 TXD
- Arduino Pin 11 → HC-05 RXD (via 1kΩ/2kΩ voltage divider)
Arduino Code
The code reads single-character commands from the HC-05 via SoftwareSerial and drives the motors accordingly. The Bluetooth RC Controller app sends these standard characters: F (forward), B (backward), L (left), R (right), S (stop). Speed commands are sent as digits 0–9 where 0 = 0% and 9 = 100% speed.
#include <SoftwareSerial.h>
// Bluetooth module on pins 10 (RX), 11 (TX)
SoftwareSerial BT(10, 11);
// Motor A (Left) - L298N
const int ENA = 5; // PWM speed control
const int IN1 = 3;
const int IN2 = 4;
// Motor B (Right) - L298N
const int ENB = 9; // PWM speed control
const int IN3 = 6;
const int IN4 = 7;
// Optional LED and Buzzer
const int LED_PIN = 12;
const int BUZZER_PIN = 8;
int motorSpeed = 200; // Default speed (0-255)
char command;
void setup() {
pinMode(ENA, OUTPUT);
pinMode(IN1, OUTPUT);
pinMode(IN2, OUTPUT);
pinMode(ENB, OUTPUT);
pinMode(IN3, OUTPUT);
pinMode(IN4, OUTPUT);
pinMode(LED_PIN, OUTPUT);
pinMode(BUZZER_PIN, OUTPUT);
Serial.begin(9600); // USB debug
BT.begin(9600); // HC-05 default baud rate
stopMotors();
Serial.println("Bluetooth Robot Ready");
}
void loop() {
if (BT.available()) {
command = BT.read();
Serial.print("CMD: ");
Serial.println(command);
switch (command) {
case F: moveForward(); break;
case B: moveBackward(); break;
case L: turnLeft(); break;
case R: turnRight(); break;
case S: stopMotors(); break;
case W: digitalWrite(LED_PIN, HIGH); break; // Lights ON
case w: digitalWrite(LED_PIN, LOW); break; // Lights OFF
case V: tone(BUZZER_PIN, 1000, 200); break; // Horn
// Speed control: 0 to 9
default:
if (command >= 0 && command <= 9) {
motorSpeed = map(command - 0, 0, 9, 50, 255);
}
break;
}
}
}
void moveForward() {
analogWrite(ENA, motorSpeed);
analogWrite(ENB, motorSpeed);
digitalWrite(IN1, HIGH); digitalWrite(IN2, LOW);
digitalWrite(IN3, HIGH); digitalWrite(IN4, LOW);
}
void moveBackward() {
analogWrite(ENA, motorSpeed);
analogWrite(ENB, motorSpeed);
digitalWrite(IN1, LOW); digitalWrite(IN2, HIGH);
digitalWrite(IN3, LOW); digitalWrite(IN4, HIGH);
}
void turnLeft() {
analogWrite(ENA, motorSpeed);
analogWrite(ENB, motorSpeed);
digitalWrite(IN1, LOW); digitalWrite(IN2, HIGH); // Left motor backward
digitalWrite(IN3, HIGH); digitalWrite(IN4, LOW); // Right motor forward
}
void turnRight() {
analogWrite(ENA, motorSpeed);
analogWrite(ENB, motorSpeed);
digitalWrite(IN1, HIGH); digitalWrite(IN2, LOW); // Left motor forward
digitalWrite(IN3, LOW); digitalWrite(IN4, HIGH); // Right motor backward
}
void stopMotors() {
digitalWrite(IN1, LOW); digitalWrite(IN2, LOW);
digitalWrite(IN3, LOW); digitalWrite(IN4, LOW);
analogWrite(ENA, 0);
analogWrite(ENB, 0);
}
Pairing with Android App
The easiest Android app for this project is Bluetooth RC Controller (available on the Play Store). Here is how to pair:
- Power on your robot — the HC-05 LED should blink rapidly (not connected)
- On your Android phone, go to Settings → Bluetooth → Scan for devices
- You should see HC-05 in the list. Tap it and enter PIN 1234
- The HC-05 LED should now blink slowly (paired, waiting for connection)
- Open Bluetooth RC Controller, tap the connect icon, select HC-05
- Once connected, the HC-05 LED goes solid or blinks very slowly
- Press the on-screen buttons — your robot should respond!
If you prefer a custom app, you can use MIT App Inventor to build one in minutes — it has Bluetooth components and you can assign any characters to buttons.
Controlling Movement
The movement logic is straightforward differential steering — the same principle used by tanks and most wheeled robots:
- Forward: Both motors spin forward at equal speed
- Backward: Both motors spin backward at equal speed
- Left turn: Left motor reverses, right motor goes forward (pivot turn) — or reduce left motor speed for a gentle arc
- Right turn: Right motor reverses, left motor goes forward (pivot turn)
- Stop: Both motors off
For smoother turns you can implement arc turning: instead of reversing one motor, just slow it down. For example, a gentle right arc: left motor at full speed, right motor at 50% speed. The code above uses sharp pivot turns by default — you can modify the turn functions to use arc turns instead.
Speed Control, Horn and LED Features
The code includes three bonus features beyond basic movement:
Speed Control: Pressing digits 0–9 in the Bluetooth RC Controller app sends the corresponding character. We use map() to scale 0–9 to PWM range 50–255 (50 minimum keeps motors from stalling). The speed applies to all subsequent movement commands until changed.
LED Headlights: The app sends W to turn on and w to turn off. Connect an LED with a 220Ω resistor between Pin 12 and GND. You can add two LEDs at the front of the chassis for a realistic effect.
Horn: The app sends V for horn. We use Arduinotone() to generate a 1kHz beep on a passive buzzer connected to Pin 8. You can customise the frequency for different horn sounds.
Troubleshooting Bluetooth Connection
Here are the most common issues and fixes:
- Robot does not respond to commands: Check RX/TX wiring — TX on HC-05 goes to RX on Arduino. SoftwareSerial reverses these in software. Swap them if needed.
- HC-05 not showing in Bluetooth scan: Ensure module is powered (VCC and GND correct). HC-05 VCC must go to 5V, not 3.3V.
- Paired but app shows connection failed: Disconnect the module from the Arduino, pair again, then reconnect. Sometimes a stale pairing causes issues.
- Garbage characters in Serial Monitor: Baud rate mismatch. Both code and monitor must be 9600.
- Motors spin but do not move robot: Check that motor shaft connectors are tight. BO motor wires can pop out easily — use a small connector or solder them.
- Robot drifts left or right on straight: Minor motor speed differences. Trim the speeds by slightly reducing the faster motor PWM value in the movement functions.
Upgrades and Next Steps
Once your basic Bluetooth robot is working, consider these enhancements:
- HC-06 to HC-05: HC-06 is slave-only (simpler). HC-05 can act as master — useful for robot-to-robot communication.
- Add HC-SR04 ultrasonic sensor: Automatically stop or avoid obstacles even while under Bluetooth control.
- Upgrade to Bluetooth 4.0 (BLE): Use HM-10 module for iOS compatibility and lower power consumption.
- Upgrade to ESP32: Built-in Wi-Fi and Bluetooth, more pins, faster processor, better PWM resolution.
- Add a camera: An ESP32-CAM module turns your robot into an FPV rover you can watch from your phone.
- PID straight-line correction: Use wheel encoders and PID to maintain perfectly straight movement even with mismatched motors.
Frequently Asked Questions
Q: Can I use this project with iOS (iPhone)?
The HC-05 uses Bluetooth Classic (2.0), which iOS does not support for serial communication. To use iPhone, replace HC-05 with an HM-10 BLE module and use a BLE serial app like LightBlue or Serial Bluetooth Terminal.
Q: What is the range of the HC-05 module?
The HC-05 has a typical range of 10 metres in open air. Walls, metal chassis, and battery packs can reduce this. For longer range, use ESP32 over Wi-Fi instead.
Q: Can I use a 9V battery to power the robot?
A single 9V battery works for testing but does not provide enough current for motors. Use a 2S Li-ion pack (7.4V), 4x AA batteries (6V), or an 18650 holder for sustained operation.
Q: Why is the voltage divider needed on HC-05 RXD?
The HC-05 RXD pin is 3.3V logic level. Arduino TX outputs 5V. Feeding 5V directly into the HC-05 RX can damage the module over time. A simple 1kΩ/2kΩ voltage divider steps 5V down to ~3.3V safely.
Q: My robot turns but not straight — what is wrong?
BO motors have manufacturing tolerances — two identical motors often run at slightly different speeds. Use analogWrite(ENA, speed - 10) for the faster motor, or add a software trim variable you can adjust via Bluetooth command.
Build Your Bluetooth Robot Today
Get all the components — Arduino, HC-05, L298N motor driver, BO motors, and chassis — from Zbotic.in. Fast delivery across India, genuine components, and expert support for your DIY robotics projects.
Add comment