Y Axis homing in reverse direction if acceleration increased
-
I hear you and I don't completely disagree, but I did spend a good chunk of money for one of the most advanced 3d printer main boards on the market and I believe I should be able to use the advertised features of this board.
Since we are making comparisons, that's like buying a new Corvette and detuning the motor just to save gas money... Doesn't really make sense.
Sensorless homing should work and seems like it does with 1.8° steppers. So there's really no reason it shouldn't with 0.9° steppers.
I searched this forum for the same model 0.9° steppers I'm using and I couldn't find a single post that wasn't my post... Seems like I bought some steppers that either no one uses, or at least no one bothered to mention in the forum.
Who knows, maybe I just bought the wrong steppers.
I would but new 0.9° steppers tomorrow if we (the group) believe my board is fine and I just possibly ran into a compatibility issue.
-
@tsitalon1 said in Y Axis homing in reverse direction if acceleration increased:
42BTGHM809
http://cdn.sparkfun.com/datasheets/Robotics/42BYGHM809.PDF
This the one?
Based on the specs they seem like they should be fine.
Up to what current have you been running the 0.9 motors during homing? 25% of 1300ma? That's only 300ma
Have you tried running them higher yet? Was it that low just to get a reliable stall? What was your stall detection tuning process?
https://duet3d.dozuki.com/Wiki/Stall_detection_and_sensorless_homing
-
@tsitalon1 said in Y Axis homing in reverse direction if acceleration increased:
Since we are making comparisons, that's like buying a new Corvette and detuning the motor just to save gas money... Doesn't really make sense.
Not really a valid comparison.
Sensorless homing doesn't provide any performance benefits over physical endstop sensors.
I use IR beam break endstop sensors which will never wear out and if properly installed cannot be broken by excessive axis travel.
On the other hand sensorless homing requires excessive axis travel to occur with enough energy to be reliably detectable - banging into the limit of the travel strikes me as a rather brute force way to home an axis.
And as you have found out it can have issues.
But the important thing is that you are happy with your printer and it does what you want it to they way you want it to do that.
So keeping tweaking the parameters until you get it sorted.
-
@tsitalon1 said in Y Axis homing in reverse direction if acceleration increased:
M913 X30 Y25 ; reduce motor current to 25% to prevent belts slipping G91 ; relative positioning G1 H2 Z5 F4000 ; lift Z relative to current position G1 H1 X-333 F5000 ; home X axis G1 H1 Y-333 F5500 ; home Y axis G1 X5 Y30 F4000 ; go back a few mm ;G90 ; absolute positioning G30 ; home Z by probing the bed M913 X100 Y100
I might be wrong, but AFAIK a CoreXY requires a different homing sequence:
... G1 H2 Z5 F4000 ; lift Z relative to current position G1 H1 X-333 Y-333 F5000 ; home both axes at once <= insert this line G1 H1 X-33 F5000 ; home X axis G1 H1 Y-33 F5500 ; home Y axis ...
Especially the line I marked is important, maybe someone can confirm this? @Phaedrux
Here's the link to the Wiki page
//edit Does that also explain, why increasing acceleration changed the behaviour. The motors simply hit the 'endstops' at a different time?
-
@tsitalon1 said in Y Axis homing in reverse direction if acceleration increased:
So some interesting news..
I switched back to the 1.8º steppers, reconfigured my steps to 80 steps/mm.
power cycled and tried homing, print head moved left and then backward on Y.
I increased homing current to 40% from the initial 30% and it homed correctly. Tried homing 10 times and 10 times it was perfect.
Tried the 2 prints back to back to see if after the 1st print it would misbehave on the homing sequence. to my surprise it did not, it's working flawlessly.
Thinking the back to back print outcome was a fluke, I tried it 3 more times, and all 3 times it was perfect.
The fact that even with the 1.8º steppers I saw backwards movement on Y until I changed homing current (same as I saw with the 0.9º steppers) makes me think my 0.9 steppers are fine, especially since they print without any issues.
Does this mean I have a bad board that is super sensitive to inductance and current draw of stepper motors, or is this expected behavior?
I couldn't for the life of me find a homing speed/current combination that produced consistent results with the 0.9º steppers.
I would prefer to go back to the 0.9º steppers as they are finer resolution and quieter.
At only 30% current the torque will be very low, so it is not surprising that the motor cannot maintain normal acceleration. I think your options are:
- Try again to find speed, current and stall sensitivity settings with which sensorless homing works using your 0.9deg motors, with the current higher than 30%; or
- In your homing files, use the M201 command to reduce the acceleration limit at the start, and restore it at the end using M201 again.
-
@phaedrux said in Y Axis homing in reverse direction if acceleration increased:
@tsitalon1 said in Y Axis homing in reverse direction if acceleration increased:
42BTGHM809
http://cdn.sparkfun.com/datasheets/Robotics/42BYGHM809.PDF
This the one?
Based on the specs they seem like they should be fine.
Up to what current have you been running the 0.9 motors during homing? 25% of 1300ma? That's only 300ma
Have you tried running them higher yet? Was it that low just to get a reliable stall? What was your stall detection tuning process?
https://duet3d.dozuki.com/Wiki/Stall_detection_and_sensorless_homing
Yep 42BTGHM809, I agree, they should be fine, but I do appear to be the only one using them or at least posted anything on these forums with that model number.
I used the procedure you linked to, and tried between 25% to 50% current, trying all different speeds. I will try again now that I believe the board is fine.
-
@dc42 said in Y Axis homing in reverse direction if acceleration increased:
@tsitalon1 said in Y Axis homing in reverse direction if acceleration increased:
So some interesting news..
I switched back to the 1.8º steppers, reconfigured my steps to 80 steps/mm.
power cycled and tried homing, print head moved left and then backward on Y.
I increased homing current to 40% from the initial 30% and it homed correctly. Tried homing 10 times and 10 times it was perfect.
Tried the 2 prints back to back to see if after the 1st print it would misbehave on the homing sequence. to my surprise it did not, it's working flawlessly.
Thinking the back to back print outcome was a fluke, I tried it 3 more times, and all 3 times it was perfect.
The fact that even with the 1.8º steppers I saw backwards movement on Y until I changed homing current (same as I saw with the 0.9º steppers) makes me think my 0.9 steppers are fine, especially since they print without any issues.
Does this mean I have a bad board that is super sensitive to inductance and current draw of stepper motors, or is this expected behavior?
I couldn't for the life of me find a homing speed/current combination that produced consistent results with the 0.9º steppers.
I would prefer to go back to the 0.9º steppers as they are finer resolution and quieter.
At only 30% current the torque will be very low, so it is not surprising that the motor cannot maintain normal acceleration. I think your options are:
- Try again to find speed, current and stall sensitivity settings with which sensorless homing works using your 0.9deg motors, with the current higher than 30%; or
- In your homing files, use the M201 command to reduce the acceleration limit at the start, and restore it at the end using M201 again.
I did try up to 50% with the 0.9º steppers, but I will try again, thank you.
-
@o_lampe said in Y Axis homing in reverse direction if acceleration increased:
@tsitalon1 said in Y Axis homing in reverse direction if acceleration increased:
M913 X30 Y25 ; reduce motor current to 25% to prevent belts slipping G91 ; relative positioning G1 H2 Z5 F4000 ; lift Z relative to current position G1 H1 X-333 F5000 ; home X axis G1 H1 Y-333 F5500 ; home Y axis G1 X5 Y30 F4000 ; go back a few mm ;G90 ; absolute positioning G30 ; home Z by probing the bed M913 X100 Y100
I might be wrong, but AFAIK a CoreXY requires a different homing sequence:
... G1 H2 Z5 F4000 ; lift Z relative to current position G1 H1 X-333 Y-333 F5000 ; home both axes at once <= insert this line G1 H1 X-33 F5000 ; home X axis G1 H1 Y-33 F5500 ; home Y axis ...
Especially the line I marked is important, maybe someone can confirm this? @Phaedrux
Here's the link to the Wiki page
//edit Does that also explain, why increasing acceleration changed the behaviour. The motors simply hit the 'endstops' at a different time?
That's not technically required for coreXY. The only reason to do it that way is to save some time as it moves both axis together until one of the axis endstops are hit, which stops both, then the following homing moves will home the remaining axis that hasn't yet hit the endstop. If you wanted you could do each axis independently without issue.
-
So I've spent a good part of my day trying different combinations with the 0.9º steppers.
Setting my homing-all file to the below was the only real way I could get it to consitently home:
M913 X25 Y25 ; reduce motor current to 25% to prevent belts slipping G91 ; relative positioning G1 H2 Z5 F4000 ; lift Z relative to current position G1 H1 X-333 F5000 ; home X axis G1 H1 Y-333 F5000 ; home Y axis G1 X5 Y30 F4000 ; go back a few mm ;G90 ; absolute positioning G30 ; home Z by probing the bed M913 X100 Y100
As soon as I go over 25% on the Y axis, it starts moving the wrong way on the Y axis.
But here's the kicker, even though I seem to have gotten it 100% consistent during homing, all that goes compltely out the window if I actual print something..
here's how that goes:
- power on printer
- Home-all
- once print is done I click print again
- this time during the homing sequence, it ignores the X movement and only initiates Y towards the front of the printer.
I don't think it matters, but here is my end code in my slicer:
M915 X Y S2 F0 R0 ; Stall detection - disable reporting M104 S0 ;extruder heater off M140 S0 ;heated bed heater off (if you have it) G91 G1 H2 Z5 F4000 G90 G0 Z5 X290 Y290 F3000 M84
-
And what M915 do you have set in config.g? What did you calculate for the H value?
-
@tsitalon1
In your end code you disable stall detection and also use M84 to switch off the motors. So the next homing will fail without re-enabling stall detection in your homeall.g. -
In addition to what others have said, motor temperature will have an effect on stall detection. So it's highly likely that the settings which work when the motors are cool, will not work when the motors are hot (after a print for example). Sensorless homing was "invented" by Prusa with the sole purpose of negating the need to fit switches thus saving a dollar or two on cost. It will never be as accurate or reliable as a simple switch (regardless of how expensive the control board is).
-
@tsitalon1 do you also have some acceleration control in your slicer? Could changing the acceleration limits you originally put in your config when running a print.
If it helps, I have a macro that sets all my motor parameters (steps, speed, accel, jerk current etc). I call this from config.g on startup, and can also call it from any other script (e.g. homing) to make sure that I know the machine settings haven't changed. Even better, I can reduce accel & jerk during homing, then reset it back so my config level with one line, and if I want to change my machine setup, I only need to change it in one place (the macro)
-
@tsitalon1 said in Y Axis homing in reverse direction if acceleration increased:
Setting my homing-all file to the below was the only real way I could get it to consitently home:
M913 X25 Y25 ; reduce motor current to 25% to prevent belts slipping G91 ; relative positioning G1 H2 Z5 F4000 ; lift Z relative to current position G1 H1 X-333 F5000 ; home X axis G1 H1 Y-333 F5000 ; home Y axis G1 X5 Y30 F4000 ; go back a few mm ;G90 ; absolute positioning G30 ; home Z by probing the bed M913 X100 Y100
As soon as I go over 25% on the Y axis, it starts moving the wrong way on the Y axis.-
The title of this thread is "Y Axis homing in reverse direction if acceleration increased". So have you tried reducing acceleration at the start of homeall.g, and restoring it at the end, as I suggested in my earlier response?
-
A common issue with stall-detect homing is the motors registering as stalled immediately, so that there is no movement. Is this one of the problems you are having? If so, the solution is to back off a little before the homing move.
My CoreXY machine uses this homex.g file:
G91 ; use relative positioning G1 H2 X0.5 Y0.5 F10000 ; energise motors to ensure they are not stalled M400 ; make sure everything has stopped before we change the motor currents M913 X20 Y20 ; drop motor currents to 20% G1 H2 Z3 F5000 ; lift Z 3mm G1 H1 X-400 F3000 ; move left 400mm, stopping at the endstop G1 H2 X2 Y2 F2000 ; move away from end G1 H1 X-400 F3000 ; repeat the homing move because it doesn't always work first time G1 H2 X2 Y2 F2000 ; move away from end G1 H2 Z-3 F1200 ; lower Z G90 ; back to absolute positioning M400 ; make sure everything has stopped before we reset the motor currents M913 X100 Y100 ; motor currents back to 100%
The M400 commands are not needed when using recent firmware.
-
-
Thank you guys for your help
So finally think I got it all straight, every time I think I had a consistent homing sequence, even without printing, later on in the day it would prove me wrong.
I finally settled on a very low current and a filtering of S3 in my M915 command in config.g
So here is my final configuration:
Config.g
; Drives M569 P0 S1 ; Drive 0 goes forwards M569 P1 S1 ; Drive 1 goes forwards M569 P2 S1 ; Drive 2 goes forwards M569 P3 S1 ; Drive 3 goes forwards M584 Y4 M350 X16 Y16 Z16 E16 I1 ; Configure microstepping with interpolation M92 X160 Y160 Z403 E820 ; Set steps per mm M566 X1000 Y1000 Z200 E900 ; Set maximum instantaneous speed changes (mm/min) M203 X18000 Y18000 Z1800 E18000 ; Set maximum speeds (mm/min) M201 X2200 Y2200 Z200 E3500 ; Set accelerations (mm/s^2) M906 X1300 Y1300 Z1000 E700 I25 ; Set motor currents (mA) and motor idle factor in per cent M84 S10 ; Set idle timeout ; Axis Limits M208 X3 Y0 Z0 S1 ; Set axis minima M208 X310 Y312 Z437 S0 ; Set axis maxima ; Endstops M591 D0 P2 C"e0stop" S1 ; filament monitor connected to E0 endstop M574 X1 Y1 S3 ; configure sensorless endstop for low XY M915 X Y S3 F0 R0
HomeAll.g
M913 X20 Y20 ; reduce motor current to 20% to prevent belts slipping G91 ; relative positioning G1 H2 Z5 F4000 ; lift Z relative to current position G1 H1 X-333 F4700 ; home X axis G1 H1 Y-333 F4700 ; home Y axis G1 X5 Y30 F4000 ; go back a few mm G30 ; home Z by probing the bed M913 X100 Y100
I also removed all M915 commands from both my start and end slicer gcode config. I was playing around with stall detection and forgot I had some M915 commands in there.
So I'm still not sure why I need such low current in my homing files, but I have tested this about 100 times, after a fresh power-up, both hot and cold, and printing 25 models back to back.
I'm still mapping E1 to Y axis, but I'll probably revert that back to normal after a few more days of testing.
DC42 - yes, after a print job when it would park the nozzle in the far right corner, on the next homing sequence it would trigger X as stalled and move only the Y axis.
I'll play around with your suggestions, but at this point I am satisfied and all seems to be working well.
I still find it VERY odd that moving the homing current above 20% will not trigger a stall, but instead make the Y axis motor spin in the wrong direction, but that does not happen during normal printing.. I don't understand how/why that happens..
-
@tsitalon1 You might want to switch back to absolute positioning after you have homed. It can get very confusing otherwise.
-
@gloomyandy said in Y Axis homing in reverse direction if acceleration increased:
@tsitalon1 You might want to switch back to absolute positioning after you have homed. It can get very confusing otherwise.
I have it in my start gcode in my slicer, but I will make the change, thank you!
-
It will restore the original absolute/relative mode when the macro finishes. But good practice to restore axis motion to absolute anyway.