Skip to main content

How to connect stepper motor

Yes this article is actually about how to figure out connecting a stepper motor to your stepper motor driver.

This article is needed because there is no actual standard set up (or I can't find) for the naming of pins in stepper motor and the naming are extremely frustrating and confusing, they are so confusing because 1A and A1 can totally different pins!

In this post I attempt to connect all the random names flying around out there and create a clear guide using which you (and future me) can connect stepper motors no matter that naming (or pain) world throws at us.

Actual attempt is to tell the naming, and also how to figure out connection by knowing the basics of stepper motor. If you know and understand the basic you don't really need the convention

Now since I am done with my ranting/monologue following is the information which you care about

We have two player in our stepper motor setup

  1. Stepper motor
  2. Motor drive

Stepper Motor

Basic Idea behind stepper motor is to put a permanent magnet in the center which will be the shaft and put electromagnets in defined location around the shaft and pull the magnet by activating the electromagnets one by one to have defined rotation of shaft on which permanent magnet is attached.

If you want to understand detailed inner working of Stepper working, check out it this brilliant video, where the creator tears down a real motor and shows the working

Working of stepper motor. Credit:

Motor Driver

Motor driver most commonly controls the direction and magnitude of current through a coil of motor using H-Bridge. Following image shows basic depiction of how circuit is internally wired.

Very detailed understanding of H-Bridge and how circuit works:

Basic depiction of how the Motor Driver controls the Stepper Motor. Credits: TI

Connecting both of them

Main Idea is to connect two/three wires of coil to same H-Bridge, as shown in above picture.

The datasheets of motor driver will always have clear explanation of coil connection, they will might also a connection marking on the pin to tell which lead of coil connects where

Problem is on the stepper motor side, it's not clear which wiring or the pin on the connector coming out of the stepper motor connects to which coil. Sometimes there will be no adequate information in datasheet or in many cases there is just no datasheet (lols (lot of long sobbing))

So rest of the blog is just about figuring that out. Ha Ha hah ☹️. (Yes this is the whole point of this blog)

Connection marking

Following is how connections are marked in the stepper motor system, both on the stepper motor and on the motor driver. You just have to match the connection names. This is going to be more helpful on the motor driver side.

And yeah there are just too many naming conventions, I just listed them all in one image

Figuring out Connector

Following is an example of the motor with good data sheet in which motor has connector

Credit: Oriental Motor

Following is the example of good is which motor has wire coming out of stepper motor.

If you have any of the above diagram for your motor, we are basically done here, just look at these diagrams, look at the datasheet of motor driver and make the connection. Or you can match this with the naming convention diagram and make connection according to that.

If there is no datasheet, you have two option:

  1. Tryout the connection assuming connection shown in datasheet example or use the images given below
  2. Use multi-meter to figure out which connection are one coil

Other connection




Using multi-meter to figure out which wire connect to which coil

You should know how many phase (how many coils) a motor has.

Each coil will either have 2 wires or 3 wires

So assuming it's a 2 phase motor, it will have two coil. In this case it will either have 4 wires on 6 wires coming out of the motor

First take a multi-meter and set it on resistance mode

Now you need to check resistance across the pins/wires to check which pins are connected to same coil, following is how they should behave:

  1. Resistance across 1/2/3 and 4/5/6 will be infinite
  2. Resistance across 4 and 5 or 5 and 6 will be half of resistance across 4 and 6
  3. Similar to point 2, pair of 1,2 and 3 will behave


To sum up, following are the steps:

  1. Figure out which pair connectors/wires coming out of stepper motor connects to same coil using
    1. Connection naming from datasheet
    2. Trying commonly famous connections shown above
    3. Using a multi-meter
  2. In motor driver datasheet, find out which pair of pin are pair of H-Bridge
  3. Make sure to connect one coil to one H-Bridge

If there are questions or feedback please do comment below, it will help be improve the blog as well!

External resource

  1. Highly recommended video to see how everyday use stepper motor is constructed and works:
  2. Stepper motor working:
  3. H-Bridge working:
  4. More on wiring:
  5. More on wiring:
  6. More on wiring:
  7. More on wiring:
  8. Motor datasheet:
  9. Motor datasheet:
  10. Motor datasheet:
  11. Extra details of stepper motor working and comparison of 5 phase and 2 phase:
  12. Image sources:
  13. Image sources:


  1. I always check these types of advisory post and I found your article.230 V Industrial Electric Motors For Sale This is a great source to increase knowledge. Thanks for sharing an article like this.

  2. Great post, Thanks for sharing this wonderful blog with us. I love your blog for Custom soft magnetics for sale online in USA .This is very useful and informative post .Keep it up.

  3. Genuinely good post about your experience. Your post is interesting to read. I like your writing method, Please share some about Neodymium magnet manufacturer Good luck with next upcoming update.

  4. At Belterra Casino Resort, you’ll discover greater than 900 of essentially the most fun and exciting slot machines, complete with denominations from $0.01 to $100, Video Poker, and two High-Limit slot rooms. We are additionally excited to offer a non-smoking 점보카지노 section for guests wishing to gamble in a smoke-free environment in our Indiana Casino. Be positive to additionally examine again typically to see our featured slots beneath. Many slot machines in a specific on line casino could be linked together to more rapidly grow the progressive jackpot.


Post a Comment

Popular posts from this blog

Looking for software engineer to join the Mumbai team

About Kamui Tech A team is all about it’s members and their values. Kamui Tech is made of passionate people who love to make creative, ambitious and, great technologies. Everyone on the team here has an interest in art and engineering. Kamui Tech is a software and electronic hardware consultancy startup. We are in phase of figuring out product market fit, trying out different products in rising markets. Once we have a fit, we will shift from consultancy to product base. We are experimenting in renewable, ev, satellites and ground station, fintech and, ed-tech. Till we figure out product, we do consultancy business to keep making money. We have unique unfair advantage as combination of soft and hard wares are in fabric of company's thought process. Currently we provide end-to-end solutions to real life problems by working with startups. WeWork Office. Our Mumbai team work out of cool co-working place About You A passionate individual who would take up respon

What if humans can make worm holes - Electricity in House

How will the technology look like if the tool-making animal has a new tool - Wormhole. Assumptions - A wormhole can be made of any size - Could connect any two places in space - Unlimited life span Today's topic - Energy transport in House Obviously, there is no need for wires. What if there is a charger plugged in the socket and it has one side of wormhole and another end is in your mobile. Wire comes out of the circuit of the charger goes into the wormhole and the wire exit directly on the battery of the phone. (Why you need the battery? Because you may lose electricity at home, duh!) Imagine you can do this for all the wire in the home! The battery never dies of your phone and laptop. Cameras can be placed anywhere, no need for Wifi or Bluetooth, just connect to speakers directly through the wormhole! You can finally roam around in the house while cooking on induction because there is no need to power it on the plug. You can just hover it on drones because drone