Merging modern software development with electrons and metal
Random header image... Refresh for more!

XY Table Part 6: Determining Stepper Configuration

Since I couldn’t find a datasheet on my Sanyo Denki stepper, I decided to figure out how the motor was wired myself.  There are a variety of sources; PIClist has the best list of methods I found, and RepRap is also worth a look.

If you’re not familiar with stepper motors and their terminology (such as unipolar or bipolar), Wikipedia’s article is a good start.  A 4 wire stepper can be used in bipolar mode only, a 5 wire stepper can be used in unipolar mode only, but 6 and 8 wire steppers can be used in either bipolar or unipolar mode.

The exact procedure to use will vary depending on the motor (and its number of leads) and the equipment you have.  Since I have an 2 channel oscilloscope, I decided to use it and look at the phase differences between the leads of my Step-Syn 103-771-16.

My Step-Syn is a 5-wire stepper motor so it has one common wire connecting the center-taps of both coils, and four wires connected to the ends of the two coils.   The wire colors are black, red, blue, yellow, and orange.

The first step is to find the common wire:  the resistance between the common wire and any other wire will be half of the resistance between any other two wires.  The resistance  between the black wire and the other wires was 130 Ohms; between all the other wires, 260 Ohms.  So the black wire is the common.

The next step is to set up the oscilloscope with the black (common) wire connected to the oscilloscope probes’ ground and the two channels connected to any two wires.  You then spin the motor and adjust the oscilloscope settings (V/Div, timebase, triggering, etc) until you can capture a good set of data.  If the waveforms are 180 degrees out of phase, the wires are from the same coil.  If they are 90 degrees out of phase, the wires are from different coils.

Same Stepper Motor Phases, Normal Oscilloscope Mode
Phase Difference for Wires on Same Coil, Normal Oscilloscope Mode
Different Stepper Motor Phases, Normal Oscilloscope Mode
Phase Difference for Wires on Different Coils, Normal Oscilloscope Mode

If your oscilloscope can be used in XY mode (often used for showing Lissajous patterns), it’s even more obvious: wires from the same phase create a diagonal line while wires from different phases create a circular pattern.  My Fluke 196 doesn’t have a real XY mode, but I used a Tek TDS210 to get the pictures below.

Same Stepper Motor Phases, XY Mode
Wires on Same Stepper Coil, XY Mode
Different Stepper Motor Phases, XY Mode
Wires on Different Coils, XY Mode

If the wires are connected to the same coil, then the other two wires are the other coil.  If the wires are connected to different coils, then swap out one wire until you find two wires on the same coil.

Suppose I connect the Step-Syn’s orange and yellow wires to the scope.  The scope trace would show they are connected to the same coil; therefore, the other two wires (red and blue) are the other coil.  Or, suppose I connect the orange and blue wires to the scope; the trace would show they are connected to different coils, so I would swap out one wire (for example blue for yellow) and try again until I find two wires connected to the same coil.

The procedure would be similar for a 6-wire stepper motor, except you have to find two common wires, but the procedure would be considerably more complex for an 8-wire stepper.

The final part is determining the how to connect the wires to the driver.  Basically, connect the coil wires up using your best guess.  If you swap wires within a coil or swap the coils you will change the direction of rotation.  I’ll give a real world example in a paragraph or two.

When I got ready to connect my Step-Syn motor to my Stepnet I discovered I had a problem: the motor is unipolar only while the Stepnet is bipolar only.  The Stepnet manual doesn’t state that (there is no mention of bipolar or unipolar stepper motors), but it became obvious when I looked at the motor connection diagrams in the manual.

Sometimes you can convert a 5-wire motor to a 6-wire by taking the motor apart, cutting the connection between the two center-taps, and then bringing out the second center tap.  I did take the case off the Step-Syn, but I didn’t see any obvious way to bring out the sixth wire.

Since I still wanted to test this motor, I decided connect it to a Allegro Microsystems UCN5804 unipolar stepper driver.  I connected the black wire, Pin 2, and Pin 7 to +24VDC, orange to Pin 1, yellow to Pin 3, blue to Pin 6,  red to Pin 8, and Pin 14 (Direction) is tied to ground.  The motor rotated the direction I wanted: clockwise when viewed from the front.  Using the UCN5804 datasheet, I determined that in 2-phase drive the wires were energized in the order yellow/red, red/orange, orange/blue, and blue/yellow.  In wave mode (1 phase), the wires were energized in the order red, orange, blue, and yellow.

Swap two wires within a coil, for example, yellow and orange.  yellow is now connected to Pin 1 and orange is connected to Pin 3.  The motor now moves counter-clockwise.

4 comments

1 michaelschembri { 01.21.13 at 1:26 pm }

I’ve built two stepper motor drivers for a stepsyn sanyo stepper motor (4.1V, 1.1A, 1.8deg/step). One controlled from atmega (using MOSFETS P65NF06) and the other one via parallel port (using TIP 121). Central pins (the common ones) connected to 5V and then each coil to the collector/source. However, I get the same result motor vibrates but does not run. Tried multiple control sequences (i.e. tried all stepper motor pin sequences), two motors, various time delays but no success. If one coil is actuated the shaft will not budge. However, if stepping the movement is erratic.

Coils are protected to the power supply via diodes. Transistors and motor get hot after some time.

Any suggestions?

2 Tony { 01.22.13 at 3:33 pm }

What StepSyn model is it? Is it unipolar? Do you have any commercial stepper drives you can use to test the motors? What step rate are you trying to run at?

Note that typically steppers are driven at much higher voltage than the rated voltage, with the drive electronics controlling the current; this allows better performance at higher speeds. Wikipedia’s stepper motor page has a bit on this.

3 michaelschembri { 01.23.13 at 3:34 am }

The stepper motor was from a functioning IBM Proprinter – Unipolar 6wire 103G770-2511. I have no drives to test them on. I tried multiple step rates from 1ms/step (2ms,4ms,10ms,20ms,1s) and I tried also half stepping them.

What I find strange is that after a full 4 steps the next step should continue the rotation, however that does not occur (especially in slow stepping mode).

In all my stepping runs I energize pins in order 1234, 1324, 1243: this way always get a correct order, at least once, irrespective of the wiring.

The resistance is of 4ohms. My issue here is that if I give a greater supply, that would exceed the motor rated current which is 1.1A (4.3V/4ohms = 1A). The motor does warm up when running.

Thanks for the interest

4 Tony { 01.23.13 at 2:09 pm }

Assuming it’s a six wire stepper, based on this and this, the most likely wiring seems to be:
Common: BLACK, WHITE
Coil A: RED, YELLOW
Coil B: BLUE, ORANGE

For unipolar operation, your overall connection appears correct: motor supply voltage connected to common, and the four coil wires connected to your four drivers. I’d say first try to verify your connections (that you know which wires are part of the same phase) and then try all the possible stepping sequences.

With a six wire motor and bipolar driver, you can also try bipolar operation, leaving the common wires unconnected; in this case, you should use half the current.

I’m lucky to own some commercial stepper drivers. You might consider buying one; Gecko drives are < $100, there's also eBay for used drives or there's integrated driver chips -- I've used the UCN5804, which is out of production, but still available on eBay, and easy to use since it's a DIP. I some information about a different StepSyn motor, the 103-771-16, which might be useful.

Stepper motors do run hot at 100% power and high duty cycles; it’s another reason I prefer servo motors.

Leave a Comment