ESP32-CAM

The ESP32-CAM is a specialized, ultra-small camera board that combines Espressif's ESP32 chip with an OV2640 camera module, an onboard microSD card slot, and a high-brightness flash LED.

ESP32-CAM

At a glance

Pins and properties exactly as the circuit editor and simulator define this part. The text below explains how to use them.

Board facts

Board facts
FactValue
Operating voltage3.3 V
FamilyEspressif
Python runtimemicropython
Wi-FiYes
BluetoothYes
Native USBNo

Pinout

Pinout of the ESP32-CAM. Select a label to see that pin in the table below.

Pins (16)

Pins of this board
PinKindFeaturesAlternate functions
5VPower
GNDGround
GPIO12GPIOPWM, ADCPWM, ADC2, MISO, SPI
GPIO13GPIOPWM, ADCPWM, ADC2, CS, SPI
GPIO15GPIOPWM, ADCPWM, ADC2, SCL, I2C, MOSI, SPI
GPIO14GPIOPWM, ADCPWM, ADC2, SDA, I2C, SCK, SPI
GPIO2GPIOPWM, ADCPWM, ADC2
GPIO4GPIOPWM, ADCPWM, ADC2
3V3Power3.3V
GPIO16GPIOPWMPWM
GPIO0GPIOPWM, ADCPWM, ADC2
GNDGround
VCC (3V3 out)PowerVCC OUT, 3.3V
GPIO3GPIOPWMPWM, RX0, UART0
GPIO1GPIOPWMPWM, TX0, UART0
GNDGround

The ESP32-CAM is a specialized, ultra-small camera board that combines Espressif's ESP32 chip with an OV2640 camera module, an onboard microSD card slot, and a high-brightness flash LED.


1. Hardware Specifications

  • Processor: Dual-core Tensilica LX6 running at 240 MHz.
  • Logic Level: 3.3V.
  • Memory Limits: 4 MB Flash, 520 KB SRAM, and 4 MB external PSRAM (critical for holding raw image data frames).
  • Camera Module: Includes an OV2640 camera (2 Megapixel resolution).

2. Detailed Pinout & GPIO Map

Due to the camera sensor occupying the majority of the ESP32's internal registers, only a small set of GPIOs are exposed. Below is the pinout map:

Physical Pin LabelGPIO IDPin TypePin Functions / MappingsWarnings & Cautions
GPIO 00Analog / GPIOADC2, Boot strapBootstrap Pin. Must be jumpered to GND to enter flashing mode.
GPIO 11DigitalTX0 (Console / Flash)Shared with USB-to-UART serial transmit.
GPIO 22Analog / GPIOADC2Plain GPIO in OMS's simulator. On real hardware this pin is a boot-strapping pin some camera module designs pull low — worth caution, but OMS doesn't model or enforce that constraint.
GPIO 33DigitalRX0 (Console / Flash)Shared with USB-to-UART serial receive.
GPIO 44Analog / GPIOADC2, High-power Flash LEDControls the bright white front-facing LED. Runs hot; use sparingly.
GPIO 1212Analog / SPIADC2, SPI MISODefault SPI Master In Slave Out pin.
GPIO 1313Analog / SPIADC2, SPI CSDefault SPI Chip Select pin.
GPIO 1414Analog / I2C / SPIADC2, I2C SDA, SPI SCKDefault I2C data pin and default SPI clock pin (mutually exclusive uses).
GPIO 1515Analog / I2C / SPIADC2, I2C SCL, SPI MOSIDefault I2C clock pin and default SPI data pin (mutually exclusive uses).
GPIO 1616DigitalGPIOPlain, freely usable GPIO in OMS. On real hardware this pin doubles as U2RXD/PSRAM-select on some module variants — not modeled or restricted in OMS's simulator.

[!NOTE] Real AI-Thinker ESP32-CAM hardware also routes GPIO12–15 to an onboard microSD card slot (HS2_DATA2/DATA3/CLK/CMD) — OMS doesn't simulate the SD card at all, so in OMS these 4 pins are simply the board's default I2C/SPI buses, with no SD-card-sharing conflict to worry about.

GPIO 33 (the onboard red status LED) is not a wireable pin in OMS's simulator at all — it only exists as the built-in LED, the same way GPIO2 is excluded on the plain ESP32 DevKit V1 (Section 3.5). You can't select it in the Circuit Canvas.


3. Power Architecture & FTDI Adapter Requirements

[!WARNING] High Current Brownouts (2A Peaks): The ESP32-CAM module does not contain a built-in USB port or a USB-to-UART converter chip. To flash and run the board, you must use an external USB-to-UART FTDI programmer:

  1. Connect FTDI TX to ESP32-CAM RX (GPIO 3).
  2. Connect FTDI RX to ESP32-CAM TX (GPIO 1).
  3. Connect FTDI GND to ESP32-CAM GND.
  4. Critical: Connect FTDI 5V to ESP32-CAM 5V. Do NOT use the 3.3V pin of the FTDI adapter, as the board draws peak currents up to 2A during camera initiation and Wi-Fi handshakes, which will trigger brownout resets.

4. Compiler Settings & IDE Properties

When targeting this board, the compiler is intended to use the following parameters:

  • FQBN: esp32:esp32:esp32cam
  • Default Flashing Baud Rate: 921600
  • Flash Mode / File Type: esp
  • Flash Memory Offsets: { bootloader: 0x1000, partitions: 0x8000, app: 0x10000 }
  • Programming Runtimes: C++ (Arduino framework) only. Due to the high memory demands of holding image buffers and MicroPython's runtime structures concurrently in RAM, MicroPython is disabled for the ESP32-CAM model.

[!WARNING] Known bug: same issue as the ESP32-S2/S3/C3 (Sections 3.6-3.8) — this board's actual internal id (esp32cam) doesn't match any key in the compiler's board-config lookup table (which only has hyphen/underscore forms like esp32-cam), so compiling currently silently falls back to plain ESP32's FQBN (esp32:esp32:esp32) instead of the CAM-specific one above. See Known_Bugs.md §2.0.


5. Supported Blockly Board Blocks

Drawing the blocks…

6. Simulator and Flashing Diagnostics

  • Simulator: Core GPIO toggles are simulated. There is no simulated camera frame/image output of any kind (no test pattern, no colorbar).
  • Flashing Guide:
    1. Bridge GPIO 0 to GND using a jumper wire.
    2. Press the physical RESET button on the back of the ESP32-CAM.
    3. Click Flash in OMS.
    4. Once compilation and serial upload finish, remove the jumper wire between GPIO 0 and GND.
    5. Press the RESET button again to boot into your application code.

7. Communication Buses & Electrical Capabilities

Beyond the per-pin table above, here's the board's bus-level capability summary (from its own capabilities config):

BusDetails
UART1 hardware bus — TX on GPIO1, RX on GPIO3, shared with the FTDI programming connection.
I2CDefault on GPIO14 (SDA) / GPIO15 (SCL).
SPIDefault on MOSI GPIO15, MISO GPIO12, SCK GPIO14, CS GPIO13. Note GPIO14/15 are shared between the I2C and SPI defaults — pick one bus or the other per project.
1-WireNo dedicated 1-Wire hardware peripheral. Sensors like the DHT11 bit-bang the timing on any regular digital pin instead.
Analog (ADC)7 ADC2-only pins (GPIO0, 2, 4, 12, 13, 14, 15 — no ADC1 pins exposed at all), 12-bit resolution.
PWM16 channels, 16-bit resolution, up to 40 MHz — same LEDC peripheral as the plain ESP32 DevKit V1.

Electrical limits: max 20 mA per pin (lower than other ESP32 boards — a deliberately conservative limit since the camera module shares the same 3.3V rail), max 1200 mA total.


8. Further Reading


ESP32-CAM — OMS Parts