Stepper Motor
Connect and use a stepper motor with the Make Controller Kit.
Problem
You want to connect a stepper motor to the Make Controller Kit with an Application Board.
- Is it a bipolar or unipolar stepper motor?
- What voltage should you drive it at?
Solution
The first step to using a stepper motor with the Make Controller Kit is to wire it up. In order to wire it up, we need to know whether the motor is bipolar or unipolar. We can assume that if the motor has 4 wires coming out of it, it's bipolar and if it has 5 or 6 wires, it's unipolar. To figure out which wires go where, we'll need to do some investigation with our trusty multimeter. If you're using a stepper motor you bought from MakingThings, it's a bipolarmotor, so you can skip straight down to that section.
Note that the wiring examples here assume we're connecting to stepper 0
(Outs 0-3). If you want to connect up a second stepper, or just use
the 2nd bank of outputs, subistitute Outs 4-7.
Note - if you can't find the labels for the outputs on the Application Board, be sure to lift the big screw connectors off the board. The labels are underneath.
Bipolar Motor
It's time to put that multimeter to work to figure out which of those 4 wires are which. They should be grouped in two pairs, and between each pair you should see the same resistance. Between wires that are not paired, you should see no connection, or an extra high resistance (several megohms).
For example, consider you have wires A, B, C and D. Between A and B there's no connection. There's no connection between A and C either, but we measure 25 ohms(this value can vary from motor to motor) between A and D. Now we can guess that we'll see 25 ohms between B and C - sure enough, we do. Just to be sure, we can also confirm that there's no connection between either of our B/C pair and either of our D/A pair. So we know our pairs are wires A & D, and wires B & C. Phew.
Connections
Once you have sorted which wires are in pairs, make the connections as follows:
- Connect one pair of wires between Out0 and Out1
- Connect the other pair of wires to Out2 and Out3
Unipolar Motor
If you have 6 wires, two of those will be the center taps and should both be connected to your voltage. If we consider just one of the coils, there are 3 wires involved - the center tap, and the two ends. The resistance between the two ends should be twice the resistance between the center tap and either of the ends.
In 5 wire steppers, 2 center taps are already connected for you, so it's difficult to say definitively which wires belong to which coils from a simple test of resistance. In any event, the resistance between the center tap and each of the other wires should be half the resistance between any 2 of the other wires. In this case, we don't know which of the 4 wires are paired, so as long as we get the center tap in the right place, a little trial and error will be the best strategy. Don't worry, this won't harm the board or your motor - it will just stutter a bit instead of running smoothly like it should.
Connections
With the wires sorted out, make connections as follows:
- Center tap wire(s) to VOut1
- First pair of wires between Out0 and Out1
- Second pair of wires between Out2 and Out3
Since the board is set to control bipolar motors by default, be sure to send the message
/stepper/0/bipolar 0to put it in unipolar mode. If the motor still stutters instead of turning properly, try swapping the connections between one of your pairs - i.e. swap the wires in Out2 and Out3 (or Out0 and Out1 if you prefer).
Powering Your Stepper
Since most steppers draw more current than the USB connection can offer, you usually want to use a wall transformer to power your steppers. Ideally, you'll know the voltage that your stepper requires, from some manufacturer's documentation. If not, you can carefully experiment with using incrementally higher voltages until the stepper holds firm while you try to turn its shaft by hand. Be careful not to go too high trying this, as it can damage your motor!
If your stepper is powered at 9V or under, you can connect a supply of the appropriate voltage to the main power connector on the Make Controller Kit, and then set the output voltage jumpers to V+ to drive the steppers from that power supply. This is convenient because you only need one power supply to drive both the Make Controller Kit itself as well as your steppers.If your stepper is powered by more than 9V (up to 30V), you should use the external power connectors on the outputs. Connect a power supply of the appropriate voltage to VExt1 and GND, then set the output voltage jumper to VExt. You'll need to power the Make Controller Kit itself with either another supply or simply the USB connection, but now you can drive much higher voltage stepper motors.
The reference for controlling stepper motors via OSC can be found here, and the reference for programming stepper motors in your own firmware is here.
Discussion
Once you have them connected correctly, the Make Controller Kit offers flexible control of your stepper motors. Using the positionrequested, position, and stepproperties, we can keep track of where the stepper is going, where it currently is, or simply move a certain number of steps.
Simple Stepping
The simplest way to use a stepper motor is to tell it simply to start stepping. To do this, send an OSC message like
/stepper/0/step 1000
to move the motor 1000 steps in the positive direction from wherever it currently is.
Position Based Stepping
We can also take a slightly more sophisticated approach by using the positionrequestedproperty. When the board fires up, it assumes that the stepper motor is at an absolute position of 0. Then, if we set positionrequested to 1000 by sending the message
/stepper/0/positionrequested 1000then the board will take 1000 steps. So far, it has behaved similarly to when we simply told it to take 1000 steps. Except now, if we were to say /stepper/0/positionrequested 1000 again, the motor wouldn't move since it's already at position 1000. On the other hand, if we were to say /stepper/0/step 1000
at this point, it would simply take another 1000 steps.
We can read back the position at any given moment to figure out where the motor thinks it is. To read the current position, send the message
/stepper/0/position
Then we should receive a message back from the board that looks like
/stepper/0/position 3500
where 3500 is the current position of the motor. If at some point, we want to redefine where position 0 is (or any other position for that matter), we can say
/stepper/0/position 0
and the stepper will now, no matter where it was, stop and consider itself to be at position 0.
This is helpful, for example, if you have a system using some limit switches - perhaps the motor has floated a little bit and while it thinks it's at position 100, it's actually banging into the end of where it should be running. So your limit switch is activated and you reset the motor to be at position 0. It can then resume normal operation.

Mitsumi M43SP-5N 7.5 degree step connection to mck (image)
Hope it would be useful
If anyone wants to see this particular stepper motor image and connection to the mck
visit this link of the image on my site
http://www.skmtech.com/images/dsc03735.jpg
it's approx 2mb.
I got it from Vetco electronics for $5
http://shop.vetcosurplus.com/catalog/
Cheers