← Back
Project 04 Robotics

Microcontroller Based Bluetooth Car

A four-wheel car driven from a phone over Bluetooth — an ESP32 receives serial drive commands and controls 12V DC motors through an L298 motor driver.

Year
2025
Domain
Robotics · Embedded
Status
Working build
Role
End-to-end build

01The Idea

A classic embedded-systems build done properly: a phone-controlled car where every layer — power, motor drive, wireless link, and firmware — is understood and hand-wired rather than taken from a kit.

The goal was a responsive, reliable car using the ESP32's built-in Bluetooth Classic, so no separate HC-05 module is needed and the whole control path lives in one chip.

02The Approach

The ESP32 advertises as ESP32_Car over Bluetooth Serial (SPP). A controller app on the phone sends short newline-terminated commands, and the firmware maps them to motor states on an L298 dual H-bridge.

  • Nine drive commands: forward, backward, spins, smooth diagonal turns, and stop
  • Unknown or dropped commands fail safe to a motor stop
  • Dual-supply power: 12V pack with BMS for the motors, separate 8V supply for the ESP32
  • Common-ground wiring between logic and drive stages

03How It Works

Four GPIO pins drive the L298's IN1–IN4 inputs, controlling the left and right motor pairs independently. Straight motion runs both sides; spins run them in opposition; diagonal turns stop one side for a smooth arc.

Commands stream in over Bluetooth Serial and are parsed line-by-line, so any generic Bluetooth controller app works — buttons are simply mapped to the command letters.

04Tech Stack

ESP32
MCU + Bluetooth Classic
L298 Driver
Dual H-bridge motor drive
12V DC Motors
Four-wheel drive
Li-ion Pack + BMS
Motor power
Arduino / C++
Firmware
Bluetooth SPP
Phone control link
View on GitHub ↗ More projects