Acceleration should happen every step. #107

Closed
arthurwolf opened this Issue Feb 13, 2013 · 4 comments

Projects

None yet

2 participants

@arthurwolf
Contributor

Currently, acceleration is calculated in a separate interrupt, at a fixed frequency.
We want it to update every step.

This is an interresting read : http://www.eetimes.com/design/other/4026992/Linear-motor-control-without-the-math-item-1

@arthurwolf arthurwolf was assigned Feb 13, 2013
@ghost
ghost commented Aug 29, 2013

As of Apr 15 2013, there's an mbed library based on "Generate stepper-motor speed profiles in real time" from "David Austin - December 30, 2004".

See here : http://mbed.org/users/mederic/code/Stepper

@wolfmanjm
Contributor

Interesting, however the code is flawed,

  1. _dt0 is used potentially without ever being set.
  2. _acc is used as a boolean even though it is a float so probably will never be false (would need to be exactly 0.0000).
  3. _acc & _dec are never initialized if setAcceleration() and/or setDeceleration() are not called.

Basically very sloppy code.

With some massaging the code could be made to work, probably be very easy to put into the homing code to test, which currently has no acceleration,

I'm not sure how well this would work when you need to synchronize three axis though.

@arthurwolf
Contributor

2013/8/29 Jim Morris notifications@github.com

Interesting, however the code is flawed,

  1. _dt0 is used potentially without ever being set.
  2. _acc is used as a boolean even though it is a float so probably
    will never be false (would need to be exactly 0.0000).
  3. _acc & _dec are never initialized if setAcceleration() and/or
    setDeceleration() are not called.

Basically very sloppy code.

With some massaging the code could be made to work, probably be very easy
to put into the homing code to test, which currently has no acceleration,

I'm not sure how well this would work when you need to synchronize three
axis though.

From what I've been told there is a way to do this that you do the accel on
each axis independently, and still get all the accel curves perfectly
synched. It has to do with rounding, math, and choosing between counting
time or steps etc. Logxen understands this quite well I think.


Reply to this email directly or view it on GitHubhttps://github.com/arthurwolf/Smoothie/issues/107#issuecomment-23520122
.

Courage et bonne humeur.

@wolfmanjm
Contributor

this is WIP, and will be released soon.

@wolfmanjm wolfmanjm closed this Jun 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment