CarBot-C3 – WiFi Controlled Smart Robot Car
A WiFi-controlled 4WD robot car built with ESP32-C3 in Rust, featuring motor control, obstacle detection, and a web interface
Author: Zagornean Iana
GitHub Project Link: https://github.com/UPB-PMRust-Students/fils-project-2026-ianazag
Description
A self-contained WiFi-enabled robotic car powered by the ESP32-C3 microcontroller. The system hosts its own wireless network, letting a phone or laptop connect directly and control the vehicle through a simple web interface. A dual-channel TB6612FNG motor driver manages the left and right motors independently, enabling forward, reverse, and turning movements.
A time-of-flight sensor (VL53L0X) monitors distance to obstacles, while a servo motor can rotate the sensor to scan the environment. The device exposes live telemetry (movement status, distance readings, safety flags) in the browser and uses a buzzer to signal warnings such as approaching obstacles.
The software is fully implemented in Rust and runs directly on the microcontroller, integrating motor control, networking, and real-time feedback into a compact and autonomous embedded system.
Motivation
This project was chosen to explore how embedded systems, robotics, and Rust can be combined into a complete, real-world application. It provides hands-on experience with controlling hardware components like motors and sensors while also implementing higher-level features such as WiFi communication and a browser-based interface. Building a fully standalone system that can be controlled remotely helps in understanding how modern IoT devices operate without external dependencies. Additionally, it offers valuable insight into debugging hardware-software interactions and lays the groundwork for extending the project with more advanced capabilities like autonomous navigation and obstacle avoidance.
Architecture
Main components
- Web Interface (HTTP UI) – user control (Forward, Left, Right, Back)
- Control Layer – translates commands into motor actions
- Motor Driver Layer – controls TB6612FNG signals
- Sensor Layer – reads distance (VL53L0X)
- Safety Layer – prevents collisions
- Telemetry Module – reports system state
WiFi Client (Phone / Laptop)
|
| HTTP Requests
v
Web Control Interface
|
v
Control Logic (ESP32-C3)
|
+--[ GPIO ]-----------> Buzzer (Alert / Warning)
|
+--[ PWM ]------------> Servo Motor (Scan Direction)
|
+--[ GPIO + PWM ]-----> Motor Driver (TB6612FNG)
| |
| +--> DC Motor Left
| |
| +--> DC Motor Right
|
+--[ I2C ]---------------> Distance Sensor (VL53L0X)
| |
| v
| Distance Data
|
v
Telemetry & Safety Layer
|
v
Web Response (Real-time Status)
Log
Week 1 - 4
Defined the project idea: a WiFi-controlled robotic car using ESP32-C3. Researched motor drivers (TB6612FNG), sensors (VL53L0X), and Rust support for embedded systems. Planned overall architecture (control via web interface + real-time telemetry).
Week 5 - 6
Ordered components and started assembling the hardware. Mounted motors on the chassis and prepared wiring for power distribution. Studied ESP32 pinout and how to interface with the TB6612FNG driver.
Week 7 - 8
Connected ESP32-C3 to the motor driver and powered the system. Tested GPIO signals and verified connections using a multimeter. Started debugging motor behavior (direction issues, inactive channels).
Hardware
The hardware setup is built around the ESP32-C3 microcontroller, which acts as the main control unit and provides WiFi connectivity. A TB6612FNG motor driver is used to control two DC motors for movement (left and right). A VL53L0X time-of-flight distance sensor is connected via I2C for obstacle detection, while a servo motor is used to rotate the sensor for environmental scanning. An active buzzer provides audio feedback for alerts. The system is powered by a battery pack with a voltage regulator, and all components are connected using jumper wires on a prototyping setup.
Schematics
Bill of Materials
| Device | Usage | Price |
|---|---|---|
| ESP32-C3 Dev Board | Main microcontroller with WiFi | 35 RON |
| TB6612FNG Motor Driver | Controls DC motors (left/right) | 20 RON |
| Wheels with DC Gear Motors (x4) | Movement (wheels) | Already owned |
| VL53L0X ToF Sensor | Distance measurement | 25 RON |
| SG90 Servo Motor | Rotates sensor (scan) | Already owned |
| Active Buzzer | Sound alerts | Already owned |
| 18650 Li-ion Battery(x2) | Power source | 44 RON |
| Step-down Voltage Regulator | Regulates voltage to 5V/3.3V | 32 RON |
| Jumper Wires + Breadboard | Connections and prototyping | 7 RON |
Software
| Library | Description | Usage |
|---|---|---|
| esp-idf-hal | Hardware abstraction layer for ESP-IDF | Used for GPIO, PWM, and peripheral control |
| esp-idf-svc | High-level services for ESP-IDF | Used for WiFi, HTTP server, and system services |
| embedded-svc | Common embedded service traits | Used as abstraction for networking and IO |
| anyhow | Error handling library | Used for simplified error management |
| log | Logging facade | Used for runtime logs and debugging |
| esp-idf-sys | Raw bindings to ESP-IDF | Low-level integration with ESP-IDF framework |