Relative probing trigger value with precision piezo
-
I have been using the precision piezo on Duet Wifi in analog mode previously. I managed to have really good result with it. After switching to Duet 3, sometimes the probe reading slowly drifts to a larger value causing the probe to be triggered without touching the bed. I was wondering is there a way to instead of setting a trigger value with G31 Pxxx, use a relative threshold, for example, when the reading increased by 100 compared to the start of the probing, trigger the probe?
-
@Ray11 That could be interesting.
The analog inputs on the Duet3 seem to be very sensitive to noise. In my case, as the carriage gets to the back half of the print bed the untriggered level starts increasing until it's almost 30 points higher at the back than the front. In fact, I also saw 10 point movement depending on how close I was standing to the printer! It turned out that the long cable I used to connect the printer to my emergency stop button was picking up interference from somewhere and transferring it to the board. It uses shielded cable but I had forgotten to attach the drain wire to a suitable ground. Once I did that, the untriggered value stayed constant.
See if you can change the probe cable routing. Even if it doesn't fix the issue, any change in the reported value might give you some idea of what's going on. Also try moving the probe to one of the other analog-capable IO connectors (3-7). Also try turning off anything not needed like 12/24v power supply and even nearby lights or appliances and see if that makes a difference.
-
@gtj0
Thank you so much for your answer!
Is this the ground drain port on Duet 3?
-
Yep, there's a small spade terminal there.
-
@Ray11 I'm using "relative" trigger value
do this before using the probe:
G31 P{sensors.probes[0].value[0] + 8}
it sets the trigger point to "whatever is now" + 8
-
@arhi said in Relative probing trigger value with precision piezo:
@Ray11 I'm using "relative" trigger value
do this before using the probe:
G31 P{sensors.probes[0].value[0] + 8}
it sets the trigger point to "whatever is now" + 8
That's a good idea. I keep forgetting about conditional gcode because I use the DSF not standalone.
Still be good to figure out what's causing the variation. Could also be physical stress from hotend wiring or bowden tube, etc.
-
I am on duet2 and I still was not able to make orion work reliably without this "relative" value
I used the old boards with drilled disks for years on number of printers and never had the problem. No schematic available for orion, I noticed they changed the opamp and removed the VR1 but looks a lot less stable than old one. Not sure why schematic is not available, if PRC guy's want to clone it's 5min tops for them to reverse it (just photoshop the traces and measure the resistors and caps on the board).
-
@arhi
This is a great idea! I was trying with this however it seemed like when I changed it in config.g, the firmware treated it as already triggered. Should I put this line somewhere else?Here is what I wrote in config.g
M558 P1 I0 C"io3.in" H3 F2000 T6000 ; set Z probe type to switch and the dive height + speeds G31 P{sensors.probes[0].value[0] + 15} G31 X0 Y0 Z0
-
@Ray11 you can see my whole config here: https://github.com/Duet3D/RRF-machine-config-files/tree/master/Creality_Ender_5/arhi-eth-centreZero-xrail-flex3drive/sys
so in config I do
M558 P1 C"zprobe.in" R2 H5 F1200 T3000 A3 S0.03 K0 G31 X0 Y0 Z0 P780
as config is not probing so I put some "low" value for P there (my probe never go below 780 so I use that but you can use P10)
then for homez:
G90 G0 X0Y0 F3000 ; go to center of the bed, complain if X or Y not homed G91 ; relative positioning G0 Z5 F900 H2 ; drop bed for 5mm G90 ; absolute positioning G4S3 ; wait 3sec G31 P{sensors.probes[0].value[0] + 8} G30 ; Probe the bed at the current XY position. ; When the probe is triggered, set the Z coordinate ; to the probe trigger height.
So I set the trigger value dynamically just before I'm calling G30.
For mesh leveling bed.g is called when you call M32 so
https://github.com/Duet3D/RRF-machine-config-files/blob/master/Creality_Ender_5/arhi-eth-centreZero-xrail-flex3drive/sys/bed.gG29 S2 ; delete compensations M561 ; clear any bed transform G31 P{sensors.probes[0].value[0] + 4} G29 S0
Now, this is actually not ideal, it works for me most of the time but since I don't do mesh probing on every print but only from time to time it's acceptable.
What I plan to do when I get some spare time is to rewrite bed.g to not use G29S0 but to actually manually probe every point like is done in the sample here: https://duet3d.dozuki.com/Wiki/GCode_Meta_Commands (look at the example at the bottom) and I'd then do G31 P{sensor.probes[0].value[0]+4} before each G30. But as is now works and I have more pressing things to attend...