Use The EasyDriver Stepper Motor Driver + Arduino

Discussions area for bildr's blog posts.
From: http://bildr.org/2011/06/easydriver/


Stepper (or step) motors are really cool. They are perfect for automation or any time you need a motor to turn to a specific point, at a specific speed, in a specific direction. For this article I wont get into why, or how, but unlike typical motors, steppers are able to do all of this, and hold their position when they are not moving - You pay for this by essentially powering them at full power all the time, but you get total cont ...
ameyer
Founder
 
Posts: 2999
Joined: Thu Jan 21, 2010 11:59 pm
Location: The Bay Area

hello..

mike here, masters mechanical u de s in quebec canada. been to circus school. into circus arts, aviation, space, education, engineering.

trying to get a stepper motor working, but the tutorial specifically says to ask here if the colours of my stepper are different from those in the tutorial. I remember seeing many articles online explaining how to do this, and will go look them up again if need be. my suggestion would be to put a link in the article to where the question is answered, if such an answer exists. if there was one, I would not be typing this :-)

ok, found what looks like the closest I will get :-) a default solution will be switching polarities until something works.

-I should specify, I have found the pairs, just not sure if there is any way of knowing which polarity to connect them with without just trying it.

cheers,

-mike :-)
mikethe1wheelnut
 
Posts: 1
Joined: Wed Jul 20, 2011 2:27 pm

It's hard to write this in just a single nigh.. I had to cut corners somewhere. :D

If you have the pairs you are 90% there

I don't believe it matters how you hook it up as long as it is a1, a2, b1, b2
you can see more here: http://www.tigoe.net/pcomp/code/circuit ... per-motors

You will know if you have it wrong as it will take one step forward, and one back and won't move, or will be very weak. But that won't hurt it at all.
ameyer
Founder
 
Posts: 2999
Joined: Thu Jan 21, 2010 11:59 pm
Location: The Bay Area

EDIT
Wow, sorry, I just realized my mistake, I feel really silly now. Nevermind, and thanks again.


Hey, in your tutorial you linked the code used for the stepper motor. I just have one quick question about setting the degrees of the stepper. In your rotateDeg function you do abs(step) * (1/0.225), and I'm just wondering how you got that calculation.

Very helper tutorial btw, thanks!
pudgeball
 
Posts: 1
Joined: Thu Jul 21, 2011 8:06 am

pudgeball wrote:[i]Hey, in your tutorial you linked the code used for the stepper motor. I just have one quick question about setting the degrees of the stepper. In your rotateDeg function you do abs(step) * (1/0.225), and I'm just wondering how you got that calculation.



Yeah, that is just there so that 360º = 1600 steps. It is 4.444444... steps per degree - 1/0.225 is 4.44444444... but more accurate than using the decimal form.

Glad it helped.
ameyer
Founder
 
Posts: 2999
Joined: Thu Jan 21, 2010 11:59 pm
Location: The Bay Area

Hi there,

I was wondering if the EasyDriver connected to Arduino can control more than 1 Stepper Motor?

If yes, would you be able to advice me on what parts to purchase or if there might be a reference to how to hook up more than 1 Stepper Motor?

Your time on this is much appreciated.


Thank you,
Hikari
hikarikosemura
 
Posts: 3
Joined: Mon Aug 22, 2011 1:42 pm

No... you would need more than one driver.

This guy can control 4 though.
http://www.sparkfun.com/products/10507

You will need to use a timer based library to make it work though. Like this one: http://www.open.com.au/mikem/arduino/AccelStepper/

The code we posted would only allow one motor to move at a time.



hikarikosemura wrote:Hi there,

I was wondering if the EasyDriver connected to Arduino can control more than 1 Stepper Motor?

If yes, would you be able to advice me on what parts to purchase or if there might be a reference to how to hook up more than 1 Stepper Motor?

Your time on this is much appreciated.


Thank you,
Hikari
ameyer
Founder
 
Posts: 2999
Joined: Thu Jan 21, 2010 11:59 pm
Location: The Bay Area

Hi Ameyer,

Thanks a lot, you've been most helpful. Really appreciate the links you've provided, will certainly see how to do that.


Hikari
hikarikosemura
 
Posts: 3
Joined: Mon Aug 22, 2011 1:42 pm

Hi Ameyer,

I was wondering, can I use a 12v adapter with 600mA instead of the 750mA as suggested?


Your help on this would be appreciated.


Thanks,
Hikari
hikarikosemura
 
Posts: 3
Joined: Mon Aug 22, 2011 1:42 pm

It all comes down to how much power the motor will be using when it is running. The motor will only use 350ma at 12v. SO that should be ok.


---long answer---

I just dont like to get too close to the limit because if the voltage goes up on the supply (can happen often) it could send it over the rating, and the supply could die, or over heat.

To be extra safe, the driver has a tiny pot on it you can turn to limit the current. The markings are reversed, but at min (says max) it supplies 150ma, and at max (says min) it is 750ma. The motor wants 350ma, so you can turn it to around that area.


hikarikosemura wrote:Hi Ameyer,

I was wondering, can I use a 12v adapter with 600mA instead of the 750mA as suggested?


Your help on this would be appreciated.


Thanks,
Hikari
ameyer
Founder
 
Posts: 2999
Joined: Thu Jan 21, 2010 11:59 pm
Location: The Bay Area

Can you help clarify what color leads on the motor actually go in what locations on the board? I have been watching your video trying to track the wire colors since it looks like you change the colors around on the breadboard.

Does the JPEG above the video link represent the correct color combination or can you reply with that? I have the same controller and motor just trying to figure out the correct wiring.

Thanks!
ovrtn5
 
Posts: 10
Joined: Mon Sep 12, 2011 10:23 am

Yes, the wiring in this image is color correct:

Imag

ovrtn5 wrote:Can you help clarify what color leads on the motor actually go in what locations on the board? I have been watching your video trying to track the wire colors since it looks like you change the colors around on the breadboard.

Does the JPEG above the video link represent the correct color combination or can you reply with that? I have the same controller and motor just trying to figure out the correct wiring.

Thanks!
ameyer
Founder
 
Posts: 2999
Joined: Thu Jan 21, 2010 11:59 pm
Location: The Bay Area

Thanks! I appreciate the help!
ovrtn5
 
Posts: 10
Joined: Mon Sep 12, 2011 10:23 am

Thanks for sharing. I am going to try it on Thursday. It would be my first project with Arduino. I just bought it because of your post. I like to try. Thanks,
Tho
tho
 
Posts: 3
Joined: Wed Oct 12, 2011 4:36 am

I worked well. Could you also give any suggestion if I want to run a HDD motor with Ardiuno Uno? Thanks,
Tho
tho
 
Posts: 3
Joined: Wed Oct 12, 2011 4:36 am

The only thing I think you could do is turn it on and off.
They are 12V. so you need something to turn on/off 12V.
You can either use a relay (electro-controlled mechanical switch) or a transistor like this:
http://bildr.org/2011/03/high-power-con ... nd-tip120/


tho wrote:I worked well. Could you also give any suggestion if I want to run a HDD motor with Ardiuno Uno? Thanks,
Tho
ameyer
Founder
 
Posts: 2999
Joined: Thu Jan 21, 2010 11:59 pm
Location: The Bay Area

Hi Ameyer,
Thank you for your reply. Could I replace the transistor with MOSFET? I am not quite familiar with MOSFET. So I would like to try with it to get some experiences. Thanks,
Tho
tho
 
Posts: 3
Joined: Wed Oct 12, 2011 4:36 am

Yes, very easily. But I dont have an example of one.
A Mosfet is a type of transister switched by voltage instead of current.

This guy would work.
http://www.sparkfun.com/products/10213

But again, I dont have a wiring diagram fot it just now.


tho wrote:Hi Ameyer,
Thank you for your reply. Could I replace the transistor with MOSFET? I am not quite familiar with MOSFET. So I would like to try with it to get some experiences. Thanks,
Tho
ameyer
Founder
 
Posts: 2999
Joined: Thu Jan 21, 2010 11:59 pm
Location: The Bay Area

Hi,
thanx for the great tutorial.
I'm planning to do it this week, I just received all the parts from sparkfun. I'm just wandering about power stuff. I'm french but currently in Los Angeles , so I'm not sure about current. I bought a 12v AC 800mA power adapter, cut the wires but there is no information (no red / black cable). So my question is as it's AC , does it matter how the 12V power is plugged ? I also bought a 8 AAA battery holder. I think this one is polarized and need to be correctly plugged but again what about the adapter?

Thank you

Benjamin
phlexib
 
Posts: 3
Joined: Sun Nov 13, 2011 9:02 pm

The plug should be 12V DC. You can check it with a meter if you have one. It's pretty normal for then not to color code the wire.

I haven't heard of a 12V AC plug, but it is possible.

If it is 12V AC, it will destroy the board almost immediately.

The 8x AAA holder should work fine, but wont last too long. Maybe a few hours max.


phlexib wrote:Hi,
thanx for the great tutorial.
I'm planning to do it this week, I just received all the parts from sparkfun. I'm just wandering about power stuff. I'm french but currently in Los Angeles , so I'm not sure about current. I bought a 12v AC 800mA power adapter, cut the wires but there is no information (no red / black cable). So my question is as it's AC , does it matter how the 12V power is plugged ? I also bought a 8 AAA battery holder. I think this one is polarized and need to be correctly plugged but again what about the adapter?

Thank you

Benjamin
ameyer
Founder
 
Posts: 2999
Joined: Thu Jan 21, 2010 11:59 pm
Location: The Bay Area

Thank for your answer. That's a Energecell AC adapter I bought at Radioshack.
I'll get a multimeter tomorow to Check that. Anyway in your tutorial you use à 12v AC adapter.. Does this have polarity? did you risk to burn the board by inversing polarity? I don't get it.
Thanks for your help.

Benjamin.
phlexib
 
Posts: 3
Joined: Sun Nov 13, 2011 9:02 pm

Ok... If it was from radio shack, it outputs DC.
Basically, 100% of the time, an AC adapter actually outputs DC current. I have never seen one that outputs AC, but im sure it does exist for some weird industrial device.

So the plug in the drawing, you can see the red wire, that represents the positive side, and the black represents the ground.

If you look closely at the wires, sometimes that have tiny white printed text on one of them with a + or - on it. If not, you will need a meter to find out what is + and what is -

If you swap the polarity, it may cause damage. Im not sure how the board was designed. It may have protection against that, but it may not.


phlexib wrote:Thank for your answer. That's a Energecell AC adapter I bought at Radioshack.
I'll get a multimeter tomorow to Check that. Anyway in your tutorial you use à 12v AC adapter.. Does this have polarity? did you risk to burn the board by inversing polarity? I don't get it.
Thanks for your help.

Benjamin.
ameyer
Founder
 
Posts: 2999
Joined: Thu Jan 21, 2010 11:59 pm
Location: The Bay Area

I'm going for the multimeter anyway..
here is the doc for the adapter if you're interested :
http://www.radioshack.com/graphics/uc/r ... _PM_EN.pdf

So I guess the EasyDriver requires DC, and they make it clear that this should not be used with your material requires DC.
The first thing I should asked was does Easydriver requires DC, and yes it does.

Benjamin
phlexib
 
Posts: 3
Joined: Sun Nov 13, 2011 9:02 pm

Yeah, I guess its hard because really you just assume that everything is DC. Anything small, like smaller than a vacuum is DC.


phlexib wrote:I'm going for the multimeter anyway..
here is the doc for the adapter if you're interested :
http://www.radioshack.com/graphics/uc/r ... _PM_EN.pdf

So I guess the EasyDriver requires DC, and they make it clear that this should not be used with your material requires DC.
The first thing I should asked was does Easydriver requires DC, and yes it does.

Benjamin
ameyer
Founder
 
Posts: 2999
Joined: Thu Jan 21, 2010 11:59 pm
Location: The Bay Area

Hi,

I'm using a bunch of these Sparkfun steppers with Easydriver, and everything works fine, except the steppers seem to have very little torque; for instance, I can easily make them stop turning by simply applying a little pressure with two fingers; I don't need it to run a mill or anything remotely that demanding, just raise a 40g weight by turning a screw... Is there any way I can (first) measure the actual torque the stepper is building, and (then) improve it?

Thanks,
G
gcaglion
 
Posts: 1
Joined: Thu Oct 06, 2011 2:23 am

Next

Return to Blog Posts

Who is online

Users browsing this forum: Bing [Bot] and 0 guests

cron