SZP for bed level in 3.6-RC1
-
I just rebuilt my printer with CAN using Roto Toolboard with SZP. Everything appears to be working correctly again, except for the bed level.
this is a Voron trident with the microswitch bed probe for Z home and offset. What I changed in bed.g is right after the Z home, I move the coil just over the bed near the microswitch since I know approximately where that portion of the bed is located in height so known to be safe. I do a M558.1 calibration for the SZP probe.
Then I go to probe the three bed points for leveling using the normal M558 commands using the SZP probe: M558 K1 H15:5 F1000 T15000
The first point seems to probe ok but I think I'm just getting lucky that the bed is an equal height there. At the second probe point the bed is a little higher and the nozzle runs into the bed during the probe dive so I abort. I also notice that neither probe point seems to be honoring the H parameter because it looks like it's starting ~5mm high.What are good steps to debug. The M558.2 and M558.1 by themselves seem to do the right thing. Do I need more parameters for the M558 probe command?
-
@jltx I've tested using H15:5 in 3.6.0-rc.1+2, and it works correctly, moving up 15mm before moving to the next probe point, while subsequent probes at the same point are done at 5mm. But I'm using a 'normal' probe rather than SZP. Could you test to see if this firmware version resolves the issue? Find it here: https://www.dropbox.com/scl/fo/y03luwmbypirbxncla3rk/AAJFLPFsVdFylemyhkXsAac?rlkey=7cq4svp4rzl2ztdffpzq2ghjk&dl=0
Ian
-
@droftarts Yes, this same code (except the M558.1) was used when I had a P8 probe and it worked fine. When I switched to P11 is when it changed behavior.
I don't think the dive height is the main problem though because the probe starts well above the trigger point. It just doesn't see it when lowering on the second probe point. Is there a way I can monitor the values live?
I will try the firmware above if I can figure out how to install on my SBC+Mini5+RR. I also need to figure out why my DWC did not update with the rest of the firmware when I did M997 S2.
-
@droftarts I can't get that firmware to load with my SBC. Maybe I'm doing it wrong. I don't see any sbc file. I may have to wait for official release to try.
-
I missed the note that said 15 is typical current. My M558.2 came up with 22. So I lowered it to 15 and I see some more normal behavior (I think). Is 99999 mean it has triggered or overflowed? The values rise as I get closer to the bed and then suddenly jump to 99999. The DWC status shows normal, yellow, then red during the probe dive. But it doesn't stop at red, it keeps going. The first probe point finally stops right before impacting the bed but had already jumped to 99999. The second probe point does similar but impacts the bed and I have to reset machine.
-
@jltx said in SZP for bed level in 3.6-RC1:
@droftarts I can't get that firmware to load with my SBC. Maybe I'm doing it wrong. I don't see any sbc file. I may have to wait for official release to try.
See here for updating your firmware with an SBC.
https://docs.duet3d.com/User_manual/Machine_configuration/SBC_setup#update-firmware
-
@Phaedrux said in SZP for bed level in 3.6-RC1:
https://docs.duet3d.com/User_manual/Machine_configuration/SBC_setup#update-firmware
I know how to do that when the firmware is via a depot but this is from a dropbox so I assume there is a manual procedure. Do I need to sftp them over?
-
so I played around with the drive current more. I cannot find a setting that works all the way from the bed to infinity. The best I can do, using 16, is get a non-99999 value from about 2mm over the bed to infinity. If I drop Z lower it jumps to 9999, but I can boost the current and get a good reading but then it instead jumps to 99999 at higher Z. It seems very finicky. This is all with a cold bed for now. I haven't tried heated.
-
I did this repeatability test after running a M558.1:
G1 Z5 F3000
G30 K1 P0 Z-9999
G30 K1 P1 Z-9999
G30 K1 P2 Z-9999
G30 K1 P3 Z-9999
G30 K1 P4 Z-9999
G30 K1 P5 Z-9999
G30 K1 P6 Z-9999
G30 K1 P7 Z-9999
G30 K1 P8 Z-9999
G30 K1 P9 Z-9999 S-1
G1 Z5and it works! The RMS error seems largish but it works.
So G30 works but M558 does not. Am I just missing a parameter?
M558 K1 H15:5 F1000 T15000 -
@jltx said in SZP for bed level in 3.6-RC1:
@Phaedrux said in SZP for bed level in 3.6-RC1:
https://docs.duet3d.com/User_manual/Machine_configuration/SBC_setup#update-firmware
I know how to do that when the firmware is via a depot but this is from a dropbox so I assume there is a manual procedure. Do I need to sftp them over?
Are you already on the unstable branch? If so, you should be able to upload the bin file and send M997 to flash to it. See here for parameter details for M997 in SBC mode.
https://docs.duet3d.com/en/User_manual/Reference/Gcodes#m997-perform-in-application-firmware-update
-
@Phaedrux I must be reading that wrong because it looks like the P parameter only works in standalone mode. For SBC only a feed is supported, stable or unstable. That is how I got to 3.6-rc1. I can try it later today. I assume I have to do the CAN board separately.
-
@jltx You can still send M997 S0 to flash the firmware if you've uploaded it. And you can use P to refer to the file name directly if it isn't the default.
-
-
The dive height is still not correct. And the trigger does not appear to work. I can see it turn red on DWC but the Z keeps decreasing until it hits the bed and keeps going until I reset.
-
no, wait! it works. I had made an experimental edit (I was sure it wouldn't help) yesterday out of desperation. But then I forgot to revert it. I just did and now I can ABL again!
I guess I need to tune the current more because I am getting bigger rms error than the threshold I am using for ABL.
-
spoke too soon. I ran it again and it made odd adjustments to the Z motors and then the head crashed into the bed pretty bad. I also noticed that it only does the first dive, not the second, e.g. 15 but not 5.
; Clear any bed transform M561 ; Turn off noisy Extruder motor M84 E0 ; Lower currents, speed & accel M98 P"/macros/print_scripts/setup_probing.g" ;if !move.axes[2].homed ; Home all axes G28 G1 Y240 Z6 ; move coil over bed and higher than trigger point M558.1 K1 S1.5 ; calibrate height coeff ; Probe the bed at 3 points, x3 for more precision M558 K1 H15:5 F800 T15000; increase the depth range, gets the gantry mostly level immediately M98 P"/sys/bed_probe_points.g" M558 K1 H4:2 F400 T15000 ; reduce depth range, probe slower for better repeatability M98 P"/sys/bed_probe_points.g" ; last attempt will be auto-repeated M558 K1 H1 F60 T15000 ; reduce depth range, probe slower for better repeatability while move.calibration.initial.deviation > 0.01 ; 0.003 if iterations > 3 abort "Too many leveling attempts! Canceling print." M98 P"/sys/bed_probe_points.g" echo "Current deviation: " ^ move.calibration.initial.deviation ^ "mm" echo "Leveling complete" ;use mechanical instead? G30 S-2 ; Z=0 ; Restore high currents, speed & accel M98 P"/macros/print_scripts/setup_printing.g"
-
undefined Phaedrux marked this topic as a question
-
I think the fundamental problem is there is no drive current for the SZP that covers the range necessary for bed leveling. If I dial in the drive current for near the bed then it is pre-triggered at the initial dive heights necessary for a possibly tilted bed (more than a few mm). Alternatively I can find a drive current that works at a higher height but then overflows before the trigger point near the bed.
Here is the probe set up I am using to go with the bed.g posted above:
; Scanning Z probe M558 K1 P11 C"121.i2c.ldc1612" F36000 T36000 ; configure SZP as probe 1, type 11, on CAN address 120 M308 A"SZP coil" S10 Y"thermistor" P"121.temp2" ; thermistor on SZP coil G31 K1 Z2 Y36 ; define probe 1 offsets and trigger height M558.2 K1 S16 R115897 ; set drive current and reading offset
Every day I run M558.2 K1 S-1 (for debug) and I get a different answer, 16, 22, 18. There is a span of about 5 around these that will work over some Z range and outside of that it is always overflowed. It's also hard to debug because in DWC the Z trigger is always red. sometimes that seems ok and other times it says it is pre-triggered.
-
I think my printer is monitoring this thread. So suddenly, without changes, the Z probe stopped being red.
So I tried again and now I get a completed ABL.
However, it is not repeating any probes as requested, i.e. second dive at reduced height. Is that expected with SZP?
-
I hate to jinx it but it seems to be working now, repeatedly. I think the key was having the z value not red (whatever that indicates). I don't know what flipped it. I only made one change to protect against bad currents. Since I added this statement in bed.g everything started working and this statement has never triggered. But I wonder if somehow sampling the value cleared something and now it works (not red)?
if sensors.probes[1].value[0] = 99999 abort "wrong current"
-
undefined jltx referenced this topic