Duet: Centering the Bed or Setting the Bed Origin

Difficulty Level: Advanced

Reading Time: Minutes

Introduction

With most printer geometries, you can choose where on the bed the origin (the X=0 Y=0 point) will be. There are two common choices:

  • X=0 Y=0 is at the centre of the printable area:
    • Simplifies slicer configuration as prints are always centered on X0 Y0, regardless of bed size.
    • Sliced files can be reused across multiple printers.
    • IDEX printers can maintain consistent centering for ditto and normal modes, as well as simplify mirror mode printing setups.
  • X=0 Y=0 is one corner of the printable area, typically the front-left corner:
    • Preferred by some users of Cartesian and CoreXY printers.
    • Requires slicer configuration to define the bed center for print centering.

Setting the Origin on a Cartesian or CoreXY/CoreXZ/CoreXYU Printer

The position limits of each axis are defined using the M208 command:

  • M208 S0: Defines the lower position limits.
  • M208 S1: Defines the upper position limits.

When an axis is homed:

  • To a low-end (minimum) homing switch, the axis is assumed to be at the lower position limit.
  • To a high-end (maximum) homing switch, the axis is assumed to be at the upper position limit.

Changing the position limits in the M208 command will adjust the origin accordingly.

Example Configuration

Scenario 1: X0 Y0 as the Center of the Bed

A Cartesian printer with the following setup:

  • Low-end X homing switch: Triggers when the nozzle is 8mm from the low-X edge of the bed.
  • High-end Y homing switch: Triggers when the nozzle is 2mm from the high-Y edge of the bed.
  • Bed size: 200mm x 200mm.

To set X0 Y0 as the center:

M208 S0 X-108 Y-100  ; set axis lower limits
M208 S1 X100 Y102    ; set axis upper limits

For firmware 2.02 or later:

M208 X-108:100 Y-100:102  ; set axis limits

Scenario 2: X0 Y0 as the Corner of the Bed

To set X0 Y0 as the front-left corner:

M208 S0 X-8 Y0     ; set axis lower limits
M208 S1 X200 Y202  ; set axis upper limits

For firmware 2.02 or later:

M208 X-8:200 Y0:202     ; set axis limits

Notes

  • Include Z parameters in the M208 commands as needed.
  • The M208 limits determine the position after the G1 S1 homing switch command triggers. If a G92 command is used after the G1 S1 command (common for Z-min homing), it will override the position.