The Classic Encoder articles are reprints taken from the original print version of the Encoder. Some of these are just flat out timeless, and worth another publication.
Karl Lunt - May 1996
[Note: Bill Baileys chopper drive PCB is available for purchase from http://www.nwlink.com/~kevinro/products.html ]
I just finished building one of Bill Bailey's new stepper motor driver boards, and thought I'd pass along some observations.
It's way cool!
OK, I'll elaborate. Bill has created a 2" by 2-3/4" circuit board that uses the SGS-Thompson L297/L298 chip set to control a bipolar stepper motor. This chip set can supply 2 Amps of continuous current (4 Amps intermittent), ample for almost anything but a Dan Mauch design. Best of all, the circuit provides a PWM chopper drive for the stepper. This type of drive drastically reduces the current drain and boosts the efficiency of your motor, a must when using batteries.
The chopper drive also lets you use low-voltage steppers on high-voltage systems, without having to waste valuable energy with large dropping resistors. This means you can plug a 5 VDC stepper into Bill's board, hook up a 12 VDC gel-cell, and start running the stepper. The chopper electronics automatically senses the current demands of the motor and keeps the power to the motor in the proper range.
I've always scoped the surplus stepper motors that turn up in the catalogs. Steppers of all types and sizes, many suitable for robotics, if only I had the right driver circuitry to make them go. Now, I do.
Bill's board sports a heavy-duty male 4-pin .156" AMP connector for hooking up your stepper, plus a second male 2-pin .156" AMP connector for the motor's voltage source. The board also carries a 9-pin male 0.1" AMP connector for the control signals from your computer board.
The computer connector supplies nine signals (including ground) because of all the different features available. The state of the CW/*CCW line selects clockwise (CW) or counter-clockwise (CCW) rotation. A rising edge on the *CLOCK line moves the motor one step in the selected direction.
The HALF/*FULL line configures the motor for half or full steps, while the ENABLE line, if low, removes all current from the motor's coils. This latter signal can be very handy if your robot is sitting at rest; removing the motor current can dramatically reduce battery drain.
To control the current the board delivers to the motor coils, you simply adjust a small on-board trimpot until a test point yields the desired voltage. Bill has chosen components such that the measured voltage, in millivolts, equals the motor current in milliamps. Thus, dialing a voltage of 200 millivolts means the chopper circuit will limit the motor current to 200 milliamps.
And Bill has added some very cool touches to this board, to make it even easier to use. For example, he includes traces and layout for a 5 VDC power supply for the L297. Although you can supply 5 VDC for this chip through the board's 9-pin connector, it isn't always convenient, or other circumstances might make it difficult. Bill's additional supply derives the 5 VDC from the motor's voltage source. Note, however, Bill's excellent documentation warns that using this additional voltage regulator will limit your motor supply voltage to 12 VDC.
Bill also provides a signal for computer control of the motor current. The state of this line will switch the motor current between one of two values selected values. This lets you use one setting for the power needed to move your robot, and another, lower setting for keeping just enough current in the motor's windings so your robot stays in place.
At the April meeting, Bill was selling a board plus a kit of parts, so I bought a couple of kits and built one up. The board goes together very easily, with only a couple of problem areas. In one case, the L298's heatsink sits very close to the L297 (or its socket, if you use such), making it necessary to use longer leads on a pair of caps that fit between the two ICs. The L298 device can also present a problem, as its leads must pass over a few traces, and you have to make sure you mount the chip so as to avoid accidental shorts.
After I finished wiring up the board, I rooted through my junk box for an old stepper motor, wired up a connector, and hooked the motor to my board. I then built up a little 555 circuit to provide stepper pulses, switched on my bench supply, and watched the stepper go 'round and 'round.
I don't know if Bill intends to sell any more kits of parts for his board. You might contact him and see what he says. If he decides not to kit up parts anymore, I'm sure you can find everything you need from Mouser or Digi-Key.
With the motor and driver board working, I needed to mount a wheel onto the motor shaft. I thrashed out some ideas with Dan Mauch, and we came up with what I consider to be a fairly elegant and cheap solution.
Dan started with a piece of 5/8" round aluminum stock. He cut a piece of this stock to a 3/4" length, then drilled a 5mm hole down the center from one end, about halfway through the length of the piece. This bore is sized to slip-fit onto the 5mm shaft of the stepper motor. He then drilled a set-screw hole 1/4" up from the end and tapped for an 8-32 set-screw.
At the opposite end of the piece, Dan drilled a hole down the length, sized to tap for an 8-32 thread. He then tapped this hole for 8-32. The end result is a 3/4" long adapter that will lock onto the 5mm shaft of a stepper motor. The opposite end of the adapter will accept anything you can hold with an 8-32 bolt. Dan capped off this little gem by milling the adapter's threaded end to press-fit a 3/8" fender washer. He fitted a fender washer onto the milled end, then clamped both pieces into his bench vise and cranked on it. When he unwound the vise, he had added a 1-1/2" flange to the milled end of the adapter, perfect for gluing or bolting wheels, pulleys, or couplings.
As an unexpected bonus, I discovered that an 8-32 bolt is exactly the right size to run through a Dave Brown Lite-Flite wheel. The bolt cuts threads in the wheel's bore so it fits tightly in place. Then I just screw the bolt into the threaded end of the adapter, and presto!, I have a solid mechanical connection for my robot wheel.
I've already talked to Dan about a series of adapters, with threaded ends for 6-32 and 4-40 as well as 8-32. Dan figures he can build these for about $5 each, but his schedule is pretty tight, so he didn't know when he could make more. Given the number of machinists in the club, perhaps others might be interested in following up. This adapter is by far the easiest way to hook just about anything to a stepper. I'd like to see the club pursue this idea.
Dan and Bill have each created a powerful tool to help this hobby of amateur robotics move forward. I guess it's time for me to get off my rear and write some more robot code. Got to carry my share of the load, you know.
Keep on keeping on...
Karl Lunt: email@example.com