HomeHome AutomationM5Stamp: where size matters

M5Stamp: where size matters

Awesomeness comes in small packages

Is it bigger than a stamp? It depends on where you are and what stamps you have on your envelope. M5Stamp (M5Stack Store) is the smallest ESP32 based development board in the M5Stack family cutting the footprint of the M5Stack Atom (M5Stack Store, Banggood, AliExpress) by a fair margin. It’s thin, tiny and currently in my possession early thanks to the brilliant PR team at M5Stack.

Who doesn’t like early access right?

M5Stamp – not for everyone

M5Stamp Kit with headers and Grove connector
M5Stamp Kit with headers and Grove connector

Unlike almost all other devices from M5Stack, M5Stamp requires a bit of DIY before you can get started. I can’t image anyone taking on this board type without the will to solder things. You can make your life easier and order an M5Stack Kit, that includes FTD Programmer that docks into M5Stamp or pick the DIY path, soldering the pins yourself and use whatever FTD Flasher you have at hand. Either way, best have a good soldering iron about with a pointy tip – something like MiniWare TS80P (review) is a perfect tool for the job.

It’s slightly bigger than a thumbnail, yet M5Stack managed to pack a few features in and break out several GPIOs to make your adventures easier. It uses a slimmed-down ESP32 PICO D4 which has a footprint of 7x7mm. Other than a smaller footprint, lower power consumption and an integrated hall sensor and temperature sensor – it’s a standard ESP32 board with 2.4GHz WiFi and Bluetooth 4.2.

It’s only fair, that I include specifications here so you don’t have to venture far:

Other M5Stack products talked about in detail:


  • ESP32-PICO-D4
  • Flash 4MB
  • 5V @ 500mA
  • WiFi 802.11 b/g/n & Blutooth V4.2 BR/EDR and BLE
  • 18 * 24 * 4.4mm
  • Programmable physical keys x 1
  • Programmable RGB LED (SK6812) x 1
  • 12 GPIOs

Power consumption

Apart from the small form factor, ESP32 PICO D4 brings pretty good power benchmarks. M5Stamp power specs include:

Normal standby:5V@29mA
WIFI STA mode: 5V@60mA
Bluetooth mode data sending status: 5V@84mA
Deep-sleep mode: 5V@0.35mA
Typical ESP32 power consumption is in excess of 80-100mA depending on the mode

The device can be split into 3 interfaces (although you can define pins however you like in software). Included GROVE connector utilises 4 pins at the bottom of the device, serial transfer is done using 6 pins available on the right edge of the board and there are additional 9 pins on the right edge. The full GPIO map looks like this:

M5Stamp pin layout
M5Stamp pin layout

The built-in button is programmable and onboard LED flashes in all RGB colours. The machined thread in the middle of the PCB can be used as a mounting point. The package includes male/female headers so you can pick the preferred GPIO interface, the GROVE connector and a small Allen key to remove the shroud.

Getting started with M5Stamp

As the unit comes pre-flashed, to get started, all you need is to supply 5V and use created by M5Stamp WiFi AP point to access and configure the device. Take a note of the SSID created by the M5Stamp (M5-XXXXXXX) as XXXXXXX is your API key for UIFlow. Navigate to once connected to the AP and enter your WiFi credentials.

The board will ask you to reboot it and you are ready to program it wirelessly through UIFlow. The M5Stamp has just been added there so select the board in options and you are ready to program it wirelessly.


UIFlow interface
UIFlow interface – blinking RGB LED randomly

From there, it’s the usual fun with wireless programming. Pick your path: UIFlow with visual programming or MicroPython. It’s not the most sophisticated example, but to get you started I made a random LED flasher.

The code below will set the LED to blue for 2 sec then use the button to activate random colour change or press and hold to stop the RGB madness.

MicroPython Sample code

from m5stack import *
from m5ui import *
from uiflow import *
import time
import random

button = None
RRR = None
GGG = None
BBB = None

def buttonA_wasPressed():
global button, RRR, GGG, BBB
button = True

def buttonA_pressFor():
global button, RRR, GGG, BBB
button = False
for count in range(3):
btnA.pressFor(0.8, buttonA_pressFor)

button = False
while True:
if button == True:
RRR = random.randint(0, 255)
GGG = random.randint(0, 255)
BBB = random.randint(0, 255)
rgb.setColorAll((RRR << 16) | (GGG << 8) | BBB) wait_ms(100) wait_ms(50)

Of course, if UIFlow and Micropython aren't what you are after, then M5Stack devices are supported in Arduino IDE, you can download that and use C++ libraries instead. After all, it is at its core yet another small form factor ESP32 based board.

If you don't want to use the default firmware (to save some space for your own code) you can erase it using M5Burner (don't worry, you can always flash it back), but to do so, you will need an FTD programmer.

To do it, you need to wire your FTD programmer in the following way:

FTD ProgrammerM5Stamp pins
VCC or 3.3V EN (Enable)
Flashing M5Stamp via FTD Programmer

M5Stamp actually gave me an opportunity to try out my new pocket oscilloscope. Investigating the behaviour of CTI and DTR pins and checking the PWM signals of the M5Stamp gave me the inspiration to learn how to use an oscilloscope, as having one on your desk is very handy. If you want to know more about MiniWare DS213 - expect a review soon.

Final Thoughts

Once again, M5Stack made something cool out of a simple concept. You could get a random ESP32 dev board instead, but the size and wireless programming make it a very cool board to work with. With included GROVE connector, M5Stamp also opens access to a huge library of compatible sensors and expansion boards that you can use without any further soldering. So go on treat yourself. You know you want to! Let me know your thoughts in this Reddit thread.

🆓📈 - See the transparency note for details.


Nothing says "Thank you" better than keeping my coffee jar topped up!


Support me on Patreon and get an early access to tutorial files and videos.


Bitcoin (BTC)

Use this QR to keep me caffeinated with BTC: 1FwFqqh71mUTENcRe9q4s9AWFgoc8BA9ZU

Smart Ideas with

Automate your space in with these ecosystems and integrate it with other automation services


Learn NodeRED

NodeRED for beginners: 1. Why do you need a NodeRED server?

To server or not to server? That's a very silly question!

Best Automation Projects

Tuya SDK for beginners: Intro to Tuya Cloud API

Working with Tuya Cloud API. A guide to Cloud automation for beginners, get started with REST!

NEST your old thermostat under $5

Nest-ing up your older thermostat under $5

Nora – Google Assistant in NodeRED

Integrate Google Assistant with NodeRED thanks to Nora - NodeRED home automation

Sonoff Zigbee Bridge – review

Sonoff line up will soon include Sonoff Zigbee Bridge and more Zigbee sensors - here is the first look

DIY Smart Washing Machine – for about 15 bucks!

Learn how to add washing machine notifications to your Google Home on the cheap

Smart Home

Sonoff ZigBee Bridge U isn’t what you think!

I expected Sonoff ZB Bridge U to be a next gen ZigBee bridge with Matter support. Turns out, there is much more to talk about!

Aqara “Everything” M3 Hub

When I started my home automation adventure, the current problem was the number of ecosystems needed to outfit your smart home. Aqara M3 Hub has a long list of protocols to match that!

Sonoff ZB Micro did it! (and bonus ZigBee device)

A long time ago, I took an angle grinder to the humble Sonoff Micro, will I do this again? Meet Sonoff ZB Micro and Sonoff ZB Contact (SNZB-04P) - the latest devices from the ZigBee ecosystem.

This keyless entry is PRO: SwitchBot Lock Pro

SwitchBot Lock Pro offers comprehensive upgrades over the original, combining enhanced design, stronger performance, and a faster mechanism for keyless entry

I damaged the cheapest Smart Socket with power metering for you

Sonoff S60 has an exeptional price for a smart socket with a power meter - I decided to check it out and see how flashable it is