Mohammad

Robotics Blog

RECENT POSTS

TWITTER UPDATES

No public Twitter messages.

Stepper Motor Demo

Posted by Mohammad On August - 14 - 2008 12 COMMENTS

This is my first stepper motor project where the I have used NIPPON PF35T-48L4 unipolar motor which I controlled from a PC through the Parallel Port (LPT1, DB25). I simply used a ULN2003A IC which uses 7 Darlington Transistor Array to amplify the input current comming from the port. This 16-pin IC is capable to take TTL input and the output load may have high voltage upto 50V. I wrote small program in Visual Basic 6 using inpout32.dll driver.

Here is a screenshot for the unipolar stepper motor and the driver IC ULN2003A:

It is recommended to connect a 6.2V zener diode between the power supply and VDD (Pin 9) on the chip, to absorb reverse (or “back”) EMF from the magnetic field collapsing when motor coils are switched off.

To rotate the motor anti-clock wise, the step sequence sent to the parallel port is as follows:

STEP-1   0001     1
STEP-2   1001     9
STEP-3   1000     8
STEP-4   1010    10
STEP-5   0010     2
STEP-6   0110     6
STEP-7   0100     4
STEP-8   0101     5

Here is the live video of how the motor rotates:

VN:F [1.9.13_1145]
Rating: 6.3/10 (4 votes cast)
VN:F [1.9.13_1145]
Rating: 0 (from 2 votes)
Stepper Motor Demo, 6.3 out of 10 based on 4 ratings

12 Responses

  1. Mohn says:

    Nice thinking… But let me know how far it is completed.

    VA:F [1.9.13_1145]
    Rating: 1.0/5 (1 vote cast)
    VA:F [1.9.13_1145]
    Rating: 0 (from 2 votes)
  2. James says:

    Hi:
    Nice work!
    Can you send me the Visual Basic code that runs this motor so I can see how it works ?

    Thanks
    James

    VA:F [1.9.13_1145]
    Rating: 1.0/5 (1 vote cast)
    VA:F [1.9.13_1145]
    Rating: -1 (from 1 vote)
  3. pintoo says:

    hi
    good job
    can you send me the visual basic code that runs this motor
    as i need this concept in my project

    VA:F [1.9.13_1145]
    Rating: 1.0/5 (1 vote cast)
    VA:F [1.9.13_1145]
    Rating: 0 (from 0 votes)
  4. Dalton says:

    Looks awesome!
    If you can send the VB code to me so I can un-commercially use it, that would be awesome!

    VA:F [1.9.13_1145]
    Rating: 1.0/5 (1 vote cast)
    VA:F [1.9.13_1145]
    Rating: -1 (from 1 vote)
  5. Mohammad says:

    @Sean: Use you multimeter. If your motor has 6 wires, it must be unipolar stepper motor. If 4, it is bipolar (no center pole). If you have basic knowledge on uni/bi-polar stepper motor, you can easily figure out the right schematic of your coils just using a multimeter. For more info about stepper motor, you can visit http://www.doc.ic.ac.uk/~ih/doc/stepper/control2/connect.html

    VN:F [1.9.13_1145]
    Rating: 1.0/5 (1 vote cast)
    VN:F [1.9.13_1145]
    Rating: -1 (from 1 vote)
  6. Sean says:

    I have a motor similar to this but I cant figure out what leads go for what coil. How did you figure it out?

    VA:F [1.9.13_1145]
    Rating: 1.0/5 (1 vote cast)
    VA:F [1.9.13_1145]
    Rating: -1 (from 1 vote)
  7. gail says:

    hi! nice work! but i would really appreciate if you
    could also send me the visual basic code that runs this motor as i need the concept for our project. Thanks!

    VA:F [1.9.13_1145]
    Rating: 1.0/5 (1 vote cast)
    VA:F [1.9.13_1145]
    Rating: -1 (from 1 vote)
  8. X says:

    Hi! Mohammad
    Can you tell me step by step how do you use Visual Basic program to make the stepper motor work ?
    Email me , Thanks

    VA:F [1.9.13_1145]
    Rating: 1.0/5 (1 vote cast)
    VA:F [1.9.13_1145]
    Rating: -1 (from 1 vote)
  9. Nizam Uddin says:

    Hi Mohammad bhaI,

    How are U ? where is Pechali ? any problem or busy ?

    VA:F [1.9.13_1145]
    Rating: 1.0/5 (1 vote cast)
    VA:F [1.9.13_1145]
    Rating: -1 (from 1 vote)
  10. Reeshad says:

    Dear Mohammad: Good one ! Hope to see your upgraded one.. Thanks

    VA:F [1.9.13_1145]
    Rating: 2.5/5 (2 votes cast)
    VA:F [1.9.13_1145]
    Rating: 0 (from 2 votes)
  11. glyd says:

    Hello Mr. Mohammad
    Can you teach me how to connect parallel port and runs in VB6, most site that I read connects only serial connection. Please I need your help. I have project that a stepper must run in an event in a Visual Basic 6 that uses parallel port. Thanks and more power.

    VA:F [1.9.13_1145]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.13_1145]
    Rating: +1 (from 1 vote)
  12. Mohammad says:

    @glyd: Let me rephrase your question. You wanted to learn “Parallel Port Interfacing”. If you are using an old PC, they have the 25 pin DB25 connector in the back. You may directly connect with it. I assume you are using Windows 98/XP. For the later versions, you may need some additional driver or different methodology. For XP, you need to download a driver inpout32.dll. I have come across with this tutorial which I thought is easy to understand. Check this out http://electrosofts.com/parallel/. The operating system is another important aspect to consider. I first started learning interfacing in Windows 98 using the DOS version of Turbo C++ 3.0. Then using inpout32.dll, I started doing it on Windows XP using Visual C++ 6.0. If you prefer VB6, check this out. They did with .NET. You may ignore the extra code they did for .NET. Just initialize the DLL at the top. And then simply use the inp and out functions. Just a couple of lines. http://www.codeproject.com/Articles/15020/Reading-from-Parallel-Port-using-Inpout32-dll. Let me know how it goes. You may post your comment here.

    VN:F [1.9.13_1145]
    Rating: 0.0/5 (0 votes cast)
    VN:F [1.9.13_1145]
    Rating: 0 (from 0 votes)

Leave a Reply