Stepper Speed + Motor Shield

Adafruit Ethernet, Motor, Proto, Wave, Datalogger, GPS Shields - etc!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
jamesob
 
Posts: 16
Joined: Fri Jul 30, 2010 7:12 am

Stepper Speed + Motor Shield

Post by jamesob »

Hi There

I was wondering if there a maximum speed you can use in the

motor.setSpeed(500); // 10 rpm

or does it depend on stepper motor you use ?

Cheers

James

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: Stepper Speed + Motor Shield

Post by adafruit_support_bill »

It will depend on the stepper motor, and also to some extent the stepping mode you use (SINGLE, DOUBLE, INTERLEAVE, MICROSTEP).

audiomason
 
Posts: 5
Joined: Fri Oct 08, 2010 1:37 pm

Re: Stepper Speed + Motor Shield

Post by audiomason »

I'm trying to figure this out, too.

I created a test program that incrementally ramps the speed up to a MAX_SPEED setting:

Code: Select all

void loop() {
  for(int i = 1; i < TOP_SPEED; i++) {
    Serial.print("Speed is: ");
    Serial.println(i);
    motor1.setSpeed(i);
    motor2.setSpeed(i);
    doublestep(10, FORWARD, SINGLE);
  }
}
My motors start to get jerky around 60 rpm. When I crank it up faster than that the motors barely move even though they're getting the pulses, and the power supply and L293DNE ICs get really hot.

What's weird is that the pulses get faster up to 328 rpm (even though the motors don't turn), at which point they halt and then begin accelerating as if the speed setting was set back to 1?! This happens again at 656 and every multiple of 328. I looked at the source code for setSpeed to see if there was some modulo stuff going on there, but no, the code is pretty straight forward:

Code: Select all

void AF_Stepper::setSpeed(uint16_t rpm) {
  usperstep = 60000000 / (revsteps * rpm);
  steppingcounter = 0;
}
What I'd really like to know is how to get the motor speeds up without the jerkiness? It seems like the performance of the L293DNE degrades as it gets hotter. Could this be true? I tried a bigger power supply, which gave me better performance at first, but quicker degradation due to the heat. I've got my L293DNE's piggybacked with heat sinks on top, I don't know what else I can do...

I might be searching for a more robust stepper controller if I can't get the speeds up to where I need them to be.

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: Stepper Speed + Motor Shield

Post by adafruit_support_bill »

It comes down to the physics of the motor vs the controller. Jones has an excellent description of stepper motor physics: http://www.cs.uiowa.edu/~jones/step/physics.html

The L293D is a relatively simple general purpose stepper controller. There are more sophisticated controllers that can be tuned to the characteristics of a particular motor, but these are generally fairly expensive.

What voltage is your power supply? And what is the motor rated for? You can probably get more speed by increasing your supply voltage. 10-20% over the rated voltage is generally not a problem for intermittant operation. And be sure to take into account the voltage drop through the H-bridge (about 1.4v).

audiomason
 
Posts: 5
Joined: Fri Oct 08, 2010 1:37 pm

Re: Stepper Speed + Motor Shield

Post by audiomason »

The motor is rated for 5.4V 1.5A, and I've tried a few different power supplies, running two motors off the board: 7.5V 1.5A, 9V 1A, and 12V 2.5A.

Here's the manual for the motor: http://download.siliconexpert.com/pdfs/ ... 223870.pdf. It's the G070.

I read the Jones link, and the torque versus speed section seems to relate, although I still don't quite understand all the physics.

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: Stepper Speed + Motor Shield

Post by adafruit_support_bill »

1.5A per phase is a little on the big side for the L293D. They are rated for 600mA (1A peak). Piggy backed, you should get almost double that. Not to say that it won't work, but you don't have much headroom there for driving any kind of load.

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino Shields from Adafruit”