Nema 23 driver for 400 RPM

Hello!
I want to control Nema 23 step motor ( http://www.pololu.com/product/1477 ).
I should change the speed through a potentiometer with range 0 - 400 RPM.
I have this driver http://www.pololu.com/product/2133 and my power supply is 20 - 25 V with 1A current.

I can change the speed with this program :

void loop() {
  sensorValue = analogRead(sensorPin);
  sensorValue = map(sensorValue,0,1023,15000,375);
  digitalWrite(8, HIGH);
  delayMicroseconds(sensorValue);
  digitalWrite(8, LOW); 
  delayMicroseconds(sensorValue);

This does not rotate smoothly , especially at the last 100 RPM. And is impossible to reach 400 RPM , now I have range 0 - 250 RPM .

I am wondering if I change the driver with this one:
http://www.omc-stepperonline.com/leadshine-dm542-digital-stepper-driver-2050-vdc-with-1042a-p-77.html
or this one:

I can do easily my project, am I right ?
But If I don't change driver what I can do with the already driver?

Stepper are not that grate at going fast. the faster you go the less power they have you would be better of with a DC motor if you look at speck sheet its shows what I am meaning.
a commercial stepper driver would help, but a DC motor will be cheaper

I don't have problem with the money because I already have the Nema 23 stepper motor.
I just wonder If I must buy another driver.

Any suggestions ?

It may not even be possible to achieve 400 rpm with that motor and power supply, but the higher the motor power supply voltage, the better. Are you using full-step mode? Have you properly adjusted the current-limiting feature of the motor driver and if so, to what value is it set?

Try this very basic test code. Note that the pulse is very short and all the timing is between the pulses.

// testing a stepper motor with a Pololu A4988 driver board or equivalent
// on an Uno the onboard led will flash with each step
// as posted on Arduino Forum at http://forum.arduino.cc/index.php?topic=208905.0

byte directionPin = 6;
byte stepPin = 5;
int numberOfSteps = 100;
byte ledPin = 13;
int pulseWidthMicros = 20;  // microseconds
int millisbetweenSteps = 25; // milliseconds


void setup() 
{ 

  Serial.begin(9600);
  Serial.println("Starting StepperTest");
  digitalWrite(ledPin, LOW);
  
  delay(2000);

  pinMode(directionPin, OUTPUT);
  pinMode(stepPin, OUTPUT);
  pinMode(ledPin, OUTPUT);
  
 
  digitalWrite(directionPin, HIGH);
  for(int n = 0; n < numberOfSteps; n++) {
    digitalWrite(stepPin, HIGH);
    delayMicroseconds(pulseWidthMicros);
    digitalWrite(stepPin, LOW);
    
    delay(millisbetweenSteps);
    
    digitalWrite(ledPin, !digitalRead(ledPin));
  }
  
  delay(3000);
  

  digitalWrite(directionPin, LOW);
  for(int n = 0; n < numberOfSteps; n++) {
    digitalWrite(stepPin, HIGH);
    delayMicroseconds(pulseWidthMicros);
    digitalWrite(stepPin, LOW);
    
    delay(millisbetweenSteps);
    
    digitalWrite(ledPin, !digitalRead(ledPin));
  }
  
}

void loop() 
{ 

}

If this works (and it should) you just need to arrange for your sensor to update the variable millisbetweenSteps.

For “production” code you should replace the delay(millisbetweenSteps) with the technique in the Blink Without Delay example sketch.

…R

jremington:
It may not even be possible to achieve 400 rpm with that motor and power supply, but the higher the motor power supply voltage, the better. Are you using full-step mode? Have you properly adjusted the current-limiting feature of the motor driver and if so, to what value is it set?

Yes, I am using full step mode. And the current is on max limit.
But when I increase the voltage my motor, indeed run faster but I don't have the "sensitivity" that I want on low RPM.

The voltage should not affect the speed, apart from enabling (but not causing) higher speeds. Speed is only determined by the interval between step pulses.

Have you everything wired up correctly?

...R

Mis-stepping is usually caused by resonance, an unloaded motor will behave differently
to one under load (so firstly test the motor under its actual mechanical load).

x8 or x16 microstepping is going to reduce resonance I suspect, so try those settings.

Try a 40V supply - the supply voltage has to be enough to overcome the back-EMF of the
motor spinning at your desired speed - alas stepper motor manufacturers are very
coy about advertising their back-EMF/rpm ratings so this usually has to be measured.
(Note the driver you has an abs. max. supply of 45V so even 40V is at the limit)

Your motor is unfortunately not a very high performance one, as its 9 ohm. A good
NEMA23 motor would be 0.5 ohm or so and need 3 or 4A of drive. Such a motor would
probably perform fine for your purposes at 24V (but need a beefier chopper-driver).

In theory a 9 ohm motor is as good as a 0.5 ohm motor if driven from about 4
times the voltage…

And the current is on max limit.

What does that mean?

Thanks for the answers guys.

Well, I was running the step motor with frenquency generator for testing.
The voltage supply on driver was 45V (max) .
The motor turned until 700Hz and my tachimeter said 230rpm ,from this value and more the step motor was stick.
Maybe I must change driver to reach 400rpm right ?

you will need a bigger driver and power supply to go at any decent speed I hope you don't wont to move anything with much weight as you will have to run it on its limits for anything more than 10kg.
I have a 1200oz/in stepper running on upto 6 amps 70vdc and it can just handle 150kg moveing up and down

Do you suggest me any of those three:

I know the first one is the best but what about the two others or do you suggest me something better ?
and what specification I must check ( for the new driver ) If I want to speed the motor at 400 RPM?

first why a stepper motor.

yes the leadshine will do it, but you motors inductance is to high to work out the power supply required for the stepper you have is
inductance X 4 =56 vdc plus amps.
so you would need a big power supply.
you could get a stepper with drive plus power supply if you get a low inductance stepper for less than the cost of a bigger stepper driver and power supply.
or even a DC servo motor with a encoder and controller plus power supply


daniellyall:
first why a stepper motor.

yes the leadshine will do it, but you motors inductance is to high to work out the power supply required for the stepper you have is
inductance X 4 =56 vdc plus amps.
so you would need a big power supply.
you could get a stepper with drive plus power supply if you get a low inductance stepper for less than the cost of a bigger stepper driver and power supply.
or even a DC servo motor with a encoder and controller plus power supply


My employer want stepper motor.
The power supply isn't a problem,
so I just need new driver and motor ?

If you buy a low inductance motor it will require a higher current and that in turn probably also means buying a new driver board.

The Pololu DRV8825 can work at up to 45 volts. Have you tried increasing the voltage to see if that solves your problem?

...R

Robin2:
If you buy a low inductance motor it will require a higher current and that in turn probably also means buying a new driver board.

The Pololu DRV8825 can work at up to 45 volts. Have you tried increasing the voltage to see if that solves your problem?

...R

Yes,
The driver worked up to 45 Volts and the motor stuck above 700 Hz (with the generator function)
when measuring rpm was about 240.

Alex_Tr:
The driver worked up to 45 Volts and the motor stuck above 700 Hz (with the generator function)
when measuring rpm was about 240.

I don't understand why you use some sort of function generator - why not test things with the Arduino?

As your motor has 200 steps per revolution 700steps per second should equal 3.5 rps or 210 rpm.

I have smaller motors - nominally 12v 0.33A - and they run about 1000 steps per second or a little more with a 24v supply.

Have you tried using the AccelStepper library to ramp up the speed?

Have you tried micro-stepping as @MarkT suggested?

Have you tried Googling for other people's exerience of using your motor?

...R

I tried the AccelStepper and It was the same thing, after one value the motor wasn't turned, It was close to 230RPM.
And with microstepping nothing. I had only biggest value not speed.

with 45V supply on driver

Disappointing ...

Sounds like you should ask Pololu for a refund ???

Edit to add

I realize this may be a case of teaching granny to such eggs - but have you the motor wired correctly? It seems to be a 6 wire stepper so there is scope for confusion.

The motor datasheet in the Pololu resources page has a graph showing 6800 half-steps per second when driven with 30 volts.

Have you the current limit on the driver board set correctly?

I wonder if you need a power supply capable of delivering more than 1 amp current to cope with instantaneous demand - leave the DRV to apply the limit?

...R