-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Motion Controll seems to be way too Simple #52
Comments
PS Ignoring Stall GuardThe move() function also ignores the Trinamic stall guard completely! Man, you have a state of the art high performance stepper driver, but ignoring it's very basic features! |
Same applies to float _speed = 4500;
const uint16_t steps = BowdenLength::get();
for (uint16_t i = 0; i < steps; i++)
{
do_pulley_step();
if (i > 10 && i < 4000 && _speed > 650) _speed = _speed - 4;
if (i > 100 && i < 4000 && _speed > 650) _speed = _speed - 1;
if (i > 8000 && _speed < 3000) _speed = _speed + 2;
delayMicroseconds(_speed);
}
} Further more here a |
With this crap of motion algorithms, spread around the whole code, I would not suggest to call the version to be released anything with 1.x.x! Especially with all the bug reports about misbehaviour of the selector and idler. |
I'm glad Karl took the effort to dig into the code. I've seen LOTS of losing track of where you are, etc. When the printer says to go to a channel, the MMU moves (some parts) left or right one, but it has no idea where it IS. I understand there aren't sensors on everything, but calling positions explicitly seems like it could avoid a lot of this "four left and 3 right" - that's how everything gets out of sync. |
I've fixed that issue in a simple showcase: |
I have opened a pull request using the AccelStepper library: |
I've played with Karl's current firmware a bit and can at least confirm it is much much faster and gets lost a lot less, has stallguard basically working and some other bits. It has a totally different feel and brings a hint of a smile to your face. |
I just reviewed some parts of the code.
the 'move()' function is a bit too simplistic:
A simple but better approximation could be like this:
Here an 1/x function is approximated by an a^(-x) function, which is simpler to calculate, since no division is needed.
Starts with 66% of end speed
Quick calculations in Libre Office show, that the speed for e.g. the idler is "ramped up" from 666 steps/s to 1000 steps/s. That's far away from a proper acceleration. It starts with 66% of the end speed immediately.
No Deceleration
But the larger problem seems to be, that there is absolutely no deceleration implemented!
Inconsistent Speeds
If the function is called with multiple non-zero parameters, the speed steps, when one of them finished it's movement!
The text was updated successfully, but these errors were encountered: