ESP32-CAM module contains a 2MP Camera, some I/O pins and one MicroSD slot to store the images and videos. With its tiny size and 240MHz CPU is able to provide a fair quality images. This project is a source code which lets you to handle the camera and use the module’s special features.
This project contains two folders ESP32CamProgram (the Arduino source code) and PHP Script (For server use option).
The source code contains 7 files:
1- ESP32CamProgram.ino – the main program
2- AC.ino (camera and autoconnect configuration)
3- AC.h (settings and configuration headerfile)
4- CamSettings.h (Camera settings)
5- CamCapture.ino (Capturing and storing the images)
6- CamMemory.ino (Video player/images gallery)
7- CamPages.ino (Internal pages)
Uploading the projectFirst open one of the files with Arduino program, then set the settings as the following image (Board and CPU Frequency):
Then turn on the ESP32 module in the “download mode” (GPIO0->GND) and upload the program with using an USB2Serial module.
Here's the "programming (With the programming jumper) and working (Without the programming jumper and USB to Serial is not necessary) schematics:
• It’s suggested to install (or upgrade/downgrade to) “ESP32 Boards rev 3.2.0”. This revision is more compatible with the project.
• The “Board” must be set on the compatible ESP32 Modules (Ai Thinker ESP32-Cam) before doing anything.
• The start-up CPU speed has been set to 240MHz.
• For the “download mode”, use a jumper for connecting “IO 0” to the GND.
• It’s suggested to remove the whole data in the ESP flash memory before the first upload.
Preparing The ESP32 IPCamThe “Ai Thinker ESP32-Cam” module is completed. You only need a standard 5V power source.
Also you can stick a heat sink to the module’s regulator. It’s not necessary but recommended.
• The onboard ESP32 module must only receive 3.3v. Higher voltage will hurt the module.
• Do not use higher voltage for the 5V and 3.3V input pins.
This is the assembled circuit with a 5V power source inside of an enclosure:
After upload, run the program in “normal mode”.
Then in case you are using ESP32-Cam, the red LED on the board would be turned on for 1 second then turns off. 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 WiCardIPCam and the default password is 12345678. Connect and go to 192.168.4.1/config with a web browser.
In the “Modem Configuration” section, you’re able to view/edit the SSID and password of WiFi modem/router and then click on “Save” after inserting. The module would connect to the modem after about 30 seconds in case of validity of ssid and password.
• This page is also available via the DHCP IP of the module.
In the “Device Hot Spot Configuration“ section, you can set the module hotspot’s SSID and password. Also you can set a password for the internal page with Secure Link section. (Example: the secure link is ABCD and the root page would be at 192.168.4.1/ABCD/ address)
The “Hidden HotSpot” button will set the module’s hot spot as hidden hotspot and the “Disable HotSpot when is connected to the modem” would disable the module’s hotspot, when is connected to the modem.
The Camera Configuration Section:
With “Enable Recording” button you can enable or disable the motion sensor.
After the configuration click on save button and re-start the module.
Video Streaming PageThis page is at the root address (192.168.4.1 or the router’s given IP) and works as a CCTV camera and you can see the live video.
Is case of placing a MicroSD card, with click or tapping on the stream video, the module takes a picture (the stream freezes for 2 seconds).
It you click or tap twice, the white LED of the ESP32-CAM turns on or toggles off.
• The light of scene increases images quality.
• Do not keep the white LED on for a long time.
• Better to use a suitable heatsink for the module’s regulator.
• Better to use a 5V-2A power source.
• The WiFi signal strength takes effect on the module capability and the video streams.
Memory pageThe memory page is located at 192.168.4.1/memory (or with the DHCP IP) and shows the memory’s images and videos.
The video’s format is.JP4 and only just the module can play them. With tap on the image of video, the video would play and pause.
• The process of smaller images is faster.
• If you have not enough programming and electronics knowledge, do not make changes
Comments