Having problem in interfacing of bipolar stepper motor with 8051 using uln2003a

Discussion in 'Embedded Systems and Microcontrollers' started by bobparihar, Aug 12, 2014.

  1. bobparihar

    Thread Starter Member

    Jul 31, 2014
    93
    0
    i am interfacing bipolar stepper motor with 8051 using uln2003a

    here is the code and circuit diagram on proteus

    Code ( (Unknown Language)):
    1.  
    2. #include<reg51.h>
    3. void main()
    4. {
    5. unsigned int i;
    6.  
    7. while(1)
    8. {
    9.  
    10.  P2=0x0C;     //00001100
    11.  for(i=0;i<40000;i++);  // delay
    12.  P2=0x06;                   // 00000110
    13.   for(i=0;i<40000;i++);  
    14.  P2=0x03;                   // // 00000011
    15.   for(i=0;i<40000;i++);  
    16.  P2=0x09;                  //  00001001
    17.   for(i=0;i<40000;i++);
    18.   }
    19.   }
    20.  


    can't simulate on proteus.. circuit diagram is in the attached file..plzz help
     
    Last edited by a moderator: Aug 12, 2014
  2. timwhite

    Member

    Apr 10, 2014
    50
    7
    Perhaps those wait times are too short? Otherwise perhaps there's some sort of niche for that software where you have to have something wired up, like the crystal?
     
  3. absf

    Senior Member

    Dec 29, 2010
    1,492
    372
    The ULN2003A can only supply "GND" to the stepper motor but not V+. If you use the 4 wire stepper, it will not work. To drive 4W stepper motor you need some kind of H-bridge driver like L293D.

    Here is a sample provided by Lab Centre in proteus how to drive a stepper motor using ULN2003A.

    Allen
     
  4. bobparihar

    Thread Starter Member

    Jul 31, 2014
    93
    0
    sir i did the same program with the unipolar stepper motor and that works fine on the same Proteus software
     
  5. bobparihar

    Thread Starter Member

    Jul 31, 2014
    93
    0
    sir the sample provided here is for unipolar stepper motor(6 wire) , but i want to use a four wire bipolar stepper motor
     
  6. timwhite

    Member

    Apr 10, 2014
    50
    7
    Given that on your schematic the stepper only has 4 wires, I have to assume it's a bipolar one. These are a pain to drive with ULN2003 (or ULN2803 or other Darlington arrays) because the chips are designed to sink current and you need to be able to send both high and low voltages to each of the four wires.

    You'd normally use H-bridge ICs to drive a bipolar stepper but if you are absolutely set on using ULN2003, you can float the wires off of a motor supply voltage on power resistors (and they will get really hot) and then sink with ULN if you need low voltage or let go if you need high.
     
  7. ligo.george

    New Member

    Feb 2, 2013
    19
    2
    Try the following link, it might help you.
    Interfacing Stepper Motor with 8051 Microcontroller
    It contains interfacing of bipolar, unipolar stepper motor and different kinds of drives..

    Use separate power supplies for microcontroller and stepper motor.. Otherwise microcontroller may get reset due to ripples produced by stepper motor.. or use proper filtering capacitors..
     
  8. bobparihar

    Thread Starter Member

    Jul 31, 2014
    93
    0
    should i also have to use seprate ground for the stepper motor driving ic(ULN or L293D) and the microcontroller??

    last time when i did make the ground common for both ULN and Microcontroller the axle rotate a single step forward then a single step backward and so on.. back and forth
    but it does not rotates fully clockwise or anticlockwise
     
  9. ligo.george

    New Member

    Feb 2, 2013
    19
    2
    USE common ground for all,,, use separate power supply for motor and microcontroller.. but common ground..
     
Loading...