With this source code and schematic, a 3 wheels robot chassis, you can make a Controllable Robot (or Dome Camera) and record video with an “ESP32-CAM” module
Price:
Other projects from this group
This project is an “ESP32-Cam WiFi Robot” firmware arduino source code (.ino) and also can be used as a “Dome Camera” with Chain Network feature which is based on the “ESP32 WebApp Builder” project.
The WiFi Robot project uses the “AI Thinker ESP32-CAM” module which has a 2MP Camera, 10 I/O pins, an on-chip LED and one MicroSD slot to store the images and videos as the main processor which with its tiny sized camera and 240MHz CPU is able to provide a fair quality images and video frames.
The other core is an ATmega8A AVR microcontroller. This chip controls 4 relays of two motors (in two directions) and communicates with ESP32-Cam via UART pins.
The project contains a schematic file and 2 folders, “ATmega8ARobot” which is the AVR-CodeVision source code and “ESP32CamRobot” the following files:
The pre-compiled .hex file of the AVR source code is placed in “ATmega8ARobot/Exe/ ATmega8ARobot.hex”.
There are different types of DC motors for project like this. I have choosen two 3-6 volt DC motor (which is called “TT Motor”) with gearbox.
One must be placed in the left side and one in the right side (back or front). A 360 Degree wheel must be placed in the center of the chassis.
The mechanism is so simple:
You can either use a “DIY 3-Wheels Robot Chassis” (which are available everywhere in different shapes/types) or build a Chassis yourself.
Simply I’ve made a chassis with what I had in my room for this project:
First open one of the files with Arduino program, then set the settings (Board and Flash Frequency).
Then turn on the ESP32 module in the “download mode” (GPIO0àGND) and upload the program with using an USB2Serial module.
To uploading the .hex file into ATmega8A, you can use either a standard AVR programmer or our designed AVR programmer, WiCard Kit 1.
Build up the chassis by assembling the motors and wheels, upload the firmware in both of ESP32-Cam and ATmega8A and make the circuit according to the schematic file in the project and your chassis.
The best place for the camera is the center-front of the chassis, but I’ve placed it in the left side.
The main power source must be 5V. If your battery or power source has more nominal voltage, use a 5V linear regulator like 7805 or LM2590 Switcher regulator.
Also you can stick a heat sink to the ESP32-Cam’s regulator. It’s not necessary but recommended.
Build the robot or dome camera according to the schematics and upload the programs. Then turn it on.
The LED will blink once (in case of everything is ok-or multiple times in case there’s no memory card). Then you’ll be able to see the module’s hot spot ssid via the WiFi networks in your PC or smart phone.
The default SSID is WiCardRobot and the default password is 12345678. Connect and go to 192.168.4.1 with a PC or smart phone web browser (Chrome or Firefox).
Here’s the web UI:
There are driving and recording tools in the right side. By tap or click on the steer, you can drive your robot.
In case of inserting memory card, by tap or click on the “RECORD” button, it starts recording video (the button’s name will change to “STOP”).
By tap or click on the “STOP” button, the recording will stop.
Capture button takes a photo and saves it in the memory card.
Light button turns the ESP32-Cam’s on chip power LED on or off.
Also there’s a camera vision (on-line stream) in the left side. By tap or click on it, the stream video will enlarge and the quality will increase.
And by tap of clicking again on the image, the stream size will change to the original size.
The quality can be set in the settings page.
This web application is also compatible with cell phone and mobile device browsers:
The Web Application is divided to 3 menus. The menus can be selected by click on the menu button.
“Controller” refers to the control tools and the “Online Stream” page, “Memory” refers to the file manager and “Settings” refers to the settings page.
In the “Memory” page, you can see the saved images (.jpg format) and the recorded videos.
The videos save in “.jp4” format and in the current firmware revision, you can either play the .jp4 video file in this page or with the KMPlayer.
Also you can access to another device’s memory in this page with setting the “Target” device in the settings page.
There are 3 buttons under the image:
The left button under the image (blue button) shows the file name and has the direct link of file (you can right click on it and copy the link).
The middle button shows the next file.
And the right button, removes the file.
You can download the images by tap or click on the image.
By click on the play button (middle of the JP4 file image), the video will be downloaded and played along with the audio and you can pause the video by tap or click on the image.
The web application’s settings menu has been divided to 5 parts:
I’m going to update and upgrade this project. I can add “AI” features (yes, “Artificial Intelligence”) or just a few options and bug fixes. Depending on you support :)
1.0
- Online Stream and control feature.
- Network memory access.
- .jp5 .jp4 .jpg file support.
- Video player upgraded.
- Supports FAT32 and newer microSD cards.
- Flash light during recording.
- Recoding videos
- Camera configuration
- Internal pages secure link
- Saving the images
- LED toggle on/off
- Set module hotspot and modem’s ssid and password
- Automatically connection to the modem
- Hidden hotspot button
- Disable hotspot button