Nozzle Brush with Klipper Macros (Parametric) 3D Printer File Image 1
Nozzle Brush with Klipper Macros (Parametric) 3D Printer File Image 2
Nozzle Brush with Klipper Macros (Parametric) 3D Printer File Image 3
Nozzle Brush with Klipper Macros (Parametric) 3D Printer File Image 4
Nozzle Brush with Klipper Macros (Parametric) 3D Printer File Thumbnail 1
Nozzle Brush with Klipper Macros (Parametric) 3D Printer File Thumbnail 2
Nozzle Brush with Klipper Macros (Parametric) 3D Printer File Thumbnail 3
Nozzle Brush with Klipper Macros (Parametric) 3D Printer File Thumbnail 4

Nozzle Brush with Klipper Macros (Parametric)

Flying Gyroscope avatarFlying Gyroscope

October 20, 2024

printables-icon

Description

Use a Klipper macro to fully automate nozzle cleaning with this parametric mount for 2020 extrusion and a brass brush.  I have modeled for a specific brass brush (link at the bottom) but you can edit the f3d file to use any brush dimensions that you like.

Brass or Silicone?

A brass brush can withstand high temperatures, and has been effective when used with my Klipper macros and startup routine.  However, I now use a silicone nozzle wiper made with a silicone crafting mat.  It should withstand nozzle temperatures for common filaments while never wearing a brass nozzle or any coatings/treatments.  You can find it here: https://www.printables.com/model/895830-parametric-silicone-nozzle-cleaner-brush-wiper-wit.  

Supplies

You will need: 

  • (2) M3x5x4 heat set inserts for the mount base
  • (2) M5 nuts for 2020 extrusion
  • (2) M5x10 screws for the mount base
  • (2) M3x16 screws for the brush carrier

You will also need a rotary tool or saw to cut away the brass brush, and some suitable glue.  I used JB Weld.

Target Height

The brush mounts to the side of the bed extrusions.  My design centers around a target height, measured from the bottom of the 2020 bed extrusion to the tip of the brass bristles.  I am unsure how much this will vary from printer to printer, so I modeled many target heights.  I estimate that a stock aluminum bed and a Stealthburner toolhead should use a target height of 44 mm (or 24 mm above the 2020 bed extrusion).  

For the best results, pull out your calipers, measure your setup with the nozzle 1 mm above the print bed.  For cases where a specific target and brush height cause the carrier to collide with the base, increase the “pad_right” variable to gain more clearance.  This will move the brush carrier farther away from the bed extrusion.

Klipper Macro

Always be careful copying and pasting someone else's code into your config files!  Below is a template for the Klipper macro that I use.  I intentionally left the position variables with unusable values, which will cause Klipper to error out.  Why?  It is not possible for me to know safe values for your printer.  

You need to manually move the toolhead into position and note X, Y, and Z values that work with your combination of toolhead, brush mount, and other obstacles (like an endstop pin or klicky mount).  

[gcode_macro BRUSH_NOZZLE]
# heat nozzle for best results
variable_x1: 9999 # left of brush   <<<edit this value>>>
variable_x2: 9999 # right or brush  <<<edit this value>>>
variable_y1: 9999 # y value         <<<edit this value>>>
variable_z1: 9999 # nozzle height   <<<edit this value>>>
gcode:
    M400  ;wait for buffer to clear
    {% if "xyz" not in printer.toolhead.homed_axes %}
        G28         ;home axes before travel moves
    {% endif %}

    G90
    G0 Z5 F3600     ;ensure nozzle is above endstop pin
    G0 X{x1} Y{y1}  ;left position
    G0 Z{z1}        ;move down, ready for brushing
    
    M117 Brushing Nozzle
    G0 X{x2} F5000  ;move right
    G0 X{x1}        ;move left
    G0 X{x2}        ;move right
    G0 X{x1}        ;move left
    G0 X{x2}        ;move right
    G0 X{x1}        ;move left
    G0 X{x2}        ;move right
    G0 X{x1}        ;move left
    G0 Z5 F3600     ;raise nozzle when done
    M117 Nozzle Cleaned

After you have tested the macro, simply add it to your print start routine.  I brush before I use the calibrate_z plugin, and once again right before printing.  

Only use the brass brush - stainless is too abrasive for brass nozzles: https://www.homedepot.com/p/HDX-2-Piece-Utility-Brush-Set-80-724-111/204258914

Thanks for visiting, and enjoy!

Minor update: Reorganized downloads by collecting all step files together in a zip file.  Added subsections in the description.  

Minor update: Linked to silicone nozzle wiper.