LabWired The easy way to build hardware
Independent A1 mini-style desktop printer reference with a moving bed, cantilever gantry, toolhead, display and filament guide.
Original machine CAD, LabWired controller schematic and STM32 firmware. An independent engineering reference, not OEM hardware.

From schematic to motion: a 3D printer digital twin in LabWired

A firmware test can tell you whether a microcontroller executed its code. A machine test must go further: Did the axes move as commanded? Did the sensors change the machine’s behavior? Did the controller reach a safe state when something went wrong?

We built an independent desktop 3D printer reference to test these questions together. It combines a controller schematic and running STM32 firmware in LabWired with a constrained four-axis machine model in KernelCAD. An A1 mini-style printer provides the mechanical reference, but the CAD, electronics and firmware are original.

The project is public. You can run the saved simulation, inspect the controller and open the mechanical model.

This 20.7-second video has no audio. It shows the LabWired controller, simulated traces, printer motion, OLED state replay, PCB routing and the 3D board.
Run the printer in LabWired Inspect the 3D model

One project, from firmware signals to machine motion

Running STM32 firmwareCompiled C executes on a simulated STM32F411 controller in LabWired.
Four commanded axesSTEP and DIR signals control the X, Y, Z and extruder joints of the linked machine.
Observable safety testsHoming, display updates, fault responses and output shutdown have explicit checks.
Custom controller PCBA separate six-layer layout uses individual controller, driver and power-stage ICs.

The LabWired schematic includes an STM32F411, four stepper-driver channels, three home switches, and hotend and bed temperature inputs. It also includes an OLED and controlled outputs for heaters, the fan and motor drivers.

The firmware runs against a declared verification scenario. The scenario supplies switch transitions and temperature inputs; the controller must respond to them. The motion model receives counted STEP edges and DIR states, so its movement follows firmware commands rather than a standalone animation.

LabWired schematic with an STM32F411, four stepper channels, motors, home switches, temperature inputs, heater outputs, fan and OLED.
The controller schematic and its compiled firmware are part of the public LabWired project.
Open the live controller
Open the same circuit used for the firmware verification run.

Follow the firmware, not a scripted animation

The saved test first homes the three motion axes. It then commands a move to X30/Y30/Z1 mm, a 60 mm square and diagonal, a return move, and 6 mm of extruder travel. The test checks that the OLED framebuffer was painted and that controlled outputs return to their safe states.

The recorded sequence includes these markers:

HOME_X
HOME_Y
HOME_Z
ALL_HOMED
MOTION_START
PRINT_DONE
POSITION_STEPS 150 150 25 600
OUTPUTS_SAFE EN=1 HOT=0 BED=0 FAN=0

PRINT_DONE marks completion of the programmed motion sequence. It does not mean that a physical object was printed.

The connected KernelCAD model has 63 parts, including the moving bed, cantilever gantry, toolhead, filament path, display and auxiliary hardware. Its X, Y, Z and extruder joints follow the firmware’s counted motion commands.

Inspect the full 3D assembly
Interactive printer assembly. Orbit and zoom to inspect the moving bed, gantry, toolhead and other parts. Open the full assembly for editing in KernelCAD.
Parametric desktop printer assembly with moving bed, gantry, toolhead, display and filament guide.
The original parametric assembly connects commanded firmware motion to a constrained machine model.

We checked 14 joint poses and 36 animation samples. Those samples showed no mate failures or detected collisions. They do not establish structural stiffness, drive torque or print quality.

Fault handling is part of the demonstration

A successful motion sequence is only half of the test. We also exercise faults and verify that the firmware responds.

TestExpected firmware response
Hotend overtemperatureStop motion and return controlled outputs to a safe state
Invalid temperature inputEnter SENSOR_FAULT and shut outputs down
Emergency stop during motionDisable drivers and prevent subsequent STEP edges
Missing home switchEnter HOME_TIMEOUT rather than move indefinitely
Heater no-rise conditionStop heating when the reported temperature fails to rise

These tests verify controller logic under defined input conditions. They are not a substitute for physical thermal, electrical or product-safety testing.

A component-level controller PCB

The schematic and firmware are developed and tested in LabWired. As a separate hardware engineering reference, we also designed a six-layer, 140 × 105 mm controller PCB with 127 placed parts and 104 named nets.

The board is built around packaged components rather than plug-in development boards:

FunctionComponent
Main controllerSTM32F411CEU6
X/Y/Z/E stepper drivers4 × TMC2209-LA
Power conversionLM2596S-5.0 and AP2112K-3.3
Hotend temperature interfaceMAX31855KASA+T
MOSFET gate drivers2 × TC4427AEOA
Hotend, bed and fan outputs3 × IRLR2905Z

The layout includes input protection, decoupling, motor and sensor connections, SWD, UART and OLED interfaces. The power outputs include gate resistors and pulldowns, with flyback protection for the fan.

Six-layer component-level controller PCB layout for the 3D printer engineering reference.
The dedicated controller PCB is an engineering reference. Four signal connections remain unrouted; it is not yet released for fabrication.

Geometry checks report zero violations. Four signal connections remain to be routed. Electrical margins, thermal behavior, EMC and manufacturing readiness still need validation before a physical board can be released.

What the digital twin proves

The public project demonstrates compiled controller firmware, sensor-driven homing, four-axis motion and OLED behavior. It also tests heater and fan control logic and fault responses. The linked CAD makes the commanded machine movement visible and inspectable.

It does not simulate filament deposition, melt flow, belt elasticity, motor stalls or print quality. The PCB is a design reference, not a qualified production board.

That distinction matters. A digital twin is useful when it shows which behaviors have been tested and which have not. Here, you can inspect the schematic, run the firmware and observe the corresponding machine motion before building hardware.

Run the digital twin Explore the machine CAD

Independent engineering reference. “Bambu Lab” and “A1 mini” identify the commercial visual reference only. This project is not affiliated with or approved by Bambu Lab, and it does not use proprietary OEM firmware or CAD.

Andrii Shylenko
Andrii Shylenko

Founder, LabWired.