Hi, I have an Atmega 328 with MotorShield. I have a 12v 1.8˚ bipolar stepper that works but will not go any faster than 25 rpm. If I try any setSpeed value between 30 and 300 it just goes slower and seems to have a hard time at that.
Any suggestions? is my code missing anything?
Thanks!
#include <AFMotor.h>
AF_Stepper motor(200, 2);
void setup() {
Serial.begin(9600);
Serial.println("Stepper test");
motor.setSpeed(25);
motor.step(10, FORWARD, SINGLE);
motor.release();
}
void loop() {
motor.step(10, FORWARD, SINGLE);
}
Stepper won't move faster than 25rpm
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- adafruit_support_bill
- Posts: 88096
- Joined: Sat Feb 07, 2009 10:11 am
Re: Stepper won't move faster than 25rpm
What are you using for a power supply? How do you have it connected?
-
- Posts: 8
- Joined: Tue Oct 04, 2011 3:03 pm
Re: Stepper won't move faster than 25rpm
Just the USB from the Arduino.. Not enough power? motor is 400 milliamp.
I just tried running it at 40 rpm with the 5v Arduino ext power adapter and it still wont do it. Or does the MotorShield need the power directly?
I just tried running it at 40 rpm with the 5v Arduino ext power adapter and it still wont do it. Or does the MotorShield need the power directly?
- adafruit_support_bill
- Posts: 88096
- Joined: Sat Feb 07, 2009 10:11 am
Re: Stepper won't move faster than 25rpm
That is 5v@500mA max - not enough voltage or current for your motor. You motor will want to see 12v@400mA on each energized coil. Since generally there will be 2 energized coils at a time while stepping, you will need 12v @800 mA for the motor. It is generally better to use a separate power supply for the motor. Remove the Power Jumper and wire the external supply to the external power terminals on the shield.Just the USB from the Arduino
-
- Posts: 8
- Joined: Tue Oct 04, 2011 3:03 pm
Re: Stepper won't move faster than 25rpm
Thank You.. It performs much better now with 12v external power, but it still will not go faster than 100 rpm. Is this the limit for this stepper maybe?
- adafruit_support_bill
- Posts: 88096
- Joined: Sat Feb 07, 2009 10:11 am
Re: Stepper won't move faster than 25rpm
1.8 degree steppers are designed more for precision than speed.
Please be positive and constructive with your questions and comments.