Society of Robots - Robot Forum

Software => Software => Topic started by: Azraels on February 18, 2013, 03:54:02 PM

Title: Stepper acceleration/deceleration
Post by: Azraels on February 18, 2013, 03:54:02 PM
Hello everyone! While I could probably spend time searching for this information with google I thought I may as well use it as my first post. I am in the middle of building an arm with salvaged steppers. This is the second arm I have built. The first one was built using steppers and servos and only had 4 dof plus gripper and was controlled by an arduino and a couple of parallax joysticks. It was pretty limited in range of movement.
The new arm will have 6 dof and substantial more power.
My question is about accelerating steppers from stop. I have been using the 'for' statement in arduino to accelerate and decelerate. example: for(x=0; x<100; x++) { stepper.setSpeed(x); step(1); }.......then continue stepping at speed and then to stop reverse that process. I have tested this and it does work and keeps the stepper from rough stop/starts.
Is this the best way to accomplish this and should I start and stop at 0 speed or higher?
Title: Re: Stepper acceleration/deceleration
Post by: jwatte on February 18, 2013, 05:18:17 PM
That seems like a reasonable way of doing it, assuming you can get the timing right -- there's no delay built-in that loop, so it may get to full speed pretty quickly. (Maybe "step" does some delaying?)

Also, if step() does the delay based on speed, then you will actually speed up at a slower rate of acceleration in the beginning.

Best would be to use (or build) a library that has built-in support for trajectory ballistics like this, where you can say "go to speed X with an acceleration of Y" and it takes care of it using proper math and interrupts/timers.

Title: Re: Stepper acceleration/deceleration
Post by: newInRobotics on February 19, 2013, 02:13:10 AM
Is this the best way to accomplish this [...]
In industry it is common to use fuzzy logic to achieve what You want.
Title: Re: Stepper acceleration/deceleration
Post by: jwatte on February 20, 2013, 11:19:37 AM
Quote
In industry it is common to use fuzzy logic to achieve what You want.

Really? I can't find a "fuzzy logic" controller from Kollmorgen or Allen Bradley or Delta Tau, all of whom are large, industry leading motion control companies.
What industry, and what controllers, are you suggesting use bona fide "fuzzy logic"?
Title: Re: Stepper acceleration/deceleration
Post by: newInRobotics on February 20, 2013, 11:44:59 AM
Quote
In industry it is common to use fuzzy logic to achieve what You want.

Really? I can't find a "fuzzy logic" controller from Kollmorgen or Allen Bradley or Delta Tau, all of whom are large, industry leading motion control companies.
What industry, and what controllers, are you suggesting use bona fide "fuzzy logic"?
Just because You can't find any it does not mean it is not used :) Fuzzy Application Library/Technical Applications/Industrial Automation (http://www.fuzzytech.com/e/e_a_plc.html)
Title: Re: Stepper acceleration/deceleration
Post by: jwatte on February 20, 2013, 07:24:51 PM
One link to a particular programmable logic controller does not mean it's "common" in industry :-)
I know of systems controlled by neural networks, too. I wouldn't call them "common" however.