Stepper Motor won't turn quickly--Please advise

I have a 12-volt, 6-wire stepper motor from an old scanner that I am running with an EasyDriver 4.4. After testing with a multimeter, I have found the 2 common wires, which I have ignored. The remaining four wires I have hooked up to the EasyDriver. I can get the motor to work quite nicely, but the problem is that it will not turn nearly as fast as it does in the scanner. I suspect that when this motor was used in the scanner, the other two wires enabled more advanced control of the motor.

Using Dan Thompson's stepper motor tutorial code as a base (see below), I can drive the motor as follows:

Full Step: Minimum Microseconds Delay is 1800
Half Step: Minimum Microseconds Delay is 1000
Quarter Step: Minimum Microseconds Delay is 500
Eighth Step: Minimum Microseconds Delay is 300

(Note that these values are all without and load or strain placed on the motor...it is just sitting on the workbench. Also, the motor is supplied with 12-volt external power.)

If I set the delay to less than these values, the motor just grinds and freezes. The speed I can achieve even at full step is a fraction of the speed that the motor can achieve in the scanner.

So, my question is: Is there anything I can do to improve how I drive the motor?

I suspect that this is a unipolar motor, that can be driven as if it is bipolar...is this the underlying problem causing slow speeds?

Alternately, is there a motor driver out there that could utilise all six of the leads?

// Based on code from Dan Thompson:  http://danthompsonsblog.blogspot.com/

////// ED_v4  Step Mode Chart //////
//                                //
//   MS1 MS2 Resolution           //
//   L   L   Full step (2 phase)  //
//   H   L   Half step            //
//   L   H   Quarter step         //
//   H   H   Eighth step          //
//                                //
////////////////////////////////////

int DIR = 3;         // PIN  3 = DIR
int STEP = 2;        // PIN  2 = STEP
int MS1 = 13;        // PIN 13 = MS
int MS2 = 9;         // PIN  9 = MS2


void setup() 
{
  pinMode(DIR, OUTPUT);   // set pin 3 to output
  pinMode(STEP, OUTPUT);  // set pin 2 to output
  pinMode(MS1, OUTPUT);   // set pin 13 to output
  pinMode(MS2, OUTPUT);   // set pin 9 to output
  
  digitalWrite(13, LOW);  // MS1 ...These two lines set
  digitalWrite(9, HIGH);  // MS2 ...it to 1/4 stepping
}


void loop()
{
  int i;
  digitalWrite(DIR, LOW);
  delay(5000);

  for (i = 0; i<5000; i++)
  {
    digitalWrite(STEP, LOW);
    digitalWrite(STEP, HIGH);
    delayMicroseconds(500);
  }
}

Is it possible to move at full speed with MS1 & MS2 pulled high with pullup resistors placing the driver chip in 1/8 the step mode ?

placing the driver chip in 1/8 the step mode

That is the last thing you want to do if you are trying to increase the motor speed. You want whole steps.

To get a motor to run faster you need more voltage so the current gets into the coils faster. A good way to do this is to use a higher voltage but use a chopping driver to regulate the current to the maximum you should have.

You can wire a 6 wire stepping motor as a bipolar motor and that will be easier to drive than a unipolar motor.

Grumpy_Mike:
To get a motor to run faster you need more voltage so the current gets into the coils faster. A good way to do this is to use a higher voltage but use a chopping driver to regulate the current to the maximum you should have.

Mike, I just checked, and the Easy Driver is a chopping driver...but the only thing I see on the Sparkfun website is that it has an on board voltage regulator for the digital interface that can be set to 5V or 3.3V. Do you know if there is a way to regulate the current down to the maximum (12v for this motor) using Easy Driver? Or should I upgrade to a different driver?

Right now, in half step mode, I would say that the motor is achieving a speed of about one quarter of the speed in the scanner. Will the over-volting method compensate dramatically, or are we talking about a modest increase (10-20%) in motor speed?

The "motor voltage" is actually irrelevant. What is important is maximum allowed steady state winding current per winding -- more than that and the motor will overheat. You need to know the maximum in order to set the EasyDriver correctly. One way to estimate the maximum motor current is to measure the winding resistance using a multimeter (from the coil center tap to one end) and divide that into 12 V.

Once you have that current value (and if it is less than or equal to 750 mA) then the EasyDriver will work. Set the motor current according to the EasyDriver instructions and use any voltage motor power supply, up to the 20 V maximum allowed.

Keep in mind that to get the maximum motor speed, you have to start slowly and gradually accelerate the rotational rate. If that isn't fast enough, Pololu makes chopper drivers that will allow you to use motor power supplies up to about 45 V. That will make a huge difference.

placing the driver chip in 1/8 the step mode

That is the last thing you want to do if you are trying to increase the motor speed. You want whole steps.

EXACTLY ! The board is shipped with pullup resistors !
Unless the OP pulls those lines low it will ALWAYS be in 1/8 step Mode !
I thought that asking the question would lead the OP to look at the datasheet and deduce that.
One would expect that response, wouldn't one ?

You can see from the code that the OP is setting it for 1/4 step..

  digitalWrite(13, LOW);  // MS1 ...These two lines set
  digitalWrite(9, HIGH);  // MS2 ...it to 1/4 stepping

Is that FULL speed ?

raschemmel:
Is that FULL speed ?

I changed the code and iterated through all step settings (full, half, quarter, eighth).

I would estimate that at full step (both MS1 and MS2 pulled LOW) the motor is only doing about a quarter to a third of the speed that is possible when plugged into the scanner.

jremington:
One way to estimate the maximum motor current is to measure the winding resistance using a multimeter (from the coil center tap to one end) and divide that into 12 V.

The resistance is 99.3? ... dividing this into 12 (ie 12/99.3) is 0.1208 ....what do I do with this number (bit of a newbie here! ;))

The resistance is 99.3? ... dividing this into 12 (ie 12/99.3) is 0.1208 ....what do I do with this number

That is 0.12 amperes, or 120 mA.

Follow the instructions to set the motor driver to 120 mA, then you can use a power supply of up to 20 volts to power the motor. Use full step mode for fastest rotation.

Are you using that same 12V power source as the motor power for the Easy Driver ?

raschemmel:
Are you using that same 12V power source as the motor power for the Easy Driver ?

Yes, I've copied the layout shown here: Dan Thompson: EasyDriver 4.2 Tutorial

jremington:
Follow the instructions to set the motor driver to 120 mA, then you can use a power supply of up to 20 volts to power the motor. Use full step mode for fastest rotation.

According to this info from Easy Driver stepper motor driver ...
The largest voltage on that test point (normally 5V) will result in the largest current through the motor coils (750mA), and the smallest voltage on TP1 (1V) corresponds to the least current through the motor coils (150mA).
...the least current I can put through the coils will be 150mA; so I assume that I should use a power supply slightly under 20 volts. What is the mathematical equation you are using to determine the maximum voltage? It would be good to have this for future reference!

the least current I can put through the coils will be 150mA; so I assume that I should use a power supply slightly under 20 volts. What is the mathematical equation you are using to determine the maximum voltage? It would be good to have this for future reference!

Oops, I looked at the specs for the V4.4 board and failed to notice the 150 mA minimum.

The 12V motor "rating" just comes from the coil resistance and the maximum rated current -- the reverse of the calculation I suggested that you do. The real limitation of a stepping motor is its ability to dissipate heat from the winding current. If you run your motor at 150 mA, then it may overheat. Unfortunately the voltage of the motor power supply (if greater than 12V) is irrelevant with the EasyDriver because the chip on the EasyDriver actively limits the current regardless. The reason for using higher voltages is to achieve the rated current faster, which leads to faster steps.

You can run the EasyDriver at 12 V, but then the current limiting feature doesn't work and microstepping is unlikely to work correctly as well. It is beginning to appear that this combination won't work well for you. In other words, if you really need a faster step rate, you will probably have to use another, higher current stepping motor.

For a great resource on stepping motors and drivers see this site: http://homepage.cs.uiowa.edu/~jones/step/

To get maximum speed you must limit the acceleration to what the motor
can tolerate, ie. use the AccelStepper library and adjust the max acceleration
by experiment.

With a good microstepping driver microsteps can give better motor performance
because resonance effects are reduced. Mechanical damping is also very effective
at limiting resonance, if you've removed the motor from its drive belt then it will
perform worse.

jremington:
It is beginning to appear that this combination won't work well for you. In other words, if you really need a faster step rate, you will probably have to use another, higher current stepping motor.

I was coming to the same conclusion :slight_smile: and will be ordering a much better high torque motor in the coming days. Thanks for the link on stepper motors, I'll take a look at it!

MarkT:
To get maximum speed you must limit the acceleration to what the motor
can tolerate, ie. use the AccelStepper library and adjust the max acceleration
by experiment.

I had attempted to use the AccelStepper library, but the motor didn't seem to be performing correctly. From a dead stop through to the end of acceleration, the motor would make a grinding noise. Only when it reached full speed would the grinding stop.

It will be interesting to see how a better motor performs. Any thoughts on this nema 17 motor?

But was it accelerating? Steppers are noisy, especially on full-steps.

Have you investigated the voltages/currents the motor was subject to when
in the scanner itself? Its quite possible it was being overdriven at times, since
a scanner is an intermittent-duty device, the motor has time to cool down between
scans.

What is the highest supply voltage present in the scanner?

If you want more speed, you need more voltage. No other way about it.

Motor coils have significant inductance, and with an inductor, dI/dt = V / L. Since torque is proportional to current and your rate of change of current is limited by both voltage and inductance, you have two options for obtaining greater speed:

  • increase your supply voltage, or
  • reduce the motor inductance.

More supply voltage should be obvious: run on 24-36V if your stepper controller can survive that; just make sure that it's chopping is setup correctly to limit the motor current appropriately. With more voltage, the current can change polarity much faster and therefore you can step much faster. Note that with 12V and 100R, the motor will only asymptotically approach 120mA and will never get near 150mA; chopping will NEVER occur in the driver when set to 150mA.

Note also that it's a 6-wire stepper, and you are using the whole coils, which is the highest inductance possible! If you connect just one leg of each winding then you will have half as much inductance. You will also have half as much torque, but do you care? This is the reason 6- and 8-wire motors exist: a means to "gear shift", i.e. obtain either high-speed, low-torque operation for fast traversals, or obtain low-speed, high-torque operation for driving a heavy load accurately.

A high-performance "gear-changing" driver for this stepper will have three half-bridges per winding, one for each connection. That gets a bit complicated though...