M5Stack-Timer-CAM

ESP32 board with built-in camera and LiPo support - perfect for low-power time-lapse and surveillance apps.

USB-C
M5Stack-Timer-CAM board
45 × 20 mm
ESP32
MCU
240MHz
clock
4MB
flash
520KB
SRAM
28· 2 ADC
GPIO
BLE 4.2+ WiFi
radio
On this page

M5Stack-Timer-CAM Pinout

30 pins
M5Stack-Timer-CAM pinout diagram, high resolution: all 30 pins, with GPIO numbers, ADC channels and strapping pins
M5Stack-Timer-CAM pinout, drawn by ESPboards from the ESP32 Series Datasheet v5.3.
PinGPIOLabelsStatusCapabilitiesNotes
113G13SCLstrappingi2c · adc · touch · pwmGrove port (HY2.0-4P) pin 1, SCL. One of only two GPIOs brought out; 22R series resistor and an ESD diode on the board
24G4SDAsafei2c · adc · touch · pwmGrove port (HY2.0-4P) pin 2, SDA. One of only two GPIOs brought out; 22R series resistor and an ESD diode on the board
3-5VVSYSpower-Grove port pin 3. The VSYS rail: USB 5V or the battery, each through a Schottky diode, so a little under 5V on USB and battery voltage on the LiPo
4-GNDground-Grove port pin 4
532CAM_D0safe-Camera data bit 0 (Y2)
635CAM_D1strapping-Camera data bit 1 (Y3)
734CAM_D2strapping-Camera data bit 2 (Y4)
85CAM_D3strapping-Camera data bit 3 (Y5)
939CAM_D4strapping-Camera data bit 4 (Y6)
1018CAM_D5safe-Camera data bit 5 (Y7)
1136CAM_D6strapping-Camera data bit 6 (Y8)
1219CAM_D7safe-Camera data bit 7 (Y9)
1327CAM_XCLKsafe-Camera system clock (XCLK)
1425CAM_SIODsafe-Camera SCCB data (SIOD), 2K pull-up
1523CAM_SIOCsafe-Camera SCCB clock (SIOC), 2K pull-up
1622CAM_VSYNCsafe-Camera vertical sync (VSYNC)
1726CAM_HREFsafe-Camera horizontal reference (HREF)
1821CAM_PCLKsafe-Camera pixel clock (PCLK)
1915CAM_RESETstrapping-Camera reset (RESET); PWDN is not wired (-1)
2012RTC_SDAstrapping-I2C data to the BM8563 real-time clock. Also a strapping pin (MTDI)
2114RTC_SCLstrapping-I2C clock to the BM8563 real-time clock
2238BAT_ADCstrapping-Battery voltage through a 1.37K / 2.67K divider (battery = reading x 1.51). Input-only
2333BAT_HOLDsafe-Battery power latch: drive HIGH early in setup to keep running on the LiPo after the PWR button is released; LOW switches the board off on battery
2437PWR_BTNstrapping-Reads the PWR/WAKE side button through a diode (low while pressed). Input-only; from the schematic, not in the M5Stack pin table
252LED_BUILTINLEDstrapping-Blue status LED (470R to GND), lit HIGH. Also a strapping pin
260G0BOOTstrapping-Download-mode strap, pulled low by the CH552T USB bridge for auto-upload. No BOOT button; also on the front G0 test pad
271TXDU0TXDuartuartUART0 TX to the CH552T USB bridge; also on the front TXD test pad
283RXDU0RXDuartuartUART0 RX from the CH552T USB bridge
2916PSRAM_CSstrapping-PSRAM chip select
3017PSRAM_CLKstrapping-PSRAM clock
Download the M5Stack-Timer-CAM pinout Free to use and share for non-commercial work, as long as you credit espboards.dev. License.
28 GPIOs broken out 1 free · 5 need care · 22 to avoid

Start with these

1 pins with no boot or system involvement
G4GPIO4

Freely assignable - no strapping, flash, USB or JTAG duties. Ideal first picks for buttons, sensors and LEDs.

Fine - with a little care

5 pins · 4 things to know
G13GPIO13 JTAG clock pin (TCK); also ADC2 channel 4 / Touch4 input. JTAG

Used for JTAG debugging (TCK); avoid using as GPIO if JTAG is needed.

LED_BUILTINGPIO2 Blue status LED (470R to GND), lit HIGH. Also a strapping pin onboard hardware

Wired to the blue status LED on this board. The pin is yours if you give that up, but nothing else can share it.

G0GPIO0 Download-mode strap, pulled low by the CH552T USB bridge for auto-upload. No BOOT button; also on the front G0 test pad onboard hardware

Wired to the USB serial bridge (auto-download) on this board. The pin is yours if you give that up, but nothing else can share it.

TXDGPIO1RXDGPIO3 Used by the USB serial bridge (CH552T) onboard hardware

Wired to the USB serial bridge (CH552T) on this board. The pin is yours if you give that up, but nothing else can share it.

  • TXDUART0 TX to the CH552T USB bridge; also on the front TXD test pad
  • RXDUART0 RX from the CH552T USB bridge

Only if you know the tricks

22 pins · 6 things to know
CAM_D0GPIO32CAM_D1GPIO35CAM_D2GPIO34CAM_D3GPIO5CAM_D4GPIO39CAM_D5GPIO18CAM_D6GPIO36CAM_D7GPIO19CAM_XCLKGPIO27CAM_SIODGPIO25CAM_SIOCGPIO23CAM_VSYNCGPIO22CAM_HREFGPIO26CAM_PCLKGPIO21CAM_RESETGPIO15 Used by the OV3660 camera onboard hardware

Wired to the OV3660 camera on this board, which is soldered down. Driving it from your own code breaks that function.

  • CAM_D0Camera data bit 0 (Y2)
  • CAM_D1Camera data bit 1 (Y3)
  • CAM_D2Camera data bit 2 (Y4)
  • CAM_D3Camera data bit 3 (Y5)
  • CAM_D4Camera data bit 4 (Y6)
  • CAM_D5Camera data bit 5 (Y7)
  • CAM_D6Camera data bit 6 (Y8)
  • CAM_D7Camera data bit 7 (Y9)
  • CAM_XCLKCamera system clock (XCLK)
  • CAM_SIODCamera SCCB data (SIOD), 2K pull-up
  • CAM_SIOCCamera SCCB clock (SIOC), 2K pull-up
  • CAM_VSYNCCamera vertical sync (VSYNC)
  • CAM_HREFCamera horizontal reference (HREF)
  • CAM_PCLKCamera pixel clock (PCLK)
  • CAM_RESETCamera reset (RESET); PWDN is not wired (-1)
RTC_SDAGPIO12RTC_SCLGPIO14 Used by the BM8563 RTC onboard hardware

Wired to the BM8563 RTC on this board, which is soldered down. Driving it from your own code breaks that function.

  • RTC_SDAI2C data to the BM8563 real-time clock. Also a strapping pin (MTDI)
  • RTC_SCLI2C clock to the BM8563 real-time clock
BAT_ADCGPIO38 Battery voltage through a 1.37K / 2.67K divider (battery = reading x 1.51). Input-only onboard hardware

Wired to the battery voltage divider on this board, which is soldered down. Driving it from your own code breaks that function.

BAT_HOLDGPIO33 Battery power latch: drive HIGH early in setup to keep running on the LiPo after the PWR button is released; LOW switches the board off on battery onboard hardware

Wired to the battery power latch on this board, which is soldered down. Driving it from your own code breaks that function.

PWR_BTNGPIO37 Reads the PWR/WAKE side button through a diode (low while pressed). Input-only; from the schematic, not in the M5Stack pin table onboard hardware

Wired to the PWR/WAKE button on this board, which is soldered down. Driving it from your own code breaks that function.

PSRAM_CSGPIO16PSRAM_CLKGPIO17 Used by the 8MB PSRAM onboard hardware

Wired to the 8MB PSRAM on this board, which is soldered down. Driving it from your own code breaks that function.

  • PSRAM_CSPSRAM chip select
  • PSRAM_CLKPSRAM clock
These are recommendations, not hard rules - with the right pull-ups, timing and boot-state awareness most pins can be made to work. When in doubt, start green.

Across 30 pins, the M5Stack-Timer-CAM exposes 28 GPIO plus 5V and GND for power.

For peripherals, I²C is mapped to SDA on GPIO4 and SCL on GPIO13.

On the analog side there are 2 ADC-capable pins for sensors and battery monitoring, PWM on 2 pins and 2 capacitive-touch inputs.

If you want zero surprises, G4 is free of any such role - the safest first picks. 5 of the exposed pins carry boot-time or system duties on the ESP32 (G13, LED_BUILTIN, G0 and 2 more).

Getting started

flash your first firmware in ~2 minutes
Tool:
1
Connect over USB
Install your USB-serial driver (CH340 / CP210x) if no port appears. Not detected? Hold BOOT while plugging in.
2
Match & flash
Set the Tools options shown, then click Upload.
3
Verify it runs
GPIO4 toggles - wire an LED and resistor to it, or change the pin to your board's own LED.
Set these in Tools · leave everything else at default
Arduino IDE 2.x - Tools Copy
Board: "ESP32 Wrover Module"▸
Flash Size: "4MB (32Mb)"▸
Flash Mode: "DIO"▸
PSRAM: "QSPI PSRAM"▸
Partition Scheme: "Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS)" (default)▸
Upload Speed: "921600"▸
▸ every other Tools option - leave at default
Board: ESP32 Wrover Module
Flash Size: 4MB (32Mb)
Flash Mode: DIO
PSRAM: QSPI PSRAM
Partition Scheme: Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS)
Upload Speed: 921600
Find it: Tools ▸ Board ▸ ESP32 Arduino ▸ ESP32 Wrover Module
blink.ino Copy
// toggle GPIO4 - wire an LED and resistor to it
void setup() {
  pinMode(4, OUTPUT);
}
void loop() {
  digitalWrite(4, HIGH); delay(500);
  digitalWrite(4, LOW);  delay(500);
}
board to selectesp32dev⧉ copy
platformio.ini Copy
[env:m5stack-timer-cam]
platform = espressif32
board = esp32dev
framework = arduino
monitor_speed = 115200
upload_speed = 921600
board_build.arduino.memory_type = qio_qspi
build_flags = -DBOARD_HAS_PSRAM
Find it: PlatformIO Home ▸ Boards, search esp32dev - or type it after board =.
board to selectesp32dev⧉ copy
device.yaml Copy
esp32:
  board: esp32dev
  variant: esp32
  framework:
    type: esp-idf
psram:
  mode: quad
  speed: 80MHz

# blink - GPIO4
output:
  - platform: gpio
    pin: 4
    id: led_out
light:
  - platform: binary
    name: "LED"
    output: led_out
Find it: search ESPHome's board list for esp32dev (same ids as PlatformIO).
esptool doesn't pick board settings - a prebuilt .bin already has them baked in. This is just the raw flash command.
terminal Copy
esptool.py --chip esp32 --port /dev/ttyACM0 \
  --baud 921600 write_flash 0x1000 firmware.bin
--port = your /dev/tty* (macOS/Linux) or COMx (Windows).
Build details: sketch space 1310720 B · data 327680 B · DIO

Downloads

Free for non-commercial use, credit espboards.dev · License
M5Stack-Timer-CAM board illustration, front

Board illustration

The bare M5Stack-Timer-CAM board drawn to scale at 45 × 20 mm, with no pin labels on it. Made for slide decks, wiring diagrams and project write-ups where a photo is too busy. Take the scalable SVG for print or editing, the high-resolution PNG to drop straight in, or the transparent PNG when you need it with no background behind it.

M5Stack-Timer-CAM pinout diagram

Pinout diagram

Every pin on both sides of the board with its functions, drawn by ESPboards from the ESP32 Series Datasheet v5.3 - the same sheet shown at the top of this page. The PNG is a high-resolution image for screens, the SVG is vector so it stays sharp at any size, and the PDF is laid out to print on A4 or Letter.

Free for non-commercial use, with the credit line kept.

Embed the M5Stack-Timer-CAM pinout

Paste this where you want the diagram. Keep the credit line - it is what the licence asks for, and it is the only thing we want in return.

<figure>
  <img src="https://cdn.espboards.net/boards/m5stack-timer-cam/diagram-1600.png"
       alt="M5Stack-Timer-CAM pinout diagram" width="1600" loading="lazy">
  <figcaption>
    M5Stack-Timer-CAM pinout by
    <a href="https://www.espboards.dev/esp32/m5stack-timer-cam/">ESPboards</a>,
    <a href="https://creativecommons.org/licenses/by-nc/4.0/">CC BY-NC 4.0</a>
  </figcaption>
</figure>

Using it commercially? Ask us first - it takes one email.

Yours to use, share and adapt for non-commercial work, as long as you credit espboards.dev - the full terms and ready-made credit lines are here.

Specifications

ESP32 · 45 × 20 mm · vs other ESP32 chips →
Compute
MCU
ESP32
Clock
240 MHz
SRAM · Flash
520 KB · 4MB · 8MB PSRAM
Radio
Wi-Fi
802.11 b/g/n
Bluetooth
4.2 LE
Antenna
3D
I/O
GPIO · ADC
28 · 2
UART · I²C · SPI
3 · 2 · 2
PWM
16 channels
Power
USB
USB-C
Serial
CH552T
Boot address
0x1000
Electrical
Input
5V USB-C
Consumption
2µA sleep
Regulator
-
Flashing
Upload · OTA
esptool_py · esp_ota
Flash · Boot mode
DIO · DIO
Sketch · Data
1.25 MB · 320 KB

Dimensions

M5Stack-Timer-CAM board, drawn to scale
20 mm45 mm
45 × 20 mm
The M5Stack-Timer-CAM uses esptool_py for firmware uploads, esp_ota for over-the-air (OTA) updates. Flash mode is DIO with DIO boot mode. The maximum sketch size is 1.25 MB with 320 KB available for data.

About this board

At its core is the ESP32 - a dual-core Xtensa with both Bluetooth Classic and BLE.

Expect to pay about $15.95 - less than the ~$20 most ESP32 boards go for.

Onboard you'll find 8MB PSRAM, an OV3660 camera (2048x1536), a Grove connector, a BM8563 RTC, battery charging via SH1.0-2P, status LEDs (Status) and Power/Reset buttons.

Where to buy

prices are typical street prices
M5Stack-Timer-CAM
M5Stack-Timer-CAM
$15.95per unit, typical
The M5 Stack store link is an affiliate link - ESPboards may earn a commission on purchases, at no extra cost to you.

Resources

Similar boards