Go Down

Topic: Pololu DRV8825 driver problem (Read 1 time) previous topic - next topic

ifugaopapercraft

I just received several of these drivers and don't know which is the problem; hardware or the sketch. Here is a photo of the setuphttp://www.flickr.com/photos/92579016@N08/8627332585/. Left side powered by 12v wall wart, right by Arduino 5v. There is no power to the motor output pins, no heat whatsoever on the driver. I have tried several sketches, this without the enable pin, and one with enable to an Arduino pin. Still no voltage to the motor. Must be something dumb but after wiring and editing the sketch umpteen times, I am completely lost. The wiring is same as Pololu drawing herehttp://www.pololu.com/catalog/product/2133.

int dirPin = 8;
int stepperPin = 7;
void setup() {
pinMode(dirPin, OUTPUT);
pinMode(stepperPin, OUTPUT);
}
void step(boolean dir,int steps){
digitalWrite(dirPin,dir);
delay(50);
for(int i=0;i<steps;i++){
   digitalWrite(stepperPin, HIGH);
   delayMicroseconds(800);
   digitalWrite(stepperPin, LOW);
   delayMicroseconds(800);
}
}
void loop(){
step(true,1600);
delay(500);
step(false,1600*5);
delay(500);
}

JimboZA

You need to edit a space into those links before the "h" of "http" .... else it thinks "setup" and "here" are part of the link
Roy from ITCrowd: Have you tried turning it off an on again?
I'm on LinkedIn: http://www.linkedin.com/in/jimbrownza

ifugaopapercraft

Oops! Thanks.

I just received several of these drivers and don't know which is the problem; hardware or the sketch. Here is a photo of the setuphttp://www.flickr.com/photos/92579016@N08/8627332585/. Left side powered by 12v wall wart, right by Arduino 5v. There is no power to the motor output pins, no heat whatsoever on the driver. I have tried several sketches, this without the enable pin, and one with enable to an Arduino pin. Still no voltage to the motor. Must be something dumb but after wiring and editing the sketch umpteen times, I am completely lost. The wiring is same as Pololu http://www.pololu.com/catalog/product/2133 

int dirPin = 8;
int stepperPin = 7;
void setup() {
pinMode(dirPin, OUTPUT);
pinMode(stepperPin, OUTPUT);
}
void step(boolean dir,int steps){
digitalWrite(dirPin,dir);
delay(50);
for(int i=0;i<steps;i++){
   digitalWrite(stepperPin, HIGH);
   delayMicroseconds(800);
   digitalWrite(stepperPin, LOW);
   delayMicroseconds(800);
}
}
void loop(){
step(true,1600);
delay(500);
step(false,1600*5);
delay(500);
}

ifugaopapercraft

The sketch does not include an "enable" pin. Several others I've seen include it. In any case, of the four sketches designed for this driver, not one worked.  No power to the motor output pins on the board. The wiring seems to be straight forward. Any ideas?

ifugaopapercraft

After rewiring the board a dozen times, I want to believe the sketches intended for the driver somehow aren't compatible with my setup. I'm trying to upload the simplest possible test sketch. Will this work?

Code: [Select]
int dirPin = 4;
int stepperPin = 5;


void setup() {
  pinMode(dirPin, OUTPUT);
  pinMode(stepperPin, OUTPUT);

}
void loop(){

  digitalWrite ( dirPin,LOW);
  digitalWrite (stepperPin,HIGH);
  delay (1000);
  digitalWrite ( dirPin,HIGH);
  digitalWrite (stepperPin,LOW);
  delay (1000);
}

PaulS

Quote
Will this work?

Will it work? Or should it work?

You are the one with the hardware.

Perhaps if you posted a picture of how you really have the board connected to the Arduino, motors, and batteries/power supply, we could help. Hopefully, you used several feet of one color wire running across each other. Not really, I don't.



codlink


Perhaps if you posted a picture of how you really have the board connected to the Arduino, motors, and batteries/power supply, we could help.


@ ifug: Why can't you put spaces before links?
//LiNK

PaulS

Where does the white connector go? Where is the power supply to supply power to the motor? Surely you are not expecting the Arduino to power the motor.

ifugaopapercraft

The white connector goes to the bipolar stepper. The motors are powered by a 12v, 500ma wall wart.

Go Up