Stack-chan Is a Fun, Open, and Fully-Customizable Companion Robot Platform

This palm-sized companion robot platform is based around the M5Stack and can talk, move, and express emotions on its embedded screen.

Motivation for creating Stack-chan

Over the past few years, companion/communication robots have greatly increased in numbers from a wide variety of different companies. However, each one has a common problem- they are all far too reliant on their specific company's internal infrastructure to operate. This means a person could purchase one only to have it become a lifeless paperweight a couple of years later. As an alternative, Shinya Ishikawa set out to create his own vendor-independent open platform that anyone could take and modify however much they desire.

System overview

In order to provide a high level of customization, Ishikawa had to choose a microcontroller/module that already featured plenty of wired and wireless connectivity options, which led him to go with the M5Stack Core2. This IoT module us based around an ESP32 that has a pair of Xtensa 32-bit cores clocked at 240MHz, as well as WiFi and Bluetooth wireless networking capabilities. When combined with an onboard 6-axis IMU, battery, and 2-inch capacitive touch screen, the M5Stack is extremely versatile for an internet-connected robotics platform.

Apart from the M5Stack and accompanying expansion board, the firmware Ishikawa developed (called the Stack-chan framework) utilizes the Moddable SDK for creating powerful embedded programs in Javascript/Typescript, making it far more approachable for beginners.

PCB design and assembly

Stack-chan was meant to exist both on its own and as an add-on companion for preexisting robotics platforms. This premise meant additional connectors were required so that other microcontrollers, such as an Arduino Nano, could "talk" to the M5Stack over UART or I2C. To do this, Ishikawa designed and assembled his own expansion board that contains two rows of pin headers that the M5Stack could slot into. From here, its broken-out pins lead to JST headers for connecting sensor modules, servo motors, or other boards, as well as a larger external battery pack.

Building a housing

The enclosure for Stack-chan was meant to be tinkered with an expanded so that other features could be added in the future. The base version contains a large shell that holds the battery pack and a pair of servo motors that are able to both pivot and tilt the robot to give the impression of it "looking" somewhere. 3D-printed feet are attached to the bottom that provide a stable platform, and the M5Stack gets slotted into the front facing outwards so that a face, or something else, can be displayed.

Writing the base firmware

Writing firmware that was robust enough for a demonstration while also being customizable for other users was a bit tough initially, but the resulting program turned out quite well. At its core, several timers run which trigger various actions such as adjusting the gaze of the avatar's eyes, pivoting the robot to look around the room, and waiting for a button to be pressed. The default behavior also includes several sound files and a text-to-speech driver, but this is merely a small portion of what is ultimately possible.

Modding and further customization

As stated at the beginning, Stack-chan is a robotics platform dedicated to modding, which is why mods are so integral to the firmware. By adding a new implementation for the onRobotCreated function, a mod can be made to do nearly anything, including but not limited to showing custom avatars, receiving remote commands over HTTP, or even using other hardware modules. This can be seen towards the end of Ishikawa' video where he shows off what other people have been able to make.

For more information about the Stack-chan project/platform, you can read Ishikawa's write-up here.

Arduino “having11” Guy
20 year-old IoT and embedded systems enthusiast. Also produce content for and love working on projects and sharing knowledge.
Latest articles
Sponsored articles
Related articles
Latest articles
Read more
Related articles