Skip to content
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

max speed with tcm 16 microsteps #29

Open
guestisp opened this issue Aug 16, 2023 · 1 comment
Open

max speed with tcm 16 microsteps #29

guestisp opened this issue Aug 16, 2023 · 1 comment

Comments

@guestisp
Copy link

Hi all
i've read that the max speed for this library is 4000steps/s to have a reliable movement.

But is this including the 16 microsteps for TMC2209 (or others) or just the full step? Because i'm currently using 9600 steps/mm (200 * 3 * 16microsteps) without any visible issue on a ESP32 but i need a little bit more speed, like 12800 (200416 steps/s)

What do you think ?

@Rerouter
Copy link

I may have worked out how to make it run at-least faster, the rate of acceleration may change its scaling as a side effect, but it retains the behavior towards direction changes while allowing as high a max speed as you have defined, not saying your device can crunch it, but it allows it to reach it.

_cn could only get slightly lower than the original acceleration, so unless you set a very high value it limited your max speed,

something you can try as a patch is replacing this
_cn = _cn - ((2.0 * _cn) / ((4.0 * _n) + 1)); // Equation 13
with
_cn = ((2.0 * _c0) / ((4.0 * _n) + 1));

and this
long stepsToStop = (long)((_speed * _speed) / (2.0 * _acceleration)); // Equation 16
with
long stepsToStop = abs(_n);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants