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

Nora – Google Assistant in NodeRED

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

NEST your old thermostat under $5

0
Nest-ing up your older thermostat under $5

Sonoff R3 DIY mode & why it sucks

0
Long awaited Sonoff R3 DIY mode is even worse than I expected.

Things they don’t tell you about IKEA Trådfri

0
There are things you should know about IKEA Tradfri before you make your purchase

Flashing ESP with Tasmotizer is a dream come true

0
How to flash Tasmota on ESP devices with new Tasmotizer tool

Smart Home

The quietest roller shade driver I used!

0
Aqara Roller Shade Driver E1 is ZigBee 3.0 wireless and the quietest controller for blinds, rollers and verticals.

M5Stack UnitV2 update brings WiFi

0
M5Stack UnitV2 finally gets much needed WiFi update and I will show you how to make the settings stick

Flashing Tasmota on Sonoff POWR3

0
How to flash tasmota on Sonoff POWR3 and set it up correctly

Amped to 25 – Sonoff POWR3

0
It's bigger, better and comes with massive 25A current limit - for all your present needs - meet Sonoff POWR3

SwitchBot made an IP Camera

0
SwitchBot Indoor Cam is small and inexpensive 1080p camera with smart assistant support and 2 way communications