Stepper Motors
The stepper motors I purchased have four wires (red, yellow, green, blue) used to control the motor. In order to confirm the color combinations provided in the motor's drawing and thus find the wire pair that controls each coil, I used a multimeter to measure the amount of resistance between each motor pairing. The wires with less than 10 Ohms of resistance belong to the same coil. Before wiring your motor to a controller, I'd suggest double checking the wiring for any stepper motor using this method. For this particular motor and driver board the wiring is (from left to right): red, green, yellow, blue.
Quad Stepper Motor Controller
I selected this particular stepper motor because it can control up to 4 stepper motors simultaneously and interfaces with an Arduino (Mega).
Quadstepper Motor Controller |
Arduino Interface
The Arduino Mega connects to the driver board using 6 wires per motor (Enable, MS1, MS2, MS3, Direction, and Step). Sparkfun has an Arduino library and initial code for using the Quadstepper motor controller with and Arduino. The code for the quad-stepper driver requires the following pin connections:
Motor1 STP pin: mega pin 11
Motor2 STP pin: meag pin 5
Motor3 STP pin: meag pin 6
Motor4 STP pin: mega pin 46
And then you can set the remaining pin assignments for the direction, enable, and MS1-3 wires to whatever pins you want on your Arduino.
After confirming the connections and code for one motor, I added the other two motors and modified the code accordingly. Here's a video of testing one stepper motor.
No comments:
Post a Comment