Sensorless homing tuning on cartesian printer
-
Hi all,
First of all, I hope you are all safe an healthy. Be strong.
I installed yet another Duet to one of my cartesian machines. I decided to try the sensorless homing feature, just to save me from routing two additional cables and installing end-stops. The machine previously run on 2130s on X and Y and it just made sense to me.
Most of the transition has been painless, but now it comes the sensorless homing. Searching around I found starting settings for my config.g, homeall.g, homex.g, homey.h and homez.g (Z axis has an inductive probe). The problem I see and I cannot troubleshoot on my own is that the printer behaves as I expect when I home the axis individually (first X, then Y and finally Z) but not when I press the home all button on the dashboard. See the video to check it out.
I know I have to edit all files individually and so I did. here they are:
homeall.g
; homeall.g ; called to home all axes ; ; generated by RepRapFirmware Configuration Tool v2.1.8 on Sat Mar 28 2020 22:27:48 GMT+0100 (Central European Standard Time) G91 ; relative positioning G1 S2 X0.2 Y0.2 Z0.2 ; Move all axis 0.2 mm, clear stall status G29 S2 ; to clear the height map before Z homing M561 ; reset bed compensation ; X and Y Sensorless homing M400 ; make sure everything has stopped before we make changes M913 X60 Y75 ; XY motors % current M915 X S2 Y S3 R0 F0 ; set X and Y sensitivity, do nothing when stall, unfiltered M574 X1 Y1 S3 ; set endstops to use motor stall G1 S2 Z5 F1200 ; lift Z G1 S1 X-220 Y-220 F3600 ; move X and Y back, stopping at the end stop M400 ; make sure everything has stopped M913 X100 Y100 ; XY motors to 100% current M915 X S30 Y S30 R0 F0 ; set X and Y sensitivity high, do nothing when stall, unfiltered ; Home Z with the probe G90 ; back to absolute mode G1 X110 Y110 S2 F3600 ; go to first bed probe point and home Z G30 ; home Z by probing the bed
homex.g
; homex.g ; called to home the X axis G91 ; set relative mode G1 S2 X0.2 ; Move X by 0.2 mm, clear stall status G29 S2 ; to clear the height map before Z homing M561 ;reset bed compensation M400 ; make sure everything has stopped before we make changes M913 X60 ; X motor % current M915 X S2 R0 F0 ; set X sensitivity, do nothing when stall, unfiltered M574 X1 S3 ; set endstops to use motor stall G1 S2 Z5 F1200 ; lift Z G1 S1 X-220 F3600 ; move X back, stopping at the end stop M400 ; make sure everything has stopped M913 X100 ; XY motors to 100% current M915 X S30 R0 F0 ; set X sensitivity high, do nothing when stall, unfiltered G1 S2 Z-5 F1200 ; reset Z G90 ; Absolute positioning
homey.g
; homey.g ; called to home the Y axis G91 ; set relative mode G1 S2 Y0.2 ; Move Y by 0.2 mm, clear stall status G29 S2 ; to clear the height map before Z homing M561 ; reset bed compensation M400 ; make sure everything has stopped before we make changes M913 Y75 ; Y motor % current M915 Y S3 R0 F0 ; set X sensitivity, do nothing when stall, unfiltered M574 Y S3 ; set endstops to use motor stall G1 S2 Z5 F1200 ; lift Z G1 S1 Y-220 F3600 ; move X back, stopping at the end stop M400 ; make sure everything has stopped M913 Y100 ; XY motors to 100% current M915 Y S30 R0 F0 ; set Y sensitivity high, pause when stall, filtered G1 S2 Z-5 F1200 ; reset z G90 ; back to absolute mode
homez.g
; homez.g ; called to home the Z axis ; G91 ; relative positioning G1 H2 Z5 F6000 ; lift Z relative to current position G90 ; absolute positioning G1 X110 Y110 F6000 ; go to first probe point G30 ; home Z by probing the bed ; Uncomment the following lines to lift Z after probing G91 ; relative positioning G1 Z5 F100 ; lift Z relative to current position G90 ; absolute positioning
on my config.g I have something like this:
M574 X Y S3 ; set endstops to use motor stall M915 X Y S30 R0 F0 ; set X sensitivity, do nothing when stall, unfiltered
Any help on troubleshooting this, would be much appreciate it, as I don't feel like installing endstops...
-
@FelixH said in Sensorless homing tuning on cartesian printer:
M915 X S30 Y S30 R0 F0 ; set X and Y sensitivity high, do nothing when stall, unfiltered
This line doesn't look right to me. Try splitting it out into two lines, like from your homex.g and homey.g files. I can't test this at the moment so just a theory.
Ian
-
I tried that, but to no avail... in order to print, this evening I had to lower the sensitivity on the homeall.g file, but then it doesn't home on the home position
-
If homeX homeY and homeZ all work correctly on their own, why not change homeall to simply call each one of them in turn with M98.
M98 Phomex.g
M98 Phomey.g
M98 Phomez.gI'm going to speculate that the electrical properties of the system as altered sufficiently when moving multiple motors at the same time that it isn't behaving as expected.
Stall detection for homing is tricky. Personally, I'd run the wires and use a switch.
-
@Phaedrux I though about your solution, but I didn‘t know how to implement it. I will try that and, if it doesn‘t work, I will run the wires...
-
Well, I just tried and it did the trick... a bit annoying seeing the Z axis moving up and down more than necessary, but for now I'll call it good...
Any other speculation as for it didn't work would be educationally welcomed...
-
@FelixH said in Sensorless homing tuning on cartesian printer:
G1 S1 X-220 Y-220 F3600 ; move X and Y back, stopping at the end stop
When I tried this command, it always stopped when one or the other axis hit a stop, unlike the case with switched homing where it lets each axis stop independently. I think the stall detection interrupts all axes. The independent homes seem to be the right solution. I went back to the switches anyways, just because I already had them installed.
-
@mendenmh said in Sensorless homing tuning on cartesian printer:
I think the stall detection interrupts all axes...
Maybe that's the issue...
I'll try to edit the old homeall.g to do it individually, adding M400 all over the place.
-
Well, i mixed the code on the 3 independent homing files into one homeall.g file (see below). It appears to work without any issues...
I hope this post helps somebody else with similar issues.
Thanks a lot, everyone.
; homeall.g ; called to home all axes ;M98 Phomex.g ;M98 Phomey.g ;M98 Phomez.g G91 ; set relative mode G1 S2 Z5 F1200 ; lift Z G29 S2 ; to clear the height map before Z homing M561 ;reset bed compensation ; homex.g G1 S2 X0.2 ; Move X by 0.2 mm, clear stall status M400 ; make sure everything has stopped before we make changes M913 X60 ; X motor % current M915 X S2 R0 F0 ; set X sensitivity, do nothing when stall, unfiltered M574 X1 S3 ; set endstops to use motor stall G1 S1 X-220 F3600 ; move X back, stopping at the end stop M400 ; make sure everything has stopped M913 X100 ; XY motors to 100% current M915 X S30 R0 F0 ; set X sensitivity high, do nothing when stall, unfiltered M400; ; make sure everything has stopped ; homey.g G1 S2 Y0.2 ; Move Y by 0.2 mm, clear stall status M913 Y75 ; Y motor % current M915 Y S3 R0 F0 ; set X sensitivity, do nothing when stall, unfiltered M574 Y S3 ; set endstops to use motor stall G1 S1 Y-220 F3600 ; move X back, stopping at the end stop M400 ; make sure everything has stopped M913 Y100 ; XY motors to 100% current M915 Y S30 R0 F0 ; set Y sensitivity high, pause when stall, filtered M400; ; make sure everything has stopped homez.g G90 ; absolute positioning G1 X110 Y110 F6000 ; go to first probe point G30 ; home Z by probing the bed