Go Down

Topic: college problem with stepper motor and DC power supply (Read 1 time) previous topic - next topic

d00093059

Im doing a project for college where I have to drive 2 motors with a 5804 driver board. I am just trying to get one motor to turn to start with and the code im using is working its turning motor one revolution and then back one revolution, but the dc power supplies current limiting is at 3 Amps. I cant figure out how to correct this. If i go above 4v the current goes above 1Amp and I need 12v to drive the motor. I dont know if its my wiring or my code.Below is my code. This code works but is wrong as the one phase and half step pins of my driver should be at ground and I only need 2 outputs from arduino going to the step input and direction pins of driver. I dont know how to change the code to do this as this is first time I used arduino
#include <Stepper.h>

const int stepsPerRevolution = 850;  // change this to fit the number of steps per revolution
                                     // for your motor

// initialize the stepper library on pins  8 through 11:
Stepper myStepper(stepsPerRevolution 8,9,10,11);           

void setup() {
  // set the speed at 60 rpm:
  myStepper.setSpeed(60);
  // initialize the serial port:
  Serial.begin(9600);
}

void loop() {
  // step one revolution  in one direction:
   Serial.println("clockwise");
  myStepper.step(stepsPerRevolution);
  delay(500);
 
   // step one revolution in the other direction:
  Serial.println("counterclockwise");
  myStepper.step(-stepsPerRevolution);
  delay(500);
}

jremington

With so little useful information in your post (like what motor, what motor driver, how wired) it is neverthess still possible to guess your problem: you have one of those low resistance stepper motors that requires a chopper-style stepper driver. If so, the motor won't work with a standard H-bridge motor driver.

d00093059

Its a 5804 BiMOS 2 UNIPOLAR Stepper motor translator/driver. as for the motors all I know is there 12v.

jremington

Surely you have access to a multimeter. Measure the motor winding resistance(s) and tell us what they are. How many wires come out of the motor?

Go Up