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:

Specification

  • 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 192.168.4.1 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.

Sample

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
pass
btnA.wasPressed(buttonA_wasPressed)

def buttonA_pressFor():
global button, RRR, GGG, BBB
button = False
for count in range(3):
rgb.setColorAll(0xcc0000)
wait_ms(500)
rgb.setColorAll(0x000000)
wait_ms(500)
pass
btnA.pressFor(0.8, buttonA_pressFor)

rgb.setColorAll(0x3366ff)
button = False
wait_ms(2000)
rgb.setColorAll(0xff0000)
while True:
if button == True:
rgb.setColorAll(0x000000)
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
VCC3V3
RXG1 (TX)
TXG2 (RX)
VCC or 3.3V EN (Enable)
GND G0 (GPIO00)
GNDGND
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.

PayPal

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

Patreon

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

image/svg+xml

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

client-image
client-image
client-image
client-image
client-image
client-image
client-image
client-image
client-image

Learn NodeRED

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

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

Best Automation Projects

Tuya SDK for beginners: Intro to Tuya Cloud API

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

NEST your old thermostat under $5

0
Nest-ing up your older thermostat under $5

Sonoff Zigbee Bridge – review

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

Nora – Google Assistant in NodeRED

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

DIY Smart Washing Machine – for about 15 bucks!

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

Smart Home

I damaged the cheapest Smart Socket with power metering for you

0
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

The end of Tasmota? Sonoff SwitchMan M5 Matter

0
These are one of the least expensive Matter devices to automate your lights. Will Sonoff SwitchMan M5 Matter put an end to Tasmota?

Meros TRV to the rescue?

0
I got my hands on another TRV - this time from Meross. I heard good things about the brand so I wanted to see if Meross TRV would be good to manage smart heating.

Aqara brings Thread sensors but…

0
Aqara brings new Thread sensors to their ecosystem. First sensors to support Matter this way are Aqara Motion and Light Sensor P2 and Aqara Contact Sensor P2

Multi-lights for your ceiling from Aqara

0
This is the biggest light I held in my hands so far. It's ZigBee and it comes from Aqara - meet Aqara Ceiling Light T1M