Connecting to sources…

How to build XGO-lite3 (education model of the XGO series): the whole process

57 steps to build XGO-lite3 (education model of the XGO series), from buying parts, printing and assembly to software, calibration and training, with the bill of materia…

List price $599.00, with a sale price of $479.20 shown on the page (LuwuDynamics official store shop.xgorobot.com, 2026‑10‑31, pre-sale, ships within 10 days; tax and shipping not stated); Taobao and JD CNY prices not read

Buy parts

  • Prepare a Raspberry Pi CM4 or CM5

    Prepare a Raspberry Pi CM4 or CM5 with a compatible carrier board.

  • Connect the ST7789V SPI LCD

    Prepare an ST7789V SPI LCD connected via SPI0.

  • Prepare a Debian-based Linux OS

    Prepare a Debian-based Linux operating system.

  • Get the XGO-lite3 robot

    Obtain the multimodal robot platform from the XGO-lite3 page on xgorobot.com. The platform is presented for tech enthusiasts, STEAM education, university research, and other needs.

Assemble

  • Connect Controller to RP1 UART

    Connect the robot controller's TX/RX fly wires to the corresponding pins of an unused RP1 UART.

  • Connect the four-wire PWM fan

    Connect the four-wire PWM fan’s VCC, GND, PWM, and TACH to the corresponding interfaces and use TACH to obtain the actual speed.

Software

  • Enable the UART Overlay

    Enable the overlay corresponding to the connected UART in `config.txt`.

  • Restore the Bluetooth Port

    Change the `bluetoothd` configuration back to `ttyAMA0`.

  • Pass the Serial Port as a Parameter

    Modify line 188 of `xgolib_dog.py` to use the existing `port` parameter instead of hard-coding the serial path.

  • Scan Candidate Serial Ports

    Traverse the `/dev/ttyAMA*` and `/dev/ttyS*` candidate ports and send the firmware version query command to each.

  • Identify the Port and Set Fallback

    A valid version reply beginning with `M`, `L`, `W`, or `R` identifies a match; otherwise use `/dev/ttyAMA0`, without affecting other apps that use Bluetooth through D-Bus.

  • Configure ALSA Mixing and Recording

    Configure `dmixer` and `dsnooper` in `/etc/asound.conf`, routing default playback through `plug` and `dmix` to `hw:0,0`, and capture through `plug` and `dsnoop` to `hw:0,0`.

  • Enable the fan thermal driver

    Enable dtparam=fan_temp in config.txt so the pwm-fan kernel driver controls the fan and exposes pwm1 and fan1_input under /sys/class/hwmon/hwmon2/.

  • Monitor voltage and battery jointly

    Have l uwu-undervolt-monitor.py read the CM5 voltage with vcgencmd and the dog battery percentage with xgolib.read_battery(), then make a combined judgment and tiered response.

  • Deploy the battery data service

    Use the ttyAMA0 serial port and the xgolib pip package, and deploy l uwu-undervolt-monitor.py as a systemd service.

  • Enable journaling filesystem mode

    Add rootflags=data=journal to /boot/firmware/cmdline.txt; step 7 of install.sh deploys this automatically.

  • Automatically identify hardware configuration

    On every boot, identify the current hardware and switch to the correct `config.txt` for the new or old CM4 batch or for CM5.

  • Isolate the CM5 configuration

    Exit directly at the `is_cm4()` check on CM5; the firmware naturally isolates the `[cm5]` section, so no additional handling is needed.

  • Probe the robot serial port

    Send the xgolib firmware version query frame `PROBE_FRAME` to candidate serial ports. Treat any reply or a `PermissionError` as evidence that the robot is present on that port.

  • Prevent configuration switching loops

    After each configuration switch, write `/tmp/luwu_hw_autoconf_switched`; on the next boot, keep the current configuration if probing still fails and the marker exists. The marker is stored in tmpfs and clears automatically after power loss.

  • Stop maintaining xgoscreen

    Do not maintain or migrate xgoscreen. The fbtft kernel driver manages the display, while apps render through PySide6 or LinuxFB.

  • Display images with QLabel

    Replace the former `LCD_2inch.ShowImage()` role with `QLabel.setPixmap()`.

  • Create the luwuos education package

    Keep the legacy image's `xgoedu` package unchanged. The new image uses the pip package `xgoedu-luwuos`, still imported with `from xgoedu import XGOEDU`.

  • Replace the drawing backend

    Inside `xgoedu-luwuos`, replace PIL ImageDraw and spidev with PySide6 QPainter and QPixmap. Keep the existing API signatures fully compatible.

  • Add hand recognition

    Use MediaPipe Hands to implement hand recognition in the new `edulib.py`.

  • Add face detection

    Use MediaPipe Face Detection to implement face detection in the new `edulib.py`.

  • Add skeletal pose recognition

    Use MediaPipe Pose to implement skeletal pose recognition in the new `edulib.py`.

  • Add YOLO object detection

    Use onnxruntime to implement YOLO object detection in the new `edulib.py`.

  • Add OpenCV recognition

    Use OpenCV to implement color, color-block, line-following, and sphere recognition in the new `edulib.py`.

  • Add QR and AprilTag recognition

    Implement QR-code and AprilTag recognition in the new `edulib.py`.

  • Provide helper functions

    Provide helper functions such as `hand_pos`, `color`, and `getFaceBox` in the new `edulib.py`.

  • Move deprecated features

    Move the deprecated features listed in the table to the App or system layer instead of retaining them in the new package backend.

  • Migrate drawing APIs

    Migrate the old PIL and spidev drawing model to the Qt drawing model. The `lcd_*` drawing APIs in the table can be migrated without loss.

  • Refresh display after drawing

    Call `label.setPixmap(pixmap)` after every drawing operation to refresh the display. Its behavior is identical to the old `ShowImage()`.

  • Preserve user API compatibility

    Keep the method signatures of user graphical programs unchanged. Switch the backend transparently from the old drawing implementation to Qt rendering.

  • Parameterize the dog serial port

    Keep `xgolib_dog.py` and change the constructor's serial path to a `port` parameter whose default is `/dev/ttyAMA0`.

  • Keep the legacy education package

    The legacy image continues to use `xgoedu`, which remains unchanged and is unaffected by the new `xgoedu-luwuos` package.

  • Install the package for each image

    Install `xgoedu` on the legacy image and `xgoedu-luwuos` on the new image. Both use the same `from xgoedu import XGOEDU` import.

  • Flash the system image with Luwu-Imager

    Download Luwu-Imager for Windows or macOS and flash the pre-built system image.

  • Install the system from source

    Clone the luwu_os repository, change to /opt/luwu-os, and run configs/install.sh. The script handles kernel overlays, udev rules, ALSA multi-app audio sharing, systemd services, and Python dependency installation.

  • Confirm key Python packages

    After installation, the key Python packages include xgolib, xgoedu-luwuos, and xgo-blockly-luwuos.

  • Enable and start the luwu-launcher service

    Enable the luwu-launcher systemd service so the system starts automatically on boot.

  • Build PySide6 framebuffer applications

    Build the applications with PySide6 so they render directly to the Linux framebuffer. The BallTracker example starts a camera with Picamera2 and triggers frame processing every 33 milliseconds.

  • Route key events through a FIFO

    Route key events from the C++ launcher to Python apps through `/tmp/luwu_keys.fifo`.

  • Load ONNX AI models

    Place the ONNX models in `model/` and load them with `onnxruntime`. They include YuNet face detection, MediaPipe hand pose and person detection, MediaPipe pose estimation, custom emotion recognition, and YOLO COCO object detection.

Calibrate and test

  • Initialize Mixer State

    Initialize the mixer with `write_volume()` in `apps/settings/main.py`, mute the four Output Mixer feedback paths, set Capture to 45/63 (71%), and set Playback to 255/255 (100%, 0dB).

  • Set the Volume Controls

    Use the `Playback`, `Speaker`, and `Headphone` names reported by `amixer scontrols`; map user volume 0–100% with `raw = 196 + vol × 59 // 100`, fix Speaker and Headphone at 127, and fix Speaker DC and Speaker AC at 5.

  • Check the fan temperature curve

    Check the config.txt thermal curve: the fan starts at 80% at 36°C and increases speed progressively at 40°C, 52°C, and 58°C.

  • Verify the shared battery state

    Verify that the service writes the battery level to /tmp/luwu_battery_level and that the Qt status bar and any app can read it without writing.

  • Verify tiered undervoltage response

    When the battery is above 10%, treat undervoltage as a transient power peak and allow the CM5 hardware to throttle automatically without software intervention.

  • Verify exhausted-battery shutdown

    Perform the protective shutdown only when the battery is genuinely exhausted.

  • Validate battery protection shutdown

    Confirm that the system shuts down automatically for protection when the battery is exhausted without damaging the filesystem.

Use it

  • Build and execute a block program

    Drag block modules to combine robot actions and logic, then click to deploy. The deployed program executes on site.

  • Run three preset motions

    In the remote-control app, select built-in preset motions such as “sway,” “squat-and-rise,” and “dance,” then execute them with one command.

  • Run three more preset motions

    In the remote-control app, select built-in preset motions such as “look around,” “urinate,” and “push-ups,” then execute them with one command.

  • Program with XGO-Blockly

    Write the program by dragging modules on the left of XGO-Blockly, and view live Python code and execution logs on the right. The tool supports graphical block programming and automatic AI code generation.

  • Enable App Playback and Recording

    Have apps play and record directly with `aplay`, `arecord`, or Python `subprocess`, providing native mixing support.

Parts

  • Raspberry Pi CM5 Lite 2 GB (CM5102000) with a 32 GB microSD holding the OS, plus an ESP32 motion controller linked over UART
  • 12 leg servos: 6V 2.3 kg·cm plastic-case metal-gear 300° dual-shaft TTL serial servos with potentiometer feedback; a 3-DoF arm with gripper
  • 5 MP camera, MEMS microphone, speaker, 2.0-inch 320×240 IPS screen, four buttons, IMU
  • 18650 2S 2500 mAh battery, 5V USB-C charging in about 1.5–2 hours, about 2 hours of runtime
  • 1 mm aluminium-alloy frame, ABS legs and feet; 250×145×170 mm standing, 610 g
  • Standard kit: protective case, USB-C dock, HDMI cable and colour blocks for vision lessons

Tools

  • Ships assembled, no build needed
  • Reflashing the OS uses Luwu Imager and a microSD reader; motion firmware can only be flashed online at tools.xgorobot.com (Chrome/Edge)

Skills

  • XGO-Blockly blocks with AI code generation, and move-and-record teaching by hand
  • Python: xgolib motion control, xgoedu vision and voice interfaces, MQTT messaging
  • Advanced: ROS 2 (reference setup Ubuntu 26.04 with ROS 2 Lyrical) and MuJoCo reinforcement learning (NVIDIA GPU needed)

Software

  • Luwu-OS 2.1.3 (2026‑08‑29): a Qt launcher with PySide6 apps for AI chat, gesture, face and ball tracking, remote video control, lidar scanning, group shows and Blockly
  • PyPI: xgolib 1.1.10, xgoedu-luwuos 2.2.1, xgo-blockly-luwuos 1.0.6.10
  • luwu-ros (CM5 ROS 2 image), luwu_mjlab (MuJoCo training and ONNX export), URDF/MJCF models
  • XGO app (iOS / Android, BLE remote control)

Documents