Link to home
Start Free TrialLog in
Avatar of IanTh
IanThFlag for United Kingdom of Great Britain and Northern Ireland

asked on

arduino and stepper motors using a sheild etc

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
Avatar of Dave Baldwin
Dave Baldwin
Flag of United States of America image

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.
Avatar of IanTh

ASKER

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
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.
Avatar of IanTh

ASKER

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
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.
Avatar of IanTh

ASKER

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))
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.
Avatar of IanTh

ASKER

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
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.
Avatar of IanTh

ASKER

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
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.
Avatar of IanTh

ASKER

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
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.
Avatar of IanTh

ASKER

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 ?
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
Avatar of IanTh

ASKER

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 ?
If you look at the image on that page, the Sparkfun board uses surface mount chips which are hard to replace.
Avatar of IanTh

ASKER

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
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.
Avatar of IanTh

ASKER

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?
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.
Avatar of IanTh

ASKER

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
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.
Avatar of IanTh

ASKER

so can you say install a fuse so it doesn't burn out and its cheaper to change a fuse
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.
Avatar of IanTh

ASKER

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 ?
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.
Avatar of IanTh

ASKER

but is there a way to work out the resistance of the wire
ASKER CERTIFIED SOLUTION
Avatar of Dave Baldwin
Dave Baldwin
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial