Help understanding why I have trouble with setting my Z height
-
Hi all,
I built a Voron 2.4 with a Duet 3 Mini and add-on board. I've been using it for months, but I always have trouble when I need to re-calibrate the Z height after a nozzle change etc.
I've spent hours looking through old posts where people have had similar issues, but I still think I'm getting something wrong.
I'm using an inductive probe, the repeatability seems to be very precise. When probing 10 times in the same area I only get a delta of around 0.01mm, with the bed at 100°C.
When I need to change the Z height of the nozzle I go into my config.g and change the line:
"G31 P500 X0 Y24 Z1.50", to something like "G31 P500 X0 Y24 Z1.60" to raise the nozzle off the bed by 0.1mm when printing.
But doing it today seems to have no effect on the height of the nozzle when I ask for Z0. I remember that I've had this problem in the past.
I don't remember how I got everything to work correctly when I first built the printer, but I did set up homeall.g and homez.g, which both have G92 Z1.65.
Could someone have a scan through my files, see if anything looks wonky and let me know how I should be doing things?
I want to be able to change a nozzle and be able to change 1 value and have it work every time. I'm sure I'm doing something wrong. I'm pretty confused by how G28, G30, G32 and G29 mesh leveling all interact with each other, and how the Z values in G31 and G92 relate to each other. I think I set the G92 Z1.65 to get the mesh looking right, rather than floating above/below the bed, but I don't know if the values are where they should be or what the effect of having them all set to the wrong offset would be.
I'll post my files below...
-
G90 ; send absolute coordinates... M83 ; ...but relative extruder moves M550 P"Voron" ; set printer name M669 K1 ; select CoreXY mode M150 X3 R0 U0 B127 W127 S19 ; set LED main lighting colours M918 P2 E-4 F2000000 ; configure direct-connect display M150 X2 R255 U255 B0 S3 ; set screen LED colours M150 X2 R18 U21 B0 S2 ; Network ; removed for post ; Drives M569 P0.2 S1 ; physical drive 0.2 goes forwards M569 P0.1 S1 ; physical drive 0.1 goes forwards M569 P0.3 S1 ; physical drive 0.3 goes forwards M569 P0.0 S1 ; physical drive 0.0 goes forwards M584 X0.2 Y0.1 Z0.3:4:5:6 E0.0 ; set drive mapping M350 X16 Y16 Z16 E16 I1 ; configure microstepping with interpolation M92 X80.00 Y80.00 Z400.00 E419.00 ; set steps per mm M566 X600.00 Y600.00 Z300.00 E250.00 ; set maximum instantaneous speed changes (mm/min) M203 X27000.00 Y27000.00 Z12000.00 E600.00 ; set maximum speeds (mm/min) M201 X2200.00 Y2200.00 Z2000.00 E3500.00 ; set accelerations (mm/s^2) M906 X1700 Y1700 Z1400 E650 I40 ; set motor currents (mA) and motor idle factor in per cent M84 S1800 ; Set idle timeout ;High speed printing modifications (uncomment to enable) Remember to disable M572 below! ;M906 X2000 Y2000 Z1400 E650 I40 ; set motor currents (mA) and motor idle factor in per cent ;M566 X1000.00 Y1000.00 Z300.00 E500.00 ; set maximum instantaneous speed changes (mm/min) ;M203 X27000.00 Y27000.00 Z12000.00 E600.00 ; set maximum speeds (mm/min) ;M201 X10000.00 Y10000.00 Z2000.00 E5000.00 ; set accelerations (mm/s^2) ; Axis Limits M208 X0 Y0 Z0 S1 ; set axis minima M208 X300 Y300 Z275 S0 ; set axis maxima ; Endstops M574 X2 S1 P"io5.in" ; configure active-high endstop for high end on X via pin io5.in M574 Y2 S1 P"io6.in" ; configure active-high endstop for high end on Y via pin io6.in M574 Z1 S2 ; configure Z-probe endstop for low end on Z ; Z-Probe M558 P5 C"io4.in" H5 F800 T25000 ; set Z probe type and the dive height + speeds ;G31 P500 X0 Y24 Z1.55 ; set Z probe trigger value, offset and trigger height for E3D G31 P500 X0 Y24 Z1.50 ; set Z probe trigger value, offset and trigger height for Bondtech CHT M557 X25:275 Y25:275 S25 ; define mesh grid ; Heaters M308 S0 P"temp1" Y"thermistor" T100000 B4582 C1.013e-7 ; configure sensor 0 as thermistor on pin temp1 M950 H0 C"out0" T0 Q10 ; create bed heater output on out0 and map it to sensor 0 M307 H0 B0 S1.00 ; disable bang-bang mode for the bed heater and set PWM limit M140 H0 ; map heated bed to heater 0 M143 H0 S120 ; set temperature limit for heater 0 to 120C M308 S1 P"temp0" Y"pt1000" ; configure sensor 1 as PT1000 on pin temp0 M950 H1 C"out1" T1 ; create nozzle heater output on out1 and map it to sensor 1 M307 H1 B0 S1.00 ; disable bang-bang mode for heater and set PWM limit M143 H1 S300 ; set temperature limit for heater 1 to 300C M308 S2 P"temp2" Y"thermistor" T100000 B4582 C1.013e-7 M308 S2 A"Chamber" ; Fans M950 F0 C"out5" Q20 ; create fan 0 on pin out5 and set its frequency M106 P0 S0 H-1 C"Part fan" ; set fan 0 value. Thermostatic control is turned off M950 F1 C"out6" Q20 ; create fan 1 on pin out6 and set its frequency M106 P1 S1 H1 T55 ; set fan 1 value. Thermostatic control is turned on M950 F2 C"!out4+out4.tach" Q25000 ; create fan 2 on pin out4 and set its frequency M106 P2 S0 H0 T48 X0.6 C"Filter fan" ; set fan 2 value. Theromostatic control is turned on M950 F3 C"!out3+out3.tach" Q25000 ; create fan 3 on pin out3 and set its frequency M106 P3 S0 H-1 C"Electronics fan" ; set fan 3 value. Thermostatic control is turned off ; Tools M563 P0 S"Hotend" D0 H1 F0 ; define tool 0 G10 P0 X0 Y0 Z0 ; set tool 0 axis offsets G10 P0 R0 S0 ; set initial tool 0 active and standby temperatures to 0C ; Miscellaneous M501 ; load saved parameters from non-volatile memory T0 ; select first tool M106 P3 S0.6 ; set electronics fans to 60% M569 P0 D2 M569 P1 D2 M569 P2 D2 M569 P3 D3 M569 P4 D3 M569 P5 D3 M569 P6 D3 M572 D0 S0.045 ; set pressure advance value (slows down very high speed prints) M671 X-46:-46:345:345 Y9:368:368:9 S20 ; Z leadscrews positions M376 H5 ; set mesh compensation high limit to 5mm during a print G4 S1 ; 1 second pause to allow accelerometer to wake M955 P0 C"io3.out+io3.in" I50 ; configure accelerometer M593 P"zvddd" F40 ; use ZVDDD input shaping to cancel ringing at 40Hz
-
; homeall.g ; called to home all axes ; ; generated by RepRapFirmware Configuration Tool v3.2.3 on Mon Aug 02 2021 22:10:22 GMT+0100 (British Summer Time) G91 ; relative positioning G1 H2 Z4 F700 ; lift Z relative to current position G1 H1 X305 Y305 F9000 ; move quickly to X or Y endstop and stop there (first pass) G1 H1 X305 ; home X axis G1 H1 Y305 ; home Y axis G1 X-5 Y-5 F6000 ; go back a few mm G1 H1 X305 F360 ; move slowly to X axis endstop once more (second pass) G1 H1 Y305 ; then move slowly to Y axis endstop G90 G1 X150 Y150 F9000 ; centre the hotend G91 M201 Z200 ; reduce Z accelerations M913 Z25 ; reduce Z motor current G1 H1 Z-282 F1800 ; move Z down stopping at the endstop M913 Z40 G1 Z10 F900 G1 H1 Z-282 F900 ; move Z down stopping at the endstop G90 ; absolute positioning G92 Z1.65 ; set Z position to axis minimum (you may want to adjust this) M913 Z100 ; restore Z motor current M201 Z2000 ; restore Z motor accelerations ; Uncomment the following lines to lift Z after probing G91 ; relative positioning G1 Z50 F6000 ; lift Z relative to current position G90 ; absolute positioning
-
; homez.g ; called to home the Z axis ; ; generated by RepRapFirmware Configuration Tool v3.2.3 on Mon Aug 02 2021 22:10:22 GMT+0100 (British Summer Time) G1 X150 Y150 F9000 ; centre hotend G91 ; relative positioning G1 H2 Z5 F6000 ; lift Z relative to current position G1 H1 Z-282 F2400 ; move Z down stopping at the endstop G1 Z10 G1 H1 Z-282 F900 ; move Z down until the endstop is triggered G92 Z1.65 ; set Z position to axis minimum (you may want to adjust this) ; Uncomment the following lines to lift Z after probing ;G91 ; relative positioning ;G1 Z5 F100 ; lift Z relative to current position ;G90 ; absolute positioning
-
bed.g
G30 P0 X030 Y270 Z-10000 H0 G30 P1 X030 Y030 Z-10000 H0 G30 P2 X270 Y030 Z-10000 H0 G30 P3 X270 Y270 Z-10000 H0 S4
-
; config-override.g file generated in response to M500 at 2022-07-06 00:17 ; This is a system-generated file - do not edit ; Heater model parameters M307 H0 R1.103 K0.745:0.000 D1.65 E1.00 S0.80 B0 M307 H1 R2.169 K0.346:0.128 D4.90 E1.35 S1.00 B0 V24.2 ; Workplace coordinates G10 L2 P1 X0.00 Y0.00 Z0.00 G10 L2 P2 X0.00 Y0.00 Z0.00 G10 L2 P3 X0.00 Y0.00 Z0.00 G10 L2 P4 X0.00 Y0.00 Z0.00 G10 L2 P5 X0.00 Y0.00 Z0.00 G10 L2 P6 X0.00 Y0.00 Z0.00 G10 L2 P7 X0.00 Y0.00 Z0.00 G10 L2 P8 X0.00 Y0.00 Z0.00 G10 L2 P9 X0.00 Y0.00 Z0.00
-
Should it be G31 Z value that should be changed? Or the two G92 in the homing files?
How do these two values differ and why can't we just use a single value to tell the printer "the nozzle is at Z in relation to the probe point"?
Edit: I should add that I am using the Z probe as the endstop. I don't have a mechanical end stop on Z. I guess that's why there is a value for an offset of the probe and a separate 0 = offset.
-
@threepwood said in Help understanding why I have trouble with setting my Z height:
I did set up homeall.g and homez.g, which both have G92 Z1.65.
Don't use G92 to force a height if you intend to use the probe, because it overrides what the probe trigger height is in G31 in your config.g
So remove the G92s and just set the trigger height with G31.
-
@phaedrux That's a simple solution! So should I remove the whole line "
G92 Z1.65" or just the height "G92Z1.65"? -
@threepwood i was always thought your axis limits min for z should be a neg number like -3 or around that
-
@downshift64 Wouldn't that cause the nozzle to dig into the bed if I asked for it?
-
@threepwood no it doesnt on mine
; Axis Limits
M208 X-27 Y-22 Z-3.0 S1 ; set axis minima
M208 X295 Y295 Z295 S0 ; set axis maxima; Endstops
M574 X1 S1 P"xstop" ; configure switch-type (e.g. microswitch) endstop for low end on X via pin !xstop!xstop
M574 Y1 S1 P"ystop" ; configure switch-type (e.g. microswitch) endstop for low end on Y via pin !ystop
M574 Z1 S2 ; configure switch-type (e.g. microswitch) endstop for high end on Z via pin zstop; Z-Probe
M950 S0 C"exp.heater3" ; create servo pin 0 for BLTouch
M558 P9 C"^zprobe.in" H5 F1500 T6000 ; set Z probe type to bltouch and the dive height + speeds
G31 P500 X0 Y0 Z2.32 ; set Z probe trigger value, offset and trigger height
M557 X15:295 Y25:295 S20 ; define mesh grid
the G31 Z2.32 is what i adjust the nozzle height with -
@threepwood said in Help understanding why I have trouble with setting my Z height:
@downshift64 Wouldn't that cause the nozzle to dig into the bed if I asked for it?
It could, yes. A slight negative value would let you baby step a bit lower if needed. -0.5mm is probably asa much as I would want to allow.
The mesh compensation will go as low as needed by the mesh though, so it makes no difference there.
@threepwood said in Help understanding why I have trouble with setting my Z height:
@phaedrux That's a simple solution! So should I remove the whole line "
G92 Z1.65" or just the height "G92Z1.65"?Remove the whole G92 line.
-
@threepwood if u set your axis limits for z min to -3 and max to whatever the max is, then u just adjust your G31 z whenever u need to get a good first layer, i do mine this way and when i change a nozzle or a thicker or thinner bed i dont have to mess with anything it has the same offset a good first layer every time, you need to let your bed heat soak the same amount of time i have noticed on my bed it bows a lot at first then after it soaks for about 45 mins it relaxes back some
-
So I've tried removing the G92 Z commands from homeall.g and homez.g but no matter what number I put in to
G31 P500 X0 Y24 Z-1.35
I get the same result.I first set it to 0 to see what would happen. After homing, Z=0 would be the exact point that the sensor triggers, which makes perfect sense.
Then I tried
G31 P500 X0 Y24 Z1.35
andG31 P500 X0 Y24 Z-1.35
But there is no change in where 0 is. Every time I would change the value, reset the machine, re-home and run macro:-
G28 G32 G32 G32 G28 Z
I would jog the bed down 0.2mm at a time and the moment I hit 0 in DWC the sensor would trigger, with the nozzle still 1.35mm above the bed, no matter what number I put after Z in G31.
-
@downshift64 I did try changing Z min to -5 to see what happened, but it just set the point the sensor triggered to -5 and let me move the Z to -5. Other than that, nothing changed. I guess putting in +1.35 as the minimum would set my 0 to the correct position, but I wouldn't be able to get there. I don't think the Duet would like it if a slicer told it to move below minimum.
-
A negative trigger height would mean the nozzle tip is pushing that amount into the bed. Not what you want unless it's a nozzle contact type probe. Your trigger height would always be positive in most cases.
How are you measuring the trigger height?
You should follow this: https://docs.duet3d.com/en/User_manual/Connecting_hardware/Z_probe_testing
I also should have noticed before that your homing files are using a G1 H1 Z move as if an endstop is being used. So no wonder your G31 probe offsets aren't being applied. That would only happen if you home Z with a G30.
So replace
G1 H1 Z-282 F900
with a line to position to probe likeG1 X150 Y150 F2000
followed by aG30
to actually call the probe. -
@phaedrux said in Help understanding why I have trouble with setting my Z height:
A negative trigger height would mean the nozzle tip is pushing that amount into the bed. Not what you want unless it's a nozzle contact type probe. Your trigger height would always be positive in most cases.
How are you measuring the trigger height?
You should follow this: https://docs.duet3d.com/en/User_manual/Connecting_hardware/Z_probe_testing
I also should have noticed before that your homing files are using a G1 H1 Z move as if an endstop is being used. So no wonder your G31 probe offsets aren't being applied. That would only happen if you home Z with a G30.
So replace
G1 H1 Z-282 F900
with a line to position to probe likeG1 X150 Y150 F2000
followed by aG30
to actually call the probe.I'm measuring the trigger height by looking over at the hotend and watching when the red LED in the probe turns off (it also shows Z Probe = 1000), when I look in DWC it always says Z is at 0 under "Tool Position". Then I can use "Z Babystepping" under the status page and the nozzle grips an 80gsm sheet at -1.35mm.
I'll try G30 and report back! Thank you!
-
@phaedrux I've made the changes to my homing files and it now works perfectly! I can't thank you enough. I've spent months using work arounds to get where I need. Now it's finally sorted.
Previously I was using homing Z once very quickly (but at very low currect in case of probe fault) and then at my standard Z homing speed. If I keep the first instance of
G1 H1 Z-282 F2400
then run G30, I assume the G30 will overwrite the G1 H1. Is that correct? -
-
YOu should probably follow the steps in here for measuring the trigger height accurately and easily.
https://docs.duet3d.com/en/User_manual/Connecting_hardware/Z_probe_testing
To do a fast probe and then slow probe try this in your homing file where you call G30.
M558 A1 F600 ; set single fast probe
G30
M558 A3 F120 ; set slower multi probe
G30That would probe at least 3 times, and up to 4 times.