Time for an update of the goings-on in the Bitbeam Basement.
Last week, I purchased some stepper motors from Jameco (Part #: 155460). I went with bipolar instead of unipolar based on what I read on the RepRap wiki page about steppers — bipolar steppers are used in newer RepRap machine designs. I figured what’s good for RepRap would be good for me, since I didn’t have an opinion either way.
Next step was to wire up the motor. Here’s a trick: if you’re searching for concise, correct, easy-to-read instructions on how to create a simple circuit, always append the word “Arduino” to your Google search. It’s similar to searching for Linux related things — for the best docs, append the word “Ubuntu” to your search — beginner friendly technology projects always have the best docs! It also helps to actually use Arduino and Ubuntu, too! The Arduino bipolar stepper circuit shows how to use an L293D or SN754410NE chip (commonly called “H-bridge”) to drive the stepper. Very cool! I knew those were handy for DC motors, but didn’t realize they could be used for steppers, too. I happened to have lots of H-bridges around for another project. If you want to pick up some yourself, again Jameco is your friend. (Part #: 1341966)
After wiring-up, I launched the Arduino IDE and opened the stepper example. (Menu path: File->Examples->stepper->stepper_oneRevolution). The built-in library of ready-to-use real world example code is another reason why the Arduino project is so wonderful work with. Thanks also goes to Tom Igoe, who wrote the original version of the code and docs that made their way into the Arduino IDE and website.
With the code ready, and the basic H-bridge good to go, there was one more task to confirm– did I connect the stepper motor’s 4 wires to the H-bridge in the right sequence? Only after I created the above video, did I realize the online data sheet (PDF) shows the correct wiring diagram. I went the brute force way, and just re-arranged the 4 wires while the circuit was running on the Arduino until the axle was rotating properly in both directions. If you get the wiring sequence wrong, the stepper’s axle will mostly just jitter in place, rotating erratically. I had a sense that if I got the wiring wrong on the first try, nothing bad would happen (e.g. I wouldn’t likely kill the motor or the H-bridge chip), so I didn’t feel too guilty just plugging it in and seeing what happens. It’s a fine line knowing when to do precisely the right thing the first time, and when to just say “Oh, forget it. Let’s turn it on, and see what happens.”
The almost awesome part about these specific steppers is that the mounting holes are 31 mm apart from each other. Since bitbeam holes are 8 mm apart, a length of 5 BUs (Bitbeam Units) is 32 mm, which might work with these motors. I took a chance that the motors would mount as-is directly to a bitbeam. With a little bit of wiggle, it works. That’s why I said “almost awesome”. A stepper with mounting holes 32 mm would be perfect, but 31 is close enough. Lastly, I bought some machine screws from Small Parts to mount the motors to the bitbeams. (Part #: B000NHVPW2) (M3, 10mm long, Zinc Plated Steel Machine Screw, Pan Head, Phillips Drive.)
That’s it for now. The next post will show the stepper motor connected up (screwed up?) with some bitbeams driving the X-stage of an eventual Bitbeam CNC machine.