3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

How-To: Motors

How-To: Motors
Servos and Steppers and Gears! Oh my!

Some of our favorite hobbyist electronics utilize motors to mobilize, making them fun and awesome! Including a motor in your project could be challenging, especially if you have never worked with them before.

The following Instructable will explain how motors work, and break down some of the most commonly used kinds of motors.
 
Remove these adsRemove these ads by Signing Up
 

Step 1The Fundamentals

The Fundamentals
Before we can really begin addressing how a motor works, lets focus on what a motor does. A motor uses electromagnetism to create motion, converting electrical energy into mechanical energy.

Magnetic fields produce physical force that can move things. Every magnet has a magnetic field with a north pole and a south pole. If you try to push the north poles of two magnets together, they will repel each other. The same thing happens if you try to push two south poles together. If two poles are the same, they will repel each other. If, however, you play with two magnets and bring the north pole of one close to the south pole of another, they will attract each other and stick strongly together, opposite magnetic poles attract each-other.

An electric motor uses the attraction and repelling properties of magnets to create motion. There are two magnets in a standard electric motor: a permanent magnet, and a temporary magnet. The temporary magnet is a special kind of magnet, called an electromagnet. An electromagnet is created by passing an electric current through a wire. The permanent magnet has a magnetic field (a north pole and a south pole) all the time, but the electromagnet only has a magnetic field when there is a current flowing through the wire. The strength of the wire's electromagnetic magnetic field can be intensified by increasing the current through the wire, or by forming the wire into multiple loops.

In an electric motor, the electromagnet is placed on an axle so it can spin freely inside the magnetic field of a permanent magnet. When an electric current is passed through the wire, the resulting temporary electromagnetic field interacts with the static permanent magnet, and attractive and repelling forces are created. This excitation of the wire, or electromagnet, propel it to spin on its axle, and an electric motor is born.




Motors are classified by having the following properties:
  • There's a permanent magnet (or magnets) around the edge of the motor case that remains static, so it's called the stator of a motor.
  • Inside the stator, there is a wire coil, mounted on an axle that spinsaround at high speed -  this is called the rotor. 
« Previous StepDownload PDFView All StepsNext Step »
42 comments
1-40 of 42next »
Mar 6, 2012. 8:51 AMcoolnits says:
I new to complex circuits and arduino. Wat is arduino?.
And do u program arduino with a computer?
if yes - Which language ?

Plzz answer.

----- curious beginner
May 2, 2012. 8:48 PMrtty21 says:
Coolnits,
Arduino is a microcontroller (like a mini, programmable computer)
You program it using the Arduino IDE (the arduino program-writing software)
You can go to Arduinio.cc for a LOT of good information about the Arduino.
It is programmed in C / C++

-Ryan
Mar 8, 2012. 10:49 AMburnerjack01 says:
Coolnits, Arduino is a very powerful microcontroller which is based on an opensource platform. The website www.hackaday.com can fill you in. Seems to be ONE of the up and coming nextgen controllers. Free software downloads, free manuals and tutorials too! I have it on my wish list but have yet to actually try one or do any work with one, so I can't tell you much more other than it is based on Object Oriented Code. What's that? Dunno. Yet. I do get the Idea that it is quite popular with techies who dive deep. Good luck.
Feb 19, 2012. 2:44 PMNirgal38 says:
I got the link to this the day after I'd finally figured out how to get a stepper working with my Arduino.

Timing is everything. :)
Feb 21, 2012. 4:55 AMArkyro says:
You should use a ULN2003 IC to drive stepper motors using the arduino! If i am not wrong it is a darlington array..
Feb 26, 2012. 6:51 AMDavAnt says:
Yes, I got a stepper out of an old UMAX scanner, and it is controlled through a Toshiba TD62003AP, which is a Darlington array. There are also some smd capacitors to smooth it out I guess
Feb 22, 2012. 4:26 PMairborne82 says:
If you don't want to pay for a Arduino board and you know a little about electronics, you can build a stepper motor controller from a 555 timer IC, a 4017 decade counter IC and a ULN 2003 Darlington transistor array. To adjust the speed simply put a potentiometer ( the higher the resistance, the slower it goes) between pins 7 and 8 of the 555 timer IC. The direction can be changed using a DPDT switch from the output of the ULN2003. This works simplest when running 3 phase stepper motors which are commonly used in aviation. There isn't much information on the net about 3 phase stepper motors and how to run them, but I combined knowledge about the 3 ICs and many schematics.
Feb 24, 2012. 5:24 PMairborne82 says:
I have to correct myself. To adjust the speed, put a potentiometer between pins 2 and 7 of the 555 timer IC.
Feb 21, 2012. 1:43 PMraphsonnewton says:
Where can you get the small axle?
Feb 19, 2012. 8:29 AMkristof.van.opstal says:
This is a great starters tutorial for motors! It would be a perfect entry for the teachers-contest!
Feb 19, 2012. 10:22 AMJeff Yates says:
I Agree
Feb 21, 2012. 12:21 PMstephenfitton says:
Are you the Jeff Yates from (Paravet-Computers are here Co)
The inventor of Mr Salty water chlorinator and the Originater of the First Usuable Chineses Computer Keyboard. In which case please take credit for realising my basic theory with Barry to take the stepper motor to its 1,000 degree. If I remember right that took 6 months and $30,000 to realise, congradulations, Student 6 of 20 pass
Feb 21, 2012. 12:11 PMstephenfitton says:
nice presentation,because you have done so well and like experimenting.
History back in the eighties they wanted stepper motors to go beyond 1.5-3 degrees I offered a solution . by oscillating the fields with different wave lengths and forms,1,000 th of one degree was achievable using the same motors..Keep up the good work.
Feb 20, 2012. 9:39 AMskrubol says:
The brushes are just part of the commutator. They're the switch that keeps the coil at the right polarity to keep spinning. They don't propel anything.

Also I agree with Clemtasm. A constant voltage across an 'ideal' motor will give constant speed with varying load. In real motors the speed drops with higher load due mostly to the resistance of the windings.
Feb 21, 2012. 4:50 AMArkyro says:
When the load on the motor increases the current consumed by the armature will also increase hence the flux will increase. Speed in inversely proportional to flux. So the speed of the motor has to decrease with increase in load over a constant load. Even in case of an ideal DC motor. Please let me know if I am wrong.
Feb 21, 2012. 6:41 AMskrubol says:
It's been a long time since I've dealt with theoretical emag, so I'm not sure. In an ideal motor model with zero ohm windings (I think even in an ideal motor, sometimes you will account for winding resistance, depends who considers it ideal..) speed is strictly proportional to voltage and torque is strictly proportional to current.
In a simple motor model (where you do take winding resistance into account, but do not take reactivity or friction into account,) it's pretty easy to deal with the winding resistance. Speed will just be (Vin - Tout/Ka*r)*Kv. Or if you know V and I, just (Vin - I*r)*Kv.
Feb 17, 2012. 11:48 PMpattyshaw says:
This was great but how do i wire a 6 lead stepper motor to an arduino?
Feb 21, 2012. 5:01 AMArkyro says:
You need a Stepper motor driver circuit...
Feb 19, 2012. 10:28 AMelabz says:
It's a unipolar stepper, Arduino has a special tutorial for it here:
http://www.arduino.cc/en/Tutorial/StepperUnipolar All the chips needed for driving it along with the software to step through the windings is mentioned on that page
Feb 19, 2012. 10:06 AMaskjerry says:
Be sure to use a motor driver... the Arduino is designed around an Atmel processor which can support a maximum of 20mA from a port, not to exceed 50mA for the entire chip. A typical stepper motor can be 2A which is 2000mA or 400% of what the chip is designed for.

4-wire Steppers are driven by alternating the flow through the coils forward/backward so you have two wires per coil. The 6-wire steppers are designed to have the center set to ground, then you energize the coil you want. The interface can be as simple as a 2N2222 transistor per coil. (Or larger MOSFET if more current is needed.)

a 6-wire stepper can also be driven as a 4-wire by not connecting the center lead and thereby using the entire coil. Again... use a bidirectional motor driver. (H-Bridge) to drive them.
Feb 19, 2012. 11:08 AMpattyshaw says:
It is a lin engineering 4118L-04 I believe it is a unipolar motor but i haven't been able to find its exact spec sheet
Feb 19, 2012. 12:14 PMthesa1nt01 says:
"Speed of the motor can be controlled by the amount of current reaching the coils from the battery to the commutator."

Should be changed to:

"Speed of the motor can be controlled by the amount of voltage applied to the coils from the battery to the commutator."

Voltage is proportional to speed and current is proportional to torque.
Feb 21, 2012. 5:00 AMArkyro says:
The speed of a DC motor can be controlled by limiting the current supplied to the commutator. Speed and Torque are inversely proportional.
Feb 21, 2012. 12:23 AMthrobscottle says:
Really good instructable. Shame you didn't cover analogue DC motor control - I would have liked to read that since I've forgotten how it works...
Feb 20, 2012. 5:39 AMClemtasm says:
I believe you mean speed of the motor can be controlled by controlling the amount of voltage across the motor?

My understanding is- A DC motor fed a constant voltage will have a fairly constant speed over a range of loads. A motor fed constant current will produce fairly constant torque over a range of speeds
Feb 19, 2012. 8:56 PMdreadengineer says:
The last paragraph is incorrect for stepper motors; I think you may have meant to put it in another section ("If you hook the battery leads of a stepper motor up to a battery, the axle will spin.").

To make a stepper spin, you have to use a microcontroller to pulse each of its coils in a sequence, as shown in your second picture. If you just hooked up a coil to a battery, the axle will be pulled into alignment with that coil and won't spin.
Feb 19, 2012. 8:43 PMdakellymon says:
Thanks for sharing.
Feb 19, 2012. 12:53 PMdidgitalpunk says:
damn it where is that "like" button!
very good instructable!
Feb 19, 2012. 10:23 AMaskjerry says:
Your Instructable is very good... but I didn't see where you mentioned using a driver chip or transistor to interface between the Arduino and the motor you are running. This may lead people to think they can just connect a motor directly tot he Arduino leads and run it directly. That is actually VERY BAD. The Arduino has limited current depending on the particular Atmel chip used for that model.

The Atmel is designed to only supply about 20mA per pin (0.020 amps)... enough to drive an LED or send a signal to another device. Servo motors are fine... the motor driver is built internally... but DC motors and Stepper motors are raw coils which...

a) Need a high current level. (Between 700mA to 4000mA)
b) Output a return spike when power is removed.
d) Pull more current through the core of the chip than it was designed to take.
e) Often require higher voltages, 12v, 24v, and 36v are common.

Sparkfun makes a suitable module that is completely assembled: http://www.sparkfun.com/products/10267

You can also purchase chips and roll your own if you like.
Here is one example:
http://search.digikey.com/us/en/products/E-L6219/497-1426-5-ND/585947

Another advantage to using a chip is that it supports MICROSTEPPING... so instead of 200 steps per revolution you can get 2000 or so. The chip pulses the coils with PWM (pulse width modulation) to allow for intermediate steps... and many chips will also throttle back the current when the stepper is not moving to help the motor run cooler and longer.

I hope that helps.
Jerry
Feb 19, 2012. 10:20 AMJeff Yates says:
An excellent instructable. Deserves an award.
Feb 19, 2012. 8:28 AMmoffett8 says:
If anyone know of a place to sell motors similar to the ones in the picture.. I have more than I can ever use to build things with. I have about 5 different motors all are in the same size range but are different types of motors, stepper, regular etc.

Thanks,

Philip
Feb 19, 2012. 10:00 AMaskjerry says:
I would set up an account on ETSY. The ad cost is $0.20 USD and you will get many people finding your site. http://www.etsy.com/

An alternative is to sell them on ebay. http://ebay.com
Feb 19, 2012. 8:33 AMmemartina says:
What kind of motor drives the power windows of my car?
Feb 19, 2012. 9:58 AMaskjerry says:
It's a DC gear motor that is likely toggled via a DPDT relay.
Feb 19, 2012. 7:57 AMsitearm says:
@audreyobscura; Hi! Great videos, explanations, and examples! I've tweeted your excellent tutorial plus the videos of world's simplest motor and slow motion capture of vibrator motor modes. Cheers! Site
Feb 19, 2012. 6:58 AMdesertdog says:
Very well done !!. Simple and informative. I learned some things that I did not know.
Feb 19, 2012. 5:51 AMMattCP says:
Great informational 'ible'...well done! I am going to use this with my students this week!
Feb 18, 2012. 5:00 PM94todd says:
thank you very much, an absolutley perfect instructable set
Feb 18, 2012. 5:44 AMivanjacob says:
why isnt this done before?! perfect explaination and easy to understand!
1-40 of 42next »

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
86
Followers
8
Author:audreyobscura(audreyObscura.com)
technology fiend, photographer, and amateur electric ukulele player.