ESP32-CAM is a camera module based on ESP32. It comes with an OV2640 2 MP camera and provides onboard SD memory card slot.
It is suitable for home smart devices, wireless monitoring, and other IoT applications.
ESP32 CAM module has on board PSRAM.
The OV2640 camera module on the ESP32 Camera board can support a max resolution of 1600 x 1200 pixels, however without PSRAM the camera frame buffer can only support a max resolution of 800×600 pixels
Boards with PSRAM (typically 4MB) can support the max resolution and also support 2 concurrent frame buffers. This provides for a better streaming experience as while one frame is being sent , the camera is working on capturing the next frame.
Always Power up the module using 5V .Powering the board with 5V increases stability .
The camera module has no USB input.So we need a FTDI programmer or USB-TTL module to upload program.In this testing we make use of an USB-TTL module built on CP2102 IC.
Connection between ESP CAM & USB-TTL is simple.
We make use of the 5v power from USB module itself.
Gnd is connected to Gnd pin of Camera module.
Rx of USB module to Tx (printed as UOT) of Camera module.
Tx of USB module to Rx (printed as UOR) of ESP CAM.
Do not use 3.3 V AS POWER SOURCE .
For PROGRAM Mode the GPIO0 pin must be connected to GND.
Plug in the USB-TTL module to PC and note the COM port allotted under Device Manager.
To use Arduino IDE for programming , we need to install the ESP32 boards Manager for Arduino.
From Arduino IDE open File—> Preferences
Copy and paste the following json link for additional Boards Manager :
https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
click OK to close the window.
Click Tools –> Boards –> Boards Manager
A separate window opens.
Search for ESP32 and install the latest version.
Once the ESP32 Board package is installed , you can select the ESP CAM board under Tools.
Click Tools –> Board –> ESP32 Arduino
and select AI Thinker ESP32 CAM
And then select the COM port.
Now open the File –> Examples –> ESP32 –> Camera –> Camera WebServer
It is a sophisticated program.
To start with you need to select camera model .
For this , uncomment CAMERA_MODEL_AI_THINKER and comment all other:
Then enter SSID and PASSWORD for your WiFi router.
Click on UPLOAD.
If GPIO0 is not connected to GND , you get a fatal error.
Ensure that GPIO0 is connected to GND and click Upload.
While you see Connecting…….. at the bottom of IDE , Press the RESET switch on CAM module.
RESET switch has to be pressed at the right time while you see Connecting…….
If RESET is not pressed properly , you get Error : Failed to Connect
Once uploading is successful you see the message
Leaving….
Hard Resetting via RTS pin…
Now open the SERIAL monitor of IDE.
Remove the GPIO-GND Jumper.
and press the RESET switch.
WiFi connected message is displayed and you get an IP address for your Camera module.
This IP address is Dynamic and provided by your Router.
Open the WEB Browser and type in the IP address.
Now you can see the DASHBOARD control of Camera.
From here you can click on GET STILL button to take pictures.
Quality & Resolution of the picture can be modified by sliding the control bar provided.
START STREAM button is provided to start streaming of live video.
While you capture Still pictures , JPG picture details are displayed on the serial monitor.
Following are some common problems and solutions :
If your power source is not providing enough current,
you get the following error.
Always use 5V for supply , as 3.3v often gives problem.
If CAMERA MODEL is wrongly selected, you get error : Detected Camera not supported.
Always uncomment the correct model in the code and all others must be commented out.
VIDEO TUTORIAL :