When I bought my Sherline mill, it came with stepper motors, but no driver box. The drive box takes the output from a PC parallel port (small electrical signals indicating which axis should move and in what direction).
Drive boxes contain several essential parts:
- Power supply
- Stepper motor drivers
- Break out board
- Connectors
- Fuses and wiring
I’m kind of particular about the control electronics of a piece of equipment. Control electronics should be layout in such a way that they are easily serviced. Nothing worst than trying to trace down a problem in a rats next of wiring. Below is as list of some practices I like to use when laying out an electronics enclosure.
- Components should be spaced to allow airflow around them
- Components should be removable without taking out an inordinate amount of other components
- Mount components to a removable panel, rather than directly to the enclosure
- Wiring should be neatly bundled, using removable wiring loom where possible
- Removable connectors are preferred over soldered connections
- Wire ferrules should be used when making connections to terminal blocks.
- Wiring going to a removable external panel should have extra length to allow the panel to be removed without straining connections (called a service loop)
Finding the right enclosure was probably the hardest part of this project, mostly because I had many criteria.
- Mostly made of metal
- Top should be removable without taking front or rear panel off
- Removable front and rear panels
- At least 10″x10″ and ideally ~4″ tall (based on some rough dimensions of the power supply and driver)
- Less than $50
I found several enclosures that fit a few of the requirements, such as:
Par-metal table top series. Nice, but too much money.
Circuit Specialists EM Series Price is right, but a little too tall.
The one I settled on was from eBay, but I also found it on amazon
This enclosure fit all my criteria. My only gripe with it would be that the front and back panel are plastic and snap in place instead of using screws.
As I mentioned above, mounting components such as drivers and power supplies to a removable panel inside the enclosure makes assembly and service much easier. Parts can be installed and wired on the bench and the panel can be placed into the enclosure in one shot. This is a pretty common practice in industrial control panels. In fact, most enclosure suppliers (like Hoffman) sell panel kits that fit into their enclosures.
I took measurements of the inside of my enclosure and cut a panel out of 0.090″ aluminum sheet. 1/4″ nylon spacers and 8-32 hardware secure the panel to the enclosure. To find the position of mounting holes, I printed out a 1:1 scale outline of the power supply and laid it down next to the driver adjusting their relative locations until I was happy with the clearance.
When it came to the rear panel layout I did use CAD software, as I wanted the connectors to spaced evenly and I needed to make sure I had room to run the wiring. Again, I printed a 1:1 scale drawing with the cutouts and screw holes marked, and traced that onto the rear panel.
A step drill made quick work of the holes for the circular DIN connectors and AC input fuse.
The remainder of the cutouts were made on the mill.
A sharp utility knife squared off the corners of this cutout for the power switch on the front panel.
Skipping forward a few steps, the AC input connector and fuse has been installed and wired to the front power switch and power supply.
I used 4 wire 22 gauge shielded security system cable from McMaster to make the internal connections from the driver board to the DIN connectors. Where the wires connect to the Phoenix connectors (also called Euroblocks, those green pluggable screw terminal connectors) I terminated the wires with wire ferrules and heat shrink over the cable covering.
Using wire ferrules instead of bare stranded wire in a screw terminal is good practice, as the strands of wire tend to get broken in screw terminals, increasing the contact resistance.
If you’d like to learn more than you ever probably wanted to about wire ferrules and their use, see this white paper from Weidmuller.
A cable tie mount on the power supply neatly bundles the stepper motor cables.
One last overall shot
At this point I thought I was done. However, my decision to use the 4 axis all-in-one board was bugging me. It’s known to be buggy, and if one axis blew the board could be taken out entirely. In the name of making a more robust driver, I switched to individual axis drivers and a break out board.
The breakout board was pretty easy to mount. 4-40 self tapping screws and nylon spacers secured the board to the enclosure panel. The individual drivers where more challenging. There wasn’t enough room to lay them flat, which meant they need to be mounted on the edge of their heat sink. I thought about a few ways to mount them (screws coming up from the bottom, adhesive, pieces of all thread) before I came up with the idea of using a small strap through the heat sink fin.
Using the same 0.090″ aluminum, I machined some 3/8″x4″ straps, with 1/8″ holes for 4-40 hardware.
Laying out a hole pattern to space the drivers on a 2″ pitch.
First test fit.
Success! The driver is firmly attached, and most importantly, I can remove the driver easily if I need to change setting on the DIP switches. An added bonus is that the heat sink can conduct some of its heat away to the aluminum panel beneath it.
Fortunately the wiring I had made previously for the stepper outputs fit fine, so those did not have to be remade.
Some labels on the back finish the driver box off.