Pages: [1]   Go Down
Author Topic: Stepper motor project.  (Read 1479 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 1
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello, first time posting. I have the Arduino Duemil board and a the easy stepper driver board from Sparkfun. I also bought their bi polar stepper motor. I have been learning C for the last 4 months on my Mac and I am getting some what good at it. Can someone direct me to some test code that I can use (if it exists) to test out the motor. I have never worked with hardware before so I am a little unsure as to what I must do. I was following this example and tried his code but it did not seem to work right. http://garagedeveloper.wordpress.com/2009/12/05/the-diy-surveillance-system-using-a-webcam-part-1/

Any help or links would be greatly appreciated as I start to learn.

-Lars
Logged

Australia
Offline Offline
Full Member
***
Karma: 8
Posts: 161
You dont have to touch powerlines for them to kill you, even looking at them for too long will make them angry.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

http://www.arduino.cc/en/Tutorial/StepperBipolar

There is some test code here that might work, a little info on your pinout/schematic would also be helpful so i can do more.
Logged

"Human beings, who are almost unique in having the ability to learn from the experience of others, are also remarkable for their apparent di

St. Louis, Missouri
Offline Offline
Sr. Member
****
Karma: 1
Posts: 279
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

This might help: http://danthompsonsblog.blogspot.com/2008/09/easydriver-v31-tutorial.html
Logged

Offline Offline
Newbie
*
Karma: 1
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks you for those links. I will take a look at them. I am hoping one of them comes with a list of the functions available. like I see digitalWrite and ledPin.

Thanks again!

-Lars
Logged

Offline Offline
Newbie
*
Karma: 1
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

So I got everything connected and used the software that I found on the web to test it and the stepper motor won't turn. I put a voltage meter to all my connections and the stp and dir both showed voltage. The 4 stepper outputs on the easy driver (A and B) all register 0 so it appears that nothing is going to the stepper motor.

Any ideas?

Code:
/********************************************************
**         More info about the project at:             **
**  http://lusorobotica.com/viewtopic.php?t=103&f=106  **
**   by TigPT         at         [url=http://www.LusoRobotica.com]www.LusoRobotica.com[/url]  **
*********************************************************/
int dirPin = 2;
int stepperPin = 3;

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(100);
    digitalWrite(stepperPin, LOW);
    delayMicroseconds(100);
  }
}

void loop(){
  step(true,1600);
  delay(500);
  step(false,1600*5);
  delay(500);
}
Logged

Leighton Buzzard, UK
Offline Offline
Edison Member
*
Karma: 21
Posts: 1339
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

you're stepping far too fast
change delayMicroseconds(100)
to delay(100)
Logged

there are only 10 types of people
them that understands binary
and them that doesn't

Pages: [1]   Go Up
Jump to: