Pages: [1]   Go Down
Author Topic: Maximum torque parameters for a unipolar stepper ??  (Read 442 times)
0 Members and 1 Guest are viewing this topic.
Santa Fe
Offline Offline
Full Member
***
Karma: 1
Posts: 214
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I an driving a unipolar stepper and trying to get max torque.   Here is basically the  sketch. The question I have is: Does this scheme produce maximum torque, and if I reduce the motorspeed delay from 25 ms I currently use to 10 ms does it effect the torque? The current draw in either case seems the same.
Code:
void counterclockwise (){
  // 1
  digitalWrite(motorPin1, HIGH);
  digitalWrite(motorPin2, LOW);
  digitalWrite(motorPin3, LOW);
  digitalWrite(motorPin4, LOW);
  delay(motorSpeed);
  // 2
  digitalWrite(motorPin1, HIGH);
  digitalWrite(motorPin2, HIGH);
  digitalWrite(motorPin3, LOW);
  digitalWrite(motorPin4, LOW);
  delay (motorSpeed);
  // 3
  digitalWrite(motorPin1, LOW);
  digitalWrite(motorPin2, HIGH);
  digitalWrite(motorPin3, LOW);
  digitalWrite(motorPin4, LOW);
  delay(motorSpeed);
  // 4
  digitalWrite(motorPin1, LOW);
  digitalWrite(motorPin2, HIGH);
  digitalWrite(motorPin3, HIGH);
  digitalWrite(motorPin4, LOW);
  delay(motorSpeed);
  // 5
  digitalWrite(motorPin1, LOW);
  digitalWrite(motorPin2, LOW);
  digitalWrite(motorPin3, HIGH);
  digitalWrite(motorPin4, LOW);
  delay(motorSpeed);
  // 6
  digitalWrite(motorPin1, LOW);
  digitalWrite(motorPin2, LOW);
  digitalWrite(motorPin3, HIGH);
  digitalWrite(motorPin4, HIGH);
  delay (motorSpeed);
  // 7
  digitalWrite(motorPin1, LOW);
  digitalWrite(motorPin2, LOW);
  digitalWrite(motorPin3, LOW);
  digitalWrite(motorPin4, HIGH);
  delay(motorSpeed);
  // 8
  digitalWrite(motorPin1, HIGH);
  digitalWrite(motorPin2, LOW);
  digitalWrite(motorPin3, LOW);
  digitalWrite(motorPin4, HIGH);
  delay(motorSpeed);
}

//////////////////////////////////////////////////////////////////////////////
//set pins to ULN2003 high in sequence from 4 to 1
//delay "motorSpeed" between each pin setting (to determine speed)

void clockwise(){
  // 1
  digitalWrite(motorPin4, HIGH);
  digitalWrite(motorPin3, LOW);
  digitalWrite(motorPin2, LOW);
  digitalWrite(motorPin1, LOW);
  delay(motorSpeed);
  // 2
  digitalWrite(motorPin4, HIGH);
  digitalWrite(motorPin3, HIGH);
  digitalWrite(motorPin2, LOW);
  digitalWrite(motorPin1, LOW);
  delay (motorSpeed);
  // 3
  digitalWrite(motorPin4, LOW);
  digitalWrite(motorPin3, HIGH);
  digitalWrite(motorPin2, LOW);
  digitalWrite(motorPin1, LOW);
  delay(motorSpeed);
  // 4
  digitalWrite(motorPin4, LOW);
  digitalWrite(motorPin3, HIGH);
  digitalWrite(motorPin2, HIGH);
  digitalWrite(motorPin1, LOW);
  delay(motorSpeed);
  // 5
  digitalWrite(motorPin4, LOW);
  digitalWrite(motorPin3, LOW);
  digitalWrite(motorPin2, HIGH);
  digitalWrite(motorPin1, LOW);
  delay(motorSpeed);
  // 6
  digitalWrite(motorPin4, LOW);
  digitalWrite(motorPin3, LOW);
  digitalWrite(motorPin2, HIGH);
  digitalWrite(motorPin1, HIGH);
  delay (motorSpeed);
  // 7
  digitalWrite(motorPin4, LOW);
  digitalWrite(motorPin3, LOW);
  digitalWrite(motorPin2, LOW);
  digitalWrite(motorPin1, HIGH);
  delay(motorSpeed);
  // 8
  digitalWrite(motorPin4, HIGH);
  digitalWrite(motorPin3, LOW);
  digitalWrite(motorPin2, LOW);
  digitalWrite(motorPin1, HIGH);
  delay(motorSpeed);
}

  void pinsOff(){ // shut um all down
  digitalWrite(motorPin1, LOW);
  digitalWrite(motorPin2, LOW);
  digitalWrite(motorPin3, LOW);
  digitalWrite(motorPin4, LOW);

  }
  
 

Logged

0
Online Online
Shannon Member
****
Karma: 216
Posts: 12570
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thats half-stepping which alternates between one and two windings being energized.  It ought to perform well but the holding torque is limited by the torque of a single winding.  Try full-stepping (always driving two windings) in case that performs better.

Ideally you'd use micro-stepping to get the smoothest constant-torque behaviour and less vibration/resonance (misstepping can be due to resonances).

Torque for a unipolar motor drops directly with motor speed unfortunately, you can't prevent that.

Constant-current bipolar motor drivers are best for keeping solid torque up to high speeds.
Logged

[ I won't respond to messages, use the forum please ]

Santa Fe
Offline Offline
Full Member
***
Karma: 1
Posts: 214
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Try full-stepping (always driving two windings) in case that performs better.
Thanks for the info MarkT.
Is full-stepping what the stepper.lib uses nor should I search for full step script? The load is pretty well balanced, and I am running through about a 12 to 1 reduction, so I turn the motor off to conserve power, and it holds.
From what you say, I guess I should not speed up the steps by reducing the delay between them?
Logged

Pages: [1]   Go Up
Jump to: