go_away

Author Topic: Stepper Motor Demo  (Read 3482 times)

0 Members and 1 Guest are viewing this topic.

Offline reefatTopic starter

  • Full Member
  • ***
  • Posts: 61
  • Helpful? 0
    • Reefat's Robotics Blog
Stepper Motor Demo
« on: August 23, 2008, 01:55:02 AM »
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:


Here is the schematic of my stepper motor driver:


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:
[youtube]hQlG9tHk41w[/youtube]

To learn how a unipolar stepper motor works, read more. Here is another reference to Stepper Motor Controller.

For more info about Microcontroller, Stepper Motor, Analog to Digital Converter, Sensors and other Roboric related topics visit http://robotalk.codecake.com/.

Tags: inpout32.dll, Motor Control, Parallel Port, Stepper Motor, ULN2003
« Last Edit: August 23, 2008, 02:08:46 AM by reefat »

Offline RobD

  • Full Member
  • ***
  • Posts: 64
  • Helpful? 0
Re: Stepper Motor Demo
« Reply #1 on: August 23, 2008, 02:07:16 AM »
Cool!  Nice job!

You just reminded me that I was wanting to try mscomm32.ocx for serial control one of these days.       

Offline reefatTopic starter

  • Full Member
  • ***
  • Posts: 61
  • Helpful? 0
    • Reefat's Robotics Blog
Re: Stepper Motor Demo
« Reply #2 on: August 23, 2008, 02:14:43 AM »
RobD. I use parallel port of my old IBM laptop for testing purpose. I have another USB interface that works better and faster than the obsolete LPT1. After successfully experimenting the device on my inexpensive IBM machine, I do proceed it to the USB of my expensive Sony VAIO Laptop.
« Last Edit: August 23, 2008, 02:16:03 AM by reefat »

Offline RobD

  • Full Member
  • ***
  • Posts: 64
  • Helpful? 0
Re: Stepper Motor Demo
« Reply #3 on: August 23, 2008, 02:40:11 AM »
I completely understand your reasons for testing the LPT port first  ;)  I have an old scrap PC that I use for smoke testing my half-baked comm port ideas before I blow up my "real" computer. 

I recently switched to VB.NET and evidently there is a class floating around on the internet somewhere that allows you to use native .NET and API features instead of  having to use register VB6's mscomm32 when it's deployed.  Not a big deal so much for now except that I'm working on a CNC application (still in the hardware testing stage).  When I get to the software control phase I'd like to write an app that is easily deployable with one-click.       


By the time I finally get around to this serial interface software project you will probably have beaten me to it.   Good luck!   :)


Offline reefatTopic starter

  • Full Member
  • ***
  • Posts: 61
  • Helpful? 0
    • Reefat's Robotics Blog
Re: Stepper Motor Demo
« Reply #4 on: August 23, 2008, 02:52:51 AM »
RobD. Why do you like to use COMM Port? These ports are now removed by the manufacturer for the new models of their PCs (either Desktops or Laptops). Why don't you use USB. I know, you may say, "Too Complex!" (if you didn't work with USB before). I use USBmicro Interfacing Device which you can buy for only $35.00. It comes with it's own API which you may work with VB6/VB.NET or C/C++. This device doesn't require any driver to be installed. Computer detects it as HID. This was the main reason why I chose it as my primary interfacing tool.
« Last Edit: August 23, 2008, 02:55:50 AM by reefat »

Offline RobD

  • Full Member
  • ***
  • Posts: 64
  • Helpful? 0
Re: Stepper Motor Demo
« Reply #5 on: August 23, 2008, 03:22:07 AM »
Reefat, thanks for the pinter.  I looked at the website.  I am going to order the U401 through DonTronics (used them before).

You are right, I always thought USB was too much to learn while I'm so busy.  Another reason is that my target control computer for the CNC operation has a serial port.  This computer will actually control the CNC mill while another remote computer on the network will send it's data, via a virtual serial port, to the CNC computer. 

It's an odd configuration but it's less overhead for the end user rather than upgrading PC's




 


Get Your Ad Here