0

Microstepping with arduino
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Microstepping with arduino

by nekodrugi99 on Sun Jul 06, 2008 6:50 am

Is it possible to use microstepping with stepper motor and arduino?
nekodrugi99
 
Posts: 25
Joined: Fri Jul 04, 2008 4:12 am

by adafruit on Sun Jul 06, 2008 4:59 pm

yes. actually i got this working but i havent posted it. needs a little more tweaking.

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm
Location: nyc

by mewControl on Mon Jul 07, 2008 1:08 pm

Cool, maybe I will hold off my little project and work on something else while the new stepper code is...errr...distilled.

Are you taking into consideration acceleration, or are you providing primitives and leaving that as an exercise to the higher level implementer? If it is step and direction, I imagine it is the later.

Microstepping is great for low and medium speeds with benefits going away after that, but getting to the "after that" portion of the curve or even through the mid-band can sometimes require a trajectory planned around an acceleration curve.


Thanks.
mewControl
 
Posts: 10
Joined: Wed Jul 02, 2008 11:05 am

by adafruit on Mon Jul 07, 2008 1:36 pm

the library will only have low level microstepping. the 'computer control' part is up to you :)

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm
Location: nyc

by macegr on Mon Jul 07, 2008 1:53 pm

I used the following single-page algorithm in an ATmega to implement precise ramped acceleration; works very smoothly: http://hwml.com/LeibRamp.pdf
macegr
 
Posts: 292
Joined: Fri Apr 04, 2008 4:46 pm

by mewControl on Mon Jul 07, 2008 3:30 pm

macegr wrote:I used the following single-page algorithm in an ATmega to implement precise ramped acceleration; works very smoothly: http://hwml.com/LeibRamp.pdf


That's good stuff.

Is HWML yours? Very cool piece of hardware. This is an unimportant digression, but the command set does not appear to offer a means of setting backlash which means some error may exist depending upon the machine of course.
mewControl
 
Posts: 10
Joined: Wed Jul 02, 2008 11:05 am

by macegr on Mon Jul 07, 2008 6:01 pm

HWML is not mine. The LeibRamp.pdf has been floating around for a few years. You might even find a scanned copy of the original document.

Anyway, it's a good algorithm. It requires floating point calculations, but if you attempt to do the same thing with only integer math, it will require just as many CPU cycles.
macegr
 
Posts: 292
Joined: Fri Apr 04, 2008 4:46 pm

Please be positive and constructive with your questions and comments.