

The ESP32-CAM is a low-cost, compact, and versatile Wi-Fi and Bluetooth-enabled microcontroller module with an integrated camera. It is widely used in IoT (Internet of Things) applications, surveillance systems, and image processing projects. The module combines the power of the ESP32 microcontroller with a camera module, making it ideal for projects requiring wireless image capture and processing.








The ESP32-CAM module is equipped with a powerful ESP32 microcontroller and an OV2640 camera. Below are the key technical details:
| Parameter | Value |
|---|---|
| Microcontroller | ESP32-D0WDQ6 |
| Camera | OV2640 |
| Wireless Connectivity | Wi-Fi 802.11 b/g/n, Bluetooth |
| Flash Memory | 4 MB (PSRAM) |
| Operating Voltage | 3.3V |
| Input Voltage Range | 5V (via external power supply) |
| GPIO Pins | 9 |
| Dimensions | 27mm x 40.5mm |
The ESP32-CAM module has a total of 16 pins. Below is the pinout and description:
| Pin Name | Pin Number | Description |
|---|---|---|
| GND | 1 | Ground |
| 3.3V | 2 | 3.3V power supply |
| 5V | 3 | 5V power supply |
| U0R | 4 | UART0 RX for serial communication |
| U0T | 5 | UART0 TX for serial communication |
| GPIO0 | 6 | General-purpose I/O, used for boot mode selection |
| GPIO1 | 7 | General-purpose I/O |
| GPIO2 | 8 | General-purpose I/O |
| GPIO3 | 9 | General-purpose I/O |
| GPIO4 | 10 | General-purpose I/O |
| GPIO12 | 11 | General-purpose I/O |
| GPIO13 | 12 | General-purpose I/O |
| GPIO14 | 13 | General-purpose I/O |
| GPIO15 | 14 | General-purpose I/O |
| GPIO16 | 15 | General-purpose I/O |
| RESET | 16 | Reset pin |
The ESP32-CAM can be used in a variety of projects. Below are the steps to get started:
Below is a simple example of how to use the ESP32-CAM to capture an image and serve it over Wi-Fi:
#include <WiFi.h>
#include <esp_camera.h>
// Replace with your network credentials
const char* ssid = "Your_SSID";
const char* password = "Your_PASSWORD";
void startCameraServer();
void setup() {
Serial.begin(115200);
Serial.setDebugOutput(true);
Serial.println();
// Connect to Wi-Fi
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}
Serial.println("");
Serial.println("WiFi connected");
// Start the camera server
startCameraServer();
Serial.println("Camera ready! Use 'http://<ESP32-CAM-IP>' to connect");
}
void loop() {
// Nothing to do here
}
Module Not Connecting to Wi-Fi
Camera Initialization Failed
Serial Communication Errors
Module Overheating
Q: Can the ESP32-CAM be powered directly from a USB port?
A: No, the ESP32-CAM requires a 5V power supply, which can be provided via an external power source or a USB-to-serial adapter.
Q: How do I reset the ESP32-CAM?
A: Press the RESET button on the module or momentarily connect the RESET pin to GND.
Q: Can I use the ESP32-CAM without a camera?
A: Yes, the ESP32-CAM can function as a standard ESP32 module for other IoT applications.
Q: What is the maximum resolution of the OV2640 camera?
A: The OV2640 camera supports a maximum resolution of 1600x1200 pixels (UXGA).