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

M5Stack-Station Pinout

21 pins
M5Stack-Station pinout diagram
PinGPIOLabelsStatusCapabilitiesNotes
11TXG1uartuart
23RXG3uartuart
34G4safe-
45SSG5strappingspi
513RXD1G13strapping-
614TXD1G14strapping-
716RXD2G16safe-
817TXD2G17safe-
918SCKG18safespi
1019G19safe-
1123MOSIG23safespi
1225G25DAC1safedac
1326G26DAC2safedac
1432SDAG32safei2c
1533SCLG33safei2c
1635G35ADC1strapping-
1736G36ADC2strapping-
1837G37strapping-
1938G38strapping-
2039G39strapping-
21-MISOsafespi
20 GPIOs broken out 10 free · 10 need care · 0 to avoid

Start with these

10 pins with no boot or system involvement
G4GPIO4RXD2GPIO16TXD2GPIO17SCKGPIO18G19GPIO19MOSIGPIO23G25GPIO25G26GPIO26SDAGPIO32SCLGPIO33

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

Fine - with a little care

10 pins · 7 things to know
TXGPIO1 Default UART0 TX pin for USB-serial programming and console. UART

Connected to on-board USB-UART for uploading and logs; drives serial output at boot, so using as GPIO can disrupt programming or console.

RXGPIO3 Default UART0 RX pin for USB-serial programming (console input). UART

Used for receiving data from USB-UART (programming); also pulled HIGH at boot for console communication, so using as GPIO can disrupt uploads.

SSGPIO5 Bootstrapping pin; internal pull-up; VSPI CS0 (default SPI chip-select); acts as FSPIWP (flash write-protect) on internal-flash variants. Strapping

Must be HIGH during boot; if pulled LOW at reset, alters SDIO slave timing and may prevent normal boot.

RXD1GPIO13 JTAG clock pin (TCK); also ADC2 channel 4 / Touch4 input. JTAG

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

TXD1GPIO14 JTAG mode select pin (TMS); also HSPI CLK and PWM-capable GPIO. JTAG

Used for JTAG debugging (TMS); driving it as GPIO may interfere with JTAG or produce spurious signals at boot.

G35GPIO35G37GPIO37G38GPIO38G39GPIO39 Input-only GPIOs with ADC1 channels - no output driver Other

Cannot be used as output; only suitable for input.

  • G35Input-only GPIO (no output driver); ADC1 channel 7.
  • G37Input-only GPIO (no output); ADC1 channel 1.
  • G38Input-only GPIO (no output); ADC1 channel 2.
  • G39Input-only GPIO (no output); ADC1 channel 3, Hall sensor VN.
G36GPIO36 Input-only GPIO (no output); ADC1 channel 0, Hall sensor VP. Other

Cannot be used as output; only suitable for input (e.g., analog read).

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.

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.

10 of the exposed pins carry boot-time or system duties on the ESP32 (TX, RX, SS and 7 more) - check the guidance above before wiring anything to them. G4, RXD2, TXD2, SCK and 6 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
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 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
// 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-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: esp32
  framework:
    type: esp-idf

# 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 6553600 B · data 4521984 B · DIO

Specifications

ESP32 · 88 × 65 mm · vs other ESP32 chips →
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 · 2
PWM
16 channels
Power
USB
USB-C
Serial
CH9102F
Boot address
0x1000
Electrical
Input
5V USB · 9-24V RS485
Consumption
-
Regulator
-
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

Dimensions

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
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