M5Brick is a device that houses the NanoC6 in 2×4 and 2×3 LEGO-compatible brick-sized enclosures, allowing it to be integrated directly into LEGO creations.
It blends naturally into LEGO builds while providing access to sensors, actuators, and wireless control through the M5Stack ecosystem.
By keeping the NanoC6’s USB Type-C power connection and HY2-4P (Grove-compatible) port accessible, M5Brick turns the brick itself into an electronic device.
Why I Created M5BrickI have long enjoyed creating projects that combine M5Stack products with LEGO bricks.
However, conventional LEGO electronics projects come with several challenges:
- Official LEGO controllers and electronic components are relatively expensive
- Conventional development boards do not blend naturally into the appearance of LEGO creations
- Boards and wiring can be bulky and difficult to fit neatly inside compact builds
This led me to the concept of:
“Turning the controller itself into a LEGO brick.”
M5Brick Features1. Truly Functional 2×4 and 2×3 LEGO-Compatible SizesM5Brick is designed to match the size of standard 2×4 and 2×3 LEGO bricks.
It is not merely a case—it can be incorporated directly into LEGO creations and stacked with other bricks.
Depending on the application and the available space inside a build, you can choose between the 2×4 model and the more compact 2×3 model.
The USB Type-C and HY2.0-4P (Grove-compatible) ports remain accessible even when the NanoC6 is installed inside the enclosure.
The USB Type-C port can be used for programming, debugging, and power.
The HY2.0-4P port supports M5Stack Units and Grove-compatible devices, making it easy to add sensors, LEDs, servos, motor-control circuits, and other components to LEGO creations in a compact form.
At the heart of M5Brick, the NanoC6 supports both Wi-Fi and Bluetooth Low Energy (BLE).
This allows you to control a creation from a smartphone, PC, or another microcontroller, as well as connect multiple creations wirelessly.
M5Brick adds remote-control and IoT capabilities to LEGO creations while reducing the need for physical wiring.
What You Can Build with M5BrickM5Brick is a compact microcontroller module designed to add electronic control to LEGO creations.
By combining sensors, actuators, and wireless communication, LEGO can be used as a platform for physical computing.
Potential use cases include:
- LEGO robots
- Compact IoT devices
- Educational STEM projects
- Interactive creations using sensors
- Projects that connect multiple devices wirelessly
(The LEGO car shown in the photo was designed and built by my child as his own independent summer project.)
ProgrammingM5Brick can be programmed using any of the development environments supported by the NanoC6, including:
- UIFlow 2.0
- MicroPython
- Arduino
- ESP-IDF
UIFlow 2.0 is especially recommended for STEM education. Its visual block-based programming environment makes it easy for beginners and children to bring their LEGO creations to life while learning the fundamentals of programming and physical computing.
Development ProcessM5Brick was developed through repeated iterations of the following steps:
- Measuring LEGO-compatible dimensions
- Designing the internal layout for the NanoC6
- Adjusting the positions of the USB Type-C and HY2.0-4P ports
- Producing prototypes with a 3D printer
- Testing connections with LEGO bricks
- Verifying operation with servos and sensors
The internal space available within 2×4 and 2×3 brick-sized enclosures is extremely limited.
To fit the NanoC6 while maintaining access to the external ports, sufficient enclosure strength, and reliable connections with LEGO bricks, I repeatedly refined the design in increments as small as 0.01 mm.
(Since I had little experience with 3D modeling, I created the model directly in Bambu Studio, even though it may not be a conventional choice.)
Although I printed many prototypes, each one was very small, allowing me to continue improving the design while keeping filament consumption to a minimum.
M5Brick is a device designed to transform LEGO from mere blocks into a compact, modular, and open physical computing platform capable of wireless communication.
Tiny.
Programmable.
LEGO-compatible.
That is M5Brick.




Comments