Pages: [1]   Go Down
Author Topic: stepper question  (Read 2401 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 9
lets make it move
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello,
First post here so please bear with if I left off some information.

I have done a few projects with the arduino boards so I have some familiarity with servos, sensors, etc but have not used stepper motors yet.  My next project is something resembling a plotter with two steppers, one to control the x and one for the y axis.  I was hoping someone could help review my short shopping list of what I think I might need to accomplish this.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 9
lets make it move
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

So far I have the idea of the following items from sparkfun:

(1) uno - http://www.sparkfun.com/products/9950
(2) easydrivers - http://www.sparkfun.com/products/9402
(1) breadboard - http://www.sparkfun.com/products/112
(2) steppers - http://www.sparkfun.com/products/9238

Other components as needed, power supply, etc.

I was going to run this using the example on the forum:

http://arduino.cc/en/Tutorial/MotorKnob

I would modify the code to move the x and y axis based on sensors but if anyone has an example of two axis stepper control it would be appreciated.

Does any of this sound like a reasonable plan?  I am very open to any suggestions or assistance since all this is fairly new to me.

-BigE
Logged

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

I got two easy drivers and two of those steppers. I also got 2, 3 and 4 pin polarized plugs and connectors that could be soldered directly to the board, to eliminate the possibility of plugging wires in backwards, like these:
http://www.sparkfun.com/products/8096
http://www.sparkfun.com/products/8232

I wrote a Processing sketch that sent the mouse position as serial data to the Arduino, which used that to drive the stepper motors. If you are interested, I could send you the Processing and Arduino sketches.

For the project I had in mind, I though I might need larger stepper motors. There current requirements were more than the easy drivers could handle, so they burnt out, before I could complete my project. I wish you better luck, and hope the steppers you have are sufficient.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 9
lets make it move
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I would like to have a copy of the processing sketch if you have it, that would be really helpful.

I still have some more design on the physical proportions of the model but I will try to keep the limits of the steppers and easydriver boards in mind, thanks for the tip.
Logged

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

Quote
I would like to have a copy of the processing sketch if you have it, that would be really helpful.
PM sent with Arduino and Processing sketches.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 6
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Paul S can you send a copy of the Arduino/Processing sketches for mouse to stepper control? Any help will be appreciated. Ken.quast@gmail.com
Logged

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

Sent.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 9
lets make it move
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Paul,

It took a while to get back to this project so I only just now looked at the code you sent over.  I was wondering something, in the code you initialize

int xDirPin = 6;
int xStpPin = 7;
int yDirPin = 11;
int yStpPin = 12;

which is only four pins to control all four motors.  The other examples I have seen are using 5 pins per a motor to control the steppers, sleep, and microstepping I believe.   Is it fine to use the code you sent over and just run the motors without the sleep and microstep functions?

Any help is appreciated.
Logged

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

Quote
which is only four pins to control all four motors.
I'm using the EasyDriver motor drivers. They have a direction and step pin each. I'm only controlling 2 motors - one for X and one for Y.

I'm not sure about sleep and microstepping. The motors I had were a bit small for the application. The bigger motors came, and I swapped them out, and then toasted the EasyDriver boards trying to drive a larger motor than intended. So, I shelved the project for the time being.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 6
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The sleep, ms1,ms2, and enable pins on the Easydriver should be tied high or low with 10K resistors. For the code from PaulS, you can use full step only so tie ms1 and ms2 low. (10K resistor from pin to ground rail). Tie enable pin low as well, and sleep pin high. (Pin to +5). The + voltage should come fro the V+ on the Easydriver and not the stepper V+ which must be isolated!
As bigE, I have constructed an XY plotter and the code from PaulS works really well but I have one problem. The movement on the plotter is very small and I have not figured out how to make the stepper movement fit my plotter, 13X13 inches. I have difficulty with code but not electronics. Peace.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 9
lets make it move
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I did finally make some progress again on this project.  I added the additional pins to control the step size and sleep from the boards.  I have done this for testing but I think in the future once I know the step size I want I will hard wire those with the 10k resistors to free up the pins.  I still like to initiate sleep and awake from the board to help keep the easy drivers and the motors cool.
Logged

Pages: [1]   Go Up
Jump to: