Solved

arduino and stepper motors using a sheild etc

Posted on 2012-03-29
29
672 Views
Last Modified: 2012-05-21
I am pretty new to arduino but used to other microcontrollers (phidgets)
but I am thinking on a project using arduino with a motor shield as the stepper motor controller for phidgets is expensive (like all phidgets) and I like the fact that arduino can work seperately not connected to a host like phidgets

I know steppers can do a full rotation so my idea is just do 50 full rotations end that kind of thing or do I need to do 400*(1/8 rotation)

how do you get a motor sheild working I presume you add a library

I want to run multiple motors for an x,y frame and move a grabber around

anyone got an idea
0
Comment
Question by:IanTh
  • 15
  • 14
29 Comments
 
LVL 82

Expert Comment

by:Dave Baldwin
ID: 37791849
Here's their refernce on stepper motors:  http://arduino.cc/en/Reference/Stepper?from=Tutorial.Stepper  You have to add at least a driver IC to run stepper motors.  To get high speed and torque you will need more circuits and higher supply voltages.  This tutorial is a good start and pretty much what I did the first time to get a stepper motor working about 30 years ago.
0
 
LVL 30

Author Comment

by:IanTh
ID: 37808579
I am thinking of using 2 steppers in series ( doing the same job ) so I have been told I can do that and use 2 steppers on each channel on a 2 channel shield

when talking about stepper motors I am thinking of using 12v but to make the stepper strong is it amps that does this job if so what kind of amps do I need to make it very strong
0
 
LVL 82

Expert Comment

by:Dave Baldwin
ID: 37808674
When I had to make a stepper motor run fast and drive a tail-stock for a lathe in a machine shop, I built a variable power supply that would range from 12 to 48VDC at up to 5 amps.  I had to use a lot of external circuitry in addition to the microprocessor to make this work.  And I think that two steppers in series is probably a bad idea.

There are kits available to drive X-Y tables.  Please find them on the web and see what they are using to do this before you start your project.  Other people already know how to do these things, please take advantage of their experience in doing your own project.
0
 
LVL 30

Author Comment

by:IanTh
ID: 37809982
but doesn't a motor shield help in this way

I am talking about a poc at this time not a production machine I  have just started

I think a static 12-19v psu would work

yes I am doing a x-y frame for your info
0
 
LVL 82

Expert Comment

by:Dave Baldwin
ID: 37812712
I don't know what you mean by "motor shield".  If you mean this http://www.ladyada.net/make/mshield/ , then it does have driver ICs on it to drive the motors.  Then just follow their directions.
0
 
LVL 30

Author Comment

by:IanTh
ID: 37813217
yes what I wanted to know really I think I have found it all ready mind you

the arduino command is step yes and is it full rotations or steps (1/8 for instance (full rotation needed * 8))
0
 
LVL 82

Expert Comment

by:Dave Baldwin
ID: 37813926
The actual number of steps depends on the motor.  Each sequence of pulses moves the motor a fixed amount that is built in to the motor design.  Stepper Motors come in different versions - 0.36°, 0.72°, 0.9° & 1.8° per Step.
0
 
LVL 30

Author Comment

by:IanTh
ID: 37815534
so when they talk about 1.8°

its going to be 200 as 360° / 1.8° is 200

is that how how do a full resolution is it better to get more presision by getting a 0.36°
as 1000 is 360° / 0.36° is 1000

am I getting this correct

so are you saying the motor sheild must match the motor steps
0
 
LVL 82

Expert Comment

by:Dave Baldwin
ID: 37816411
Your arithmetic is right.  The "motor sheild" which is the motor driver board doesn't know or care anything about it.  Your software has to know how many steps it takes in order to position things correctly.
0
 
LVL 30

Author Comment

by:IanTh
ID: 37818767
when your initialising a stepper in init in the arduino application does it need to be physically connected, can it be added during the loop or does it need to be connected for the init code to work

also am I correct you do step(release) to go to to the next position or is it simple say go to x1,y1 then x2,y2
or is it go to x1,y1 step (release) go to x2,y2

thanks for all your help Dave
0
 
LVL 82

Expert Comment

by:Dave Baldwin
ID: 37819469
I didn't read the details but since there doesn't appear to be any feedback, I don't think it would need to be connected.  In a 'real world' application, you would have position sensors and feedback and the initial routines would set the position to zero so you have a known starting position.
0
 
LVL 30

Author Comment

by:IanTh
ID: 37821775
so if I have a starting point I think I will always bring my thingy back to that starting point after doing its job as that makes perfect sence
0
 
LVL 82

Expert Comment

by:Dave Baldwin
ID: 37821793
Yes, stepper motors (and any kind of electric motor) can stall and lose it's position.  If you don't bring it back to '0', you don't really know where you are.
0
 
LVL 30

Author Comment

by:IanTh
ID: 37902298
have you heard of a quad stepper done by sparkfun I think I have not seen it in the uk yet
that says it can control four steppers and that might help if I do do it that way when you issue a step command can it be done to multple ports at once as these need to run the same steps at the same time is that posible ?
0
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 
LVL 82

Expert Comment

by:Dave Baldwin
ID: 37902860
No, I haven't heard of but I haven't been looking either.  Looks like it needs some more parts to be complete.  http://www.sparkfun.com/products/10507
0
 
LVL 30

Author Comment

by:IanTh
ID: 37903017
is the problem with the sparkfun quad stepper going to be burning out the chips I have been told to get a stepper controller with replaceable chips as they do burn out quite easily ?
0
 
LVL 82

Expert Comment

by:Dave Baldwin
ID: 37903143
If you look at the image on that page, the Sparkfun board uses surface mount chips which are hard to replace.
0
 
LVL 30

Author Comment

by:IanTh
ID: 37903407
yes do you agree with replacing the motor chips is normally correct
if so why the hell have sparkfun gone surface mount I know the motor chips are bigger but the could have squeezed them in by the look of it
0
 
LVL 82

Expert Comment

by:Dave Baldwin
ID: 37903455
Cost.  Surface mount assembly is completely automated.  No direct human labor required.

I wouldn't be surprised if you burn up a driver chip in your experiments.  By the time you're done, you should be making sure it doesn't happen anymore.
0
 
LVL 30

Author Comment

by:IanTh
ID: 37904381
yes I know surface mount is automated but all the other stepper shields for arduino's seem to have a changeable motor chip from what I have seen

I have been told that even in normal operation the motor chip can burn out have you seen this yourself?
0
 
LVL 82

Expert Comment

by:Dave Baldwin
ID: 37904509
Inexpensive stepper motor drivers will not be current and voltage protected so they will be susceptible to burn out.  Industrial grade controllers and drivers will have a lot more protection and sensors to prevent problems.  But they cost a lot more.
0
 
LVL 30

Author Comment

by:IanTh
ID: 37905471
how do industrial grade steppers protect them self is that done from the psu as I am thinking of using external power would that help avoiding burn out of the stepper motors by being clean and exact

what is the normal thing that make the steppers burn out is it noisy power or something else
0
 
LVL 82

Expert Comment

by:Dave Baldwin
ID: 37906250
Noise is not normally problem, the drivers and the motors create enough of that themselves.  The thing that burns out the drivers is mechanical stalls.  When something jams a motor and won't let it move, it acts like a transformer with short and draws maximum current.
0
 
LVL 30

Author Comment

by:IanTh
ID: 37907348
so can you say install a fuse so it doesn't burn out and its cheaper to change a fuse
0
 
LVL 82

Expert Comment

by:Dave Baldwin
ID: 37908196
Yes, you could install a fuse.  But a famous old saying is "The transistor burned out quickly to protect the fuse."  In other words, it doesn't always work.  A fuse will protect the power supply more than it will protect the drivers.
0
 
LVL 30

Author Comment

by:IanTh
ID: 37908710
from the controller to the stepper can the wire be as long as needed or is there a limit or other reason to keep it short ?
0
 
LVL 82

Expert Comment

by:Dave Baldwin
ID: 37908734
Wires are very low resistance resistors.  The distance from the driver to the stepper could be important if the wires are long enough to measure the resistance.  Simple Ohm's Law says if you have a 1 Ohm resistance and you have 1 Amp flowing thru it, it drops 1 volt.  That's 1 volt less that your stepper would see.
0
 
LVL 30

Author Comment

by:IanTh
ID: 37989970
but is there a way to work out the resistance of the wire
0
 
LVL 82

Accepted Solution

by:
Dave Baldwin earned 500 total points
ID: 37990299
You can use wire tables or sometimes the manufacturers specs.  This page has both a table and little javascript calculator.  http://www.powerstream.com/Wire_Size.htm
0

Featured Post

Free Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

Join & Write a Comment

this article is a guided solution for most of the common server issues in server hardware tasks we are facing in our routine job works. the topics in the following article covered are, 1) dell hardware raidlevel (Perc) 2) adding HDD 3) how t…
This paper addresses the security of Sennheiser DECT Contact Center and Office (CC&O) headsets. It describes the DECT security chain comprised of “Pairing”, “Per Call Authentication” and “Encryption”, which are all part of the standard DECT protocol.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now