Searching \ for 'stepper motor de/acceleration' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: massmind.org/techref/io/steppers.htm?key=stepper
Search entire site for: 'stepper motor de/acceleration'.

Truncated match.
PICList Thread
'stepper motor de/acceleration'
2002\08\05@172606 by Francisco Ares

flavicon
face
Hi all PIClisters.

Can someone point me to an algorithim to do accelaration for a stepper
motor controller?

My controller uses one timer overflow ISR to switch the phases of the
motor, so the speed is calculated through the period register of this timer.

I need to calculate different values for the period register for a
constant (or close to constant) acceleration, preferably "on-the-fly",
inside the same ISR.

My first atempts resulted in that the final speed was never reached
because of accumulating errors in calculations.

Any hints?

Thank you all.
Francisco

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2002\08\05@180603 by Peter L. Peres

picon face
On Mon, 5 Aug 2002, Francisco Ares wrote:

>Hi all PIClisters.
>
>Can someone point me to an algorithim to do accelaration for a stepper
>motor controller?
>
>My controller uses one timer overflow ISR to switch the phases of the
>motor, so the speed is calculated through the period register of this timer.
>
>I need to calculate different values for the period register for a
>constant (or close to constant) acceleration, preferably "on-the-fly",
>inside the same ISR.
>
>My first atempts resulted in that the final speed was never reached
>because of accumulating errors in calculations.

For each 'step' of acceleration you compute Time1 = Time0 - dt and set the
timer to that. dt is set previously = (Starttime - Fasttime)/Numsteps,
where Numsteps is the number of intermediate speeds you need and Starttime
a timer value that corresponds to a minimum safe starting speed. When
Time0 == Fasttime you have arrived to max speed.

Peter

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2002\08\06@115405 by williams.engineering

picon face
I have come up with a perfect acceleration routine that works good for
me.  It allows me to get my steppers turning at 30rev/s

I use three timers.  One for the acceleration, one for a constant speed
after acceleration and one for a constant time interval of 1ms which I
use to update the acceleration timer.

On every 1ms interval, I increase accelerations timer values by 0x60
(30"/sec^2) of acceleration. Once, the acceleration timer value =
constant speed, then I disable timer 3, 0 and enable the constant speed
timer of

The acceleration value was calculated as follows:
30"/sec^2*0.001 = 0.03"/1ms
On my system 1" = 3200 steps so 0.03*3200 = 96 or 0x60.

So for every millisecond, I add 0x60 to the acceleration timer, until
it's value has reached the desired constant speed value of the
corresponding timer.

Regards,

James


{Original Message removed}

More... (looser matching)
- Last day of these posts
- In 2002 , 2003 only
- Today
- New search...