Welcome to My Heap!
.: MENU :.
Home
File Section
My Heap Downloads
Projects
Mike's Amphora Homebuilt Boat
Status: In Progress - last update (15 SEP 2008)
Pearson 26 Sailboat
Status: In Progress - last update (28 OCT 2007)
Gas Fired Crucible Furnace
Status: In Progress - last update (3 FEB 2006)
CNC Foam Mill
Status: In Progress - last update (03 DEC 2006)
Gingery's Lathe
Status: In Progress - last update (28 JAN 2007)
Gingery's Electric Furnace
Status: On Hold - Last Update (18 AUG 2004)
Wax Injector
Status: Finished
The Workshop & Remodelling
Status: In Progress - last update (9 JUL 2008)
Plans
Notebook
Injecting wax by hand
Making a surface plate
Weird Science
Making Honey Mead
Last Update (9 APR 2007)
Making Milk Plastic
Last Update (19 FEB 2006)
Making Green Slime
Last Update (12 FEB 2006)
Misc. Stuff
The My Heap Guest Book
My Craftsman 109
Credits
The Guilty Party
Site History
The My Heap Online Book
Chapter 0 - Introduction
Chapter 1 - Materials
How to Make IRC
Gary Overman's Charity Wax Recipes
Chapter 2 - Tools
Wax Injector
Vacuum Caster & De-bubbler
One Touch, variable heat gun
A Spin casting centrifuge.
A Reil Type Propane Burner.
A Tumble Mixer for Dry Components.
A Poor Man's Engraver Ball.
A Wax Warmer.
A Homemade Sand Muller.
Chapter 3 - RTV Molds
     Example 1: Split Mold
Chapter 3A - Alginate Molds
     Example 1: Clasping Hands
Chapter 4 - Plaster Molds
     Example 1: Fish Mold
Chapter 5 - Latex Molds
     Example 1: A Latex Glove Mold
Chapter 6 - Vinyl Molds
Chapter 7 - Silicone Caulk Molds
Last Update (9 APR 2007)
     Example 1: A Glove Mold
Chapter 8 - Slip Casting
Chapter 8A - Steam Casting
Chapter 9 - Misc. Notes
Chapter 10 - The Hall of Shame
Appendix A - Definitions
Appendix B - Suppliers
Appendix C - Credits
Appendix D - Resources
     Example 1: Casting & Mold FAQ
Building a CNC Foam Mill

PART 1: RESEARCH - Stepper Motor Control Circuits

Click here to return to the main CNC Research Page page.

Tuesday, 18 April 2006

     I have finally reached a point that I think I understand the different types of stepper motors, variable reluctance, permanant magnet unipolar and bipolar motors and have even have an idea about some of the hybrid stepper motors out there. But how do you make them run? What kind of electronics are used to make the whirr into life? This section will describe some methods to the madness as well as point you to some areas of the Internet that I have found some control circuits.

     One thing I want to make clear before I start is that I am focussing on permanant magnet unipolar stepper motors. This is not because I prefer them over all the other types, but rather because those are the type that I have most easily got my hands on when scrapping old printers.

     Stepper Motor Contol Circuits

     I will be focusing on unipolar motors in this section, but I will also try to place links to controllers and circuits for bipolar motors as well.

     Stepping a Stepper Motor

     As you may recall from the STEPPER MOTOR research section, a stepper motor is run by sending a sequence of pulses to each coil in the motor causing it to jog or step in one direction or another. The direction is dependant on the order that you energise the coils. The are three basic ways you can send these pulses to the coils these are Full Stepping with one coil, full stepping with two coils, and half stepping. (I need to make a distinction here. There is a term used when full stepping with one or two coils but I cannot remember them off the top of my head. When I find them or if I recall them I will update this part of the page. Suffice it to say though that when you full step the motor with two coils, that you get much more torque from the motor because you have the magnetic field of the coils to hold the rotor in place.)

     Full Stepping With One Coil - In the table below you will notice each coil in the motor. These are labeled as Θ1, Θ2, etc. The values listed below these are either a 0 or a 1. 0 means that no power is applied to the coil and a 1 means that power is applied to the coil. Each row of the table represents time. If you look at the table you see that on the first row (time period) that the first coil is energized and the other three coils are off. During the next time period you see the first coil has been shut off while the second has been turned on. This causes the rotor to move one position. If each time period we de-energize the coil and energize the next coil we can make the motor turn. When we reach line five we simply start the pattern over again. This process will full step a motor using one coil.

Θ1Θ2Θ3Θ4
1000
0100
0010
0001
1000

     This type of control can be set up a number of ways from using stepper motor control ICs to using simple logic. One that comes to mind is a 2 bit binary counter made from JK Flip Flops and some decode logic for each phase. This can be done like below:

(Image of single step circuit here.)

     Full Stepping With Two Coils - The table below describes how a motor is stepped using two coils. The table setup is the same as above with the coils listed at the top and each row representing time. The only difference is that two adjacent coils are energized.

Θ1Θ2Θ3Θ4
1100
0110
0011
1001
1100

     The above circuit can be implemented with XOR gates and JK Flip Flops. The circuit shown below was the first discreet component circuit I found on the internet and I have prototyped it on some protoboards. I used this circuit to drive some 2N2222 transistors to run a floppy drive motor, and it works.

(Pic of xor jk circuit here)

     A couple of things should be noted about single stepping a stepper motor. When single stepping you limit that maximum speed at which a motor can run. It will reach a point that it will miss steps and not perform. I understand this to be cause from two things, one has to do with the motor and the frequency it is runing at. (I do not pretend to understand this) The other is that the faster you cycle the coils the less time each coil has to build up a magnetic charge or stated another way, the coil does not rise to its full current value before it is switched off. Because of this the faster the motor runs the more torque it will lose, to the point that there is not enough magnetic force to move the rotor to the next position. (This can be overcome by driving the motor at a higher than rated voltage, but more on this later.) And the second problem you encounter with full stepping the motor is that it is subject to jerky starts and stops. (This is caused as I see it from the number of steps the motor has per revolution. Obviously, the fewer the steps the more jerky the motor will be.) This can be overcome by half stepping, 1/4 stepping, 1/8 stepping, etc.

     Half Stepping a Stepper Motor - When you full step with a single coil the rotor moves to point to the coil that is energized. When you switch to the next coil, the rotor moves to face that coil. When you full step with two coils the rotor move to point between the two coils that are energized. Again, when you de-energize the first coil and energize the third coil the rotor moves to point between coils two and three. If you were to conceptually overlay these two methods you end up with the table you see below. To help visualize this, you will notice that the 1st, 3rd, 5th, 7th and 9th rows look just like the first table above and the 2nd, 4th, 6th and 8th rows look just like the second table listed above. So to expand on the rotor movement description above we find the when coil one is energised the rotor points to coil one, then in the next time cycle (row 2) we leave coil one on and turn on coild two, this causes the rotor to move and point between coils one and two, then the next time cycle (row three) we turn off coil one and leave coil two on. This causes the rotor to point to coil two. You can work your way down the table like this. The end result is that the rotor points to twice as many locations as it makes one revolution. So if I had a stepper motor that would make 200 step per revoution while single stepping, I would expect it to make 400 steps (double) by making it half step.

Θ1Θ2Θ3Θ4
1000
1100
0100
0110
0010
0011
0001
1001
1000

     There are gains to be had by running your motor this way. Because a coil is energised a little longer it has time to build up a larger magnetic field and allow you to run it at higher speeds before you lose torqu and start missing steps. The second advantage is that you can get smoother starts and stops because we double the resolution (steps per revolution) of the motor.

     There are many ICs available to perform this function. These ICs usually have two inputs. One for a steppiing pulse and another line for the direction. These ICs can be emulated with basic counters and decoders if one was inclined to do so. The second circuit I built was like this. I used a 74x193 four bit counter with a 74x138 decoder and coupled it with some basic logic to create the sequence above. You can see the schematic below:

(Counter Decoder driver circuit here)

     Stay Tuned - More to come!