Skip to the content
2 layers70 × 65 mmEsp32-cam hw, the printed circuit board in 3D

Autonomous, battery-powered surveillance camera based on ESP32-Cam. Features deep-sleep cycles, MQTT image transfer to Home Assistant, and a custom dual-PCB hardware design (Mainboard & Front Panel). Developed with KiCad and PlatformIO.

Size
70 × 65 mm
Copper layers
2
Thickness
1.6 mm
Parts
18
Nets
24
Pads
52
Tracks, vias
34, 0
Pours
2
Routed
Yes
KiCad
KiCad 9.0 (file 20241229)
Created
18 Mar 2026
Updated
19 Mar 2026

Overview

Esp32-cam hw is an open-source printed circuit board by mats19, from the mats19/esp32-cam-system repository on GitHub. It is a 2-layer board of 70 × 65 mm with 18 parts on 24 nets, routed with 34 tracks and 0 vias.

Its parts include 3 connectors, 2 resistors, 2 ICs, 2 diodes and 1 switch. It belongs with the home automation and IoT boards and the ESP32 and RISC-V boards of this library.

README

README.md

ESP32-Cam Autonomous MQTT Camera

Concept

This circuit realizes an autonomous, battery-powered surveillance camera based on the ESP32-Cam (AI-Thinker model).

Functionality

  • Autonomous Operation: Designed for long-term battery use.
  • Interval Capture: The ESP32 wakes up at defined intervals, captures a photo, and sends it via WiFi/MQTT to a Home Assistant instance.
  • Power Efficiency: Uses Deep Sleep mode between cycles to minimize power consumption.
  • Manual Trigger: A tactile button allows manual image triggering at any time.
  • Status Indication: Two LEDs provide visual feedback for status or errors (e.g., connection issues).

Project Structure

The repository is organized to separate hardware design from firmware development while maintaining a unified workspace.

text
esp32-cam-system/           # Root directory (Open this in VS Code)
├── .gitignore              # Global ignore rules for PIO and KiCad
├── platformio.ini          # Central configuration (redirects to firmware/)
├── README.md               # Project documentation
├── .vscode/                # VS Code specific settings
│   ├── settings.json       # IntelliSense and include paths
│   └── tasks.json          # Build and Upload shortcuts
├── firmware/               # Firmware source files
│   └── src/                # .cpp and .h files (Logic & Headers)
├── hardware/               # KiCad PCB project
│   ├── esp32-cam-hw.kicad_pro
│   └── libraries/          # Local Footprints and Symbols
└── docs/                   # Datasheets, 3D models (STL), and images

Development Environment & Settings

PlatformIO & VS Code

To maintain a clean root directory while keeping firmware in a subfolder, the central platformio.ini is configured as follows:

  • Custom Paths: Redirects src_dir and include_dir to the firmware/ folder.
  • Hardware Abstraction: PSRAM is explicitly enabled via build flags (-DBOARD_HAS_PSRAM) to handle image processing.
  • IntelliSense: The .vscode/settings.json includes ${workspaceFolder}/firmware/src to ensure header files are recognized without errors.

KiCad Workflow

  • Portability: All custom footprints and symbols are stored in hardware/libraries/.
  • Path Variables: Library paths should use the ${KIPRJMOD}/libraries/ variable to ensure the project remains functional when cloned to different machines.

Hardware Description

Components

Main Board
  • U1 (ESP32-Cam AI-Thinker): Core module containing the ESP32-S SoC, camera, and SD card slot.
  • J1 (Power Supply): 2-pin JST-XH connector for 5V external power.
  • J2 (Programming): 5-pin header for FTDI flashing and UART debugging.
  • J3 (Front Panel Link): 4-pin socket to connect the daughterboard.
Daughterboard (Front Panel)
  • SW1 (Button): Manual capture trigger, push button DTR 7/RT (Connects IO12 to GND).
  • D1 (Red LED): Error indicator (MQTT/WiFi failure).
  • D2 (Status LED): Activity indicator (Capturing/Processing).

Connections and Pinout

PinJ2 (Programming)J3 / J4 (Link)GPIODescription
15VGND-Common Ground
2GNDTRIGGERIO12Manual trigger / Wake-up
3U0T (TX)ERR_LEDIO13Error LED (Red)
4U0R (RX)STS_LEDIO15Status LED
5IO0-IO0Pull to GND for flashing

PCB Milling Specifications (Isolation Milling)

Optimized for CNC isolation milling on copper-clad boards.

Manufacturing Parameters

  • Track Width: 0.5 mm to 0.8 mm (Signals); 1.0 mm (Power).
  • Clearance (Isolation Gap): 0.4 mm to 0.6 mm.
  • THT Pads: Standard 2.0 mm outer diameter (1.0 mm drill). Custom footprints (e.g. SW1 DTR 7/RT) use 2.6 mm pads with 2.0 mm drills to maintain isolation gaps.
  • Thermal Reliefs: Required for all pads in copper zones.
  • Antenna Cutout: Instead of a standard keepout zone, a rectangle is drawn on the User.Drawings layer. This area under the ESP32-S PCB antenna will be completely milled out (freigefräst) to avoid WiFi signal attenuation.

Milling Constraints

  • Tooling: 30° Engraving Bit.
  • Depth of Cut: 0.05 mm to 0.1 mm (Auto-leveling highly recommended).

Parts

18
QtyValueFootprintReferences
8MountingHole_2.7mm_M2.5MountingHole:MountingHole_2.7mm_M2.5H1, H2, H3, H4, H5, H6, H7, H8
2Conn_01x04_PinConnector_PinHeader_2.54mm:PinHeader_1x04_P2.54mm_VerticalJ3, J4
2LEDLED_THT:LED_D5.0mmD1, D2
2RResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_HorizontalR1, R2
1Conn_01x05_PinConnector_JST:JST_EH_S5B-EH_1x05_P2.50mm_HorizontalJ2
1Micro_USB_ConverterFootprintLibrary:Micro_USB_ConverterU2
1SW_PushFootprintLibrary:SW_DTR_7_RTSW1
1~FootprintLibrary:ESP32-Cam AI-Thinker ModelU1

Similar boards

  • 2 layers27.9 × 16.5 mmPowerSSO-24 breakout, the printed circuit board in 3D

    PowerSSO-24 breakout

    rusefi/rusefi

    rusefi - GPL internal combustion engine control unit

    18 parts1.2k
  • 2 layers42.7 × 13.7 mmStm32-mini12864, the printed circuit board in 3D

    Stm32-mini12864

    VoronDesign/Voron-Hardware

    Cool Hardware designed by the Voron Design group

    18 parts1.1kGPL-3.0
  • 2 layers41.2 × 46.6 mmThumb cluster left, the printed circuit board in 3D

    Thumb cluster left

    JesusFreke/lalboard

    A 3D-printed keyboard inspired by the DataHand

    18 parts993
  • 2 layers44 × 51.3 mm4272MAVcoder R4, the printed circuit board in 3D

    4272MAVcoder R4

    hackclub/OnBoard

    💡 Join 1,000 teenagers and make your first PCB with a $100 grant!

    18 parts915
  • 2 layers28.3 × 14.3 mmTap Photosensor PCB, the printed circuit board in 3D

    Tap Photosensor PCB

    VoronDesign/Voron-Tap

    Tap is a nozzle-based z-probe for the V2 and Trident printer designs. The entire toolhead moves to trigger an optical switch. Tap offers many advantages:

    18 parts716GPL-3.0
  • 2 layers20.3 × 15.2 mmL0 stepper driver, the printed circuit board in 3D

    L0 stepper driver

    Luos-io/luos_engine

    Open-source and real-time orchestrator for cyber-physical-systems, to easily design, test and deploy embedded applications and digital twins.

    18 parts546MIT
  • 2 layersMooltipass, the printed circuit board in 3D

    Mooltipass

    limpkin/mooltipass

    Github repository dedicated to the mooltipass project

    18 parts531
  • 2 layers42.5 × 28.8 mmC5VRX JACK DIY V2, the printed circuit board in 3D

    C5VRX JACK DIY V2

    Twotoz/C5VRX

    Ultra-minimal, zero-CPU 5.8 GHz analog FPV video receiver using ESP32-C5 Wi-Fi 6 PHY MODEM_DIAG, BitScrambler WBFM demodulation & resistor DAC CVBS

    18 parts515GPL-3.0

Questions

How big is the Esp32-cam hw PCB?

It measures 70 × 65 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Esp32-cam hw use?

18 parts. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the Esp32-cam hw KiCad files?

From the mats19/esp32-cam-system repository on GitHub, at the commit this page was made from: the board is hardware/esp32-cam-hw.kicad_pcb and its schematic hardware/esp32-cam-hw.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Esp32-cam hw design in my own project?

Its repository states no licence, so its author keeps all rights: ask mats19 before reusing the design.