-
1Preparing 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.
-
2Wiring the ESP32-CAM
Connect ESP32-CAM :
- Place the ESP32-CAM module on a breadboard for easy wiring.
- Connect its power pins to the battery pack or voltage regulator if required.
Prepare for Serial Communication:
- Connect GPIO 3 (TX) of the ESP32-CAM to GPIO 16 (RX) of the second ESP32.
- Connect both modules to a common ground.
Program the ESP32-CAM:
- Use a USB-to-serial adapter to upload the web server firmware to the ESP32-CAM.
- Test the video stream and web interface.
-
3Setting Up the Second ESP32
Connect the Motor Driver:
- Connect the motor driver input pins to four GPIO pins on the second ESP32.
- Connect the motor output terminals to the DC motors.
- Ensure the motor driver shares the same ground with the ESP32.
Connect the Servo Motor:
- Attach the servo motor to GPIO 12 of the second ESP32.
- Mount the servo motor to the panda box lid, ensuring smooth opening and closing.
Connect the Push Button:
- Wire the button to GPIO 13 and ground.
- Test the button functionality to trigger the panda box.
-
4Power Connections
Power Distribution:
- Connect the battery pack to the motor driver and both ESP32 modules.
- Verify voltage levels to ensure compatibility with all components.
Common Ground:
- Ensure all components share a common ground for stable operation.
-
5Programming the Second ESP32
Upload Firmware:
- Program the second ESP32 to interpret commands received via UART.
- Map commands (e.g., "Forward", "Left") to the motor driver and servo motor.
- Use non-blocking code (
millis()
instead ofdelay()
) to maintain smooth operation.
Test Serial Communication:
- Verify that the second ESP32 receives and processes commands from the ESP32-CAM.
-
6Web Interface Setup
Design the Interface:
- Create a webpage with buttons for Forward, Backward, Left, Right, and Stop.
- Embed the live video stream from the ESP32-CAM.
Test Web Controls:
- Ensure button presses trigger the corresponding commands on the ESP32-CAM.
-
7Final Assembly
Secure Components:
- Use screws, standoffs, or hot glue to fix all components securely to the chassis.
Organize Wiring:
- Use zip ties or heat shrink tubing to manage and protect wires.
Perform a Full System Test:
- Test motor movements, video streaming, and the panda box functionality.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.