Skip to main content
Version: FILS English

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

info

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

Schematics

Bill of Materials

DeviceUsagePrice
ESP32-C3 Dev BoardMain microcontroller with WiFi35 RON
TB6612FNG Motor DriverControls DC motors (left/right)20 RON
Wheels with DC Gear Motors (x4)Movement (wheels)Already owned
VL53L0X ToF SensorDistance measurement25 RON
SG90 Servo MotorRotates sensor (scan)Already owned
Active BuzzerSound alertsAlready owned
18650 Li-ion Battery(x2)Power source44 RON
Step-down Voltage RegulatorRegulates voltage to 5V/3.3V32 RON
Jumper Wires + BreadboardConnections and prototyping7 RON

Software

LibraryDescriptionUsage
esp-idf-halHardware abstraction layer for ESP-IDFUsed for GPIO, PWM, and peripheral control
esp-idf-svcHigh-level services for ESP-IDFUsed for WiFi, HTTP server, and system services
embedded-svcCommon embedded service traitsUsed as abstraction for networking and IO
anyhowError handling libraryUsed for simplified error management
logLogging facadeUsed for runtime logs and debugging
esp-idf-sysRaw bindings to ESP-IDFLow-level integration with ESP-IDF framework
  1. ESP32-C3 Documentation
  2. esp-idf-hal (Rust HAL for ESP32)
  3. esp-idf-svc (WiFi & HTTP services)
  4. TB6612FNG Motor Driver Datasheet
  5. VL53L0X Distance Sensor Guide
  6. ESP32 Web Server Tutorial