5 wire Stepper motor configuration

Thread Starter

Manmeet Singh

Joined May 21, 2008
37
So I have got a salvaged stepper motor from an old printer but am wondering if anyone could shed some more light onto how i figure out what wire does what. I have measured all the resistances between the wires and determined that the centertap is red2 so this will be connected to the +ve terminal of the power supply correct?

Rich (BB code):
Resistance table
           white    red1    red2    red3   red4
white    ----      110       55     110    110
red1      110     ----       55     110    110
red2       55       55     ----      55     55
red3      110      110       55     ----   110
red4      110      110       55     110    ---
The stepper motor itself is a Mitsumi m42sp-7p if that helps

Thanks!
 
Last edited by a moderator:

Thread Starter

Manmeet Singh

Joined May 21, 2008
37
I have come across that datasheet as well but wasnt sure how to decipher it to figure out the way to wire it.


I tried two techniques to figure out the combination that would work and failed with both!
http://www.ladyada.net/make/mshield/use.html
-this is the exact setup im using except my stepper has 5 wires. I connected the common tap to gnd which I beleive is the center spot on the block terminal correct? Or was this a stupid assumption? And then I connected these combinations thinking that by system of elimination I would end up with the correct setup I ran the test code which compiled fine and tried these combos.
(Coil 1 M3) (Coil2 M4)
White red1 red3 red4
white red3 red1 red4
white red4 red1 red3
According to my grade twelve math skills thats the total combinations if order doesnt matter and repeats dont! All i got here was a jitter each time

The second method was to use a wall plug with 12.5V and 150mA rating and followed steps according to this
http://www.doc.ic.ac.uk/~ih/doc/stepper/others/
connecting the common to V+ and one permanately to gnd and then testing the rest one by one. Here It didnt even look like it moved at all.

Any ideas?
 

thatoneguy

Joined Feb 19, 2009
6,359
I have come across that datasheet as well but wasnt sure how to decipher it to figure out the way to wire it.


I tried two techniques to figure out the combination that would work and failed with both!
http://www.ladyada.net/make/mshield/use.html
-this is the exact setup im using except my stepper has 5 wires. I connected the common tap to gnd which I beleive is the center spot on the block terminal correct? Or was this a stupid assumption? And then I connected these combinations thinking that by system of elimination I would end up with the correct setup I ran the test code which compiled fine and tried these combos.
(Coil 1 M3) (Coil2 M4)
White red1 red3 red4
white red3 red1 red4
white red4 red1 red3
According to my grade twelve math skills thats the total combinations if order doesnt matter and repeats dont! All i got here was a jitter each time
From the ladyada site, it states:

For unipolar motors: to connect up the stepper, first figure out which pins connected to which coil, and which pins are the center taps. If its a 5-wire motor then there will be 1 that is the center tap for both coils. Theres plenty of tutorials online on how to reverse engineer the coils pinout. The center taps should both be connected together to the GND terminal on the motor shield output block. then coil 1 should connect to one motor port (say M1 or M3) and coil 2 should connect to the other motor port (M2 or M4).
Your chart above shows you connected to M3 and M4, where the instructions stated to use odd for one set, and even for the other set, e.g. M2 and M4, or M1 and M3. This would cause it to "jitter" between two steps.

Or am I missing something and you aren't using an Arduino?

Have you gotten a known good stepper to run with your motor shield?
 

Thread Starter

Manmeet Singh

Joined May 21, 2008
37
I dont think thats the case as I think what its implying is that M1 and M3 represent coil 1 of stepper motor 1 or stepper motor 2 respectively. Since later it says



"Create the stepper motor object with AF_Stepper(steps, stepper#) to setup the motor H-bridge and latches. Steps indicates how many steps per revolution the motor has. a 7.5degree/step motor has 360/7.5 = 48 steps. Stepper# is which port it is connected to. If you're using M1 and M2, its port 1. If you're using M3 and M4 its port 2 "

Sadly I have not been able to get my hands on a stepper with a known datasheet/pinout to test things out. THe board I doubt is faulty as it seems to be driving a servo and a few other things fine. Its just figuring out what to connect where thats killing me! This is creating an annoying bottleneck with the progress of my project =(
 

John P

Joined Oct 14, 2008
2,025
I've done a lot of playing with steppers. My suggestion is to do a test which doesn't involve a processor at all. Connect Red2 to +12v (We assume 12v is correct? Probably won't burn out the motor, anyway) and then try touching the other wires to Gnd in various sequences. While you do this, look carefully at the motor shaft. It'll be easier if there's a pulley or gear on it, but if not, attach a little piece of tape to the shaft, sticking out to the side. As you apply Gnd to each wire, note which way the shaft moves, if at all. What you're looking for is a sequence that moves the motor in a consistent direction, so you could keep repeating that sequence and see the motor turn. Once you've found that, it should work under processor control too.
 

Thread Starter

Manmeet Singh

Joined May 21, 2008
37
I've done a lot of playing with steppers. My suggestion is to do a test which doesn't involve a processor at all. Connect Red2 to +12v (We assume 12v is correct? Probably won't burn out the motor, anyway) and then try touching the other wires to Gnd in various sequences. While you do this, look carefully at the motor shaft. It'll be easier if there's a pulley or gear on it, but if not, attach a little piece of tape to the shaft, sticking out to the side. As you apply Gnd to each wire, note which way the shaft moves, if at all. What you're looking for is a sequence that moves the motor in a consistent direction, so you could keep repeating that sequence and see the motor turn. Once you've found that, it should work under processor control too.
So I gave it another shot with your instructions and it moves! I guess the other link I was trying to follow with a similar method was wrong as it said to lionk the common tap to +V and permantely gnd another then test the rest! So from testing sequences (which was quite fun might I add) I determined red1, white, red3, red4 moved me CW and the opposite gave me CCW. So I have two new questions now. One is that entire sequence moving me 7.5 degrees in total after all 4 of those are gnded or is each gnd moving me 7.5 degrees (assuming this salvaged motor moves 7.5 a step.Next how do I now know which wires belong to coil 1 and which belong to coil 2?

Thanks again this finally looks promising maybe I wont have to buy a new one lol
 

SgtWookie

Joined Jul 17, 2007
22,230
Your stepper is a unipolar motor. It can be driven as a bipolar motor; in that case you'd need twice the voltage and you would not use the common. I suggest that you drive it as a unipolar instead of bipolar.
 

shortbus

Joined Sep 30, 2009
10,045
Your stepper is a unipolar motor. It can be driven as a bipolar motor; in that case you'd need twice the voltage and you would not use the common. I suggest that you drive it as a unipolar instead of bipolar.
Did you mean to say that SgtWookie? I don't think a 5 wire can be used any way but a unipolar, because the common wire is common to all coils. See this link;
http://www.wimb.net/index.php?s=motion&page=52
 

John P

Joined Oct 14, 2008
2,025
Yes, SgtWookie has it wrong in this case. You can't operate this motor with bipolar drive. But unipolar is simpler to deal with anyway.

I would expect that a motor specified for 7.5 degree steps will increment that much from one coil to the next, not for a full cycle of operation of each coil in sequence (which would imply just under 2 degrees per step). So, 48 steps per revolution.

As for which is coil 1 in any official sense, it doesn't matter. Number them yourself and make a list of coil number versus wire color.
 

Thread Starter

Manmeet Singh

Joined May 21, 2008
37
Yes, SgtWookie has it wrong in this case. You can't operate this motor with bipolar drive. But unipolar is simpler to deal with anyway.

I would expect that a motor specified for 7.5 degree steps will increment that much from one coil to the next, not for a full cycle of operation of each coil in sequence (which would imply just under 2 degrees per step). So, 48 steps per revolution.

As for which is coil 1 in any official sense, it doesn't matter. Number them yourself and make a list of coil number versus wire color.

John would you say that the stepper motor for sure works? Since I am able to come up with a sequence of grounding the inputs to acheive a CW rotation and a CCW rotation by doing the opposite I can guarantee that the motor itself is in working conidtion correct? Right now the order is red1,white,red3,red4 so
coil 4= red1
coil 3= white
coil 2= red3
coil 1= red4

Since this stepper motor is 4 phase the step sequence for single coil exciatation would be the same as this http://www.doc.ic.ac.uk/~ih/doc/stepper/control2/sequence.html correct? And on a side note can a 4 phase stepper be run from a single L293D chip?
 

SgtWookie

Joined Jul 17, 2007
22,230
No, the L293 will not work with a 5-wire unipolar stepper motor, as it cannot be operated as a bipolar stepper motor. I was in error earlier; I was posting when I was tired.
 

John P

Joined Oct 14, 2008
2,025
If the motor responds to every change in excitation, I'd say you have a good motor. And yes, the sequences they show on that website are the way to go. Note that they show that by alternating between one coil on and two coils on, you can double the resolution.

All you really need is 4 transistors and freewheeling diodes, set up to be controlled individually by the processor. The easy way to do it is with an integrated multi-channel driver like the ULN2003, which is rated for up to half an amp (but check the specs against your actual motor current, especially if you plan to drive more than one coil at a time).
 
Top