Looking for some help with stepper motor control

361 views
Skip to first unread message

Tim Driedger

unread,
Nov 11, 2012, 2:10:29 AM11/11/12
to bay-are...@googlegroups.com
Hey Everyone,

I'm wanting to use a stepper motor for a project I'm working on and was looking for some advice. First, here is the setup:

- Arduino Leonardo
- AccelStepper library for Arduino
- SparkFun Big Easy Stepper Driver (Allegro A4983, 35V/2A max)
- Kysan 1124090 Nema 17 Stepper Motor
- 12V DC power

Right now I've got the driver set to 1/4 stepping and I'm maxing out around 300rpm. (4000 steps/second, 800 steps/360 degrees). The reading I've done seems to indicate that 4000 steps/second is about the most I can get out of the Arduino. I've tried 1/2 stepping and full stepping on the driver but loose any usable torque from the motor.

Any thoughts on how I could get higher rpm? I was hoping for 600-1000rpm for the project.

Can I get higher step rates out of the Arduino easily? (I know that you can start playing around with timers, but I'd like to keep thing simple and I need an easy way to accelerate/decelerate the motor)

Would driving the motor with 24+ volts give me usable torque at 1/2 or full step settings?

Should I choose a different motor (the one I'm testing with was on-hand)

Thanks,

Tim

Peter

unread,
Nov 12, 2012, 2:29:12 PM11/12/12
to bay-are...@googlegroups.com
 It seems counterintuitive that you would get less torque from using the 1/2 or full step.  You should get more torque at full step than 1/2 step.  http://en.wikipedia.org/wiki/Stepper_motor#Phase_current_waveforms

Did you try 24V? 

Now I would ask how comfortable are you with writing Atmel C?  The Arduino's hardware can deliver the steps that you need but you may have to write some code of your own.  

Peter

unread,
Nov 12, 2012, 6:33:53 PM11/12/12
to bay-are...@googlegroups.com
I thought about this some more and based on this document: http://www.kysanelectronics.com/Products/Detail.php?recordID=7850
the inductance of your motor is 4.8mH / winding.  If you are trying to do 1000 rpm or 16.7rev/sec, you will need to step every 300 us.  Assuming the driver applies the voltage inlstatnously the current will only ramp to 0.75A in 300us, which is not the full rating, that is why you are not getting much torque.  I would turn up the voltage, if you haven't already.  

Tim Driedger

unread,
Nov 14, 2012, 1:09:43 AM11/14/12
to bay-are...@googlegroups.com
Looks like 24 volts helps things out a lot! Now I'm getting good torque and RPM in full step mode. Thanks for the help.

Now on to the next item... I can get the RPM I need in full step mode but I'd like to find a way to microstep at slower speeds and switch over to full step while ramping up the higher RPM. Any recommendations?

Tim

Peter

unread,
Nov 14, 2012, 6:07:40 PM11/14/12
to bay-are...@googlegroups.com
You could connect MS1,2,3 to digital outputs on your Arduino and change from fractional step to full step as you accelerate.  I have never done this but I can't think of anything wrong with it.  

wolfmanjm

unread,
Nov 23, 2012, 2:53:48 AM11/23/12
to bay-are...@googlegroups.com
I played with AccelStepper and for some reason it is very inefficient and the top limit is 4000steps/sec
"The fastest motor speed that can be reliably supported is about 4000 steps per second at a clock frequency of 16 MHz"

I wrote my own little stepper speed tester and I calculate the delay between steps for any given requested speed, and I can easily issue steps faster than the stepper can handle, so not sure why AccelStepper is so slow.

I have done quite a bit of testing with speeds for a Nema17 from Kysan, and it seems the top speed, regardless of microsteps, is 600RPM. with an unloaded stepper. To get that I had to drive it at the maximum current of 1.5 Amps/winding.

I also discovered from the specs for the A4988 that when using full stepping, that it only delivers 70% of the max current to the stepper (there is a nice table towards the end of the spec). So if you want to actually deliver the full 1.5Amps to the stepper you need to bump up the Vref a bit.

There is a faster stepper available here http://www.phidgets.com/products.php?category=23&product_id=3304_0  with a top speed of 1250 RPM, but at a significantly reduced torque.


On Saturday, November 10, 2012 11:10:29 PM UTC-8, Tim Driedger wrote:
Reply all
Reply to author
Forward
0 new messages