How To Wire A Stepper Motor To The Arduino Conveniently

While working on my Braille display, one problem I encountered early on was motor connecting – simply put, how to connect the motors to the driver board so I could disconnect them easily.

Since many driver boards have screw terminals, you’d think that’s as easy as it gets. However, try disconnecting two motors so as to redirect wires or move a motor; that means unscrewing as many as ten terminals. Plus, if you haven’t written down the order the wires go in, then it’s a game of “which wire goes where to work again?” until your motors are up and running.

I soon got fed up with that, and looked around for a simple plug option. Turns out the did the job nicely – four wires, ideal for a bipolar stepper motor. Once the motor is wired to the plug, adding/removing is a simple matter of unplugging. The mating connector stays attached to the board, and the wires are always arranged the same. So, even if I move my motor to another driver board, I simply make sure the motor connector is wired the same, and the motor’s plugs continue to work (simply set up and test with one motor, and I’m done).

One tricky thing about Molex power connectors: male versus female. The terminology is awkward since one plug has a female plastic cover, but male pins inside; it’s mate has a male plastic cover, and female pins. However, online the plastic cover seems to determine the gender, so the female one (with the male pins) is the plug you connect to the motor driver board screw terminals, and the male one is attached to each motor. Why? The male Molex connector is available everywhere, with a half dozen on the ends of wires in every computer power supply. the female however is rarer, since it’s usually the socket built into a peripheral. So since you only need one per motor board controller, it makes sense for it to be wired there, and use the more plentiful male connectors for the various motors.

To get them, search for , or buy those little power extenders, with usually two or three males and one female each. Another option is connectors, which turn out to be quite cheap in quantity. Just cut off the ends, attach where needed to the motor driver, and you have a simple solution for motor handling.

And by the way, what about unipolar motors, which have five or more wires? Since four are used for the drivers, and the remainder are grounds, connect the four as you would normally to the Molex plug, and add a single connector for the ground. I like to use a . Easy, and low cost.

Comments are closed.