Since the launch of CoCube, it has received a lot of attention and love from educators and students.
In the process of promoting CoCube, I’ve had the chance to collaborate more and more with friends at M5Stack, and explored many fun developments—such as designing external modules with M5 Units, and using the M5 CoreS3 to control CoCube.
With the M5Stack Global Innovation Contest 2025 as an inspiring backdrop, I was motivated to design a little project for fun. My goal is to quickly prototype a tabletop robot with audio interaction, powered by M5’s main controllers.
The rich open-source resources and beautifully crafted hardware from M5Stack make it possible to move rapidly from prototype to product-level development.
Let's get started!
Controller Selection and Solution DesignTo enable audio features, adopting the ESP32-S3 chip is indispensable.
Among the series of controllers of M5 Stack, Stamp-S3A, with its compact size, high integration, and 23 extended IO pins, has become my top choice.
When selecting the controller, it was unexpectedly discovered that M5 Stack just released a Cardputer Accessory Kit v1.1, which not only comes with a 1.14-inch screen but also uses a Stamp-S3A soldered with 1.27mm pin headers, and has an 8-pin FPC connector on the back, allowing direct connection to the 1.14-inch screen!
More interestingly, M5 Stack provides the KiCAD PCB footprint for Stamp-S3A, which can save a lot of development time!
After the selection is completed, inspiration also follows.
It still retains the cube-shaped design of CoCube, but adds a 1.14-inch front display to simulate facial expressions. By designing different shells through 3D printing or paper models, the same robot hardware can take on endless appearances. In addition to preserving CoCube’s mobility, it also integrates LLM dialogue capabilities—bringing this cute robot truly to life.
I decide to call it the StampCube.
Hardware DesignHardware design is completed in EasyEDA.
The motor drive section continues to use the CoCube design, selecting two motor drive chips in TDFN-8L package, with 3.3V signal input and 5V power supply.
For the audio section, the ES8311 audio decoding chip & NS4150B power amplifier chip & MSM381A3729H9BPC microphone are selected, and the acquisition of microphone signals and sound playback through the speaker are achieved via I2C + I2S.
The interactive section retains two switch buttons. It also adds a BMI270 sensor to interact with users by detecting acceleration.
Referring to the design of CardPuter v1.1, the microSD card has been retained to save more audio and image creatives for StampCube.
The relatively complex part is the power management section: the robot uses a 2S lithium battery. First, it steps down the 7.4V voltage to 5V through a DCDC converter to power the motor driver chip and power amplifier chip, and then further steps down the 5V voltage to 3.3V through another DCDC converter to power the Stamp-S3A and other chips. An IP2326 battery charging chip is used, and a power switching circuit is designed - when the Stamp-S3A is connected to TypeC, the 5V of the Stamp-S3A powers the robot's main board while enabling the battery charging chip to charge the battery; when not connected to TypeC, the battery on the robot's main board outputs power externally, and the stepped-down 3.3V powers the Stamp-S3A. Finally, a long-press power on/off chip is added to control the enable pins of the two DCDC chips.
During the layout phase, due to the limited space on the board, many components had to be placed under Stamp-S3A.
The CoCube's chassis design is continued - the motor drives the driving wheel to rotate through gears, which further drives the O-ring to rotate, controlling the movement of the robot, thus ensuring that the robot can rotate in place.
Only this time, the M10 motor without an encoder is used, which makes the chassis size of StampCube more compact, reducing from the original side length of 45mm to 34mm, a reduction of 25%!
For Stamp-S3A, use a plastic part with a 2mm high 1.27mm female header to raise it up, leaving enough space for the components below and the screen FPC. And the main board is fixed to the chassis by two bolts and presses against the motor.
The most interesting part is the screen bracket solution. Since M5 Stack has open-sourced the 3D model of Stamp-S3A, it is easy to import it into Fusion 360 as a reference, nest a slightly larger box for it. Finally, design a screen bracket and fix it to the box with two bolts. Done!
Screen and microSDCard
For the quickest way to test the microSD card and screen, I selected CARDPUTER in M5Burner, flashed the firmware of M5Launcher Cardputer for StampCube, and tested the screen and microSD card, which worked properly!
Audio Verification
Modify the pin definitions based on the i2s_es8311 example in esp-idf, and test the functionality of the microphone and speaker through the music and echo examples.
Motor Driver
Controlling the motor speed and rotation direction via PWM with 4 pins is sufficient, and everything is normal.
Design a paper model shell for StampCube - the internal dimensions are 34*34*40mm.
Print the pattern on 300g white cardboard, carefully cut it out, and finally use the tape provided with the M5 Stack to secure the cardboard box! The appearance is now complete!
Finally, integrate all functions in MicroBlocks. ( MicroBlocks is basically Scratch for hardware. If you want to know more about MicroBlocks, stay tuned for our blog series about CoCube! )
StampCube emulates a Macintosh computer, plays music after booting up, and displays "hello". As a desktop "personal computer", it can be moved and explored on the desktop!
Develop a remote control interface through APP Inventor or WeChat Mini Program, and you can also use StampCube as a remote control car to play, with the function of each button customizable.
And this is a demo of implementing LLM dialogue through StampCube.
Finally, a huge thank to our partner M5 Stack for hosting this Global Innovation Contest 2025. Whether or not I win the prizes, I look forward to seeing everyone at MakerFaire Shenzhen 2025 with CoCube and StampCube!
Comments