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.
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 / SoC | Espressif ESP32-C3FN4 |
| Architecture | 32-bit RISC-V single-core processor |
| Clock speed | Up to 160 MHz |
| Flash / Storage | 4MB (external SPI flash) |
| RAM / SRAM | 400KB (internal SRAM) |
| Operating voltage | 3.3V |
| Digital I/O pins | 13 (configurable) |
| Analog / ADC | 4x 12-bit ADC channels |
| PWM | Available on most GPIO pins |
| Connectivity | Wi-Fi 4 (802.11b/g/n), Bluetooth 5 (LE) |
| USB | USB Type-C (for programming and power) |
| Power input | USB Type-C (5V) or external 3.3V |
| Dimensions | 25 x 20 x 5 mm |
Pinout & pin functions
| Pin | Function |
|---|---|
| 3V3 | 3.3V Power Output |
| GND | Ground |
| G0 | GPIO0 (Boot Mode Select) |
| G1 | GPIO1 (UART0 TX) |
| G2 | GPIO2 (UART0 RX) |
| G3 | GPIO3 (SPI CS) |
| G4 | GPIO4 (ADC1 Channel 0, Touch 0) |
| G5 | GPIO5 (SPI MOSI) |
| G6 | GPIO6 (SPI MISO) |
| G7 | GPIO7 (SPI SCK) |
| G8 | GPIO8 (I2C SDA) |
| G9 | GPIO9 (I2C SCL) |
| G10 | GPIO10 (ADC1 Channel 2, Touch 2) |
| G11 | GPIO11 (ADC1 Channel 3, Touch 3) |
| G12 | GPIO12 (ADC1 Channel 4, Touch 4) |
| G13 | GPIO13 (ADC1 Channel 5, Touch 5) |
| G14 | GPIO14 (ADC1 Channel 6, Touch 6) |
| G15 | GPIO15 (ADC1 Channel 7, Touch 7) |
| G16 | GPIO16 (UART1 TX) |
| G17 | GPIO17 (UART1 RX) |
| G18 | GPIO18 (PWM) |
| G19 | GPIO19 (PWM) |
| G20 | GPIO20 (PWM) |
| G21 | GPIO21 (PWM) |
| EN | Reset 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.