Please Help with Sensorless homing of Z axis
Fickert last edited by Fickert
So rather excited but was short on sleep last night.
Have my new CoreXY build up and moving great. I got stall homing setup for X and Y with huge thanks to the people posting their homing scripts up. My issues are coming from the Z axis homing with stall homing.
I have the homing engaged, but the bed does not stop at all when I apply pressure to the bed. Even when the motor starts skipping steps.
Is Fxxx speed to slow? Or am I missing something else? I also cannot go any lower on my Z-axis current which is shown below. Is this the issue?
; Configuration file for Duet WiFi (firmware version 2.03) ; executed by the firmware on start-up ; ; generated by RepRapFirmware Configuration Tool v2.1.4 on Thu Jan 02 2020 22:58:29 GMT-0500 (Eastern Standard Time) ; General preferences G90 ; send absolute coordinates... M83 ; ...but relative extruder moves M550 P"Fickert's CoreXY" ; set printer name M667 S1 ; select CoreXY mode ; Network M552 S1 ; enable network M586 P0 S1 ; enable HTTP M586 P1 S0 ; disable FTP M586 P2 S0 ; disable Telnet ; Drives M569 P0 S1 ; physical drive 0 goes forwards M569 P1 S1 ; physical drive 1 goes forwards M569 P2 S1 ; physical drive 2 goes forwards M569 P3 S1 ; physical drive 3 goes forwards M584 X0 Y1 Z2 E3 ; set drive mapping M350 X256 Y256 Z256 E128 I0 ; configure microstepping without interpolation M92 X800.00 Y800.00 Z12000.00 E420.00 ; set steps per mm M566 X900.00 Y900.00 Z12.00 E120.00 ; set maximum instantaneous speed changes (mm/min) M203 X6000.00 Y6000.00 Z180.00 E1200.00 ; set maximum speeds (mm/min) M201 X500.00 Y500.00 Z20.00 E250.00 ; set accelerations (mm/s^2) M906 X600 Y600 Z750 E800 I30 ; set motor currents (mA) and motor idle factor in per cent M84 S30 ; Set idle timeout ; Axis Limits M208 X0 Y0 Z0 S1 ; set axis minima M208 X390 Y390 Z420 S0 ; set axis maxima ; Endstops M574 X1 Y1 Z1 S3 ; set endstops controlled by motor stall detection ; Z-Probe M558 P10 H5 F4000 T6000 S3 R0 ; Stall Detection Z probe but set dive height, probe speed and travel speed M557 X15:390 Y15:390 S20 ; define mesh grid ; Heaters M305 P0 T100000 B4138 R4700 ; set thermistor + ADC parameters for heater 0 M143 H0 S120 ; set temperature limit for heater 0 to 120C M305 P1 T100000 B4138 R4700 ; set thermistor + ADC parameters for heater 1 M143 H1 S280 ; set temperature limit for heater 1 to 280C ; Fans M106 P0 S0 I0 F500 H-1 ; set fan 0 value, PWM signal inversion and frequency. Thermostatic control is turned off M106 P1 S1 I0 F500 H1 T45 ; set fan 1 value, PWM signal inversion and frequency. Thermostatic control is turned on ; Tools M563 P0 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 ; Custom settings are not defined ; Miscellaneous M911 S10 R11 P"M913 X0 Y0 G91 M83 G1 Z3 E-5 F1000" ; set voltage thresholds and actions to run on power loss
[[language]] ; homeall.g ; called to home all axes ; M400 ; make sure everything has stopped before we make changes M913 X50 Y50 Z63 ; drop motor currents to 50% M915 X Y S3 R0 ; set sensitivity to +3 unfiltered G91 ; use relative positioning G1 S1 X-400 F4000 ; move X all the way left and stop at end G1 X16 ; move to edge of glass G92 X0 ; set X0 at edge of glass G1 S1 Y-400 F4000 ; move Y all the way left and stop at end G1 Y42 ; move to edge of glass G92 Y0 ; set Y0 at edge of glass G1 X152 Y210 ; go to back center of bed for measurement ; probe bed to set z0 G30 Z ; probe bed G29 S1 ; load heightmap G90 ; back to absolute positioning M400 ; make sure everything has stopped before we reset the motor currents M913 X100 Y100 Z100 ; motor currents back to 100% M574 X1 S0 ; redefine active low and unused microswitches M574 Y1 S1 ; redefine active low and unused microswitches
Z axis stall detection is very tricky to implement, and even if you get it reliable when the machine is cold, the results will start to very when the motors warm up.
How is your Z axis implemented mechanically? Is it a single motor? Is there any gearing between the motor and lead screw? Etc.
As an aside, you microstepping is likely to cause you issues. X256 native microstepping on all axis is not recommended.
M350 X256 Y256 Z256 E128 I0
The Duet2 2660 drivers have the option of using x16 microstepping for the step generator, and letting the driver interpolate that up to x256 for the motors without the added overhead on the CPU. It's a much prefered option because it gives the best of both worlds.
M350 X16 Y16 Z16 E16 I1and reset your steps per mm accordingly.
If you then wish to experiment with higher microstepping letters you can simply send a new M350 command AFTER the existing M350 and M92 commands and the firmware will automatically recalculate the steps per mm values for you as long as they are set first for x16 microstepping.
M350 X16 Y16 Z16 E16 I1 M92 X80 Y80 Z1600 E89 M350 E128
Here's what I had from back when I experimented with Stall guard on the Z axis. It worked, but as I said the behaviour would change with motor temp. Z axis was a single 1.8 degree motor, 1:1 ratio with 1mm lead/pitch single start lead screw.
Might have worked better with active cooling on the Z motor to reduce the temp issue. and using a 0.9 degree motor might have helped as well.
; 2_ZStallProbe.g ; ; Uses the Z axis StallGuard detection as a Z-Probe ; M291 P"Are you sure you want to proceed?" R"StallGuard Z-Probe" S3 M280 P3 S160 I1 ; Alarm Release and Push-Pin UP, inverted signal G28 G90 ; absolute positioning G1 X150 Y150 Z3 F4000 ; Always probe on the same spot M558 P9 Z0 ; Disable BLTouch M558 P10 X0 Y0 Z1 H3 F200 T6000 A10 R0.1 S0.005 ; Enable Stall Z probe G31 X0 Y0 Z0 P200 ; Set Z probe trigger value, offset and trigger offset (overshoot due to springs) M574 Z1 S3 ; set Z-min to use motor StallGuard M913 Z40 ; reduce motor current to 20% M201 Z20 ; Reduce acceleration mm/s2 M915 Z S4 F0 R0 ; Set StallGuard sensitivity for endstop homing M291 P"StallGuard Z-Probe Settings Loaded. Proceed with Probe?" R"Yes or No?" S3 M400 G30 S-1 ; Find the bed Z=0 reference G1 Z3 G30 S-1 ; do a couple of repeatability tests G1 Z3 G30 S-1 G1 Z3 G30 S-1 G1 Z3 G30 S-1 G1 Z3 G30 S-1 ; Find the bed Z=0 reference G1 Z3 G30 S-1 ; do a couple of repeatability tests G1 Z3 G30 S-1 G1 Z3 G30 S-1 G1 Z3 G30 S-1 G1 Z3 M400 M280 P3 S160 I1 ; Alarm Release and Push-Pin UP, inverted signal M291 P"Probing complete. Restoring settings." S3 M913 Z100 ; restore current to 100% M201 Z300 ; Restore acceleration M915 Z S63 F1 R0 ; Set StallGuard sensitivity for normal movement M574 Z1 S2 ; Use zprobe and home to Z Min. M558 P9 X0 Y0 Z1 H3 F100 T6000 A10 R0.5 S0.005 ; P9 for BLTouch, dive height 3mm, probe at 100mm/s, travel 6000mm/s, up to 10 probes, pause 0.5s G31 X-41.8 Y32.2 Z2.3 P25 ; probe offset from nozzle, p is trigger value, set low for bltouch, set Z=0 for testing