Dual-Core Architecture (ESP32-CAM + Arduino UNO) Β· FPV Video Stream Β· Rear Sonar Radar Β· Auto-Brake Β· Zero-Install Web App
A complete, classroom-tested open-source robotics platform combining computer vision, wireless teleoperation, and deterministic real-time hardware safety.
- Key Features
- System Architecture and Data Flow
- Electrical Wiring and Schematic
- Mechanical Layout and 3D Assembly
- Zero-Install Web Application
- Hardware Bill of Materials (BOM)
- Complete Pinout Mapping
- Quick Start and Firmware Upload Guide
- Progressive Hardware Diagnostic Tests
- PDF Handbooks Library
- Repository Structure
- License
- Ultra-Low Latency FPV Video: AI-Thinker ESP32-CAM module delivers real-time MJPEG video over local Wi-Fi with sub-100ms latency.
- Zero-Install Teleoperation App: Accessible from any smartphone, tablet, or PC browser via
http://192.168.4.1with touch joystick, speed gears, camera settings, and keyboard hotkeys. - Dedicated Classroom Observation Viewer: Dual-screen web experience at
http://192.168.4.1/viewoffering synchronized instrument gauges, telemetry graphs, and client tracking for up to 3 screens. - Rear Ultrasonic Parking Radar and Auto-Brake: Rear-mounted HC-SR04 sonar with an active acoustic beeper and red flashing beacon. Features hardware auto-braking that stops reversing if an obstacle is within 15 cm.
- High-Intensity Lighting and Hazard System: Dual front white headlights with OFF / ON / HAZARD flasher modes and white rear reverse indicator LED.
- Dual-Microcontroller Architecture: Distributes wireless networking (ESP32) and real-time motor control (Arduino Uno) across dedicated hardware with hardware watchdog fail-safes.
- Single Battery Supply (No Buck Converter): Runs on 2Γ 18650 Li-ion cells (7.4V nominal) directly feeding the L298N motor driver and Arduino Uno VIN pin, with a 2200 Β΅F buffer capacitor preventing brownout resets.
βββββββββββββββββββββββββββββββββββ
β CLIENT DEVICE β
β (Phone / Tablet / Laptop) β
β http://192.168.4.1 [Browser] β
ββββββββββββββββββ¬βββββββββββββββββ
β
β 1. Wi-Fi 802.11b/g/n (SSID: RobotCar)
β - WebSocket ws://192.168.4.1/ws (Bidirectional Telemetry)
β - MJPEG Video Stream :81/stream (Sub-100ms Video)
βΌ
βββββββββββββββββββββββββββββββββββ
β ESP32-CAM MODULE β
β (Network & Telemetry Host) β
β - AI-Thinker OV2640 Camera β
β - Web & WebSocket Server β
β - High-Power Flash (IO4) β
ββββββββββββββββββ¬βββββββββββββββββ
β
β 2. Hardware UART Serial (38,400 Baud)
β - IO14 (TX, 3.3V) βββββββΊ Arduino D3 (RX)
β - IO15 (RX, 3.3V) βββββββ 1k/2k Divider βββ Arduino D2 (TX, 5V)
β - Checksum Protected Packets: M,left,right*XX
βΌ
βββββββββββββββββββββββββββββββββββ
β ARDUINO UNO R3 β
β (Deterministic Real-Time) β
β - Real-Time Ultrasonic Echo β
β - Hardware Fail-Safe Watchdog β
β - Smooth PWM Motor Slew Rampingβ
βββββββββ¬βββββββββββββββ¬βββββββββββ
β β
βΌ βΌ
ββββββββββββββββ ββββββββββββββββ
β L298N DRIVER β β SENSORS & IO β
β 4x TT Motors β β HC-SR04 Sonarβ
β Dual H-Bridgeβ β Active Buzzerβ
β PWM Speed β β 4x LEDs β
ββββββββββββββββ ββββββββββββββββ
The robot car uses a single 7.4V battery pack (2Γ 18650 cells in series) without requiring an external buck converter. The battery directly powers the L298N motor driver and the Arduino Uno VIN pin. The Arduino Uno's onboard linear regulator produces the 5V logic bus for all sensors and the ESP32-CAM, buffered by a 2200 Β΅F 16V low-ESR capacitor.
The vehicle is built on a double-decker acrylic 4WD chassis with dedicated spatial separation between high-current inductive components and sensitive radio-frequency electronics:
- Interactive 3D CAD Viewer: Open
docs/3d/robot_car_3d_viewer.htmlin your browser to inspect and rotate the complete 3D assembly. - Parametric 3D Files: Ready-to-print 3D models available at
docs/3d/robot_car_assembly.stlanddocs/3d/robot_car_assembly.3mf.
No app store downloads or native compilation required. Connect to the car's Wi-Fi network and open http://192.168.4.1 in Safari, Chrome, Firefox, or Edge.
Mobile Driver Interface (Portrait)
|
Mobile Driver Interface (Landscape)
|
Classroom Observation Viewer (/view)
|
Real-Time Settings and Calibration Panel
|
For complete shopping links and price estimates, see docs/01_BOM.md and docs/pdf/Shopping_List_Robot_Car.pdf.
| Microcontroller | Camera Module | Motor Driver | Distance Sensor |
|---|---|---|---|
| Arduino UNO R3 | ESP32-CAM Module | L298N Dual H-Bridge | HC-SR04 Ultrasonic |
| Power Source | TT Gear Motors | Breadboard & Rails | Active Buzzer |
|---|---|---|---|
| 2Γ 18650 Li-ion + Case | 4Γ TT Motors (1:48) | 400-Point Breadboard | 5V Active Buzzer |
| LEDs & Indicators | Filter Capacitor | Resistors & Divider | Power Switch |
|---|---|---|---|
| Headlights & Tail LEDs | 2200 Β΅F 16V Low-ESR | 220 Ξ©, 1 kΞ©, 2 kΞ© | SPST Rocker Switch |
| Arduino UNO Pin | Subsystem | Connected Device | Logic Voltage | Function |
|---|---|---|---|---|
| D2 | Telemetry TX | 1k/2k Divider β ESP32-CAM IO15 | 5.0V TTL | Transmits telemetry and heartbeat to ESP32 |
| D3 | Telemetry RX | ESP32-CAM IO14 (TX) | 3.3V CMOS | Receives drive commands from ESP32 |
| **D6 ~** | Motor Right | L298N ENB | 5.0V PWM | Right motor pair speed PWM (0β255) |
| D7 | Motor Right | L298N IN4 | 5.0V Digital | Right motor pair direction bit 2 |
| D8 | Motor Right | L298N IN3 | 5.0V Digital | Right motor pair direction bit 1 |
| D9 | Motor Left | L298N IN2 | 5.0V Digital | Left motor pair direction bit 2 |
| D10 | Motor Left | L298N IN1 | 5.0V Digital | Left motor pair direction bit 1 |
| **D11 ~** | Motor Left | L298N ENA | 5.0V PWM | Left motor pair speed PWM (0β255) |
| D12 | Sonar Sensor | HC-SR04 ECHO | 5.0V Digital | Ultrasonic pulse return input |
| D13 | Sonar Sensor | HC-SR04 TRIG | 5.0V Digital | Ultrasonic 10 Β΅s trigger pulse output |
| A0 | Rear Alarm | Red Warning LED (via 220 Ξ©) | 5.0V Digital | Flashing proximity alert indicator |
| A2 | Rear Indicator | White Reverse LED (via 220 Ξ©) | 5.0V Digital | Active reverse drive lamp |
| A3 | Audio Alert | 5V Active Acoustic Buzzer | 5.0V Digital | Parking beeper & acoustic horn |
| A4 | Front Lighting | 2Γ White Headlights (2Γ 220 Ξ©) | 5.0V Digital | Front headlights (Off / On / Hazard) |
| VIN | Power Supply | Switched Battery Positive (7.4V) | Battery DC | Feeds onboard 5V linear regulator |
| 5V / GND | System Bus | Breadboard Power Rails | 5.0V DC | Master logic power distribution |
- Install Arduino IDE 2.x from arduino.cc.
- Add ESP32 package repository in Preferences β Additional boards manager URLs:
https://espressif.github.io/arduino-esp32/package_esp32_index.json - Install esp32 by Espressif Systems from the Boards Manager.
- Arduino UNO: Open
firmware/uno_controller/uno_controller.ino, select Board: Arduino Uno, and click Upload. - ESP32-CAM: Open
firmware/esp32cam_robot/esp32cam_robot.ino, select Board: AI Thinker ESP32-CAM, set Partition Scheme: Huge APP (3MB No OTA), and click Upload via the ESP32-CAM-MB daughterboard.
- Turn on the vehicle battery switch.
- Connect your mobile phone or PC to Wi-Fi SSID
RobotCar(Password:12345678). - Open
http://192.168.4.1to drive, orhttp://192.168.4.1/viewfor classroom observation!
The project includes six progressive diagnostic test sketches in the tests/ directory to systematically verify each component before full operation:
tests/
βββ 01_motor_test/ # Tests L298N H-Bridge and 4x TT DC motors independently
βββ 02_ultrasonic_test/ # Calibrates HC-SR04 sonar distance sensor via Serial Monitor
βββ 03_buzzer_led_test/ # Tests active buzzer, headlights, reverse light, and warning LED
βββ 04_link_test/ # Verifies hardware UART link between Arduino Uno and ESP32-CAM
βββ 05_esp32cam_test/ # Standalone camera, Wi-Fi stream, and flash LED verification
βββ 06_parking_alarm_bench/ # Bench validation of obstacle distance thresholds & auto-brake
The docs/pdf/ directory contains complete, classroom-ready illustrated documentation:
| Document | File Path | Scope & Content |
|---|---|---|
| Complete Handbook | docs/pdf/00_Robot_Car_Complete_Handbook.pdf |
Comprehensive student manual (all modules combined) |
| Shopping and Parts List | docs/pdf/Shopping_List_Robot_Car.pdf |
Complete parts bill with specifications and supplier links |
| Illustrated Wiring Guide | docs/pdf/02_Wiring_Guide.pdf |
Step-by-step visual wiring walkthrough |
| Large Wiring Poster | docs/pdf/Robot_Car_Wiring_Poster.pdf |
High-resolution printable A3 workbench wiring poster |
| Assembly Guide | docs/pdf/03_Assembly_Guide.pdf |
Mechanical chassis assembly and component layout |
| Software and App Guide | docs/pdf/04_Software_and_App_Guide.pdf |
Arduino IDE setup, firmware upload, and web app operation |
| Testing and Troubleshooting | docs/pdf/05_Testing_and_Troubleshooting.pdf |
Bench testing protocols and fault diagnosis |
| Technical Reference | docs/pdf/06_Technical_Reference.pdf |
Protocol specifications, math, and code architecture |
| Arduino Warm-Up Lessons | docs/pdf/07_Warm_Up_Learn_Arduino.pdf |
Introductory programming lessons for beginners |
robot-car/
βββ README.md # Primary project overview & documentation hub
βββ LICENSE # Open-source MIT License
βββ .gitignore # Git exclusion rules
βββ firmware/
β βββ uno_controller/ # Real-time motor, sonar, and alarm controller (Arduino UNO)
β βββ esp32cam_robot/ # Camera streaming, Wi-Fi AP, and WebSocket server (ESP32-CAM)
βββ web/
β βββ index.html # Mobile driving web app interface
β βββ view.html # Classroom observation dashboard
βββ tests/ # 6 progressive hardware diagnostic sketches
βββ tools/
β βββ build_ui.py # Compiles web/ assets into C header files for ESP32
β βββ 3d/make_3d_model.py # Generates 3D STL, 3MF, and HTML CAD models
β βββ diagrams/make_diagrams.py # Generates SVG wiring and chassis diagrams
β βββ pdf/build_pdfs.py # Builds printable PDF handbooks
βββ docs/
βββ 01_BOM.md # Detailed Bill of Materials
βββ 02_WIRING.md # Step-by-step wiring instructions
βββ 03_ASSEMBLY.md # Mechanical assembly instructions
βββ 04_SOFTWARE_SETUP.md # Arduino IDE and flashing guide
βββ 05_PROTOCOL.md # WebSocket & UART protocol specification
βββ 06_TROUBLESHOOTING.md # Testing and diagnosis procedures
βββ 3d/ # Interactive 3D HTML viewer, STL, and 3MF models
βββ images/ # Wiring diagrams, schematics, and UI screenshots
βββ pdf/ # Printable student handbooks and posters
This project is licensed under the permissive MIT License. You are free to study, build, modify, distribute, and integrate this project for educational and commercial purposes.



