pdf-icon

StackChan

SKU:K151

Work in progress
The product packaging and software development are still in progress. Final features and documentation may change. Thank you for your understanding.

Description

StackChan is a super kawaii AI desktop robot co-created by M5Stack and the user community. It uses the M5Stack flagship IoT development kit CoreS3 as its main controller, powered by an ESP32-S3 SoC featuring a 240 MHz dual-core processor, with 16MB Flash and 8MB PSRAM onboard, and supporting Wi-Fi and BLE. The main unit also integrates a 2.0-inch capacitive touch display with a high-strength glass cover, a 0.3 MP camera, a proximity sensor, a 9-axis IMU (accelerometer + gyroscope + magnetometer), a microSD card slot, a 1W speaker, dual microphones, and power/reset buttons.

The robot body, connected to the main unit, includes a USB-C interface for power and data, a 700 mAh battery, two feedback servos (360-degree continuous rotation on the horizontal axis and 90-degree movement on the vertical axis), two rows totaling 12 RGB LEDs, infrared transmitter and receiver, a three-zone touch panel, and a full-featured NFC module.

The factory firmware comes with rich features, including vivid and cute facial expressions and motions, the XiaoZhi AI agent, as well as support for iOS app video calls, remote avatars, and discovering other nearby StackChan devices. The product also supports programming via Arduino and UiFlow2, making it easy to implement a wide range of custom functionalities.

Note

Motor Safety
Do not forcibly rotate any movable parts connected to the motors by hand when you are unsure whether the motors are powered and under control, as this may cause hardware damage.

Features

  • Based on the CoreS3 main unit
    • For detailed information, please refer to the CoreS3 page
  • Robot body
    • USB-C interface for power and data
    • 700 mAh battery
    • Two feedback servos (360-degree continuous rotation on the horizontal axis and 90-degree movement on the vertical axis)
    • Two rows totaling 12 RGB LEDs
    • Infrared transmitter and receiver
    • Top-mounted three-zone touch panel
    • Full-featured NFC
  • Development platforms
    • UiFlow2
    • Arduino IDE
    • PlatformIO
    • ESP-IDF

Includes

  • 1 x StackChan complete unit (CoreS3 pre-installed)
  • Work in progress

Applications

  • Desktop companion
  • AI agent
  • Voice-based question and answer
  • Smart home
  • IoT control

Specifications

Specification Parameter
Main Controller ESP32-S3
Xtensa® dual-core 32-bit LX7, 240 MHz
16MB Flash, 8MB PSRAM
Wireless Connectivity 2.4 GHz Wi-Fi, IEEE 802.11 b/g/n
Bluetooth® 5 LE
Infrared receiver IRM56384 + infrared transmitter
Wired Connectivity USB CDC & full-speed USB OTG
GPIO, UART, I2C
Display 2.0-inch IPS LCD, resolution 320*240, 65536 colors, ILI9342C driver
Capacitive multi-touch, FT6336U driver
Camera GC0308, 640*480, 0.3 MP
Sensors Dual microphones, ES7210 audio codec
Proximity sensor LTR-553ALS-WA
9-axis IMU BMI270 + BMM150 (accelerometer + gyroscope + magnetometer)
Three-zone touch panel, Si12T driver
Full-featured NFC ST25R3916
Human Interactions 1W speaker, AW88298 16-bit I2S power amplifier
RGB LEDs WS2812C * 12
Power and reset buttons
Power indicator LED
Expansions microSD card slot
Grove interface * 3
LEGO®-compatible mounting holes
Motors 360-degree horizontal servo with feedback
90-degree vertical servo with feedback
Power 700 mAh battery
USB-C power and data
Power management IC AXP2101, RTC BM8563
Product Dimensions 54.0 * 70.0 * 62.0 mm
Product Weight 186.0 g
Package Dimensions Work in progress
Gross Weight Work in progress

learn

BMM150 Magnetic Interference
Magnets may interfere with the BMM150 geomagnetic sensor and cause abnormal readings. If you need to calculate device orientation using geomagnetic data, please avoid placing the device near strong magnetic fields.

Power On/Off

Power on: Short press the power button once (located next to the USB-C port on the left side). Power off: Press and hold the power button for 6 seconds (located next to the USB-C port on the left side). Reset / Reboot: Short press the RST reset button once (located next to the microSD card slot on the bottom side).

Download Mode

Connect StackChan to a computer using a USB-C cable (both the USB-C port on the main unit and the one on the base support data transmission). Press and hold the RST reset button for 3 seconds (located next to the microSD card slot on the bottom side). When the indicator LED next to the button turns green, the device has entered download mode and the button can be released.

Schematics

PinMap

This section mainly describes the robot body module. For information about the main controller, please refer to CoreS3 PinMap.

ESP32-S3 G6 G7 G5 G10 G11 G12
Servo_TX Servo_RX IR_SEND IR_REC I2C_SCL I2C_SDA

IO Expander Chip

PY32L020 IO1 IO14 I2C_SCL I2C_SDA ADD_SEL
VM_EN RGB

I2C address: 0x6F (ADD_SEL = 0, default)
I2C address: 0x71 (ADD_SEL = 1)

I2C Devices

Component I2C Address
Battery Monitor (INA226AIDGSR) 0x41
NFC (ST25R3916-AQWT) 0x50
Touch (Si12T, TSM12 compatible) 0x68
IO Expander (PY32L020) Default 0x6F
Configurable to 0x71

Expand Interface

HY2.0-4P Black Red Yellow White
PORT.A GND 5V G2 G1
PORT.B GND 5V G9 G8
PORT.C GND 5V G17 G18

Model Size

3D

Work in progress

Datasheets

Softwares

Arduino

Work in progress

UiFlow2

Work in progress

Factory Firmware

This tutorial corresponds to the factory firmware version V0.12.

Install iOS App

Install the StackChan World app on an iPhone or iPad that supports Face ID: https://apps.apple.com/app/stackchan-world/id6756086326

Update Device Firmware

Download M5Burner on your computer:

Launch M5Burner, search for StackChan, enable Only Official, and click Download to download the latest version of the firmware.

Connect the computer and StackChan using a USB-C cable. Both USB-C ports support data transmission, but it is recommended to use the port on the base to avoid accidental movement caused by rotation of the upper part of the product. Short-press the power button once (located next to the left USB-C port) to power on. On macOS, if a device connection permission dialog appears, please click Allow.

In M5Burner, click Burn, then select the port corresponding to the device. Click Start and wait until the progress bar completes to finish the firmware update.

If you are not sure which port corresponds to the device, expand the port list, disconnect the device and note the port name that disappears, then reconnect the device. If the device port still does not appear, press and hold the RST reset button for 3 seconds (located next to the bottom microSD card slot). When the indicator LED next to the button turns green, the device enters download mode. Release the button afterward.

Close M5Burner, then short-press the RST reset button once (next to the bottom microSD card slot). The device will boot normally.

Calibrate Motor Position

For first-time use, it is recommended to calibrate the motor position first.

On the device, enter the last page Setup of the main menu, then tap Zero Calibration. Manually rotate the device to the initial position, with the screen upright and the camera located between the two legs, as shown in the image below. Then tap Set Current Position As Home.

Next, verify whether the calibration has taken effect. Manually rotate the device to a non-initial position, then tap Move To Home. If the device rotates back to the initial position, the calibration is successful. Tap Done to complete the calibration process.

Motor Safety
If you feel resistance while rotating the device manually, it indicates that the motor is powered and under active control. Forcing the device to rotate by hand may cause hardware damage.

Test RGB LED Strip

On the device, enter the last page Setup of the main menu, then tap LED Strips Test. You can switch between different light colors for testing. Tap Quit at the bottom to turn off the lights.

Connect Network & Agent

On the device, enter the first page AI Agent of the main menu. The device will raise its head, and the screen will display a Wi-Fi hotspot name in the format Xiaozhi-XXXX. Connect your phone or computer to this Wi-Fi network, and the configuration page will open automatically. If it does not open, use a browser to visit http://192.168.4.1 to access the configuration page. On the configuration page, enter the Wi-Fi SSID and password you want the device to connect to, then tap connect. The device will reboot. After rebooting, enter AI Agent again. The device will announce and display a six-digit verification code on the screen.

Visit XiaoZhi AI Console at https://xiaozhi.me, register an account, and create a new agent. Set the agent name (independent of the wake word Hi, StackChan), language, voice, and character personality. Then use the six-digit verification code to bind the device to the agent. After binding, if you modify the agent settings, you must restart the device for the changes to take effect.

AI Agent Settings

In the XiaoZhi AI Console, you can modify various settings of the agent associated with the StackChan device, including the large language model, voice speed and intonation, MCP, and more.

After connecting XiaoZhi to Home Assistant via the HA plugin, you can control Home Assistant devices using XiaoZhi voice commands. For detailed instructions, refer to: https://github.com/c1pher-cn/ha-mcp-for-xiaozhi/blob/main/README.en.md

Voice Interaction

The device's default voice wake word is Hi, StackChan. You can also tap the screen to wake the device and start speaking. In the current beta firmware, an RGB LED located at the top-left near the screen indicates the voice interaction status:

  • Green indicates the device is listening;
  • Blue indicates the device is speaking;
  • Off indicates the voice interaction is idle.

Common voice commands:

  • General Q&A
    • What time is it now?
    • What will the weather be like in New York tomorrow?
    • Tell me a joke.
    • Introduce Isaac Newton.
  • Controlling the device's own components
    • (Speaker) Set the volume to 90%.
    • (Motor) Turn your head to the left.
    • (RGB LED) Change your built-in light to blue.
    • (Camera) What can you see right now?
    • (Battery) How much battery power is left?
  • After connecting to Home Assistant MCP
    • Turn on the bedroom light.
    • Turn on the air conditioner and set it to 25 degrees.
    • What is the current temperature in the living room?

Motion Interaction

When the device is idle, it will randomly display different facial expressions and turn its head in different directions.

Swipe vertically on the touch area on the top of the device's head to trigger a heart ❤️ expression and motion.

Remote Control Mode

Work in progress

Connect iOS App

(Currently, in the internal test firmware, it is not possible to return to the main menu from the AI Agent interface. You need to briefly press the reset button to restart the device.)

On the device, enter the last page of the main menu Setup, then tap App Bind Code. A QR code will be displayed on the screen. Open the StackChan World app on your phone and follow the on-screen instructions to scan the QR code and complete the binding. After binding, tap Back - Quit on the device to return to the main menu, then enter the Avatar feature. On the phone, also enter the Avatar feature.

In Avatar mode, the device becomes your avatar and mimics the movements of the person in front of the phone, including head movements (up, down, left, and right), as well as the position and size of the eyes and mouth. The voice call feature is still under development and is currently unavailable.

When the device is in Avatar mode, you can also enable Sentinel mode on the mobile app. Press and hold the up, down, left, or right arrow buttons to rotate the device, with a vertical range of 0 to 90 degrees and a horizontal range of -128 to +128 degrees. The +/- buttons in the lower-left corner are used to record the current position, allowing you to quickly return to that position from another direction by tapping the corresponding number. Both landscape and portrait orientations are supported on the phone.