IoT & Bluetooth-Controlled 4-Motor Car with Omni/Mecanum Wheels
The ADAS Car Control System is an ESP8266-based automated driving platform designed for real-time wireless control using a Bluetooth module (HC-05). The system drives four DC motors through L298N motor drivers to achieve omnidirectional movement (forward, backward, sideways, rotation).
This setup is particularly suitable for autonomous or semi-autonomous vehicle prototyping, robotics research, and educational purposes.
- Implement Bluetooth-based remote control using HC-05
- Drive 4 independent motors for omnidirectional movement
- Allow speed adjustment via Bluetooth
- Support multiple movement commands: forward, backward, sideways, rotation
- Provide a modular, maintainable motor control system
| Component | Description |
|---|---|
| ESP8266 NodeMCU | Main microcontroller |
| L298N Motor Driver (x2) | Drive 4 DC motors |
| DC Motors (x4) | Omnidirectional / Mecanum wheels |
| HC-05 Bluetooth Module | Wireless control interface |
| Power Supply | 7.4β12V for motors, 5V for ESP8266 |
Motor Connections:
- Motor 1 (Front Right): IN1 β D1, IN2 β D2, EN β D0 (PWM)
- Motor 2 (Front Left): IN1 β D3, IN2 β D4, EN β D5 (PWM)
- Motor 3 (Rear Left): IN1 β D6, IN2 β D7, EN β D8 (PWM)
- Motor 4 (Rear Right): IN1 β SD2, IN2 β SD3, EN β RX (PWM)
Bluetooth HC-05:
- TX β ESP8266 TX (GPIO1)
- RX β ESP8266 RX (GPIO3)
- VCC β 5V, GND β GND
-
Arduino IDE
-
ESP8266 Board Package
-
Required Libraries:
ESP8266WiFi.h(optional for future IoT extension)Arduino.h(built-in)
-
Bluetooth Input: The system continuously reads bytes from HC-05.
-
Command Parsing:
- Values 0β14 represent movement commands (forward, backward, sideways, rotate, stop, reserved).
- Values β₯16 adjust the motor speed (
wheelSpeed).
-
Movement Execution:
- A DCMotor class handles pin configuration, speed, and direction.
- Commands are executed through functions like
moveForward(),moveSidewaysRight(),rotateLeft(), etc.
-
Loop: After executing a command, the system waits for the next Bluetooth input.
Movement Commands Mapping:
| Command | Action |
|---|---|
| 0 | Stop |
| 1 | Right Forward |
| 2 | Forward |
| 3 | Left Forward |
| 4 | Sideways Right |
| 5 | Sideways Left |
| 6 | Right Backward |
| 7 | Backward |
| 8 | Left Backward |
| 9 | Rotate Left |
| 10 | Rotate Right |
| 11,12,14 | Reserved / Save |
The systemβs architecture and control flow can be visualized here:
π Block Diagram: View Block Diagram
Description:
- Bluetooth Module β Receives commands β ESP8266
- ESP8266 β Parses commands β Sets movement variable (
m) and speed - Motor Driver & Motors β Executes corresponding wheel movement
- Fully modular motor control via DCMotor class
- Support for omnidirectional movement
- Bluetooth-based wireless speed and movement control
- PWM speed adjustment
- Easy to extend for sensors (ultrasonic, IR) or IoT integration
- Ensure correct power supply for motors; do not power motors from ESP8266 5V.
- Motors and drivers should be isolated to prevent voltage spikes on ESP8266.
- Reserved commands (11, 12, 14) can be extended for future functions.
- Use adequate heat sinks for L298N drivers under continuous operation.
The ADAS Car Control System is a flexible, modular platform for studying autonomous vehicle dynamics, omni-directional control, and Bluetooth-based robotics.
It demonstrates hardware abstraction, real-time control, and modular code design, suitable for academic, hobbyist, or prototype autonomous vehicle projects.