Bluetooth-Controlled Car

A phone sends simple direction commands over Bluetooth to a microcontroller-driven RC car.

← All project briefs

Safety and scope

Use a separate regulated supply for the motors if required by their current draw. Do not connect a motor directly to a microcontroller pin.

Plan, predict and test

Suggested virtual study time: about 30 minutes. This is a planning estimate, not a validated construction time.

Preparation: Foundation electricity and basic programming logic. Adult supervision for children. Review a foundation lesson ↗

Use paper, a spreadsheet or a simulator. This is not a verified physical assembly guide.

  1. Scenario: Simulate single-character commands F, L, S (stop) and an unknown character. Include a communication timeout.
  2. Expected result: Unknown commands and timeout select STOP; record each input and output.
  3. Checkpoint: Write your prediction, test it in the virtual model and explain any difference.

Knowledge check

What is the safer default on loss of a valid command?

A correct answer does not certify the physical system.

Record your validation

Use only virtual inputs and indicators until the actual components, pinouts and electrical limits have been verified.

CaseWhat to record
Normal inputF → D8; L → D9; R → D10; S → all LOW
Boundary499 ms after last valid command → retain; 500 ms → STOP
Missing or invalid inputUnknown command → STOP; no motor driver or Bluetooth configuration is implemented.
Repeat testRepeat the virtual test, record the actual output and compare with the expected result.

These are test-planning requirements, not recorded hardware results.

Before building: understand the listed components and the relevant low-voltage safety rules. This is a concept brief, not a tested assembly manual.

What it does

Build a manually controlled rover and understand the full command path from a phone to the motors.

Engineering principle

Serial communication over a wireless Bluetooth link. A phone can transmit characters such as F, B, L, R and S. The Bluetooth module passes the characters to the controller, which interprets them and sets the H-bridge direction inputs and PWM speed.

Hardware and components

  • Arduino Uno or NanoReceives and interprets the serial commands.
  • HC-05 Bluetooth moduleProvides the Bluetooth serial link to a compatible phone or controller app.
  • L298N motor driverControls motor direction and speed through IN pins and enable/PWM inputs.
  • 4 × TT geared DC motorsDrive the four wheels.
  • Chassis, battery and wiringMechanical platform and power system.

Suggested build sequence

  1. Pair the phone with the HC-05 and confirm the serial baud rate.
  2. Test serial receive first and display each command in the serial monitor.
  3. Connect the motor driver and test one motor at a time with the wheels raised.
  4. Map F/B/L/R/S commands to forward, reverse, left, right and stop.
  5. Add a command timeout so the car stops if the wireless link drops.

Learning outcomes

  • UART serial communication
  • Bluetooth pairing and command protocols
  • H-bridge direction control
  • PWM speed control and failsafe behaviour

Possible upgrades

Build a custom phone interface, add speed levels, battery monitoring or a selectable manual/autonomous mode.

Practice the core principle

Use a virtual Arduino Uno circuit with the following substitute inputs and indicators. The exercise deliberately does not drive motors, powered mechanisms or real industrial equipment. Physical experimentation requires adult supervision for children, a suitable current-limited supply and checked wiring.

Reference components

  • Arduino Uno (5 V)
  • 3 LEDs, each with 330 Ω resistor
  • USB serial monitor at 9600 baud

Connection plan

  • D8 → 330 Ω → forward LED → GND
  • D9 → 330 Ω → left LED → GND
  • D10 → 330 Ω → right LED → GND

Reference sketch

char command='S';
unsigned long last=0;
void setup(){
  Serial.begin(9600);
  for(int p=8;p<=10;p++) pinMode(p,OUTPUT);
}
void loop(){
  while(Serial.available()){
    char c=Serial.read();
    if(c=='\r'||c=='\n') continue;
    command=(c=='F'||c=='L'||c=='R')?c:'S';
    last=millis();
  }
  if(millis()-last>=500) command='S';
  digitalWrite(8,command=='F');
  digitalWrite(9,command=='L');
  digitalWrite(10,command=='R');
}

How the code works

Serial characters model wireless commands. An unknown command selects stop, and a half-second inactivity timeout clears all indicators. Unsigned subtraction handles the timer wraparound.

Practice sequence

  1. Set up the virtual components with power disconnected in the simulator.
  2. Verify pin numbers and LED polarity before running the sketch.
  3. Run and record the expected inputs and outputs.
  4. Test the boundary cases described below.

Expected result and testing

Send F, L, R, S and X individually, then wait more than 500 ms after F. Confirm all indicators are off on S, X or timeout. This is not a Bluetooth or motor driver implementation.

Troubleshooting

Check the specified pin assignments, supply and common ground, indicator polarity and serial monitor baud rate where applicable. If an input seems fixed, isolate that input and observe its value before changing the control logic.

Independent challenge

Change one model threshold or timing value, predict the resulting behaviour, and repeat the test. Explain the difference without adding physical actuators.

Related briefs