1
\$\begingroup\$

I just finished getting a SOYO [email protected] unipolar stepper motor working, and wanted to know more about an issue I faced while doing so.

I used the stepping sequence below with an L293D chip to drive the current for the stepper motor:

enter image description here

So, I pulled up the datasheet for the motor, and took a look at the wiring diagram:

enter image description here

Based on this layout, I assumed the polarities (assuming M1+==1a, M1-==1b, M2+==2a, and M2-==2b):

  • M1+: Blk
  • M1-: Grn
  • M2+: Red
  • M2-: Blu

So, I wired the motor like so with respect to my current driver:

enter image description here

However, this did not work as expected, and when I used my gray code logic, the motor just ticked back and forth. So, I ended up changing the wiring to the following, and it worked:

  • M1+: Grn
  • M1-: Blk
  • M2+: Blu
  • M2-: Red

And it worked. So, my question is: is there a "standard" representation of stepper motor diagrams in data sheets I could use so I get this right the first time the next time I use a different motor?

Thank you!

\$\endgroup\$
4
  • 1
    \$\begingroup\$ Wow, that's a shit datasheet. It has no phasing information whatsoever. You're going to have to determine it experimentally. \$\endgroup\$ Nov 27, 2014 at 17:27
  • \$\begingroup\$ @ConnorWolf Thank you. I figured it was missing data. \$\endgroup\$
    – Cloud
    Nov 27, 2014 at 17:29
  • \$\begingroup\$ @ConnorWolf Also, if that's the case, and there is no additional information beyond me needing to experimentally determine the phasing information, please post this as an answer and I will mark it accepted. Thanks! \$\endgroup\$
    – Cloud
    Nov 27, 2014 at 17:31
  • 1
    \$\begingroup\$ It would help if you used the same notation for the stepping tables (1a, 1b, 2a, 2b) and how you've connected the motor (M1+, M1-, M2+, M2-). \$\endgroup\$
    – Phil Frost
    Nov 27, 2014 at 19:09

1 Answer 1

3
\$\begingroup\$

Well, as Connor Wolf says, sometimes the datasheets are crappy and you just have to determine things experimentally. However, I don't think that's your problem.

Your motor has six wires. It has two coils, each one tapped in the middle. You don't need the center taps because they are designed for a simpler drive circuit that can only drive its load in one polarity, like this (half your motor):

schematic

simulate this circuit – Schematic created using CircuitLab

By closing SW1, the magnetic field generated by the coil goes in one direction. By closing SW2, it goes in the opposite direction. Thus, even though the driver can drive only one polarity, it can still flip the magnetic field around which is necessary to turn the motor.

The disadvantage here is that at any given time you are only using half the turns in the coil. But you have an L293 which can be used to make an H-bridge, which can drive the coils in either polarity. You don't need the center taps (yellow and white wires) at all. Leave them disconnected. With an H-bridge, you can do this (again just half the motor):

schematic

simulate this circuit

For one polarity, close SW1 and SW4. To go the other way, SW2 and SW3. You don't need the center wire at all, you can still go both ways, and you can use the whole coil all the time.

Don't ever close SW1 and SW3, or SW2 and SW4 at the same time, since that just shorts out the power supply. You may blow a fuse or just trip the thermal protection in the motor driver. Either way, not what you want.

Each of the outputs on the L293 is just half this H-bridge, so just S1 and S3, for example. Each output can be connected to Vcc or ground. With the four half-bridges in the L293 you can make two H-bridges, one for each coil in your motor.

To make the motor spin, call one coil A and the other B. Start in any state. Then:

  1. Reverse the polarity of coil A.
  2. Reverse the polarity of coil B.
  3. Repeat.

There's some ambiguity in this definition, but the motor should turn no matter what. It just might be the wrong way. If it turns the wrong way, then do one of these things:

  • Run the algorithm backwards,
  • exchange coil A and coil B, or
  • reverse the polarity of one of the coils.
\$\endgroup\$
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.