

The ESP32-CAM is a low-cost development board manufactured by TSMC (Part ID: ESP32-CAM). It features an ESP32 microcontroller with integrated Wi-Fi and Bluetooth capabilities, along with a camera module. This compact and versatile board is ideal for IoT applications that require video streaming, image capture, or wireless communication.








The ESP32-CAM combines powerful processing capabilities with wireless connectivity and a camera interface, making it a popular choice for IoT and vision-based projects.
| Specification | Value |
|---|---|
| Microcontroller | ESP32 (dual-core, 32-bit LX6 processor) |
| Wireless Connectivity | Wi-Fi 802.11 b/g/n, Bluetooth 4.2 |
| Camera Module | OV2640 (2MP) |
| Flash Memory | 4 MB (PSRAM: 8 MB) |
| Operating Voltage | 3.3V |
| Input Voltage Range | 5V (via external power supply or USB) |
| GPIO Pins | 9 (configurable for various peripherals) |
| Interfaces | UART, SPI, I2C, PWM, ADC, DAC |
| Dimensions | 27mm x 40.5mm |
| Power Consumption | ~160mA (active mode) |
The ESP32-CAM 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 input |
| IO0 | 3 | GPIO0 (used for boot mode selection) |
| IO1 | 4 | GPIO1 (UART TX) |
| IO3 | 5 | GPIO3 (UART RX) |
| IO4 | 6 | GPIO4 (configurable GPIO) |
| IO12 | 7 | GPIO12 (configurable GPIO) |
| IO13 | 8 | GPIO13 (configurable GPIO) |
| IO14 | 9 | GPIO14 (configurable GPIO) |
| IO15 | 10 | GPIO15 (configurable GPIO) |
| IO16 | 11 | GPIO16 (configurable GPIO) |
| IO33 | 12 | GPIO33 (configurable GPIO) |
| RESET | 13 | Reset pin |
| GND | 14 | Ground |
| 5V | 15 | 5V power supply input |
| EN | 16 | Enable pin (active high to enable the module) |
The ESP32-CAM is easy to integrate into IoT projects. Below are the steps to use it effectively:
Power Supply:
Programming Mode:
Camera Module:
Code Upload:
Run the Program:
Below is an example of how to use the ESP32-CAM to stream video using the Arduino IDE:
#include <WiFi.h>
#include <esp_camera.h>
// Replace with your Wi-Fi credentials
const char* ssid = "Your_SSID";
const char* password = "Your_PASSWORD";
void startCameraServer();
void setup() {
Serial.begin(115200);
// Connect to Wi-Fi
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}
Serial.println("");
Serial.println("WiFi connected");
Serial.println(WiFi.localIP());
// Initialize the camera
camera_config_t config;
config.ledc_channel = LEDC_CHANNEL_0;
config.ledc_timer = LEDC_TIMER_0;
config.pin_d0 = 5;
config.pin_d1 = 18;
config.pin_d2 = 19;
config.pin_d3 = 21;
config.pin_d4 = 36;
config.pin_d5 = 39;
config.pin_d6 = 34;
config.pin_d7 = 35;
config.pin_xclk = 0;
config.pin_pclk = 22;
config.pin_vsync = 25;
config.pin_href = 23;
config.pin_sscb_sda = 26;
config.pin_sscb_scl = 27;
config.pin_pwdn = -1;
config.pin_reset = -1;
config.xclk_freq_hz = 20000000;
config.pixel_format = PIXFORMAT_JPEG;
if (!esp_camera_init(&config)) {
Serial.println("Camera init failed");
return;
}
// Start the camera server
startCameraServer();
}
void loop() {
// Main loop does nothing; camera server handles requests
}
ESP32-CAM Not Detected by Computer:
Wi-Fi Connection Fails:
Camera Initialization Fails:
Board Keeps Resetting:
Q: Can the ESP32-CAM be powered with 3.3V?
A: No, the ESP32-CAM requires a 5V input for stable operation. The onboard regulator converts 5V to 3.3V.
Q: How do I reset the ESP32-CAM?
A: Press the reset button on the board or momentarily connect the RESET pin to GND.
Q: Can I use the ESP32-CAM without the camera module?
A: Yes, the ESP32-CAM can function as a standard ESP32 development board without the camera module.