A live state-synchronized digital twin of a CR-10S 3D printer. The printer motherboard has been swapped out for BTT Octopus Pro with an ESP32 installed in an expansion slot. The ESP32 exposes a connection to the printer serial port on the local network over Telnet. A Python script running on another machine reads M154/M155 telemetry emissions from the printer via the ESP32 and then publishes the telemetry updates to an MQTT broker. The digital twin itself runs in a Unity app, and subscribes to the telemetry topics on the broker to receive updates about the machine state. The digital twin can also publish commands to the broker, and the Python script subscribes to the command topic and passes received commands on to the printer via the ESP32.
The Unity client framework, which covers much of the basic infrastructure for MQTT connectivity and DTDL parsing and is used here with modification, was created by professor Peter King of Northeastern University and Lab Bench Studios. The meshes of the printer itself were created and published on GrabCad by Nguyen Nhu Tuan, Geoff Tayler, and Proma.