Pages: [1]   Go Down
Author Topic: Pololu DRV8825 driver problem  (Read 1124 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Full Member
***
Karma: 0
Posts: 146
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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);
}
Logged

Offline Offline
Faraday Member
**
Karma: 80
Posts: 3790
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Although I answer in good faith, remember always: Your Mileage May Vary.
Get me on LinkedIn: za.linkedin.com/in/jimbrownza/

Offline Offline
Full Member
***
Karma: 0
Posts: 146
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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);
}
Logged

Offline Offline
Full Member
***
Karma: 0
Posts: 146
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Offline Offline
Full Member
***
Karma: 0
Posts: 146
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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:
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);
}
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 601
Posts: 48543
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Offline Offline
Full Member
***
Karma: 0
Posts: 146
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Here is a photohttp://www.flickr.com/photos/92579016@N08/8627332585/. I joined the grounds.
Logged

Offline Offline
Full Member
***
Karma: 0
Posts: 146
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

....and the Pololu diagramhttp://www.pololu.com/catalog/product/2132.
Logged

USA, FL
Offline Offline
God Member
*****
Karma: 14
Posts: 688
A life? Where can I download one of those?
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

//LiNK

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 601
Posts: 48543
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Offline Offline
Full Member
***
Karma: 0
Posts: 146
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Pages: [1]   Go Up
Jump to: