Working config for sensorless homing on a CoreXY
-
Perhaps the firmware thinks it is at the axis limits. What X and Y positions does it display after homing, and what M208 commands do you have in config.g?
-
Ok, I was going to check the info you wanted. Now suddenly Home All is working. Between these posts I have not changed the sensorless homing macro nor the homeall.g
However in the meantime I did configure my bltouch, and edited config.g and homez.g.
So I gather when you press Home All it automatically executes homez.g after homeall.g?
-
Home All will run homeall.g if it exists. After that, if any axes are flagged as not homed, it will run the individual homing files for those axes.
-
Ok, thank you so much. Sensorless homing now works for my setup. Off to the next step…
-
Here's my corexy full homeall.g using sensorless homing for X/Y and piezo sensor for Z.
[[language]] ; homeall.g ; called to home all axes ; M400 ; make sure everything has stopped before we make changes G1 Z1 F6000 ; Lift Z M574 X1 Y1 S3 ; set endstops to use motor stall M913 X50 Y50 Z50 ; 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 G28 Z ; probe bed to set z0 G1 Z3 ; lower bed for clearance 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
-
You can remove the M574 commands from that homeall.g file and just put the first one in config.g. I had the M574 commands in my example because it was a macro for testing sensorless homing on a machine that normally used endstop switches. Likewise the M915 command can go in config.g.
-
Ah, yeah I was still using the switches to prevent acccidental triggers during a print.
Thanks David.
-
(edit: Nevermind, lol) Why is it that this script (SuperJETT's) works for me if I have already homed X and Y but if none have been homed when it gets to the step of moving on the Y axis it moves diagonally in the X+ Y+ direction?
Here is my Homeall.g:
; homeall.g ; called to home all axes ; M400 ; make sure everything has stopped before we make changes M913 X50 Y50 ; drop motor currents to 50% G91 ; use relative positioning G1 Z5 F6000 ; lower bed for clearance G1 S1 X-400 F4000 ; move X all the way left and stop at end G1 X6 ; 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 Y13 ; move to edge of glass G92 Y0 ; set Y0 at edge of glass G1 X150 Y150 ; go to back center of bed for measurement G30 ; probe bed to set z0 G1 Z5 ; lower bed for clearance 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% G1 X320 Y320 ; move to parking point
Homex.g (and the equivalent for Y) work fine.```
; homex.g
; called to home the X axis
;
M400 ; make sure everything has stopped before we make changes
G1 Z1 F6000 ; Lift Z
M574 X1 Y1 S3 ; set endstops to use motor stall
M913 X50 ; 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 X6 ; move to edge of glass
G92 X0 ; set X0 at edge of glass
G90 ; absolute positioning -
Oops, I figured it out. Just seeing those two scripts next to each other made me realize I hadn't removed the M574 command from the individual homing scripts and then when I looked in my config.g I found that I used the X2 parameter for some reason.
BTW, this is so cool and working well. Thanks to everyone for doing the work!
-
I'm trying to set up sensorless homing on corexy I run into bit of trouble.
I use this macro to test:M117 S"Start sensorless homing" M400 ; make sure everything has stopped before we make changes M117 S"Set endstops to S3" M574 X1 Y1 S3 ; set endstops to use motor stall M117 S"Reduce current" M913 X40 Y40 ; XY motors to 40% current M117 S"Set sensitivity" M915 X Y S-6 R0 F0 ; set X and Y to sensitivity 0, do nothing when stall, unfiltered M117 S"Move Z down" G91 ; use relative positioning G1 S2 Z5 F1200 ; lift Z G1 S2 X-325 F5000 ; move left 325mm, stopping at the endstop G4 P500 ; wait 500msec ;G1 X5 ; move away from home ;G4 P500 ; wait 500msec M400 ; make sure everything has stopped before we make changes ; X is homed at this point, now home the other axis G1 S2 Y-325 F5000 ; move beyond axis minimum G4 P500 ; wait 500msec ;G1 Y5 ; move away from home G1 S2 Z-5 F1200 ; lower Z M400 ; make sure everything has stopped M913 X100 Y100 ; XY motors to 100% current G90 ; back to absolute positioning M574 X1 Y1 S1 ; define active low microswitches
What's happening is that when no axes are homed carriage moves towards 0,0, moving both motors at the same time. It catches the and and then moves again. This corresponds to separeate X and Y homing parts.
Any hints how to fix that?
-
@zen just point both homing files to your macro.
for example:
; homex.g ; called to home the X axis M98 P"/macros/Sensorless homing"
same thing for
homey.g
-
@bartolomeus I can see a few reasons that might be causing your behaviour in the code:
G1 S1 X-320 -> You might want to add a speed to the homing ( G1 S1 X-320 FXXXX). Sensorless homing is very sensitive to speed variations and triying with different speeds will produce different results.
G1 X-5 Y-5 -> If Y was not pre-homed this will abort the script on that line, because no moves are allowed on the axis unless it is homed, therefore your motors will be left with 30% current add a G1 S1 Y-320 FXXXX before the line.
I also noticed that sometimes the first homing move fails, probabl because the motor was "off" and the currents have not stabilized, so I runt the command G1 S1 X-320 and in between I wait 300 ms to let the current transients to stabilize (you do this with the command G4 300).
Hope this helps.
-
The re-home at slower speed bit may not work, because stall detection is unreliable and therefore disabled at low speeds. By default the cutoff speed is 200 full steps/second, so at x16 microstepping and 80 steps/mm that's a speed of 40mm/sec so 2400mm/min. However, for a CoreXY each motor contributes half of the motion, so I think you will find the minimum speed for stall detection is 4800mm/min. You can use the H parameter in the M915 command to try a lower threshold if you like.
-
i just finished a hypercube build with ramps+tmc2130 drivers+marlin
this is my first cube build and i got confused with the sensorless homing setup..
is there a step by step setup to follow ????
or a configuration file to compare with mine...
i have everything moving but not there yet
thanks -
@kostasbmw said in Working config for sensorless homing on a CoreXY:
i just finished a hypercube build with ramps+tmc2130 drivers+marlin
this is my first cube build and i got confused with the sensorless homing setup..
is there a step by step setup to follow ????
or a configuration file to compare with mine...
i have everything moving but not there yet
thanksI'm sorry, this forum is for Duet with TMC2660 drivers, and other controllers running RepRapFirmware. We can't help you with Marlin+TMC2130. I suggest you check first whether Marlin supports sensorless homing on CoreXY printers at all, because it needs additional code compared to sensorless homing on Cartesian and Delta printers.