Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Component Documentation

How to Use ESP32-CAM-MB: Examples, Pinouts, and Specs

Image of ESP32-CAM-MB
Cirkit Designer LogoDesign with ESP32-CAM-MB in Cirkit Designer

Introduction

The ESP32-CAM-MB is a compact development board that combines the powerful ESP32 chip with integrated Wi-Fi and Bluetooth capabilities, along with a camera module. This board is specifically designed for IoT applications, making it ideal for projects that require image capture, video streaming, or remote monitoring. Its small form factor and versatile features make it a popular choice for smart home devices, security systems, and AI-powered image recognition projects.

Explore Projects Built with ESP32-CAM-MB

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Dual ESP32-CAM and Arduino Mega 2560 Serial Communication Interface
Image of Fridge monitor: A project utilizing ESP32-CAM-MB in a practical application
This circuit consists of two ESP32-CAM modules and an Arduino Mega 2560 microcontroller. The ESP32-CAM modules are interfaced with the Arduino Mega 2560 via serial communication, with one module connected to Serial1 (TX1/RX1) and the other to Serial2 (TX2/RX2). The Arduino Mega 2560 runs a sketch that controls an LED on pin D13, turning it on for one second and off for two seconds in a continuous loop.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP32 CAM Wi-Fi Controlled Camera with FTDI Programmer
Image of R: A project utilizing ESP32-CAM-MB in a practical application
This circuit consists of an ESP32 CAM module connected to an FTDI Programmer for power and serial communication. The ESP32 CAM is programmed to capture images and stream them over WiFi, acting as a web server to provide live video feed.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP32 CAM Wi-Fi Controlled Camera with FTDI Programmer
Image of ESP32 CAM: A project utilizing ESP32-CAM-MB in a practical application
This circuit consists of an ESP32 CAM module connected to an FTDI Programmer for power and serial communication. The ESP32 CAM is programmed to capture images and stream them over WiFi, acting as a web server to provide a live video feed.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP32 CAM Wi-Fi Controlled Live Video Streamer with FTDI Programmer
Image of amen: A project utilizing ESP32-CAM-MB in a practical application
This circuit consists of an ESP32 CAM module connected to an FTDI Programmer for power and serial communication. The ESP32 CAM is programmed to capture images and stream them over WiFi, acting as a web server to provide a live video feed.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with ESP32-CAM-MB

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Image of Fridge monitor: A project utilizing ESP32-CAM-MB in a practical application
Dual ESP32-CAM and Arduino Mega 2560 Serial Communication Interface
This circuit consists of two ESP32-CAM modules and an Arduino Mega 2560 microcontroller. The ESP32-CAM modules are interfaced with the Arduino Mega 2560 via serial communication, with one module connected to Serial1 (TX1/RX1) and the other to Serial2 (TX2/RX2). The Arduino Mega 2560 runs a sketch that controls an LED on pin D13, turning it on for one second and off for two seconds in a continuous loop.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of R: A project utilizing ESP32-CAM-MB in a practical application
ESP32 CAM Wi-Fi Controlled Camera with FTDI Programmer
This circuit consists of an ESP32 CAM module connected to an FTDI Programmer for power and serial communication. The ESP32 CAM is programmed to capture images and stream them over WiFi, acting as a web server to provide live video feed.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of ESP32 CAM: A project utilizing ESP32-CAM-MB in a practical application
ESP32 CAM Wi-Fi Controlled Camera with FTDI Programmer
This circuit consists of an ESP32 CAM module connected to an FTDI Programmer for power and serial communication. The ESP32 CAM is programmed to capture images and stream them over WiFi, acting as a web server to provide a live video feed.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of amen: A project utilizing ESP32-CAM-MB in a practical application
ESP32 CAM Wi-Fi Controlled Live Video Streamer with FTDI Programmer
This circuit consists of an ESP32 CAM module connected to an FTDI Programmer for power and serial communication. The ESP32 CAM is programmed to capture images and stream them over WiFi, acting as a web server to provide a live video feed.
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications and Use Cases

  • Wireless video streaming and surveillance systems
  • Smart home automation with image or video capture
  • AI-based image recognition and processing
  • Remote monitoring for IoT devices
  • DIY robotics with vision capabilities

Technical Specifications

Key Technical Details

  • Microcontroller: ESP32-D0WDQ6 chip
  • Wireless Connectivity: Wi-Fi 802.11 b/g/n and Bluetooth 4.2
  • Camera Module: OV2640 (2MP resolution)
  • Flash Memory: 4MB (PSRAM)
  • Operating Voltage: 3.3V
  • Power Supply: 5V via micro-USB or external power source
  • GPIO Pins: 9 available for user applications
  • Interfaces: UART, SPI, I2C, PWM
  • Dimensions: 27mm x 40.5mm
  • Operating Temperature: -20°C to 85°C

Pin Configuration and Descriptions

The ESP32-CAM-MB has a total of 16 pins. Below is the pinout and description:

Pin Name Description
1 GND Ground connection
2 5V Power input (5V)
3 3.3V Power output (3.3V)
4 GPIO0 General-purpose I/O, used for boot mode selection
5 GPIO1 (TX) UART TX pin, used for serial communication
6 GPIO3 (RX) UART RX pin, used for serial communication
7 GPIO12 General-purpose I/O, often used for LED flash control
8 GPIO13 General-purpose I/O, often used for camera module communication
9 GPIO14 General-purpose I/O
10 GPIO15 General-purpose I/O
11 GPIO16 General-purpose I/O
12 GPIO17 General-purpose I/O
13 GPIO33 General-purpose I/O, often used for camera module communication
14 GPIO34 General-purpose I/O, input only
15 GPIO35 General-purpose I/O, input only
16 RESET Reset pin, used to restart the board

Usage Instructions

How to Use the ESP32-CAM-MB in a Circuit

  1. Powering the Board:

    • Connect the ESP32-CAM-MB to a 5V power source via the micro-USB port or the 5V pin.
    • Ensure the power supply can provide at least 500mA for stable operation.
  2. Programming the Board:

    • Use the micro-USB port to connect the ESP32-CAM-MB to your computer.
    • Install the necessary drivers for the USB-to-serial chip (e.g., CH340).
    • Use the Arduino IDE or ESP-IDF to upload code to the board. Select "AI-Thinker ESP32-CAM" as the board in the Arduino IDE.
  3. Connecting Peripherals:

    • Use the GPIO pins to connect sensors, actuators, or other peripherals.
    • For camera-based projects, ensure the OV2640 module is securely connected to the board.
  4. Boot Mode Selection:

    • To upload code, connect GPIO0 to GND and press the RESET button.
    • After uploading, disconnect GPIO0 from GND and press RESET again to run the program.

Important Considerations and Best Practices

  • Power Supply: Use a stable 5V power source to avoid unexpected resets or malfunctions.
  • Heat Management: The ESP32 chip can get warm during operation. Ensure proper ventilation.
  • Antenna Placement: Avoid placing the board near metal objects to ensure optimal Wi-Fi performance.
  • Camera Module: Handle the camera module carefully to avoid damaging the ribbon cable.

Example Code for Arduino UNO Integration

Below is an example of how to use the ESP32-CAM-MB to stream video 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";

// Camera configuration
#define PWDN_GPIO_NUM    -1
#define RESET_GPIO_NUM   -1
#define XCLK_GPIO_NUM     0
#define SIOD_GPIO_NUM    26
#define SIOC_GPIO_NUM    27
#define Y9_GPIO_NUM      35
#define Y8_GPIO_NUM      34
#define Y7_GPIO_NUM      39
#define Y6_GPIO_NUM      36
#define Y5_GPIO_NUM      21
#define Y4_GPIO_NUM      19
#define Y3_GPIO_NUM      18
#define Y2_GPIO_NUM       5
#define VSYNC_GPIO_NUM   25
#define HREF_GPIO_NUM    23
#define PCLK_GPIO_NUM    22

void startCameraServer();

void setup() {
  Serial.begin(115200);
  WiFi.begin(ssid, password);

  // Wait for Wi-Fi connection
  while (WiFi.status() != WL_CONNECTED) {
    delay(500);
    Serial.print(".");
  }
  Serial.println("\nWi-Fi connected");

  // Initialize the camera
  camera_config_t config;
  config.ledc_channel = LEDC_CHANNEL_0;
  config.ledc_timer = LEDC_TIMER_0;
  config.pin_d0 = Y2_GPIO_NUM;
  config.pin_d1 = Y3_GPIO_NUM;
  config.pin_d2 = Y4_GPIO_NUM;
  config.pin_d3 = Y5_GPIO_NUM;
  config.pin_d4 = Y6_GPIO_NUM;
  config.pin_d5 = Y7_GPIO_NUM;
  config.pin_d6 = Y8_GPIO_NUM;
  config.pin_d7 = Y9_GPIO_NUM;
  config.pin_xclk = XCLK_GPIO_NUM;
  config.pin_pclk = PCLK_GPIO_NUM;
  config.pin_vsync = VSYNC_GPIO_NUM;
  config.pin_href = HREF_GPIO_NUM;
  config.pin_sscb_sda = SIOD_GPIO_NUM;
  config.pin_sscb_scl = SIOC_GPIO_NUM;
  config.pin_pwdn = PWDN_GPIO_NUM;
  config.pin_reset = RESET_GPIO_NUM;
  config.xclk_freq_hz = 20000000;
  config.pixel_format = PIXFORMAT_JPEG;

  if (!esp_camera_init(&config)) {
    Serial.println("Camera initialized successfully");
  } else {
    Serial.println("Camera initialization failed");
    return;
  }

  startCameraServer();
  Serial.println("Camera server started");
}

void loop() {
  // Main loop does nothing; camera server handles requests
}

Troubleshooting and FAQs

Common Issues and Solutions

  1. Issue: The ESP32-CAM-MB does not connect to Wi-Fi.
    Solution: Double-check the SSID and password in your code. Ensure the router is within range and supports 2.4GHz Wi-Fi.

  2. Issue: The board keeps resetting during operation.
    Solution: Use a stable 5V power supply with sufficient current (at least 500mA). Avoid powering the board through weak USB ports.

  3. Issue: The camera module is not detected.
    Solution: Ensure the camera ribbon cable is securely connected. Check the camera initialization code for correct pin assignments.

  4. Issue: The video stream is slow or laggy.
    Solution: Reduce the resolution or frame rate in the code. Ensure a strong Wi-Fi signal.

FAQs

  • Can I use the ESP32-CAM-MB without the camera module?
    Yes, the board can function as a standard ESP32 development board for other IoT applications.

  • What is the maximum resolution of the camera?
    The OV2640 camera module supports a maximum resolution of 1600x1200 pixels.

  • Can I power the board with a battery?
    Yes, you can use a 3.7V LiPo battery with a suitable voltage regulator to provide 5V input.