Leaf board — pinout & IO reference

Hardware v1.0. This is the board inside every MeshCam leaf camera, and the board sold as the bare-board SKU.

It is an ESP32-S3 module-direct design: no carrier, no dev board underneath. The GPIO map below is the whole pin budget. Read it before planning custom firmware, because there are fewer spare pins than a raw ESP32-S3 dev board suggests.

Overview

Connector numbering skips J4, J5 and J7. Those existed on earlier prototype revisions (a socketed radio bay, an external battery harness) and were removed before production. Nothing is missing on your board.

Connector map

RefConnectorLocationFunction
J1USB-C receptacleleft edge Charge input (5 V) plus native USB serial console and firmware flashing. Does not power the board — see the power tree below.
J224-pin 0.5 mm FFCtop edge Camera module (DVP interface).
J3JST-PH, 3-pintop edge PIR sensor input (AM312).
J6JST-XH, 2-pintop edge Solar panel input, nominal 6 V.
J8microSD (push-push)left edge Storage, SDMMC 1-bit mode.
J9u.FLradio corner LoRa antenna, 915 MHz (US915).
J102.54 mm socket, 4-pinleft side BME280 environmental sensor (I2C).
J11JST-PH, 3-pintop edge IR illuminator output, PIR-gated. Feeds an external 12 V boost and 850 nm array for night captures.

J6, J3 and J11 sit next to each other along the top edge, in that order. Their housings use two different JST families, XH on J6 and PH on J3/J11, specifically so the solar plug cannot be mis-seated into the PIR or IR sockets.

J2 — camera FFC (24-pin, 0.5 mm pitch)

Bottom-contact ribbon: contacts face down, toward the board.

PinSignal PinSignal PinSignal PinSignal
1NC7VSYNC 13XCLK19Y2
2AGND8PWDN 14Y820Y5
3SDA9HREF 15DGND21Y3
4AVDD (2.8 V)10DVDD (1.5 V) 16Y722Y4
5SCL11DOVDD (2.8 V) 17PCLK23NC
6RESET12Y9 18Y624NC

J3 — PIR input (JST-PH, 3-pin)

PinSignal
13V3
2PIR_OUT — digital, wakes the board from deep sleep
3GND

J11 — IR illuminator output (JST-PH, 3-pin)

PinSignal
1BAT+ — raw battery voltage, about 2.5–3.65 V
2PIR_OUT — same wake/gate signal as J3, enables the external boost
3GND

J3 and J11 use the same pin order on purpose. Plugging one into the other's socket is harmless: the IR boost just sees 3.3 V, and the PIR sees a wider input range than it needs.

J6 — solar input (JST-XH, 2-pin)

PinSignal
1SOLAR_IN (+)
2GND

J10 — BME280 socket (2.54 mm, 4-pin)

PinSignal
1VIN (3V3)
2GND
3SCL
4SDA

This matches the pinout printed on common GY-BME280 breakout modules. I2C address 0x76.

J9 — antenna (u.FL)

Single-ended 50 Ω RF, straight to the RAK3172's antenna pad. Read the compliance section below before substituting an antenna.

GPIO map

The module's pins are almost entirely committed by the board design. This is the complete pin budget. There is no larger pool of free GPIO hiding elsewhere.

GPIOFunction
IO0BOOT button
IO1LoRa module reset (active low)
IO2UART RX from LoRa module
IO3Battery voltage sense (ADC, resistor-divided)
IO4Camera SDA (sensor I2C)
IO5Camera SCL (sensor I2C)
IO6Camera VSYNC
IO7Camera HREF
IO8Camera Y4
IO9Camera Y3
IO10Camera Y5
IO11Camera Y2
IO12Camera Y6
IO13Camera PCLK
IO14UART TX to LoRa module
IO15Camera XCLK
IO16Camera Y9
IO17Camera Y8
IO18Camera Y7
IO19USB D− (native USB: console + flashing)
IO20USB D+
IO21PIR wake input (deep-sleep wake source)
IO35–37Not usable (internal octal PSRAM)
IO38microSD DAT0
IO39Camera power switch (active low, off by default)
IO40BME280 SDA
IO41BME280 SCL
IO42LoRa module BOOT0 (module firmware-update mode select)
IO43 Free — the one clean spare digital GPIO on this board
IO44Radio + microSD power switch (active low, off by default)
IO45Not usable (module boot strap, flash voltage select)
IO46Input only, with a caveat: it is a boot-mode strap and must read low during a BOOT-button flash. Fine for anything that reads low at reset.
IO47microSD CLK
IO48microSD CMD

Non-GPIO module pins: EN (reset) and 3V3/GND are broken out to the usual places, but not to a header.

The camera and LoRa-UART pins are fixed by the board. Reassigning them means routing a change nobody has validated. IO43 is the only pin free for a new purpose with no caveats, and IO46 works too if your use can tolerate reading low at reset.

Power tree

The board runs from a single 26650 LiFePO4 cell (3.2 V nominal), fitted in an on-board holder. There is no cell-swap connector.

Do not fit a Li-ion 26650

A Li-ion 26650 is 3.7 V nominal. The charge circuit on this board is built for LiFePO4's lower voltage and charging profile. A Li-ion cell in a LiFePO4 charger is a safety hazard, not just a spec mismatch.

From the battery, three rails exist:

Charge status LEDs

Three LEDs, grouped at one board edge, give a charge readout without opening the enclosure. Four combinations are meaningful.

Input LEDCHG (red)DONE (green)Meaning
darkdarkdark No input reaching the board. Check the cable or charger.
litlitdarkCharging normally.
litdarklitFull.
litdarkdark The charger has declined to charge: out-of-window temperature, or a cell fault.

Compliance — antenna and radio firmware

The RAK3172's FCC grant covers full power (22 dBm) only with an antenna at or under 2.3 dBi gain on J9. The antenna MeshCam ships (Linx ANT-916-CW-HW, 1.2 dBi) is inside that limit. Swapping to a higher-gain antenna takes the board outside its certified operating conditions.

The LoRa module's own firmware cannot be modified by anyone but RAK. That is an FCC modular-certification rule, not a MeshCam restriction. The ESP32 side is fully open to custom firmware. The ESP32 to RAK3172 link is AT commands over UART (RAK's RUI3 firmware), which already exposes everything the product needs: frequency, bandwidth, spreading factor and TX power.

Mechanical

86 × 95 mm, four M4 mounting holes. If your enclosure has a conductive back panel, use nylon screws. The on-board cell holder's negative terminal runs close to two of the mounting holes, and nylon keeps that isolated.

Questions about the board, or something here that does not match the one in your hand? hello@getmeshcam.com.