Engineers Garage

  • Electronic Projects & Tutorials
    • Electronic Projects
      • Arduino Projects
      • AVR
      • Raspberry pi
      • ESP8266
      • BeagleBone
      • 8051 Microcontroller
      • ARM
      • PIC Microcontroller
      • STM32
    • Tutorials
      • Audio Electronics
      • Battery Management
      • Brainwave
      • Electric Vehicles
      • EMI/EMC/RFI
      • Hardware Filters
      • IoT tutorials
      • Power Tutorials
      • Python
      • Sensors
      • USB
      • VHDL
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Product News
    • Business News
    • Company/Start-up News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • DigiKey Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Learn
    • eBooks/Tech Tips
    • Design Guides
    • Learning Center
    • Tech Toolboxes
    • Webinars & Digital Events
  • Resources
    • Digital Issues
    • EE Training Days
    • LEAP Awards
    • Podcasts
    • Webinars / Digital Events
    • White Papers
    • Engineering Diversity & Inclusion
    • DesignFast
  • Guest Post Guidelines
  • Advertise
  • Subscribe

How to deal with an unknown stepper motor?

By Ashutosh Bhatt September 27, 2021

How to deal with any unknown stepper motor?

This section deals with a special procedure that can be useful to find out the type of stepper motor, its terminals, its coil sequence, its step resolution and everything about stepper motor. if anyone have a steppe motor that doesn’t have any specifications then after going through this section following the procedure he would be able to find out all above things for his stepper motor.

First, find out how many terminals or outcomes are provided for interface from stepper motor. If there are four terminals then it will be a bipolar stepper motor and if more than four means five of six terminals then it will be unipolar stepper motor. The construction of both motor is different and so the operation also.

Unipolar Stepper Motor: –

Unipolar Stepper Motor

The given figure shows the internal architecture of unipolar stepper motor.

The stator has four coils and one end of each coil is tied to take out a common terminal. If the motor has six terminals then not all four but end of two coils are tied together and that two terminals are taken out as common.

Now to find out which terminal is common and which are for coil follow the procedure step by step

  • take a multimeter and  put it in continuity mode
  • connect the red probe with any one terminal
  • Now connect the black probe with any other terminal.
  • if you are getting the coil resistance with each other terminals (any reading other then infinity) then the current terminal will be the common terminal
  • And if you get the coil resistance with only one terminal then the second one will be common terminal. Check it with all other terminals.
  • After identifying terminals, we have to find out the exact coil sequence how they are arranged because the motor will not rotate till the pulses applied in correct sequence.
  • For this, you have to make one test circuit on general purpose PCB or breadboard and write a simple program in C language through u can find out coil sequence.
  •  Unipolar Stepper Motor Circuit

  • The circuit is as shown in Circuit Tab1. One and only component of circuit is current driver chip ULN2003A. 
  • connection:- all the inputs of chip (pin no.- 1, 2, 3, 4) are connected with the data pins (D0-D4) of 25 pin D type female connector (LPT connector). The outputs (pin no.- 16, 15, 14, 13) are connected with all four coil terminals. The common terminal is connected with +5 V. The chip is given bias on pin no. 9 and 8 as shown
  • operation: – the chip consists of 8 Darlington pairs one for each input. When you apply high input from computer through LPT port, it will give low logic at output side so current can pass through the coil of motor.
  • Now we have to write a program in C language that will give the pulses to LPT port and rotate the motor.
  • There are three operating modes of unipolar stepper motor (1) single coil (2) double coil and (3) half step. From these three modes, we shall use first mode means only one coil will be energized at a time.
  • as four coils are connected with four data outputs of LPT port D0-D3 the output data bytes will be 01h, 02h, 04h and 08h. Please refer the table.

 coil4 D3

 coil3 D2

 coil2 D1

 coil1 D0

 data byte

 0

0 

0 

1 

01 h

 0

0

1

0

02h

 0

1 

0 

0 

04h 

 1

0

0

0

08 h

If the motor rotates then bingo!!!! You have connected the coil in right sequence. but if it doesn’t try to change the sequence in program like try 1428, 1482, 2148, 2184 etc. or you can change the connection of coil terminals and keeping sequence 1248 as it is. At one time, motor will rotate clockwise or anticlockwise. Note down the sequence and give the coil numbers according to it.

Now to find out step resolutions just go on increasing counter (i) given in program. Every time see when motor completes one full revolution. See the count. As we are applying 4 pulses in one loop total applied pulses will be counter × 4. And the step resolution will be 360/counter×4. Let’s take an example. If counter is 50 then total pulses will be 200 and step resolution will be 360/200 = 1.8. To increase or decrease speed just change given delay. If delay is increased speed will decrease and vice versa.

 Bipolar stepper motor

Bipolar stepper motor: – 

Bipolar Stepper Motor

The given figure shows internal structure of bipolar stepper motor

Here there are only two coils in stator and its all four terminals are taken out no one is common. To rotate motor both coils must be energized in sequence and to energize coil one terminal of coil should be at high logic and second must be at low logic.

Here we just have to find out between which two terminals there are coil. 

  •   take a multimeter and  put it in continuity mode
  •  connect the red prob with any one terminal
  •  now connect the black probe with any other terminal.
  • if you are getting the coil resistance (any reading other then infinity) then there must be one coil between these two terminal. If not then try other one
  • once you get one coil terminals it is clear that other two will be for second coil.
  • now to find out the sequence of terminals again we have to make a simple circuit and write a program in C language.
  • there is only one operating mode so only one kind of pulse sequence is here. it is as shown in table 

  Coil 1

Coil 2

Data byte

Terminal 1

Terminal 2

Terminal 3

Terminal 4

0

1

0

1

05 h

1

0

0

1

09 h

1

0

1

0

0A h

0

1

1

0

06 h

  • to energize the coils in this manner we need a dual H-Bridge driver circuit as shown in Circuit Diagram Tab2
  • it consist of 8 transistors, 8 resistors and 8 hex invertors.
  • for more details about these circuit go through this link 
    • again we have to write a same program in C. everything all remains same then a data byte. The data bytes will be 33h, 3Ch, CCh and C3h.

if the motor doesn’t run, don’t change pulse sequence in program just change one of the coil terminal at a time not both. Try again. If it doesn’t work again change second coil terminals. You have maximum four possibilities. In one connection, the motor will run clockwise and just by reverting second coil terminal motor will run anticlockwise.

Now to find out step resolution do the same procedure. Just go on increasing counter (i) given in program. Every time see when motor completes one full revolution. See the count. As we are applying 4 pulses in one loop total applied pulses will be counter×4. And the step resolution will be 360/counter×4. Let’s take an example. If counter is 5 then total pulses will be 200 and step resolution will be 360/20 = 18. To increase or decrease speed just change given delay. If delay is increased, speed will decrease and vice versa.

 

So that is how one can find out the terminals and other unknown parameters of any stepper motor which has no specification.

 

 

 

 

Project Source Code

 

Project Source Code

###

 Code for Unipolar stepper Motor


 

#include

#include

Void main()

{

     For(int i=0;i<5;i++)

          {

          Sound(500);

      Outport(0x0378, 0x01);

          Delay(100);

          Outport(0x0378, 0x02);

          Delay(100);

            Nosound();

          Outport(0x0378, 0x04);

          Delay(100);

          Outport(0x0378, 0x08);

          Delay(100);

           }

}

 

Code for Bipolar Stepper Motor

 


#include

#include

 Void main()

{

     For(int i=0;i<5;i++)

          {

          Sound(500);

      Outport(0x0378, 0x33);

          Delay(100);

          Outport(0x0378, 0x3C);

          Delay(100);

            Nosound();

          Outport(0x0378, 0xCC);

          Delay(100);

          Outport(0x0378, 0xC3);

          Delay(100);

           }

 

 

###

 


Circuit Diagrams

unipol2
bipolar4


Filed Under: Circuit Design
Tagged With: motor, stepper motor
 

Next Article

← Previous Article
Next Article →

Questions related to this article?
👉Ask and discuss on Electro-Tech-Online.com and EDAboard.com forums.



Tell Us What You Think!! Cancel reply

You must be logged in to post a comment.

EE TECH TOOLBOX

“ee
Tech Toolbox: Internet of Things
Explore practical strategies for minimizing attack surfaces, managing memory efficiently, and securing firmware. Download now to ensure your IoT implementations remain secure, efficient, and future-ready.

EE Learning Center

EE Learning Center
“engineers
EXPAND YOUR KNOWLEDGE AND STAY CONNECTED
Get the latest info on technologies, tools and strategies for EE professionals.

HAVE A QUESTION?

Have a technical question about an article or other engineering questions? Check out our engineering forums EDABoard.com and Electro-Tech-Online.com where you can get those questions asked and answered by your peers!


RSS EDABOARD.com Discussions

  • How to preserve hierarchical instance names like \adder_1/U1 in flattened gate-level netlist in Design Compiler?
  • Can anyone provide a guide or tutorial for Candece simulation?
  • Voltage mode pushpull is a nonsense SMPS?
  • High Side current sensing
  • MOSFET thermal noise in Weak vs Strong inversion

RSS Electro-Tech-Online.com Discussions

  • Can I make two inputs from one??
  • Photo interrupter Connections
  • Is AI making embedded software developers more productive?
  • Why can't I breadboard this oscillator?
  • Cataract Lens Options?

Featured – RPi Python Programming (27 Part)

  • RPi Python Programming 21: The SIM900A AT commands
  • RPi Python Programming 22: Calls & SMS using a SIM900A GSM-GPRS modem
  • RPi Python Programming 23: Interfacing a NEO-6MV2 GPS module with Raspberry Pi
  • RPi Python Programming 24: I2C explained
  • RPi Python Programming 25 – Synchronous serial communication in Raspberry Pi using I2C protocol
  • RPi Python Programming 26 – Interfacing ADXL345 accelerometer sensor with Raspberry Pi

Recent Articles

  • GigaDevice launches GD32C231 MCU series with 48MHz Cortex-M23 core and 64KB Flash
  • Advanced Energy releases 425 W CF-rated medical power supply in 3.5 x 6 x 1.5-inch format”
  • LEM combines shunt and Hall effect sensing in 2000 A current measurement unit
  • What is AWS IoT Core and when should you use it?
  • AC-DC power supply extends voltage range to 800 V DC

EE ENGINEERING TRAINING DAYS

engineering

Submit a Guest Post

submit a guest post
Engineers Garage
  • Analog IC TIps
  • Connector Tips
  • Battery Power Tips
  • DesignFast
  • EDABoard Forums
  • EE World Online
  • Electro-Tech-Online Forums
  • EV Engineering
  • Microcontroller Tips
  • Power Electronic Tips
  • Sensor Tips
  • Test and Measurement Tips
  • 5G Technology World
  • Subscribe to our newsletter
  • About Us
  • Contact Us
  • Advertise

Copyright © 2025 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy

Search Engineers Garage

  • Electronic Projects & Tutorials
    • Electronic Projects
      • Arduino Projects
      • AVR
      • Raspberry pi
      • ESP8266
      • BeagleBone
      • 8051 Microcontroller
      • ARM
      • PIC Microcontroller
      • STM32
    • Tutorials
      • Audio Electronics
      • Battery Management
      • Brainwave
      • Electric Vehicles
      • EMI/EMC/RFI
      • Hardware Filters
      • IoT tutorials
      • Power Tutorials
      • Python
      • Sensors
      • USB
      • VHDL
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Product News
    • Business News
    • Company/Start-up News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • DigiKey Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Learn
    • eBooks/Tech Tips
    • Design Guides
    • Learning Center
    • Tech Toolboxes
    • Webinars & Digital Events
  • Resources
    • Digital Issues
    • EE Training Days
    • LEAP Awards
    • Podcasts
    • Webinars / Digital Events
    • White Papers
    • Engineering Diversity & Inclusion
    • DesignFast
  • Guest Post Guidelines
  • Advertise
  • Subscribe