Wiring and Configuration
Buffer Internal Wiring Diagram

Installation Video
Buffer Connection to Mainboard and Configuration Method
- The
MMU Toolboardshown in the wiring examples below is for reference only regarding interface definitions. When actually used, you need to:
- Connect the cables directly to the endstop signal ports of your KLIPPER mainboard.
- In the configuration file (e.g.,
printer.cfg), modify and confirm the port number configuration corresponding toPD3,PD4, andPD5to ensure proper functionality.
- Basic Functions
- Using Trigger Buffer for Feeding or Retraction
- Wiring and Configuration Method Using MDM Sensor
-
This buffer integrates filament runout detection and manual control functions:
-
Filament Detection (FILAMENT_SENSOR)
- Signal Output: After filament runout is detected, the
PB15pin of the buffer outputs a low-level signal.
- Signal Output: After filament runout is detected, the
-
Feed Button (FEED)
- Click: The
PA2pin of the buffer outputs a high-level pulse signal for 3 seconds. - Long Press: The buffer will perform continuous feeding until the button is released.
- Click: The
-
Retract Button (RETRACT)
- Click: The
PA3pin of the buffer outputs a low-level pulse signal for 3 seconds. - Long Press: The buffer will perform continuous retraction until the button is released.
- Click: The
Wiring Guide
-
When using the above functions, please refer to the wiring diagram below:

- The
MMU Toolboardin the diagram is for reference only regarding interface definitions. When actually used, you need to:
- Connect the cables directly to the endstop signal ports of your KLIPPER mainboard.
- In the configuration file (e.g.,
printer.cfg), modify and confirm the port number configuration corresponding toPD3,PD4, andPD5to ensure proper functionality.
Configuration Reference
- Reference Configuration Using MMU Toolboard
- Reference Configuration Using Mainboard
[mcu LLL_PLUS]
serial:/dev/serial/by-id/usb-Klipper_stm32h723xx_12345-if00
[filament_switch_sensor Material_breakage_detection]
pause_on_runout: true
switch_pin: ^LLL_PLUS:PD3 # Replace with your actual pin
runout_gcode:
PAUSE
RESPOND MSG="material shortage"
insert_gcode:
RESPOND MSG="Detected"
event_delay: 1.0
pause_delay: 0.5
[gcode_button Load_consumables]
pin:^LLL_PLUS:PD4 # Replace with your actual pin, connected to feed button
press_gcode:
_Load_consumables
[gcode_button RETRACT]
pin:^!LLL_PLUS:PD5 # Replace with your actual pin, connected to retract button
press_gcode:
_RETRACT
[gcode_macro CONFIG]
description: Extruder configuration
variable_extruder_temp: 200 ## Temperature
variable_extruder_length: 50 ## Length
variable_extruder_speed: 5 ## Speed (mm/s)
variable_extruder_time: 10 ## Time (s)
gcode:
[gcode_macro _Load_consumables] ## Feeding
gcode:
{% set temp = printer["gcode_macro CONFIG"].extruder_temp %}
{% set length = printer["gcode_macro CONFIG"].extruder_length %}
{% set speed = printer["gcode_macro CONFIG"].extruder_speed %}
{% set time = printer["gcode_macro CONFIG"].extruder_time %}
{% set feedrate = speed * 60 %}
RESPOND MSG="Heat the extruder to {temp} °C"
RESPOND MSG="Heating extruder to {temp} °C"
M109 S{temp}
G4 P{time *1000}
RESPOND MSG="Start feeding {length}mm"
RESPOND MSG="Starting to feed {length}mm"
G91 ; Relative coordinate mode
G1 E{length} F{feedrate}
G90 ; Absolute coordinate mode
RESPOND MSG="Extrusion completed"
RESPOND MSG="Extrusion completed"
M104 S0
[gcode_macro _RETRACT] ## Retraction
gcode:
{% set temp = printer["gcode_macro CONFIG"].extruder_temp %}
{% set length = printer["gcode_macro CONFIG"].extruder_length %}
{% set speed = printer["gcode_macro CONFIG"].extruder_speed %}
{% set time = printer["gcode_macro CONFIG"].extruder_time %}
{% set feedrate = speed * 60 %}
RESPOND MSG="Heat the extruder to {temp} °C"
RESPOND MSG="Heating extruder to {temp} °C"
M109 S{temp}
G4 P{time *1000}
RESPOND MSG="Start material return {length}mm"
RESPOND MSG="Starting material return {length}mm"
G91 ; Relative coordinate mode
G1 E-{length} F{feedrate}
G90 ; Absolute coordinate mode
RESPOND MSG="Return of materials completed"
RESPOND MSG="Material return completed"
M104 S0
[filament_switch_sensor Material_breakage_detection]
pause_on_runout: true
switch_pin: ^PD3 # Replace with your actual pin
runout_gcode:
PAUSE
RESPOND MSG="material shortage"
insert_gcode:
RESPOND MSG="Detected"
event_delay: 1.0
pause_delay: 0.5
[gcode_button Load_consumables]
pin:^PD4 # Replace with your actual pin, connected to feed button
press_gcode:
_Load_consumables
[gcode_button RETRACT]
pin:^!PD5 # Replace with your actual pin, connected to retract button
press_gcode:
_RETRACT
[gcode_macro CONFIG]
description: Extruder configuration
variable_extruder_temp: 200 ## Temperature
variable_extruder_length: 50 ## Length
variable_extruder_speed: 5 ## Speed (mm/s)
variable_extruder_time: 10 ## Time (s)
gcode:
[gcode_macro _Load_consumables] ## Feeding
gcode:
{% set temp = printer["gcode_macro CONFIG"].extruder_temp %}
{% set length = printer["gcode_macro CONFIG"].extruder_length %}
{% set speed = printer["gcode_macro CONFIG"].extruder_speed %}
{% set time = printer["gcode_macro CONFIG"].extruder_time %}
{% set feedrate = speed * 60 %}
RESPOND MSG="Heat the extruder to {temp} °C"
RESPOND MSG="Heating extruder to {temp} °C"
M109 S{temp}
G4 P{time *1000}
RESPOND MSG="Start feeding {length}mm"
RESPOND MSG="Starting to feed {length}mm"
G91 ; Relative coordinate mode
G1 E{length} F{feedrate}
G90 ; Absolute coordinate mode
RESPOND MSG="Extrusion completed"
RESPOND MSG="Extrusion completed"
M104 S0
[gcode_macro _RETRACT] ## Retraction
gcode:
{% set temp = printer["gcode_macro CONFIG"].extruder_temp %}
{% set length = printer["gcode_macro CONFIG"].extruder_length %}
{% set speed = printer["gcode_macro CONFIG"].extruder_speed %}
{% set time = printer["gcode_macro CONFIG"].extruder_time %}
{% set feedrate = speed * 60 %}
RESPOND MSG="Heat the extruder to {temp} °C"
RESPOND MSG="Heating extruder to {temp} °C"
M109 S{temp}
G4 P{time *1000}
RESPOND MSG="Start material return {length}mm"
RESPOND MSG="Starting material return {length}mm"
G91 ; Relative coordinate mode
G1 E-{length} F{feedrate}
G90 ; Absolute coordinate mode
RESPOND MSG="Return of materials completed"
RESPOND MSG="Material return completed"
M104 S0
-
Firmware needs to be updated to
V1.1.0 -
The buffer can automatically perform continuous feeding by detecting the level status of the following pins:
-
Automatic Feeding: When the
PB5pin detects a low-level signal, the buffer will perform continuous feeding. -
Automatic Retraction: When the
PB6pin detects a low-level signal, the buffer will perform continuous retraction.
Wiring Guide
- When using the above functions, please refer to the wiring diagram below:

- The
MMU Toolboardin the diagram is for reference only regarding interface definitions. When actually used, you need to:
- Connect the cables directly to the endstop signal ports of your KLIPPER mainboard.
- In the configuration file (e.g.,
printer.cfg), modify and confirm the port number configuration corresponding toPB5andPB6to ensure proper functionality.
Configuration Reference
- Add Configuration
- Please note that this configuration must be added after enabling the basic functions.
- Reference Configuration Using MMU Toolboard
- Reference Configuration Using Mainboard
[output_pin _feeding]
pin:LLL_PLUS:PD6 # Replace with your actual pin
shutdown_value: 0
value:1
[output_pin _material_return]
pin:LLL_PLUS:PD7 # Replace with your actual pin
shutdown_value: 0
value:1
[gcode_macro Buffer_feeding] ## Buffer Feeding
gcode:
{% set temp = printer["gcode_macro CONFIG"].extruder_temp %}
{% set length = printer["gcode_macro CONFIG"].extruder_length %}
{% set speed = printer["gcode_macro CONFIG"].extruder_speed %}
{% set time = printer["gcode_macro CONFIG"].extruder_time %}
{% set feedrate = speed * 60 %}
RESPOND MSG="Heat the extruder to {temp} °C"
RESPOND MSG="Heating extruder to {temp} °C"
M109 S{temp}
RESPOND MSG="Start feeding {length}mm"
RESPOND MSG="Starting to feed {length}mm"
SET_PIN PIN=_feeding VALUE=0
G91 ; Relative coordinate mode
G1 E{length} F{feedrate}
G90 ; Absolute coordinate mode
G4 P{time *1000}
RESPOND MSG="Extrusion completed"
RESPOND MSG="Extrusion completed"
SET_PIN PIN=_feeding VALUE=1
M104 S0
[gcode_macro RBuffer_material_return] ## Buffer Retraction
gcode:
{% set temp = printer["gcode_macro CONFIG"].extruder_temp %}
{% set length = printer["gcode_macro CONFIG"].extruder_length %}
{% set speed = printer["gcode_macro CONFIG"].extruder_speed %}
{% set time = printer["gcode_macro CONFIG"].extruder_time %}
{% set feedrate = speed * 60 %}
RESPOND MSG="Heat the extruder to {temp} °C"
RESPOND MSG="Heating extruder to {temp} °C"
M109 S{temp}
RESPOND MSG="Start material return {length}mm"
RESPOND MSG="Starting material return {length}mm"
SET_PIN PIN=_material_return VALUE=0
G91 ; Relative coordinate mode
G1 E-{length} F{feedrate}
G90 ; Absolute coordinate mode
G4 P{time *1000}
RESPOND MSG="Return of materials completed"
RESPOND MSG="Material return completed"
SET_PIN PIN=_material_return VALUE=1
M104 S0
[output_pin _feeding]
pin:PD6 # Replace with your actual pin
shutdown_value: 0
value:1
[output_pin _material_return]
pin:PD7 # Replace with your actual pin
shutdown_value: 0
value:1
[gcode_macro Buffer_feeding] ## Buffer Feeding
gcode:
{% set temp = printer["gcode_macro CONFIG"].extruder_temp %}
{% set length = printer["gcode_macro CONFIG"].extruder_length %}
{% set speed = printer["gcode_macro CONFIG"].extruder_speed %}
{% set time = printer["gcode_macro CONFIG"].extruder_time %}
{% set feedrate = speed * 60 %}
RESPOND MSG="Heat the extruder to {temp} °C"
RESPOND MSG="Heating extruder to {temp} °C"
M109 S{temp}
RESPOND MSG="Start feeding {length}mm"
RESPOND MSG="Starting to feed {length}mm"
SET_PIN PIN=_feeding VALUE=0
G91 ; Relative coordinate mode
G1 E{length} F{feedrate}
G90 ; Absolute coordinate mode
G4 P{time *1000}
RESPOND MSG="Extrusion completed"
RESPOND MSG="Extrusion completed"
SET_PIN PIN=_feeding VALUE=1
M104 S0
[gcode_macro RBuffer_material_return] ## Buffer Retraction
gcode:
{% set temp = printer["gcode_macro CONFIG"].extruder_temp %}
{% set length = printer["gcode_macro CONFIG"].extruder_length %}
{% set speed = printer["gcode_macro CONFIG"].extruder_speed %}
{% set time = printer["gcode_macro CONFIG"].extruder_time %}
{% set feedrate = speed * 60 %}
RESPOND MSG="Heat the extruder to {temp} °C"
RESPOND MSG="Heating extruder to {temp} °C"
M109 S{temp}
RESPOND MSG="Start material return {length}mm"
RESPOND MSG="Starting material return {length}mm"
SET_PIN PIN=_material_return VALUE=0
G91 ; Relative coordinate mode
G1 E-{length} F{feedrate}
G90 ; Absolute coordinate mode
G4 P{time *1000}
RESPOND MSG="Return of materials completed"
RESPOND MSG="Material return completed"
SET_PIN PIN=_material_return VALUE=1
M104 S0
Functional Overview
- When used with the
FLY-MDMfilament runout/blockage sensor, the buffer can achieve blockage detection functionality. - Firmware needs to be updated to
V1.1.0.
Hardware Wiring
- The signal line of the buffer should be connected to any unused general-purpose digital output pin on the mainboard, for example:
- Connect the
STEPof the buffer'sPA5to one of the mainboard'sPWM,RGB, or12864pins. Note that the servo port of the BL-Touch can also be used. - Connect the
DIRof the buffer'sPB11to the endstop port of the mainboard.
-
This connection is used to monitor the working status of the extruder motor and is key to achieving blockage detection.
-
When using the above functionality, please refer to the wiring diagram below:

- The
MMU Toolboardin the diagram is for reference only regarding interface definitions. When actually used, you need to:
- Connect the cables directly to the endstop signal ports of your KLIPPER mainboard.
- In the configuration file (e.g.,
printer.cfg), modify and confirm the port number configuration corresponding toPD3andPC0to ensure proper functionality.
- MDM Reference Wiring

Configuration Reference
- Add Configuration
- Please note that this configuration must be added after enabling the basic functions.
- Please ensure that the
STEPandDIRin the configuration below are modified to match the pins you have wired. - Also, other configurations must match your extruder settings; otherwise, blockage detection may fail.
- Reference Configuration Using MMU Toolboard
- Reference Configuration Using Mainboard
[extruder_stepper my_extra_stepper]
extruder = extruder
step_pin: LLL_PLUS:PE10
dir_pin: LLL_PLUS:PD4
rotation_distance: 17.472
gear_ratio:50:10
microsteps:16
full_steps_per_rotation: 200
[extruder_stepper my_extra_stepper]
extruder = extruder
step_pin: PE10
dir_pin: PD4
rotation_distance: 17.472
gear_ratio:50:10
microsteps:16
full_steps_per_rotation: 200
Buffer Parameter Configuration
Obtain via Serial Tool Assistant- Connect the module to the computer using a USB cable, open the serial tool assistant, select the corresponding COM port and set the baud rate to 115200, then click Connect.

- If your extruder configuration does not contain
gear_ratio, set bothdriving gear teethanddriven gear teethto1.
Parameter Description
| Function | Configuration Command (Please enter in the serial tool) | Default | Unit | Notes |
|---|---|---|---|---|
| View all current parameters | Loading... | - | - | Send the command to read all current configurations. |
| Set motor pulse count | Loading... | 916 | - | Sets the number of pulses required for the motor to move one millimeter. |
| Set encoder detection distance | Loading... | 1.73 | mm | Sets the filament movement distance represented by each encoder signal. |
| Set running timeout duration | Loading... | 60000 | ms | Sets the auto-stop time in an untriggered state to prevent continuous extrusion. |
| Set error scaling factor | Loading... | 2.0 | - | Allowed error = encoder value × scale value.Example: 1.73 * 2.0 = 3.46 mm |
Operation Notes:
- Command Format: In the "Configuration Command" column above, the entire line of command (e.g.,
steps 916) must be entered completely. - Sending Method: Enter the command into the sending area of the serial assistant, then click Send.
- Auto Save: After successfully sending the command, the parameters will take effect immediately and be automatically saved, no additional save operation is required.
- Confirm Configuration: After modifying any parameter, send the
infocommand to query all current parameters and verify if the configuration is correct.