Custom Duet 3 / RepRapFirmware Control Stack

Large-scale construction automation platform using a custom Duet 3 / RepRapFirmware-based embedded control stack.

Overview

At COBOD International, I worked on a custom Duet 3 and RepRapFirmware-based control stack for a multi-mode automated machine used in large-scale construction automation.

The goal of the project was to build a flexible embedded machine-control architecture capable of switching between different operating modes and tool configurations while keeping a single Duet-based control platform. The system supported both conventional printhead operation and an alternative telescope/robot operating mode, requiring careful handling of motion limits, tool-mode switching, PLC interaction, operator workflows, and machine safety.

The embedded control system was built around Duet 3 MB6HC hardware, 1XD expansion boards connected over CAN-FD, and RepRapFirmware running on an ARM Cortex-M7 microcontroller. The project combined real-time embedded motion control with higher-level machine automation workflows, including PLC interaction, operator interface development, and integration with external robotics software.

A key part of the work was handling machines with multiple vertical motion sources, including a telescopic axis and the main gantry Z-axis. This required additional safety logic beyond standard single-axis soft limits, since the safe operating envelope depended on the combined state of redundant vertical axes.

Unlike a standard desktop-scale 3D printer configuration, this system required firmware-level customization, external software integration, and robust behavior on real industrial hardware. The work focused on making the machine predictable, safe, and usable for operators while preserving the flexibility needed for advanced automation workflows.

My Role

As a Robotics Engineer at COBOD International, I contributed to the development, customization, and integration of the embedded control system based on Duet 3 MB6HC, RepRapFirmware, and distributed expansion hardware over CAN-FD.

Main contributions:

  • Developed and configured a custom RepRapFirmware control setup for a multi-mode automated machine.
  • Worked with Duet 3 MB6HC hardware and 1XD expansion boards connected over CAN-FD for distributed motion-control and I/O expansion.
  • Contributed to custom RepRapFirmware source modifications, G-code behavior, macros, and machine configuration.
  • Implemented mode-dependent motion behavior, including custom axis mapping, limits, and speed handling.
  • Developed firmware-side logic for motion safety, machine-mode handling, and controlled recovery workflows.
  • Implemented safety checks for redundant vertical-axis configurations, including interactions between a telescopic axis and the main gantry Z-axis.
  • Created custom G-code commands and macros for switching between operating modes and tool configurations.
  • Developed explicit override and recovery functions for controlled motion recovery during commissioning and fault-handling scenarios.
  • Improved error handling and operator feedback for rejected or unsafe motion requests.
  • Integrated firmware behavior with Duet Web Control, custom operator-facing plugin work, and external software workflows.

Technical Focus

The project combined embedded firmware development, industrial machine integration, and robotics-oriented motion control.

Key technical areas included:

  • RepRapFirmware source customization
  • Duet 3 MB6HC hardware integration
  • 1XD expansion board integration over CAN-FD
  • ARM Cortex-M7 embedded control platform
  • G-code macros and machine configuration
  • Mode-dependent motion control
  • Custom tool and machine-mode switching
  • Redundant vertical-axis safety logic
  • Controlled override and recovery functions
  • PLC-assisted startup and position handling
  • Digital I/O and machine-state coordination
  • Operator interface development through Duet Web Control
  • Error reporting, recovery behavior, and commissioning support
  • Integration with external robotics and automation workflows

Engineering Challenges

A central challenge was managing one embedded controller across two different physical operating modes. Each mode had different motion semantics, constraints, limits, and operator expectations, while still needing to behave as one coherent machine.

This required careful design of the mode-switching logic, motion validation, error handling, and user feedback. In particular, some safety constraints depended on relationships between multiple axes rather than simple single-axis soft limits. The machine included redundant vertical motion capabilities, where the safe operating envelope depended on the combined position of the telescopic axis and the main gantry Z-axis. This required custom firmware-level handling to reject unsafe moves cleanly while keeping the machine state, displayed positions, and operator feedback consistent.

Another important challenge was designing override behavior for commissioning and recovery. The override path needed to be explicit, controlled, and limited to well-defined situations, so that operators and developers could recover from specific machine states without bypassing the normal safety model in an uncontrolled way.

The project also required coordination between RepRapFirmware, PLC logic, Duet Web Control, macros, and external software tools. The system needed to be reliable not only during ideal operation, but also during startup, commissioning, fault recovery, and operator-driven mode changes.

Impact

The project improved the reliability, usability, and flexibility of COBOD’s embedded machine-control platform.

Key improvements included:

  • More deterministic machine startup and initialization behavior.
  • Cleaner switching between machine modes and tool configurations.
  • Improved motion safety for redundant vertical-axis configurations.
  • Controlled override functionality for commissioning and recovery scenarios.
  • Clearer operator feedback during invalid or unsafe motion requests.
  • More reusable firmware configuration and macro structure.
  • Reduced commissioning complexity through better-defined behavior.
  • Improved integration between embedded control, PLC logic, operator interface, and external automation software.

The project gave me practical experience owning embedded machine-control behavior across firmware, hardware, operator interface, and robotics software. It was directly focused on the same kind of problems found in advanced industrial 3D printing systems: motion reliability, tool control, safety, usability, commissioning, and robust operation on real machines.

Source: COBOD International

Filippo Bosi
Authors
Full-Stack Robotics Engineer | ROS 2 & EtherCAT Expert