Skip to content

Instantly share code, notes, and snippets.

@conlank
Last active November 27, 2023 20:09
Show Gist options
  • Star 7 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save conlank/7904ba9529a27b03d707d3a6417877df to your computer and use it in GitHub Desktop.
Save conlank/7904ba9529a27b03d707d3a6417877df to your computer and use it in GitHub Desktop.
Klicky Writeup

Major credit for this document goes to LoganFraiser. I simply built off his documentation and sources in an attempt to help make it a little more user friendly.

If you are have suggestions, problems, comments leave them below or get in touch with me (Toynbee) on discord.

So you want to set up AutoZ with your new Klicky Probe?

Klicky

First things first:

Does your Klicky work? And I don't just mean that the probe correctly detects Open or Closed when you push the switch with your finger (although it better do that as well). Does it dock and undock automatically? Did you install the Klicky macros and customize the variables? Have you tried your Print_Start macro to make sure that it works, and works MORE THAN ONCE?

If the answer to any of these questions was "No", Do not pass Go, Do not collect $200. You are going to have to set up Klicky.

I am of the belief that you should run Klicky without AutoZ for at least a week, or 10-20 prints until you are 100% sure that Klicky and it's macros are working. Make sure it works as it is intended to work and then start to add some complexity (nozzle scrubbing, AutoZ, etc...) to your printer. Another thing to remember about Klicky and other microswitch based probes is that they are extremely accurate. If you're getting weird bed mesh results, these is typically an issue with the motion system. Check your belt tensions, grub screws, looped belt tensions, EVERYTHING. I know you built it right the first time but double check and built it right again. This makes troubleshooting things much easier, as then there are less variables to track down.

Please follow all of the documentation at Klicky Mod Page. Major Props to Jlas1 for creating the Klicky documentation and all of the others who have contributed to the effort.

Ooze Reduction

To have AutoZ work, it's critical that your nozzle doesn't have little bits of plastic on it. These tiny bits of plastic would change the detected height of the nozzle, and the corresponding offsets. There are a few methods of doing this:

  1. The Decontaminator Purge Bucket and Nozzle Scrubber
  2. SexBolt EndStop Spring Mod

The nozzle scrub mod needs some printed parts, a brass (or silicone) brush and some macros. The important part is to have the macros working so that the nozzle is scrubbed while hot to remove any ooze of plastic. This should then RAPIDLY move the nozzle over to the Z endstop to check the height. You might also need to fix the macro provided with the nozzle scrubber as documented here. I will update this if this is no longer required

The Sexbolt Spring mod is a little more difficult to find, this is a message in #Voron_User_Mods from Infinite Entropy which specifies what spring they have used to do this mod. Essentially you use a spring to add an amount of resistance to the Sexbolt endstop, which allows for a hot nozzle to displace any plastic ooze without scrubbing. This might be the preferred method of ooze reduction for those using coated/plated nozzles like the NozzleX for example. If you have more questions on this, please bug toynbeeTILES#0214 to do a better write up.

Klipper Z Calibration

There are a few rules that must be followed while using this klipper plug in.

  1. You must enable and correctly set relative_reference_index under [bed mesh] section in printer.cfg. This is calculated by [[X sample points * Y sample points] - 1]/2. So for 5x5 grid, use 12, or for 7x7 grid, use 24. relative_reference_index = 12
  2. You must not have a LOAD_GCODE_STATE or G28 or G28 Z in your print_start macro after calibrate_z or it will overwrite the z_offset (the very thing you are trying to automatically determine!)
  3. You must NOT have clear_bed_mesh in your print_end script UNLESS your print_start is either loading or measuring a new bed mesh at each print_start

The real software magic comes from protoloft and his klipper plugin. You should go and follow his documentation to the letter.

You also need to have your position_endstop in your printer.cfg configured correctly.

  1. Set your position_endstop in your [stepper_z] section to 0. Be sure to click "Save & Restart"
  • This step is a little different from some other guides, however the goal of doing this is to help simplify the math used to set the offsets. Don't compare your config values to your friends!
  1. Home XYZ and then move your nozzle to bed center, and jog until you touch a piece of paper.
  2. Take your current Z value and edit position_endstop to match, but negate the value. Eg Z= 0.34 = position_endstop: -0.34 >>> Save & Restart

Make sure the calibrate_z macro is clicking the switch BODY on the endstop, NOT THE BUTTON ITSELF

If it's not, then jog the Klicky switch until the body is over the Z Endstop (should be approximately X-8, Y-20 from nozzle_xy_position. After editing be sure to click Save & Restart.

Determine the switch_offset in klicky-z-calibration.cfg

Do this with a clean nozzle!

  1. Set your switch_offset to a small value like 0.3. After editing be sure to click Save & Restart.
  2. Run the calibrate_z macro and note the z_offset value that is determined.
  3. Move the nozzle to the center of the bed and move it downward until you can touch a piece of paper.
  4. Take the current z value and ADD the negative to your switch_offset value. After editing be sure to click Save & Restart.

For example, your nozzle is touching the paper at Z= -0.21 and your switch_offset is 0.3. You will take 0.3 + -(-0.21) = 0.51 This is your new value for switch_offset.

  1. Run calibrate_z again and your z_offset value should be very close to zero.

Adjusting switch_offset after initial determination:

After your calibrate_z record your z_offset(initial), adjust your z_offset until you have a good first layer, record your z_offset(final).

Your new switch offset is old_switch_offset + [z_offset(initial) - z_offset(final)]. Make sure to save and restart and test calibrate_z to verify this setting works!

Recommended Print Start

REQUIRES EDITING

Recommended Print_Start macro:

[gcode_macro PRINT_START]
#   Use PRINT_START for the slicer starting script
gcode:
  G90 #set absolute positioning
  M107 #turn off parts fan
  G28 #home all axis
  
  #
  # This is where you might parse extruder/bed temperature passed from the slicer, start bed fans, preheat everything, make your NEOPIXELS go crazy (Timmit)
  #
  
  Attach_Probe_Lock #prevent probe docking until unlocked, from klicky 
  #Z_TILT_ADJUST #Trident *or* 
  #QUAD_GANTRY_LEVEL #V2.4
  
  CLEAN_NOZZLE #requires brush/purge bucket, from decontaminator
  G28 Z #rehome Z axis 
  CALIBRATE_Z #automatic Z offset, from klipper z calibration  
  
  #BED_MESH_PROFILE LOAD=default #load saved mesh *or*
  #BED_MESH_CALIBRATE #generate new mesh
  
  Dock_Probe_Unlock #removes probe lock
@Jax1er
Copy link

Jax1er commented Nov 3, 2023

my position end stop is -4.255 at .1mm paper because my end stop is above the bed. Do I set the position_endstop to 4.255 to negate the negative or just leave it -4.255?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment