G Scale Model Train Forum banner

Stepper motor

1 reading
7K views 25 replies 13 participants last post by  Greg Elmassian  
#1 ·
What is a stepper motor, and how does it operate?
 
#5 ·
Dan, funny you ask. We had a 1990 Mitsubishi Mirage, which was giving us fits because it would either quit while running--accompanied by the clicking sound of a relay--or refuse to start unless you tried like 20 times. I replaced the computer and other stuff before contacting the head tech rep at Mitsubishi in LA who suggested it could be the stepper motor, which I replaced--with no results. Now my understanding is the stepper motor basically goes through the whole start-run process, so if it sticks in one mode, say, run, ya can't start the car because it's in another mode. Or that's how I see it. In the Mitsu, the stepper motor is a little solenoid-looking thingy that attaches to the throttle body.

BTW, we sold our car to a guy who took it to an auto electric specialist who found the problem--a corroded emergency fuel shutoff switch, the device that it supposed to turn off the electric fuel pump in the event of an accident. The switch was intermittant so that if you hit a bump or something, or if it got stuck in open (no current flowing) the engine quit. Now the guy loves the car which is a cream puff and has become his daily driver.
 
#7 ·
Stepper motors may be found controlling the head of an ink jet printer, (and also the paper motion), or the read/write heads on a disk dirive, and many other, much less obvious places. They are conceptually simple, but you have to know what you are doing to get the most out of them. For example, their maximum current draw occues when they are not moving.

Stepper motors are steel and copper, they don't know anything about start-run processes, or anything else.
 
#8 ·
Posted By BarrysBigTrains on 12 Apr 2011 11:19 PM
I was told that stepper motors were used in slot machines (when I lived in Vegas).

Barry - BBT



A Stepper Motor is a series of electro-magnets arranged in a circle and a simple magnet (often a permanent magnet, but can be an electro-magnet as well) as the armature (the part that rotates). Energizing any two electro-magnets on opposite sides of the armature will cause it to rotate until it is aligned with the electro-magnets that are energized. Switch those electro-magnets off and turn on the adjacent ones and the armature will turn to align with the new ones.

Energize the sets of electro-magnets in a continous sequence and the armature will spin just like a regular motor would do. But when the sequence is stopped the armature will remain aligned to the last set of electro-magnets that are energized... Well, inertia will let it continue some amount, but if you leave the last set energized it will pull the armature back to that position.


In reality, most motors are stepper motors in that they work the same way, but the "sequencer" is a mechanical device (the commutator) permanently attached to the armature that automatically disconnects one electro-magnet and connects the next one in sequence to keep the motor running in one direction all the time... as soon as the armature is aligned with one electro-magnet it is disconnected and the next one in sequence is energized to keep pulling the armature in the same direction.

A Stepper Motor just eliminates using a commutator as the Sequencer and substitutes an external device that can energize the electro-magnets in as fast or slow a sequence as is desired and stop the sequence whenever necessary so that only one set of electro-magnets remain energized and holds the armature in that place.


Stepper motors can be reversed by simply reversing which way around the sequence of electro-magnets are energized. Regular motors are reversed by reversing the direction of electric current through it.

A stepper motor can be stopped at any position by just stopping the sequence and holding one set of electro-magnets energized, but a regular motor can only be stopped by cutting of the flow of electricity and then it just spins down due to inertia and cannot be stopped at any desired position.



There are stepper motor controllers that can be purchased to perform various needs, including just spinning the armature like a regular motor, but at a precise speed which can be variable (just by varying how fast the sequence of exciting the electro-magnets is done) or one that will take one step per external signal, like a button press or some sort of sensor that can provide a pulsed output.


Stepper motors are great for positioning something... All you need to know is the gearing ratio and the angle of each step of the motor... If one step of the motor can rotate a lead screw some number of degrees (or fraction of a degree) then you can calculate how many steps are required to move a follower on the lead screw a known linear distance.

In the use in a Slot Machine, the use of stepper motors is what keeps the wheels from stopping between the cherries and the lemons and instead settle on just one. Which one each might stop at is controlled by the "randomizer" (a misnomer if there ever was one!) in the hardware that determines if enough fools have deposited their money for someone to get a small portion back, amidst all the bells, whistles, sirens and blinky lights.
 
#10 ·
Posted By toddalin on 13 Apr 2011 11:49 AM
I have a couple nice stepper motors that came with my electronics surplus "ginormous box" ($12.95 for $$$ worth of electronic odds and ends) that I would like to use (from cash registers I think). Can anyone recommend a suitable circuit?

Todd - I built a up a stepper motor driver using a PIC microcontroller a few years ago. It was for a gentleman who wanted to use two geared stepper motors to raise & lower a lift bridge on his railroad. My notes are here:

Stepper Motor Notes

I have used variations on that circuit for a number of other projects that employed stepper motors.

If you are willing to invest the time in learning PIC microcontrollers it is a great way to make a controller -

Most people are better off to purchase an off-the-shelf controller that can handle the type of motor that they have.



There are a host of resources on the web that can help. Good luck with your project!


dave
 
#14 ·
Yes I do John. I have a Playmobil #4041 conveyor belt that I want to motorize. I do have a Buhler gear motor of the type used for LGB's unloading cars and I believe it is also used in the Rigi cable cars. While looking on Allelectronics site for a small drive belt, something with a circumference of about 10 to 12 inches, and no more than 5/16" wide, I came across the stepper motors and wondered what they were all about. I am really looking for the drive belt. I don't have any DVD players or similar items to dismantle, unless I want to get into alot of trouble.
 
#15 ·
Posted By Madman on 13 Apr 2011 08:48 PM
Yes I do John. I have a Playmobil #4041 conveyor belt that I want to motorize. I do have a Buhler gear motor of the type used for LGB's unloading cars and I believe it is also used in the Rigi cable cars. While looking on Allelectronics site for a small drive belt, something with a circumference of about 10 to 12 inches, and no more than 5/16" wide, I came across the stepper motors and wondered what they were all about. I am really looking for the drive belt. I don't have any DVD players or similar items to dismantle, unless I want to get into alot of trouble.

What type of belt, Dan? Flat, V, toothed timing? I use stuff like this in my work, and can point you to a source. Did you check McMaster-Carr? They have quite a few choices. Click on "Belts" under the Power Transmission section on their home page.
Jim
 
#16 ·
Posted By Madman on 13 Apr 2011 08:48 PM
Yes I do John. I have a Playmobil #4041 conveyor belt that I want to motorize. I do have a Buhler gear motor of the type used for LGB's unloading cars and I believe it is also used in the Rigi cable cars. While looking on Allelectronics site for a small drive belt, something with a circumference of about 10 to 12 inches, and no more than 5/16" wide, I came across the stepper motors and wondered what they were all about. I am really looking for the drive belt. I don't have any DVD players or similar items to dismantle, unless I want to get into alot of trouble.




Try Goldmine Electronics. I just got an assortment there. Be sure to check out their catalog for a world of cool surplus electronics and if you put an order in, and are a tinkerer, be sure to include a "ginormous box."

How timely that in the catalog that just came out they have a big selection of giger counters.

10 belts for $5
 
#19 ·
Well, I managed to get the conveyer working without a belt. Why I didn't think of this sooner I can't say. Sometimes your mind gets influenced by the status quo. I mounted the Buehler motor right onto the conveyer side. I removed the crank handle and lengthened the motor's drive shave with an axel and the axel's plastic sleeve. Here's the result. The Youtube tool does not seem to be working for me. So here is the link.
http://www.youtube.com/watch?v=QfW7xU0tG84
 
#21 ·
Posted By Chris Scott on 17 Apr 2011 07:57 AM
Seems to me a stepper motor would be a good choice to control a turntable, I think in terms of a large turn table to handle a cab forward - live steam of course. Once programmed there's no guess work on steppers position. Add a (what do you call it) a motorized throw pin for locking. Work?

I doubt if the motor would have the torque to move the table (loaded or not) in a single step. It would need to be geared down so that it would take hundreds of steps to complete a rotation of the table. It would still provide precise positioning (except for the backlash in the gears) by counting the steps. Get rid of the gear train backlash and you would not need the locking pin, but I doubt if that could be done well enough.

Unless you could get the gear ratio exactly right with the angular position of the tracks the table is to line up with, a little backlash might be to advantage in getting the tracks and table aligned using a tapered locking pin. Move some number of steps to get to the correct place and let the tapered locking pin provide precise positioning to align the rails. Using a gear train would also allow f or a different number of steps from one track to the next; it would always be the same number of steps from track 1 to 2 and from 2 to 3, etc. even if 1 to 2 is different than 2 to 3 and so on.
 
#22 ·
One of the problems that has lead to abandoning stepper motors in many applications (and using servo motors and some sort of position feedback) is that if the motor is commanded to move and does not, your "program/controller" has no way to know this has happened.

conversely, if you move the motor armature it will not "know" either.

When I worked with some of the first digital plotters at HP, there had to be periodic "position resets" or recalibrations to know that the plotter arm was where we thought it was.

Gearing the motor down to increase the torque (and holding torque) means pretty darn slow speed unless you have a sophisticated controller that can vary the slew rate.

Regards, Greg
 
#23 ·
Posted By Greg Elmassian on 18 Apr 2011 04:08 PM
One of the problems that has lead to abandoning stepper motors in many applications (and using servo motors and some sort of position feedback) is that if the motor is commanded to move and does not, your "program/controller" has no way to know this has happened.

conversely, if you move the motor armature it will not "know" either.

When I worked with some of the first digital plotters at HP, there had to be periodic "position resets" or recalibrations to know that the plotter arm was where we thought it was.

Gearing the motor down to increase the torque (and holding torque) means pretty darn slow speed unless you have a sophisticated controller that can vary the slew rate.

Regards, Greg

Yep, all very true.

Another reason for having a sloppy gear train... when power is turned on, to get the armature position sync'd to the controller (since the controller won't know where it is) the controller will have to step the motor through at least one full revolution, of which the armature may make a full revolution -- or something less, even maybe only one step... But if the gear train is tight the motor might be able to turn, if for example, it is driving a turntable and the turntable is locked in position.

As for speed, in the application of moving a RR turntable, you don't really wanna turn it like a weedwacker so an ultimate speed of "slow" at the turntable end of the gear train is quite acceptable.

Still for precision positioning, an external position sensor makes better sense, even if using a stepper motor for motion.
 
#24 ·
On the Mach 3 software I use to drive the CNC milling machines and lathes, one clicks a button to "zero" the coordinates of all axes. This results in no movement of anything - it merely zeros the coordinates in the software, and all future movement calculations and commands are referenced from that point. Similarly, we built some robotic shears down at work to cut and punch transformer core laminations. They use stepper motors to move the steel, which is de-reeled from a large spool, through the machine to the precise punching or shearing point depending upon the next required operation. I wrote the Windows software that talks to the controller and tells it what to do. Again, there is a "reset to zero" command. Once a future position is calculated, the command is sent to the controller to tell the motor to move a certain number of steps. The controller is then "polled" via a loop to ask if it is still "busy." Once the controller responds "not busy" the software can safely assume the stepper motor has arrived at the designated position.

From my own experience here, I would think that neither required torque nor positional accuracy would be an issue IF one were willing to spend the required amount of money for an adequately sized motor and a good controller. That would be a big "IF" since such are by no means cheap.
 
#25 ·
Stepper motor (From Wikipedia)

Applications

Computer-controlled stepper motors are one of the most versatile forms of positioning systems. They are typically digitally controlled as part of an open loop system, and are simpler and more rugged than closed loop servo systems.

Industrial applications are in high speed pick and place equipment and multi-axis machine CNC machines often directly driving lead screws or ballscrews. In the field of lasers and optics they are frequently used in precision positioning equipment such as linear actuators, linear stages, rotation stages, goniometers, and mirror mounts. Other uses are in packaging machinery, and positioning of valve pilot stages for fluid control systems.

Commercially, stepper motors are used in floppy disk drives, flatbed scanners, computer printers, plotters, slot machines, and many more devices.
 
#26 ·
As always, don't take everything Wikipedia as the absolute correct information. (It's often inaccurate, especially about technical stuff)

The first 2 sentences USED to be true. That was before optical position encoders became cheap and high resolution and dead reliable. Stepper motors are not more rugged than an equivalent cost ordinary servo motor.

Microprocessors have made servo systems the real leader.

I used to work for Hewlett Packard when all the plotters were stepper motors... and all the hassle of finding the zero point on regular intervals... once we came up with inexpensive servos and optical encoders, all the stepper motor stuff went away and the birth of the ink jet printers you have today came about.

I also believe that high speed pick and place machines no longer use steppers, but that would be simple to research.

I do like the last sentence, it really shows how dated the wikipedia information is... floppy disks? plotters?

Anyway, you can have fun with stepper motors, if you get them cheap surplus and you can get some inexpensive electronics to drive them...

(of course the next time your neighbor upgrades to a new inkjet printer, get the motors out of it)

Regards, Greg