Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 14 of 14

Thread: How to wire a 4-wire stepper motor?

  1. #1
    Senior Member
    Join Date
    Jan 2013
    Location
    San Francisco Bay Area
    Posts
    659

    How to wire a 4-wire stepper motor?

    I have this stepper motor Lin engineering 3809Z-45, which is rather similar to this one:
    https://lin-web.s3.amazonaws.com/dow...0Datasheet.pdf

    stepper motor:
    Red(A+ Phase)
    Blue (A- Phase)
    Green (B+ Phase)
    Black (B- Phase)

    --

    I'm using an A4988 driver, and it has wiring for these pins:
    1A
    2A
    1B
    2B

    Click image for larger version. 

Name:	A4988-Connections-pinout-microstepping-pins.png 
Views:	16 
Size:	7.7 KB 
ID:	26736

    Is it?:
    A+ -> 1A
    A- -> 2A
    B+ -> 1B
    B- -> 2B

    I don't know much about stepper motors, and I'm looking at just getting the stepper to change positions every so often. I have the 2 power supplies and hoping not to blow anything up in wiring stuff.
    Maybe it's not a concern to mis-wire these points? If so, I could try different combinations. thanks in advance for any guidance.

  2. #2
    Senior Member
    Join Date
    Jan 2013
    Location
    San Francisco Bay Area
    Posts
    659
    This diagram seems like it might be helpful, although I'm not sure how to match up the stepper motor pins.
    Click image for larger version. 

Name:	0J10073.600.jpg 
Views:	19 
Size:	54.0 KB 
ID:	26738

  3. #3
    Senior Member
    Join Date
    Jul 2020
    Posts
    1,460
    With a multimeter in ohms setting you can identify the two separate windings of the stepper, what's important
    is that one winding goes to 1A/1B and the other to 2A/2B on that module - alas the naming schemes for windings/
    wires vary, so diagrams and multimeters are a more reliable guide.

    Quite a common colouring scheme is blue/red for one winding, green/black for the other, but this is definitely
    not universal.

  4. #4
    Member
    Join Date
    Feb 2020
    Location
    Dublin, Ireland
    Posts
    70
    Hi,
    The easiest way to double-check the wiring is to connect two wires together - e.g. red and black. If they are the two wires for one coil then, when you try to turn the motor, you should feel more resistance than when they are not connected. Do the same for the green and black wires.

    The polarity doesn't matter - just make sure one coil is connected to 1A and 1B and that the other is connected to 2A and 2B.

    Be careful to adjust the potentiometer to limit the current to that motor to 0.25 A per phase (see, for example, https://lastminuteengineers.com/a498...uino-tutorial/).

    All the best,
    Alan

  5. #5
    Senior Member
    Join Date
    Jan 2013
    Location
    San Francisco Bay Area
    Posts
    659
    I tried turning them but it didn't feel very different, but this stepper motor is connected to an apparatus where it's awkward to turn the motor and feel how much effort it takes.

    I checked and the green/black is 55 ohms, and so is blue/red, so I think those are the 2 coils and I should be able to go from there.

    Thanks for the tips!

  6. #6
    Senior Member
    Join Date
    Jul 2020
    Posts
    1,460
    55 ohms is quite large - nothing like the motor you link to as "rather similar".
    What size is the motor - this will be a more reliable guide to its dissipation limit, and thus figuring
    out a likely current value.

    You may need quite a high supply voltage to get a 55 ohm motor moving more than a few 100rpm.

  7. #7
    Senior Member
    Join Date
    Jan 2013
    Location
    San Francisco Bay Area
    Posts
    659
    Quote Originally Posted by MarkT View Post
    55 ohms is quite large - nothing like the motor you link to as "rather similar".
    What size is the motor - this will be a more reliable guide to its dissipation limit, and thus figuring
    out a likely current value.

    You may need quite a high supply voltage to get a 55 ohm motor moving more than a few 100rpm.
    The one with the document I listed is 3809Z-14.
    The exact model I have has this info on it:
    3809Z-45
    0.15A
    072007

    36mm diameter and 12mm height.

  8. #8
    Senior Member
    Join Date
    Jul 2020
    Posts
    1,460
    That'll be 150mA, 55 ohm then, which will need at least 12V for the A4988 to drive properly, and would benefit from
    higher voltage to overcome the winding impedance better (this is mainly inductance, not the resistance, note).

    The dissipation of just over 1W is plausible for such a tiny stepper.

    I suspect the -45 indicates the winding resistance (roughly!), as the linked one was 15 ohms and has -14

  9. #9
    Senior Member
    Join Date
    Jan 2013
    Location
    San Francisco Bay Area
    Posts
    659
    Is that 150mA a requirement from the 3.3V teensy, or the 12V power supply?

  10. #10
    Senior Member
    Join Date
    Jul 2020
    Posts
    1,460
    150mA stepper motor current level, which needs programming into the stepper driver module
    as per instructions for that stepper driver module.

  11. #11
    Senior Member
    Join Date
    Jan 2013
    Location
    San Francisco Bay Area
    Posts
    659
    Thanks again. Just thought I'd leave a note on the thread that this worked, in case it helps anyone else.

  12. #12
    Senior Member
    Join Date
    Jan 2013
    Location
    San Francisco Bay Area
    Posts
    659
    And this worked with 12V supplied to the VMOT pin, and 3.3V supplied from the teensy for the other power supply.
    I wasn't sure whether I should take the 5V from the teensy or the 3.3V from the teensy.
    If I can take the 5V, and still drive the step/dir pins, that would probably be preferred since I wouldn't be taxing the 3.3V supply for other things.

  13. #13
    Senior Member
    Join Date
    Jul 2020
    Posts
    1,460
    Quote Originally Posted by linuxgeek View Post
    I wasn't sure whether I should take the 5V from the teensy or the 3.3V from the teensy.
    The A4988 datasheet says logic input levels are 0.3Vdd and 0.7Vdd, which is 1.5V and >>3.5V<< if powered at 5V, thus incompatible
    with 3.3V logic.

  14. #14
    Senior Member
    Join Date
    Jan 2013
    Location
    San Francisco Bay Area
    Posts
    659
    Quote Originally Posted by MarkT View Post
    The A4988 datasheet says logic input levels are 0.3Vdd and 0.7Vdd, which is 1.5V and >>3.5V<< if powered at 5V, thus incompatible
    with 3.3V logic.
    Yep, it works! Glad to not have to worry about the impact on power draw for the ADC inputs.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •