M5Stack-Station

ESP32 board in a dock-style enclosure - built for desktop-style IoT dashboards and HMI stations.

USB-C
M5Stack-Station board
88 × 65 mm
ESP32
MCU
240MHz
clock
16MB
flash
520KB
SRAM
20· Two 12-bit, 18 Channels ADC
GPIO
BLE 4.2+ WiFi
radio
On this page

Pinout

21 pins
View:
M5Stack-Station pinout diagram
PinGPIOLabelsStatusCapabilitiesNotes
11TXG1uartuart
23RXG3uartuart
34G4strapping-
45SSG5strappingspi
513RXD1G13strapping-
614TXD1G14strapping-
716RXD2G16strapping-
817TXD2G17strapping-
918SCKG18safespi
1019G19safe-
1123MOSIG23safespi
1225G25DAC1safedac
1326G26DAC2safedac
1432SDAG32safei2c
1533SCLG33safei2c
1635G35ADC1strapping-
1736G36ADC2strapping-
1837G37strapping-
1938G38strapping-
2039G39strapping-
21-MISOsafespi

Start with these

7 pins with no boot or system involvement
SCKG18G19MOSIG23G25DAC1G26DAC2SDAG32SCLG33

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

Fine - with a little care

sampled at boot or shared with debug/serial
PinLabelWhat to knowRole
G4GPIO4Sampled at reset for boot config; should not be driven at boot (affects boot mode timing).Strapping
SSGPIO5Must be HIGH during boot; if pulled LOW at reset, alters SDIO slave timing and may prevent normal boot.Strapping
RXD1MTCK (GPIO13)Used for JTAG debugging (TCK); avoid using as GPIO if JTAG is needed.Other
TXD1MTMS (GPIO14)Used for JTAG debugging (TMS); driving it as GPIO may interfere with JTAG or produce spurious signals at boot.Other
G35GPIO35Cannot be used as output; only suitable for input.Other
G36GPIO36 (SENSOR_VP)Cannot be used as output; only suitable for input (e.g., analog read).Other
G37GPIO37 (SENSOR_CAPP)Cannot be used as output; only suitable for input.Other
G38GPIO38 (SENSOR_CAPN)Cannot be used as output; only suitable for input.Other
G39GPIO39 (SENSOR_VN)Cannot be used as output; only suitable for input.Other

Only if you know the tricks

wired to flash or USB - expect a fight
PinLabelWhat to knowRole
TXU0TXD (GPIO1)Connected to on-board USB-UART for uploading and logs; drives serial output at boot, so using as GPIO can disrupt programming or console.USB
RXU0RXD (GPIO3)Used for receiving data from USB-UART (programming); also pulled HIGH at boot for console communication, so using as GPIO can disrupt uploads.USB
RXD2GPIO16Connected to internal PSRAM on PSRAM-enabled modules; not usable as GPIO on those modules.Flash
TXD2GPIO17Connected to internal PSRAM on PSRAM-enabled modules; not usable as GPIO on those modules.Flash
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.
Pinout notes The M5Stack-Station pinout brings out 21 pins - 20 usable GPIO. Peripheral wiring is straightforward: I²C is mapped to SDA on GPIO32 and SCL on GPIO33; the SPI…

The M5Stack-Station pinout brings out 21 pins - 20 usable GPIO.

Peripheral wiring is straightforward: I²C is mapped to SDA on GPIO32 and SCL on GPIO33; the SPI bus (MOSI, MISO, SCK, SS) is broken out in full; TX/RX on GPIO1 and GPIO3 cover serial logging and flashing.

Beyond plain digital I/O you get 2 true DAC outputs.

9 of the exposed pins carry boot-time or system duties on the ESP32 (G4, SS, RXD1 and 6 more) - check the guidance above before wiring anything to them. SCK, G19, MOSI, G25 and 3 more are free of any such role - the safest first picks.

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
The onboard LED on GPIO18 blinks - swap the pin if your board's LED differs.
Set these in Tools · leave everything else at default
Arduino IDE 2.x — Tools Copy
Board: "ESP32 Dev Module"
Flash Size: "16MB (128Mb)"
Flash Mode: "DIO"
Partition Scheme: "16M Flash (3MB APP / 9.9MB FATFS)" (default)
Upload Speed: "921600"
▸ every other Tools option — leave at default
Board: ESP32 Dev Module
Flash Size: 16MB (128Mb)
Flash Mode: DIO
Partition Scheme: 16M Flash (3MB APP / 9.9MB FATFS)
Upload Speed: 921600
Find it: Tools ▸ Board ▸ ESP32 Arduino ▸ ESP32 Dev Module
blink.ino Copy
// blink the onboard LED
void setup() {
  pinMode(18, OUTPUT);
}
void loop() {
  digitalWrite(18, HIGH); delay(500);
  digitalWrite(18, LOW);  delay(500);
}
board to selectesp32dev⧉ copy
platformio.ini Copy
[env:m5stack-station]
platform = espressif32
board = esp32dev
framework = arduino
monitor_speed = 115200
upload_speed = 921600
Find it: PlatformIO Home ▸ Boards, search esp32dev — or type it after board =.
board to selectesp32dev⧉ copy
device.yaml Copy
esp32:
  board: esp32dev
  variant: m5stack_station
  framework:
    type: esp-idf

# blink - GPIO18
output:
  - platform: gpio
    pin: 18
    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 0x0 firmware.bin
--port = your /dev/tty* (macOS/Linux) or COMx (Windows).
Build details: sketch space 6553600 B · data 4521984 B · DIO

Specifications

ESP32 · 88 × 65 mm
Compute
MCU
ESP32
Clock
240 MHz
SRAM · Flash
520 KB · 16MB
Radio
Wi-Fi
802.11 b/g/n
Bluetooth
4.2 LE
Antenna
3D
I/O
GPIO · ADC
20 · Two 12-bit, 18 Channels
UART · I²C · SPI
3 · 2 · 4
PWM
16 channels
Power
USB
USB-C
Serial
CH9102F
Boot address
0x1000
Display
Screen
IPS LCD · 1.14" · 240x135
Driver
ST7789
Touch
No
Flashing
Upload · OTA
esptool_py · esp_ota
Flash · Boot mode
DIO · DIO
Sketch · Data
6.25 MB · 4.31 MB
65 mm88 mm
88 × 65 mm
The M5Stack-Station 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 6.25 MB with 4.31 MB available for data.

About this board

Inside sits the ESP32 - a dual-core Xtensa with both Bluetooth Classic and BLE.

At $48.50 it's on the expensive side for an ESP32 board - most land around $20.

Around the module: an IPS LCD 1.14" 240x135 display, a BM8563 RTC, an addressable RGB LED, an RS485 interface (SP3485), battery charging (AXP192) and 3 programmable/Power buttons.

  • 7x SK6812 addressable RGB LEDs
  • USB-A 5V power output port
  • Reserved LiPo battery socket (battery not included)

Where to buy

prices are typical street prices
M5Stack-Station
M5Stack-Station
$48.50per unit, typical

Resources

Similar boards