Page 1 of 1

Possible reasons of gradual Y axis drift?

PostPosted: Sun Mar 17, 2024 4:07 pm
by aethersis
I have a strange problem, where running very long or complicated GCODEs causes the Y axis to gradually drift. One such sample GCODE file is attached to this topic.
What I mean by drift is that when I tell the machine to go to 0 position at the end of the program by calling G0 X0Y0Z0, the Y axis is actually offset from the original zero point by roughly 0.5mm along the Y axis, which is a very large error. This was verified and measured by drilling a tiny hole in the stock before running the GCODE, so the drift can be measured at the end of the program.

There are several reasons of this fault that came to my mind:
0. Something funky with the GCODE that I am not aware of
1. Numerical error building up within UCCNC software (unlikely, since it's only the Y axis that drifts and the GCODE represents a symmetrical operation along a circle)
2. Electrical noise causing the motor drivers (DM542) to fail to register some of the control pulses - this would be possible, but how do I measure/get rid of it?
3. Skipped steps - that's most likely not possible, since the axis loads are negligible (at least 2 orders of magnitude) compared to what this machine can reliably handle
4. Too high pulse frequency - it's already been taken care of and reduced to 50kHz which is 4 times lower than the maximum the DM542 drivers claim to be able to handle
5. Backlash - it's also not possible, because the machine runs precision made linear rails and ball screws on a rigid steel frame, and pushing against the axis with full force when the motors are enabled causes movement of the spindle that's less than 0.01mm.

If anyone has an idea as to what might be causing this strange issue, please let me know - it would save me a huge amount of time and bring back my confidence in this machine.

Re: Possible reasons of gradual Y axis drift?

PostPosted: Mon Mar 18, 2024 3:01 am
by ger21
Most likely #3 but possibly #2.
Reduce the Y axis acceleration by 50%, and see if that fixes the issue.

Re: Possible reasons of gradual Y axis drift?

PostPosted: Mon Mar 18, 2024 11:55 am
by aethersis
Is there any way I could reduce the noise by e.g. installing some ferrite beads on the step/dir line? Any diagrams on how to do this?

Re: Possible reasons of gradual Y axis drift?

PostPosted: Mon Mar 18, 2024 1:15 pm
by ger21
I really don't think it's a noise issue.

Re: Possible reasons of gradual Y axis drift?

PostPosted: Sat Mar 23, 2024 7:58 pm
by Battwell
main reason for an axis drift i have found is if the step active low is set incorrectly.
this makes it change direction on the wrong edge of the signal so adds or subtracts a step a one end of the move.

to test. cut a square repeatedly by swapping m30 for m47 and deleting the m5 spindle off command from the code.
if the square starts to stretch in one direction you are losing position.

also. have you swapped the axis drives over with one without problems to see if the fault switches to the other axis.
i have had stepper drives with dodgy optos give some weird results.

Re: Possible reasons of gradual Y axis drift?

PostPosted: Mon Mar 25, 2024 2:37 pm
by formantjim
Hi Batwell that is an extremely interesting observation "main reason for an axis drift i have found is if the step active low is set incorrectly.
this makes it change direction on the wrong edge of the signal so adds or subtracts a step a one end of the move."
Could you expand upon this statement "if the step active low is set incorrectly." If the stepper motor needs a positive going pulse for step one would set it so in the setup. This has got me thinking now as I have two servo's in the Y axis and at times I've noticed slight changes in the accuracy of my setup. And as you say doing a test square is the best way of testing this thank you.