Blog

AI Thinker ESP32-CAM Development Board

AI Thinker ESP32-CAM Development Board

WiFi + Bluetooth with OV2640 Camera Module – Arduino Compatible IoT Camera Solution

Introduction

The ESP32-CAM is a compact development board combining ESP32-S chip with OV2640 camera module, perfect for IoT vision projects. It features WiFi/Bluetooth connectivity, microSD card slot, and GPIO pins in a minimal footprint.

ESP32-CAM Board

Key Features

📷 Camera Module

OV2640 (2MP with JPEG output)

📶 Dual Connectivity

WiFi + Bluetooth 4.2

💾 Storage Options

MicroSD card slot (up to 4GB)

âš¡ Low Power

Deep sleep current ~6μA

Technical Specifications

Core Processor ESP32-S (Xtensa LX6 dual-core)
Clock Speed 240MHz (up to 600 DMIPS)
Wireless 802.11 b/g/n WiFi + Bluetooth 4.2
Camera OV2640 (2MP, 1600×1200 max)
Image Formats JPEG, BMP, Grayscale
RAM 520KB SRAM + 4MB PSRAM
Flash 4MB (default)
GPIO 9 usable pins (shared with camera)

Pin Configuration

ESP32-CAM Pinout

Pin Function Notes
3V3 3.3V Power Max 500mA
5V 5V Input When not using 3V3
GND Ground
GPIO 0 Boot Mode Pull LOW to flash
GPIO 2 LED/Serial Connected to onboard LED
GPIO 4 SD Card/General SD_MMC_D1
GPIO 12 SD Card/General SD_MMC_CLK
GPIO 13 Camera/General CAMERA_PCLK
GPIO 14 Camera/General CAMERA_XCLK
GPIO 15 Camera/General CAMERA_VSYNC
Note: Many GPIO pins are shared with camera functions – check documentation before use

Basic Setup

  1. Install Arduino IDE (1.8.10+)
  2. Add ESP32 board support via Boards Manager (URL: https://dl.espressif.com/dl/package_esp32_index.json)
  3. Select “AI Thinker ESP32-CAM” board
  4. Connect GPIO0 to GND to enter flash mode
  5. Connect via USB-to-TTL adapter (RX→TX, TX→RX, 3V3→3V3, GND→GND)

Camera Web Server Example

Image Capture to SD Card

Optimization Tips

Image Quality

Adjust resolution and quality based on available RAM

Power Saving

Use deep sleep between captures to save power

Motion Detection

Implement basic motion detection to trigger captures

Troubleshooting

Camera Not Initializing

  • Verify all camera pins are properly defined
  • Check power supply (needs 500mA+ for camera)
  • Ensure proper board selection in Arduino IDE

WiFi Connection Issues

  • Check antenna is properly connected
  • Try reducing WiFi transmit power
  • Verify credentials and network availability

SD Card Problems

  • Format card as FAT32 (max 4GB)
  • Check card detect pin (GPIO13)
  • Verify proper voltage level conversion if needed