MakerLab
ESP32M5Stamp C3

M5Stamp C3: Tiny ESP32 Powerhouse for Makers

A compact and versatile development board featuring the ESP32-C3 RISC-V SoC, ideal for IoT projects and rapid prototyping.

M5Stamp C3

The M5Stamp C3 is a credit-card-sized development board designed by M5Stack, a company renowned for its modular and user-friendly hardware for the maker community. This board packs significant processing power and wireless capabilities into an incredibly small form factor, making it suitable for projects where space is at a premium. Its design prioritizes ease of use, allowing both beginners and experienced engineers to quickly bring their ideas to life.

At the heart of the M5Stamp C3 is the Espressif ESP32-C3FN4, a powerful and cost-effective System-on-Chip (SoC). The ESP32-C3 is part of Espressif's RISC-V based microcontroller family, offering a single-core 32-bit RISC-V processor. It integrates Wi-Fi 4 (802.11b/g/n) and Bluetooth 5 (LE) connectivity, making it an excellent choice for Internet of Things (IoT) applications. The C3 variant also features a range of peripherals, including GPIOs, ADCs, and SPI interfaces, all accessible through the M5Stamp C3's pin headers.

The M5Stamp C3 sits within the ESP32 family, offering a more budget-friendly and simplified alternative to dual-core ESP32 variants while introducing the RISC-V architecture. It's particularly well-suited for makers who need robust wireless connectivity and a capable microcontroller for embedded projects, especially those focused on Wi-Fi or Bluetooth communication. Its small size and integrated USB-C port for programming and power make it exceptionally convenient for wearable devices, compact sensor nodes, or as a general-purpose IoT development platform.

Released around 2021, the M5Stamp C3 represents M5Stack's commitment to providing accessible development tools based on popular and powerful microcontrollers. It aims to lower the barrier to entry for IoT development by offering a pre-built, well-documented board with a straightforward programming interface. This makes it an attractive option for students learning embedded systems, hobbyists building smart home devices, or engineers prototyping wireless sensor networks.

Watch

Related video, embedded from YouTube.

Specifications

Microcontroller / SoCEspressif ESP32-C3FN4
Architecture32-bit RISC-V single-core processor
Clock speedUp to 160 MHz
Flash / Storage4MB (external SPI flash)
RAM / SRAM400KB (internal SRAM)
Operating voltage3.3V
Digital I/O pins13 (configurable)
Analog / ADC4x 12-bit ADC channels
PWMAvailable on most GPIO pins
ConnectivityWi-Fi 4 (802.11b/g/n), Bluetooth 5 (LE)
USBUSB Type-C (for programming and power)
Power inputUSB Type-C (5V) or external 3.3V
Dimensions25 x 20 x 5 mm

Pinout & pin functions

PinFunction
3V33.3V Power Output
GNDGround
G0GPIO0 (Boot Mode Select)
G1GPIO1 (UART0 TX)
G2GPIO2 (UART0 RX)
G3GPIO3 (SPI CS)
G4GPIO4 (ADC1 Channel 0, Touch 0)
G5GPIO5 (SPI MOSI)
G6GPIO6 (SPI MISO)
G7GPIO7 (SPI SCK)
G8GPIO8 (I2C SDA)
G9GPIO9 (I2C SCL)
G10GPIO10 (ADC1 Channel 2, Touch 2)
G11GPIO11 (ADC1 Channel 3, Touch 3)
G12GPIO12 (ADC1 Channel 4, Touch 4)
G13GPIO13 (ADC1 Channel 5, Touch 5)
G14GPIO14 (ADC1 Channel 6, Touch 6)
G15GPIO15 (ADC1 Channel 7, Touch 7)
G16GPIO16 (UART1 TX)
G17GPIO17 (UART1 RX)
G18GPIO18 (PWM)
G19GPIO19 (PWM)
G20GPIO20 (PWM)
G21GPIO21 (PWM)
ENReset Pin (Active Low)

Wiring & circuit basics

The M5Stamp C3 operates at a logic level of 3.3V. When connecting external components, ensure they are compatible with this voltage. Connecting 5V devices directly to the GPIO pins can damage the microcontroller. If you need to interface with 5V logic, use a level shifter. Powering the board can be done via the USB-C port, which supplies 5V. The board has an onboard 3.3V regulator to provide stable power to the ESP32-C3 and any connected peripherals. Alternatively, you can power the board by supplying a regulated 3.3V directly to the 3V3 pin, but this bypasses the onboard regulator and requires careful current management.

When connecting an LED, it is crucial to include a current-limiting resistor in series to prevent overcurrent and damage to the LED and the GPIO pin. A typical value for a standard LED is between 220 ohms and 1k ohm, depending on the LED's forward voltage and current rating. Connect the resistor to either the anode or cathode of the LED, and then connect the other end of the resistor and the other LED terminal to a GPIO pin and ground, respectively. For example, to blink an LED connected to GPIO18, you would connect GPIO18 to one end of the resistor, the other end of the resistor to the LED's anode, the LED's cathode to GND, and then program the GPIO pin to toggle HIGH and LOW.

For I2C communication, the M5Stamp C3 typically uses GPIO8 as the SDA (Serial Data) line and GPIO9 as the SCL (Serial Clock) line. These pins need to be connected to the corresponding SDA and SCL pins on your I2C sensor or device. Most I2C devices also require pull-up resistors on both the SDA and SCL lines, typically in the range of 4.7k ohm to 10k ohm, connected to the 3.3V supply. The M5Stamp C3 board might have onboard pull-up resistors, but it's good practice to check the board's schematic or datasheet for your specific variant. Ensure the I2C device is also powered by 3.3V or properly level-shifted if it operates at 5V.

Programming & getting started

The M5Stamp C3 can be programmed using a variety of popular toolchains. The Arduino IDE is a highly recommended option for beginners, offering a familiar environment and a vast library ecosystem. You'll need to add the ESP32 board support to your Arduino IDE, which includes the ESP32-C3 variants. For more advanced users or those preferring Python, MicroPython and CircuitPython are excellent choices, providing a high-level programming experience. Espressif's own ESP-IDF (Espressif IoT Development Framework) offers the most control and access to all hardware features for professional development. PlatformIO, an integrated development environment for IoT development, also supports the ESP32-C3 and integrates well with various IDEs like VS Code.

To upload your first program using the Arduino IDE, first ensure you have installed the ESP32 board support. Connect the M5Stamp C3 to your computer via USB-C. Select the correct board (e.g., 'M5Stamp C3' or a generic ESP32-C3 Dev Module) and the corresponding COM port in the Arduino IDE. Write a simple sketch, such as the 'Blink' example, modifying the pin number to one of the available GPIOs (e.g., GPIO18). Click the 'Upload' button. The IDE will compile the code and flash it to the board. You may need to press the 'BOOT' button (often G0) while uploading if the auto-reset mechanism doesn't work, or hold it down to enter flashing mode.

Project ideas

Wi-Fi Connected Weather StationBuild a compact weather station that reads temperature and humidity using an external sensor (e.g., DHT22) and sends the data over Wi-Fi to a cloud service or a local server. This project utilizes the ESP32-C3's Wi-Fi capabilities and an I2C or digital sensor. You'll learn about sensor interfacing and network communication.
Bluetooth Low Energy (BLE) BeaconConfigure the M5Stamp C3 to act as a BLE beacon, broadcasting custom messages or sensor data. This is useful for proximity detection, asset tracking, or simple location-aware applications. It heavily relies on the ESP32-C3's integrated Bluetooth 5 LE functionality and requires understanding BLE advertising protocols.
Smart Home ButtonCreate a wireless button that can control smart home devices (e.g., turn on lights via MQTT). Connect a physical button to a GPIO pin and program the M5Stamp C3 to send commands over Wi-Fi. This project teaches about event handling, GPIO input, and IoT messaging protocols like MQTT.
USB MIDI ControllerWith its small size and USB connectivity, the M5Stamp C3 can be programmed to act as a USB MIDI controller. Connect potentiometers or buttons to its GPIOs and map them to MIDI messages. This project leverages the board's USB capabilities and requires understanding MIDI protocol and input mapping.
Low-Power Sensor NodeDevelop a battery-powered sensor node that wakes up periodically, takes readings (e.g., light, motion), sends data via Wi-Fi, and then goes back to deep sleep to conserve power. This project focuses on optimizing power consumption using the ESP32-C3's deep sleep modes and understanding efficient data transmission.
Web Server with Sensor DataHost a simple web server directly on the M5Stamp C3 that displays real-time sensor readings (e.g., from an ADC pin or an I2C sensor) when accessed from a web browser on the same network. This project combines Wi-Fi connectivity with web server development on an embedded platform.

Buying tips & gotchas

When purchasing the M5Stamp C3, ensure you are buying from reputable distributors to avoid counterfeit or lower-quality variants. Be aware that while the M5Stamp C3 is small, it still requires careful handling due to its exposed components. Common pitfalls include incorrect voltage levels (always use 3.3V logic), improper power supply (ensure your USB source can provide sufficient current, especially when Wi-Fi is active), and forgetting to include current-limiting resistors for LEDs. Essential accessories include a USB-C cable for programming and power, jumper wires for connecting peripherals, and potentially a breadboard or perfboard for prototyping. A small enclosure can also protect the board for more permanent installations.