Close
0%
0%

Remote-Controlled Car with Real-Time Video Stream

Interactive Design Experience

Similar projects worth following
This project focuses on designing an RC car that streams live video footage and can be controlled remotely via a custom-built website. Using an ESP32-CAM module, the car captures live video, which is displayed on the web interface. Users can interact with and control the car’s movements (Forward, Backward, Left, Right, and Stop) through the same web interface. Additionally, the car features a playful panda box mechanism that accepts coins, using a servo motor to deposit them into the box in an engaging and interactive way.

1-Project Objectives

  • Enable users to remotely control an RC car from a custom-built web page.
  • Stream real-time video from the car’s perspective to the same interface.
  • Integrate an interactive panda coin collector mechanism.
  • Utilize affordable components to create a functional, engaging system.

2-System Architecture and Design

System Overview

  • ESP32-CAM: Hosts the web server, handles video streaming, and transmits control commands to the second ESP32.
  • Second ESP32: Receives commands, controls motors via the L298N, and operates the servo motor for the panda box.
  • Web Interface: Displays the video feed and provides a control panel for the RC car.

   Block Diagram

  1. ESP32-CAM: Captures video, hosts the web server, and transmits movement commands.
  2. Second ESP32: Controls motor driver and servo motor based on commands.
  3. Web Interface: Integrates video streaming and control functionality.

3-Wiring Details

  • ESP32-CAM and Second ESP32:
    • GPIO 3 (TX) of the ESP32-CAM is connected to GPIO 16 (RX) of the second ESP32 for serial communication.
    • Both modules share a common ground.
  • Motor Driver:
    • The second ESP32 controls the L298N motor driver, which powers the car’s motors.
  • Servo Motor:
    • Connected to GPIO 12 of the second ESP32 for controlling the panda box.
  • Push Button:
    • Connected to GPIO 13 and ground on the second ESP32, serving as the trigger for the panda box.

Step-by-Step Build Guide

  1. Assemble the Chassis:
    • Attach wheels, motors, and other hardware to form the car’s base.
  2. Set Up the ESP32-CAM:
    • Connect the ESP32-CAM to a breadboard.
    • Program it to stream video and transmit movement commands via UART.
  3. Connect the Motor Driver:
    • Wire the L298N motor driver to the motors and the second ESP32.
    • Test connections to ensure proper control of directional movement.
  4. Integrate the Servo Motor:
    • Connect the servo motor to GPIO 12 of the second ESP32.
    • Program the servo to respond to the button on GPIO 13.
  5. Build the Web Interface:
    • Develop an HTML/CSS/JS webpage to stream video and provide control buttons.
    • Test communication between the web interface and the ESP32-CAM.
  6. Test and Troubleshoot:
    • Verify seamless communication between both ESP32 modules.
    • Test motor control and panda coin collector functionality.

How It Works

The RC car leverages two ESP32 modules to separate tasks and optimize functionality:

  1. Web Server and Video Streaming:

    • An ESP32-CAM hosts a web server using mobile data from a cellphone.
    • The server's webpage, developed with HTML, CSS, and JavaScript, displays the live video feed from the ESP32-CAM’s camera and includes control buttons for the car’s movement (Forward, Backward, Left, Right, and Stop).
    • Button handlers send commands directly to the ESP32-CAM’s serial port, which communicates with the second ESP32.
  2. Motor Control:

    • Due to limited GPIO availability on the ESP32-CAM (some pins are internally used by the camera module), motor control commands are forwarded via UART to a second ESP32.
    • The ESP32-CAM’s UART outputs commands like "Forward" to the second ESP32, which reads the input and triggers the motor driver to execute the corresponding movement.
  3. Servo-Controlled Panda Coin Collector:

    • A servo motor connected to the second ESP32 controls the panda box.
    • When a button connected to the second ESP32 is pressed, the servo motor opens the panda box lid, accepts the coin, deposits it, and closes the lid.
    • The second ESP32 uses the millis() function to ensure non-blocking control of both the motor driver and servo motor, avoiding conflicts between PWM signals.

esp32-cam-code.txt

plain - 11.23 kB - 12/19/2024 at 06:59

Download

esp32-code.txt

plain - 3.95 kB - 12/19/2024 at 06:59

Download

ROB0025-Instruction Mannual V2.0.pdf

Instructions to show how to build the car step by step. here you can the car used in the project: https://www.gotronic.fr/art-chassis-baron-rob0025-19356.htm#complte_desc

Adobe Portable Document Format - 6.54 MB - 11/06/2024 at 18:38

Preview

  • 1 × Chassis
  • 1 × ESP32CAM
  • 1 × l298N Motor Driver
  • 1 × Plaque de Prototypage
  • 1 × Rechargeable AA Battery

View all 10 components

  • Prototype for foldable manufacturing

    emi3dlol12/19/2024 at 11:20 0 comments

    We did manufacturing optimization by making again the panda box but with foldable pattern, simplifying the work. We did it with paper to test.

  • Prototyping nov 28

    emi3dlol12/19/2024 at 11:18 0 comments

    A prototype with the servomotor was generated to test the mechanism.

    The servo was tested with different speeds and angles.

    https://drive.google.com/drive/folders/1pN04_y27E8oay5VLukY2Znhpm0sNJt7P

  • Decoration Dec 12

    emi3dlol12/19/2024 at 11:12 0 comments

    Started imaginating how the panda would look like, with different materials.

  • 12/12/2024

    zalal.youssef12/19/2024 at 11:10 0 comments

    we were working on the software part, coding the esp32-cam, esp32,as well creating the web page using html, css and js.

  • Final touches

    emi3dlol12/19/2024 at 11:09 0 comments

    The final version of the panda car was decorated with cotton, we used paper clips to complete the going up and down mechanism.

    we fixed the panda with glue. The mechanism in reality turned out to be really specific, the axis had to be straight and the servomotor had to touch the pivot point on an exact area.

    We also tested the range of the esp32 for the wifi of a mobile phone that was about 10 meters.


  • Final touches

    emi3dlol12/19/2024 at 11:04 0 comments

    The final version of the panda car was decorated with cotton, we used paper clips to complete the going up and down mechanism.

    we fixed the panda with glue. The mechanism in reality turned out to be really specific, the axis had to be straight and the servomotor had to touch the pivot point on an exact area.

    We also tested the range of the esp32 for the wifi of a mobile phone that was about 10 meters.


  • 11/12

    elodie veloso12/19/2024 at 10:57 1 comment

    patern of the panda in order to not see glue/ easier manufacturing.

  • 3d printed parts for panda box

    emi3dlol12/17/2024 at 21:34 0 comments

    For the panda box, after creating a prototype version, it was found a need for the servomotor to be fixed on one side of the box, and also a pivot for the arms and box. For this an exercise of generatenge a hinge and two circular spaces so that the arms could rotate smoothly was made and the final pieces were printed. This added a more profesional presentation to the project and mainly served as an exercise to explore complexity on the design.


    Holes where made for the paper pins.

  • 24/10/24

    A0136866511/08/2024 at 12:08 0 comments

    Built the car, added the motor drivers, learnt the functioning of the driver. Added a bluetooth control for the rc car and tested the functioning.

  • logs

    elodie veloso11/07/2024 at 09:49 0 comments

    10-17/10/24: researches about the parts we can use 

    24/07/24 : Build our car  

    7/11/24 : 

View all 10 project logs

  • 1
    Preparing the Chassis

    Assemble the Car Base:

    • Attach the DC motors to the chassis using screws or mounts.
    • Secure the wheels to the motor shafts.
    • Mount the panda box on the car securely, leaving space for other components.
  • Install the Battery Pack:

    • Place the rechargeable battery pack on the chassis. Use mounting tape or straps to secure it.
  • 2
    Wiring the ESP32-CAM

    Connect ESP32-CAM :

  • Prepare for Serial Communication:

  • Program the ESP32-CAM:

  • 3
    Setting Up the Second ESP32

    Connect the Motor Driver:

  • Connect the Servo Motor:

  • Connect the Push Button:

  • View all 7 instructions

    Enjoy this project?

    Share

    Discussions

    Does this project spark your interest?

    Become a member to follow this project and never miss any updates