Octane
A Wi-Fi controlled RC car with a design inspired by Rocket League cars.
Author: Salavastru Andrei
GitHub Project Link: https://github.com/UPB-PMRust-Students/project-AndreiSa05
Descriptionβ
Octane is a Wi-Fi controlled RC car powered entirely by an ESP32-S2 Mini. The car uses a motor driver to control two DC motors that handle both forward and backward movement. Users can control the car remotely by sending WASD commands over Wi-Fi from a browser interface. The ESP32-S2 receives these commands, interprets them, and drives the motors accordingly.
Motivationβ
I chose this project because Iβve always been curious about how RC cars work. As a child, I loved playing with them, but I never truly understood how they were built or controlled. This project gave me the opportunity to explore that curiosity hands-on β combining programming with real hardware to build something functional and fun.
Architectureβ
Schematic Diagramβ
ESP32-S2 Miniβ
- Role: Serves as the central microcontroller for the car. It handles Wi-Fi communication, receives user input, processes that input, and controls the motors.
- Connections: GPIO pins display Wi-Fi connection status via LEDs, and some GPIO pins send PWM signals to the motor driverβs enable pins.
LAPTOPβ
- Role: Acts as the remote control interface. Sends WASD movement commands over Wi-Fi to the ESP32-S2 Mini.
- Connections: Communicates with the ESP32-S2 via HTTP over a shared Wi-Fi network. The control interface is a web page.
LEDsβ
- Interface: GPIO
- Role: Show whether the ESP is connected to Wi-Fi.
- Connections: Each LED is connected to a GPIO pin. A 220Ξ© resistor is placed between the GPIO and the LED to prevent damage.
MOTOR DRIVER ZKBM1β
- Interface: PWM
- Role: Controls the direction of the two DC motors based on the signals received from the ESP32-S2 Mini.
- Connections: The driver uses four GPIO pins from the ESP32-S2: IN1 and IN2 for Motor A, IN3 and IN4 for Motor B. Each motorβs speed is adjusted using PWM signals, while direction is determined by the HIGH/LOW configuration of the control pins. The driver is powered directly from a battery pack connected to its VCC and GND terminals.
DC MOTOR x2β
- Interface: Powered through motor driver
- Role: Provide movement for the car - forward and backward
- Connections: Each motor is connected to one output channel of the ZKBM1 motor driver. They receive power and directional signals through these channels.
BATTERY PACK x2β
- Interface: Power supply
- Role: Provides electrical power to both the motors and the ESP32-S2 system
- Connections: A battery pack is connected to the VCC and GND inputs of the motor driver to power the motors, while the other is used to power the ESP32-S2 Mini.
Logβ
Week 5 - 11 Mayβ
Week 12 - 18 Mayβ
Week 19 - 25 Mayβ
Hardwareβ
The Octane project is built around an ESP32-S2 Mini, which handles both Wi-Fi communication and motor control. User commands (WASD) are received via Wi-Fi and translated into PWM signals sent to a ZKBM1 motor driver. A pair of status LEDs connected to GPIO pins provide feedback, indicating the Wi-Fi connection status. The ZKBM1 controls two DC motors, enabling movement through GPIO pins. Power is supplied by two battery packs: one powers the motor driver, and the other powers the ESP32-S2 Mini. Thus, the setup allows for wireless control using a microcontroller.
Schematicsβ
Place your KiCAD schematics here.
Bill of Materialsβ
Device | Usage | Price |
---|---|---|
ESP32-S2 Mini | Main microcontroller, handles Wi-Fi and motor control logic | 30.23 RON |
Motor Driver ZKBM1 | Controls direction of two DC motors via PWM | 18.16 RON |
DC Motors x2 | Provide propulsion β forward, backward | 7.84 RON |
Battery Pack x2 | Powers the motor driver and ESP32 | 11.98 RON |
Female-Female Wires x20 | Connect components Female-Female | 5.96 RON |
Male-Male Wires x20 | Connect components Male-Male | 7.54 RON |
220Ξ© Resistors x10 | Used with LEDs to limit current | 3.37 RON |
Softwareβ
Library | Description | Usage |
---|---|---|
esp-idf-sys | Low-level bindings to the ESP-IDF | Provides access to ESP32 system APIs and runtime components |
esp-idf-hal | Hardware Abstraction Layer for ESP32 using ESP-IDF | Used for GPIO, PWM (via ledc) for motor and LED control |
esp-idf-svc | High-level service wrappers over ESP-IDF APIs | Used for managing Wi-Fi and networking |
embedded-svc | Traits and types for portable embedded services | Provides abstractions for networking, HTTP servers, and more |
log | Standard Rust logging interface | Enables logging throughout the application |
anyhow | Error handling library | Simplifies error propagation and reporting |
embuild | Build-time support for esp-idf projects | Required for setting up and linking the ESP-IDF build system properly |
std | Rust standard library (enabled via esp-idf ) | Provides multithreading (thread ), networking (TcpStream , TcpListener ), and synchronization (Mutex , Arc ) capabilities |