Home     Contact     Projects     Experiments     Circuits     Theory     BLOG     PIC Tutorials     Time for Science     RSS     Terms of services     Privacy policy  
 Home      Projects     Experiments     Circuits     Theory     BLOG     PIC Tutorials     Time for Science   

15 July 2010
Author: Giorgos Lazaridis
Simple Unipolar Stepper Motor Full Step Controller

The circuit on a breadboard for test

It is not really necessary to use a micro controller or a special IC to control a stepper motor. So, here i present a very simple and basic full-step stepper controller for a unipolar motor. If you do not know how stepper motors work and how they are made, what is unipolar and bipolar, or what is full-step, half-step and micro stepping, i strongly suggest that you read first the theory page "How stepper motors work and how they are made" that i wrote a few months ago.

The circuit

Here is the schematic circuit for the controller:

As you see, i only use the 4017 CMOS chip. This is a decade counter/divider. The input pulses comes from your pulse generator. Each pulse, will increase one count to the 4017. This will happen 4 times, for counts 0 to 3. When in count 4, the chip will self reset (from the wire Q4 to reset) and will start over again. The first 4 outputs (Q0 to Q3) are driving the 4 mosfets. Power the CMOS with 5 volts otherwise the mosfets will not work! This is very important. You can use whatever voltage for the motor, but for the chip you must use 5 volts! Not more. If you badly want to use more, then you need resistors for driving the mosfets!

Notice that i have no interface for the input pulses. I suppose that the pulsing circuit that you will use, will have the same supply and output power as the 4017. If not, then i suggest you use the following circuit to drive the pulses to the 4017:

This will work for low and medium voltages. If your pulses are more than 12 volts amplitude, you may consider increasing R2. As for the mosfets, these are my favorites-yet a little bit expensive. They have some remarkable DC characteristics. Can handle up to 100 Volts, with the incredible 0.055 Ohms RDS(on)! The voltage drop due to the mosfet is ridiculously low. 22 amperes can go through continuously, while up to 88 amperes pulsed can be controlled! I like it.

How to connect the stepper motor

My stepper is unipolar with 5 wires - this means it has one common

From each mosfet, there is a pin output, a total of 4 outputs comes from the circuit. Also, notice on the right side the fifth pin. This is the power supply of the motor. This must have the positive supply, whatever it is. In my case, the motor has 12V coils and therefore my supply is 12 volts. This may change according to the motor power supply.

The first 4 pins, must be connected to the 4 coil outputs of the motor. You need to pay attention to the coil sequence. If the sequence is incorrect, then the motor will not rotate correct. It may go clockwise and counterclockwise with no certain order. In any case, the pulses from the above circuit are delivered in the following order: 1 - 2 - 3 - 4. It's up to you to find the correct coils of your stepper.

The fifth pin goes to the common of the coils. As i said at the beginning of this article, the stepper must be unipolar. This means that there is one (if your stepper has 5 wires like mine) or two common wires (if your stepper has 6 wires). If your motor has 5 wires, then the common wire goes to the 5th connector. If your stepper has six wires, then both common wires goes to the 5th connector!

There is also one case that your stepper has 8 wires. Most probably, you have an 8-lead stepper. This type can be connected both as unipolar and bipolar. Read this page to see how to connect the wires.

Bill Of Materials
D1-D41N4001 General Purpose Diode Rectifier 
Q1-Q4IRF540 22A, 100V, 0.055 Ohm, N-Channel LOW GATE CHARGE STripFET(tm) Power MOSFET 
Integrated Circuits
IC1CD 4017 Decade Divider/Counter 

Relative pages
  • 555 timer basic circuits
  • How Brushless Motors Work (BLDC Motors)
  • How are DC motors made and how they work
  • Learn how RC Servos work
  • How the Stepper Motors work
  • Why and How to control PC Fans
  • High frequency PWM fan rpm controller with the 555

  • Comments


      Email (shall not be published)


    Notify me of new posts via email

    Write your comments below:
    BEFORE you post a comment:You are welcome to comment for corrections and suggestions on this page. But if you have questions please use the forum instead to post it. Thank you.


  • At 3 April 2016, 8:14:46 user Pierpaolo wrote:   [reply @ Pierpaolo]
    • I wanted to know if this circuit can be connected on a CNC controller for inserting automatic disconnection of a PP or spindle motor with 2 phases . In practice, the signal is provided by the CNC controller ( dedicated port ) will speed up input basic data from the software ? Thanks so much.

  • At 12 January 2016, 8:14:18 user Matija wrote:   [reply @ Matija]
    • Hi there, do you happen to have the price range for those mosfets, since my pulses are more than 12 volts amplitude and I need to increase R2.
      <a href="http://blog.poscope.com/stepper-motor-driver/"></a>

  • At 27 September 2015, 20:05:21 user jhun luna wrote:   [reply @ jhun luna]
    • sir how about my stepper motor there is 4 wires only sir pls help

  • At 2 January 2014, 20:04:43 user Giorgos Lazaridis wrote:   [reply @ Giorgos Lazaridis]
    • @Agis This is a simple and classic schematic. If you cant read this schematic then you need to learn how to read schematics instead. It cant be any simpler.

  • At 2 January 2014, 11:14:51 user Agis wrote:   [reply @ Agis]
    • Hi

      I am interesting about this circuit but i have problem to understand the schematic (as novice)....It would be convinient to you to send me a 'classic' schematic of this circuit?

      thank yo in advance

  • At 24 July 2013, 7:19:58 user Giorgos Lazaridis wrote:   [reply @ Giorgos Lazaridis]
    • @Eddie With this circuit no. You will need to go with a microcontroller or with a stepper driver.

  • At 14 July 2013, 17:09:31 user Eddie wrote:   [reply @ Eddie]
    • Very nice design!A smart engineer always keeps it simple for less inventive people. Is it possible to use the cd4017 i.c. for a cnc application as well? Is there a way to reverse direction? I'd like to cnc my dremel tool using something similar to your circuit.

  • At 1 July 2013, 2:27:25 user Earmias mrafie wrote:   [reply @ Earmias mrafie]
    • Well and precise note !!

  • At 21 May 2013, 5:00:33 user Giorgos Lazaridis wrote:   [reply @ Giorgos Lazaridis]
    • @anhdbk Motor common goes to positive. Drain of 4 mosfets goes to the 4 wires of the stepper. Source of mosfets to ground. Drive the gate of the mosfets with a small 100 ohm resistor.

  • At 20 May 2013, 3:43:53 user anhdbk wrote:   [reply @ anhdbk]
    • hey guy. i'm preparing for my final project.i use PIC 18f4550 to control stepmotor. my signal output from PIC very good. however, when i connect with motor to cotrol, motor does not operated. i think power supply for motor not enough.i want to ask you,i use irf540 to provide power for motor 12V-DC.how do i have to work?

  • At 6 March 2013, 18:29:08 user Nana wrote:   [reply @ Nana]
    • What is the step angle of this stepper motor.I have the same one but it isn't mentioned on it. and when I looked on the internet NBN... I fount documentations but in chineese so I coudn't get the informations that I want.Thnx

  • At 10 February 2013, 15:01:46 user Giorgos Lazaridis wrote:   [reply @ Giorgos Lazaridis]
    • @Pierpaolo This is not proper for your make. I do not have such a big circuit to suggest. sorry.

  • At 9 February 2013, 13:20:49 user Pierpaolo wrote:   [reply @ Pierpaolo]
    • I wanted to ask some advice regarding my cnc, I would like to know if "Simple Unipolar Stepper Motor Controller Full Step" in practice acts as a stepper motor driver 24 A. But I do not understand where can I pick up signals: dir (direction, step and enable (usually no one ever uses it.) Should I connect a L298 or another IC. Basically I need to automate fourth rotary axis, then the management is performed by "Colibri CNC" of Twintec (Italy).

      Thank you very much.

  • At 28 October 2012, 9:07:47 user Giorgos Lazaridis wrote:   [reply @ Giorgos Lazaridis]
    • @John Iacovides GDS is correct indeed

  • At 24 October 2012, 6:57:08 user John Iacovides wrote:   [reply @ John Iacovides]
    • @Giorgos Lazaridis

      No is not a colored one.

      The following is the configuration of the mosfet from its own datasheet.
      On our conversation I have the connections I did, do you thing are correct?

      IRF540N IOR mosfet.

  • At 24 October 2012, 6:22:56 user Giorgos Lazaridis wrote:   [reply @ Giorgos Lazaridis]
    • @John Iacovides Do you mean the dot on the CMOS? This indicates where pin 1 is. I am not sure about a dot on mosfet. Is this a colored dot?
      - Yes, always we provide DC power to CMOS ICs

  • At 24 October 2012, 5:05:34 user John Iacovides wrote:   [reply @ John Iacovides]
    • @Giorgos Lazaridis
      I am a little confuse and I would like your help. What the dot in the mosfet indicates?(In my mosfet the dot is on the 1st pin and not in the middle).

      IRF540N IOR mosfet.
      Pin1->Gate (I did to this pin output from CD4017)
      Pin2->Drain (To this one,I put the resistor)
      Pin3->Source (And this one directly to negative, despite the fact that is source)

      And second do we have to power pin 8 Vss with negative power and pin 16 Vdd with possitive one?

      Thank you very much!!!!

  • At 18 October 2012, 7:25:24 user Giorgos Lazaridis wrote:   [reply @ Giorgos Lazaridis]
    • @John Iacovides yes,0v is the negative

  • At 18 October 2012, 4:48:19 user John Iacovides wrote:   [reply @ John Iacovides]
    • @Giorgos Lazaridis Can I ask something else? The 0v indicates the negative power, and also all of them have to be connected together?

      Thanks again

  • At 17 October 2012, 9:38:13 user Giorgos Lazaridis wrote:   [reply @ Giorgos Lazaridis]
    • @John Iacovides This is how everyone started!!!

  • At 17 October 2012, 9:03:43 user John Iacovides wrote:   [reply @ John Iacovides]
    • @Giorgos Lazaridis Thank you very much for your respond. I will try.
      I do not have any backround on electronics but I would like to learn more.

  • At 15 October 2012, 16:34:43 user Giorgos Lazaridis wrote:   [reply @ Giorgos Lazaridis]
    • @John Iacovides you dont need to see the wiring. follow the schematic. i do not have the circuit any more.

  • At 15 October 2012, 13:45:15 user John Iacovides wrote:   [reply @ John Iacovides]
    • Hi sir,

      I cannot see clearly the wireing on the breadboard, can i have images from all sides?

  • At 21 August 2011, 23:07:48 user Mike wrote:   [reply @ Mike]
    • i have used CD4017BE and had hard time in the beginning to make it work but i found out that i need to connect PIN # 8 to the ground and PIN # 16 to 5 VDC.

      After that it works good.
      thank you the author for sharing his knowledge with us

  • At 10 March 2011, 2:36:28 user arc_0425@yahoo.com.ph wrote:   [reply @ arc_0425@yahoo.com.ph]
    • hi again sir. I tried putting resistor (470 ohms) as what you've said and finally my cmos ic did not get hot anymore. My another problem was when I try to connect the motor,it didn't work, and as some electronics book that I have read,mosfet are very delicate to static charges,please help what should be done to prevent these damages because these stuffs are quite expensive to buy. Also can I replace these with medium power transistors such as the TIP31 / TIP 41? Please advise again. Thank you very much.

  • At 9 March 2011, 11:40:29 user Kammenos wrote:   [reply @ Kammenos]
    • fernando try a resistor between the CMOS and the mosfet. A value between 100 ohm and 1 kOhm. Test

  • At 9 March 2011, 2:50:05 user c fernando wrote:   [reply @ c fernando]
    • hi again sir.I had this problem regarding the driver. I used already the 4017 cmos ic and found out that its getting hot while i connected it with the mosfets ( I did not connected yet the stepper motor ). I used two kinds namely IRF740 and IRFZ44. Does these mosfets match with the 4017 ic? I also followed the schematic diagram provided in your webpage. Thanks again...

  • At 8 March 2011, 11:33:50 user Kammenos wrote:   [reply @ Kammenos]
    • fernando, regarding the 1.3V, i strongly suggest you use STK chip (http://pcbheaven.com/circuitpages/Full_Half_Stepper_Motor_with_STK672). But for the 12V, i suppose that the only limitation is the current. The IRF540 are very tough guys. Most probably this will work. Share with us your results if you test it

  • At 8 March 2011, 10:53:58 user c fernando wrote:   [reply @ c fernando]
    • your experiment looks more simplier, anyways I'm working on a semiconductor company and I had lots of stepper motors that are quite bigger and heavier. Does the circuit can run these motors? They are 5.1V
      while the other one is 12.2V, and the worse is that I had this 1.3V stepper motor..Please advise..

  • At 10 January 2011, 7:23:34 user gumilard wrote:   [reply @ gumilard]
    • Thanx for the info before, I'll check the following link :D

      Uniquely your project is so simple frend :P . do your steppers that you use are for a high rpm or not? how about my mine? here I guide you to my stepper 12V, it say step per revolution is 48 and step angle 7,5. hearing that, does my stepper construct for high rpm or not? hoiya, in a fact I'm using BD139 to drive it And my PIC program drive it for double phase.

  • At 10 January 2011, 6:50:36 user Kammenos wrote:   [reply @ Kammenos]
    • hi gumilard. this is a normal reaction of the motor. the maximum speed is mostly determined by the mechanical characteristics of the motor. if you are using a simple full or half stepper motor controller, then this will be the maximum speed. you may want to test a micro stepping that will definitely increase a bit more the speed, but do not expect an awesome increase. check these links:
      - http://pcbheaven.com/circuitpages/Microstepping_Driver_with_the_Sanyo_STK672_080
      - http://pcbheaven.com/blogpages/Product_Review_Linistepper

  • At 10 January 2011, 6:37:47 user gumilard wrote:   [reply @ gumilard]
    • hi frend, I gotta a hard case at least for me. Mmm I want to increase an unipolar stepper motor (55M048D2U) 12 volt. when I try to increase pulse, The motor looks jammed. what should I do? oh yea, I\'m using PIC microcontrol to generate the pulse. Do that circuit can use for my stepper to? would you like to help me for all following circuit of my project?

  • At 27 August 2010, 2:53:44 user Ed K. wrote:   [reply @ Ed K.]
    • I ordered a 4017 chip and used IRF630's mosfets. This was my first attempt at operating stepper motor. I used a 555 timer to generate the pulses. Trial and error with the motor phases connections finally got my stepper turning in one direction only. I used a small 7.5 degree, 5 volt motor. Great circuit for learning about stepper motor operation.

    reddit this Reddit this

     HOT in heaven!

    NEW in heaven!

    New Theory: AC electric motor working principle

     Contact     Forum     Projects     Experiments     Circuits     Theory     BLOG     PIC Tutorials     Time for Science     RSS   

    Site design: Giorgos Lazaridis
    © Copyright 2008
    Please read the Terms of services and the Privacy policy