Skip to content
IntermediateESP32esp32bluetoothrc-car

ESP32 Bluetooth RC Car with L298N Motor Driver

Build a 2WD Bluetooth-controlled RC car using ESP32 WROOM-32 and L298N dual H-bridge. Control forward, reverse, left, right, and speed from any Bluetooth terminal app on Android or iOS.

SolderHub10/17/2026 28 min read 3 views

Architecture

The L298N is a dual full H-bridge that can drive two DC motors independently at up to 2A each. It accepts direction signals (IN1–IN4) and PWM enable signals (ENA/ENB) from the ESP32. We use LEDC (ESP32's hardware PWM) for smooth speed control instead of the Arduino analogWrite() alias.

Bluetooth Serial is handled by the built-in BluetoothSerial library — no extra hardware. Commands arrive as single characters: F=forward, B=backward, L=left, R=right, S=stop, 0-9=speed.

⚠️ Warning

The L298N's 5V regulator (if using the onboard one) can only supply ~50 mA. Power the ESP32 separately from a 5V UBEC or LiPo BEC — do NOT power it from the L298N's +5V pin when using motors over 1A.

Components

8 items
NameQtyLink
ESP32 WROOM-32 Dev Board×1Buy ↗
L298N Dual Motor Driver Module×1Buy ↗
TT Gear Motor with Wheel (2WD kit)×2Buy ↗
18650 LiPo Battery Holder (2S)×1—
18650 Li-ion Cell (3.7V 3000mAh)×2—
5V 3A UBEC / BEC (for ESP32)×1—
Acrylic 2WD Robot Car Chassis×1—
Jumper Wires + Cable Ties×1—

Need these parts? Get this build sheet by email

Parts list with buy links, plus new builds as they're published. By subscribing you agree to our Privacy Policy. Unsubscribe anytime.

Wiring

L298N PinESP32 GPIO
IN125
IN226
IN327
IN414
ENA32 (PWM)
ENB33 (PWM)
12VBattery+
GNDBattery− & ESP32 GND

ESP32 VIN → 5V UBEC output. UBEC input → Battery+/−.

C++

Live simulation

Steps

  1. 1Assemble the car chassis and mount both TT motors per kit instructions
  2. 2Wire L298N to ESP32 following the table — double-check IN1-4 polarity
  3. 3Power ESP32 from the 5V UBEC, L298N motor supply from the 7.4V LiPo
  4. 4Upload the sketch and pair your phone with 'ESP32-RCCar' in Bluetooth settings
  5. 5Open 'Serial Bluetooth Terminal' app, connect to ESP32-RCCar
  6. 6Send 'F' to move forward, 'S' to stop — adjust speed with '5' or '8'
  7. 7If one motor spins the wrong direction, swap its IN1/IN2 wires

Q&A is currently disabled site-wide.

Related projects