ESP32-CAM Remote Controlled Car:
The robot will be controlled via Wi-Fi using your ESP32-CAM. We’ll create a web-based interface to control the robot, that can be accessed in any device inside your local network.
The web page also shows a video streaming of what the robot. For good results with video streaming, we recommend using an ESP32-CAM with external antenna.
The web server has 5 controls: Forward, Backward, Left, Right, and Stop.
The robot moves as long as you’re pressing the buttons. When you release any button, the robot stops.
However, we’ve included the Stop button that can be useful in case the ESP32 doesn’t receive the stop command when you release a button.
This web controlled surveillance car can be easily built using the ESP32-CAM module.
Apart from the ESP32-Camera module, here we will use two DC motor with Robot chassis and L293D motor driver module to build this Robotic car.
ESP32 is one of the most popular boards to build IoT based projects, check all the ESP32 based IoT projects here.
The AI-Thinker ESP32-CAM module comes with an ESP32-S chip, a very small size OV2640 camera and a microSD card slot.
MicroSD card slot can be used to store images taken from the camera. Here HTTP communication protocol will be used to receive video streaming from the OV2640 camera over the web browser.
The web page will also have buttons to move the car in Left, Right, Forward and reverse directions as shown in the image above.
2. FTDI Programmer
3. DC Motors (2)
4. Motor Driver (L293D)
ESP32-CAM doesn’t have a USB connector, so you need an FTDI board to upload the code into ESP32-CAM.
VCC and GND pin of ESP32 is connected with the VCC and GND pin of the FTDI board.
Tx of and Rx of ESP32 is connected with Rx and Tx of the FTDI board. Two DC motors are connected to ESP32 through the L293D module. Module pins are connected to IO4, IO2, IO14, and IO15 pins of ESP32.
Note: Before uploading the code, connect the IO0 to the ground. IO0 determines whether the ESP32 is in flashing mode or not.
When GPIO 0 is connected to GND, the ESP32 is in flashing mode.
We built a robot by using a ready-made robot chassis, wheels, and DC motors.
We used a battery to power the motor drive module and ESP32-CAM. This is how my surveillance robot looks like:
Installing ESP32 Board on Arduino IDE
We will program the ESP32-CAM using Arduino IDE. For that, we have to install the ESP32 add-on on Arduino IDE.
To install the ESP32 board in your Arduino IDE, go to File> Preferences
Now copy the below link and paste it into the “Additional Board Manager URLs” field, as shown in the image below. Then, click the “OK” button:
This ESP32 Surveillance Camera has a total of four code files that are attached at the end of the project and also can be downloaded here. mks_Camera_car
Free eBooks: Download here.