Reviving the dockable_probe

Good news! After further inspection of the code I found the place to attach the probe before moving to the first probe point. And as you’re using the auto Z calibration module, please run the code in this special branch instead of the one of the PR. As seen elsewhere in this thread there’s a compatibility bug with the auto Z calibration module but no one has been able to test my fix. Let me know how it goes!

Thanks for your work. Good news It now picks up the probe when QGL is called it does a little double take on the probe apart from that it is the same as mentals but sorry there is always a but it now finishes the last probe point which is the front right corner and returns to the rear to detach probe but then returns to the front right corner which is not really what you want.
I then did a z-calibrate I have it set for 3 samples, it seems to essentially function but instead of doing 3 probes it does one probe returns to the dock approach position returns to the center of the bed does another probe returns to the dock appoach returns to the center of the bed for the last probe then detaches probe then returns to the center of the bed.
I am happy to test when I have time but it is not really in a usable state yet for me.

I have included the log
klippy (4).log (278.5 KB)

I finally got a nozzle Z endstop setup on one of my own printers to test the auto Z module compatibility. As you described, it had some odd movements. Here’s my solution which prevents the repeated attach/detaches during the switch body and build plate probing moves:

A while ago (Jul 22) I posted on this thread with some questions about dockable probes on Delta printers, not realizing that such a chimera does not exist. Since then I have done most of the hardware for such a probe and have got the attach and detach working smoothly. My probe is a slightly weird beast as it uses a piezo disk instead of a switch and also the dockable part is only mechanical. Some details on Thoughts on a piezo touch sensor
Only now am I able to start on the software so will almost certainly be back with more questions.
Mike

You wild so and so, well done! Great work. I hope it works with Klipper as desired.

Ask away, I’m happy to help where I can.

I have still not reached the software stage, but most of the hardware is now working and I have put a video on YouTube https://www.youtube.com/watch?v=DQXM4nrcsr4

So far it is sensitive and accurate but even looking at it cross-eyed will cause the Delta effector to try to assasinate the sled. The reed switches for detecting the sled on the park or on the effector are not at all reliable and need redesign.

So far, all of the movements are by the clunkiest macros imaginable, along with some editing out of the more dramatic and gory scenes.

Mike

The first significant problem is that I am unable to do a simple probe at a reference position to get the Z height - Klipper reports:-

Cannot probe, probe is not attached and auto-attach is disabled

To know the background, you will need to know some details of the printer and its probing hardware.
There are two distinct probes feeding into a single probe pin (PL5) on a RAMPS board, the selection of which sensor and conditioning board is active is done by asserting either SELECT_TOUCH_Z (pin PK2) for a touch probe mounted on the sled or SELECT_BED_Z (pin PG1) for an under-bed sensor mounted at the reference position of X40, Y-75

Part of the need for this arrangement is that printing may be done on surfaces as diverse as 0.15mm polyester held down by a vacuum bed, 4mm plain glass held by clips, or even 10mm aerogel - which becomes part of the manufactured object.

Calibrating the bed mesh with a sled attached works well as does the detection of the sled being attached or docked, but when a call is made to probe_no_sled to use the underbed sensor and not the sled then this fails.

The relevant part of the printer.cfg is:-

[dockable_probe]
pin: ^!PL5
z_offset: 8.384
sample_retract_dist: 5
dock_position: 99, -62, 0
approach_position: 99, -45, 20
detach_position: 99, -45, 0
probe_sense_pin: ^PK4
dock_sense_pin: ^!PK3

[gcode_macro MOVE_TO_INSERT_PROBE]
rename_existing: MOVE_TO_INSERT_PROBE.1
gcode:
    G1 X99 Y-62 Z20

[output_pin select_bed_z]
pin: PG1
value:0

[output_pin select_touch_z]
pin: PK2
value:1

[bed_mesh]
speed: 120
horizontal_move_z: 12
mesh_radius: 90
mesh_origin: 0, 0
round_probe_count: 5

[gcode_macro probe_no_sled]
gcode:
	set_pin pin=select_bed_z value=1
	set_pin pin=select_touch_z value=0
	SET_DOCKABLE_PROBE AUTO_ATTACH_DETACH=0
	detach_probe
	g1 x40 y-75 z6
	probe
	SET_DOCKABLE_PROBE AUTO_ATTACH_DETACH=1

Other problems so far are probably quite minor but I am finding difficulty getting past this one.

Mike

I have got the dual probing working very satisfactorily by using a hardware cludge: I have wired the sense switches for probe_sense_pin and dock_sense_pin to another pin (PK1) instead of GND on the RAMPS. If this is set high then dockable_probe sees the probe as being attached when it is docked - and nozzle contact probing can be used to set the Z datum.

[output_pin invert_sense_z]
pin: PK1
value:0
[gcode_macro probe_no_sled]
gcode:
	set_pin pin=select_touch_z value=0
    set_pin pin=select_bed_z value=1   
	SET_DOCKABLE_PROBE AUTO_ATTACH_DETACH=0
	detach_probe
    M400
	g1 x40 y-75 z0
    set_pin pin=invert_sense_z value=1
	probe
	SET_DOCKABLE_PROBE AUTO_ATTACH_DETACH=1
    set_pin pin=invert_sense_z value=0

While there is some work to be done yet, so far it seems robust.

Mike

1 Like

I got around to trying your code again, after a QGL it would dock then return to the last probed position, I had some help from chatgpt and modified your code to have a option in the config to return to last position or not also add some config for attach and detach speed
If you are interested the modified code is here.
dockable probe

Thanks for trying it and reporting back. Glad it’s working with a couple tweaks!

I considered removing the return-to-previous-position but without it, IIRC, bed meshing and ‘PROBE’ (among others) fail as they continue the action at the extraction coordinates (ie beside the dock). Did you run into this?

I actually haven’t tried a bed mesh I usually save a bed mesh and not do another unless I have to move the bed for some reason, I made it a option in the dockable_probe.cfg be true or false

return_to_last_probe_position_after_detach: False

I will do a bedmesh tomorrow just to test that and report back.

I will continue to use your code going forward and hope it gets merged.

yes it is affecting bed_mesh_calibrate after doing QGL it fails just after the last QGL probe point with bed_mesh_calibrate error of

horizontal_move_z can,t be less then the probes z_offset

not sure how to resolve that atm apart from changing back to your original code

The horizontal_move_z settings needs to be larger than your z_offset. Dif you try this?

no I haven’t I might have made a err - I did change the probe_offset (not sure what I was thinking when I did that ) when I was testing just the QGL to get rid of unnecessay z movements, got to wait until I finish a print to retest.

Please ignore my previous comments I must have had a seniors moment and changed the probe_offset for no good reason and I should know better.

I tested this morning with the correct probe_offset and the code works as intended.

I kicked off a bed_mesh_calibrate which includes QGL first , the last probe point for the QGL is front right corner the probe moved from that to the front left corner to start the first bed mesh point exactly as expected.

The code as it stands works as intended for quad gantry level and calibrate_z and bed mesh.

Wondering if anyone can help me understand how to do this move with the dockable_probe module. I cannot seem to get it working.

I have the following right now and it kinda works. But I would like to make the attach more gentle. At present the probe attach is a bit violent as it jumps out of the dock to the approaching head.

approach_position: 210, 0, 8.3
dock_position: 224, 0, 8.3
detach_position: 224, 0, 15
check_open_attach: True

I would much rather the attach went:

G1 {approach_position}
G1 X210 Y0 Z15
G1 X224 Y0 Z15
G1 {dock_position}
G1 {approach_position}

And the detach went the normal:
G1 {approach_position}
G1 {dock_position}
G1 {detach_position}

I am just not clear on how to override the moves properly.

Thanks in advance for any help.

Start at the top of this thread and have a read of the docs if you have not already.

1 Like

Got it working with this:

[dockable_probe]
pin: PD2
x_offset: 29.2
y_offset: 2.7
z_offset: 3.645
z_hop: 8.3
#samples: 3
sample_retract_dist: 3
#samples_tolerance_retries: 3
#samples_tolerance: 0.04
#samples_result: median
approach_position: 224, 0, 15
dock_position: 224, 0, 8.3
detach_position: 224, 0, 15
check_open_attach: True
#lift_speed: 20
attach_speed: 100
detach_speed: 100
travel_speed: 200

[gcode_macro MOVE_TO_EXTRACT_PROBE]
rename_existing: BASE_MOVE_TO_EXTRACT_PROBE
gcode:
  G1 X210 Y0 Z8.3

[gcode_macro MOVE_TO_INSERT_PROBE]
rename_existing: BASE_MOVE_TO_INSERT_PROBE
gcode:
  G1 X210 Y0 Z8.3 F12000

The dockable_probe.md should be updated to clarify the gcode. It says:

[gcode_macro MOVE_TO_EXTRACT_PROBE]
gcode:
  G1 X10 Y130

[gcode_macro MOVE_TO_INSERT_PROBE]
gcode:
  G1 X10 Y130

That does not work.

Please format it as preformatted text, else spaces get lost and it may not work.

Format

1 Like

Can you configure the dockable_probe as an end stop pin like you can for the regular probe module? Using the probe module I can define the probe as a virtual end stop:

[stepper_z]

endstop_pin: probe:z_virtual_endstop

If I switch to the dockable_probe module, I can’t figure out how to use the probe as an endstop. I’ve tried “probe:z_virtual_endstop”, and I get an error for "Unknown pin chip name ‘probe’. I also tried “dockable_probe:z_virtual_endstop” and I get the same error for unknown chip name ‘dockable_probe’