Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Controlling stepper motor with parallel port

Status
Not open for further replies.

armess

Member level 3
Member level 3
Joined
Sep 22, 2006
Messages
64
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,288
Activity points
1,692
stepper motor control parallel port

Hi can u anyone tell me if i can use C++ or VB6.0 to use parallel port of my PC having XP, to control a unipolar stepper motor having a toque of 18Kgcm and 2 Amp current per phase.
 

stepper motor using parallel port interface in vb

using XP it would be a problem because XP doesn't allow us to access its parallel ports.... Windows 98 allows so maybe you can try in that.... or if you have linux it is better because it has documentation on how to program your parallel ports....
 

stepper motor parallel port

i suggest u use vb.net but first make sure to include a inpout.dll and a module with the inpout options.
 

controlling stepper motor with parallel port

About this inpout32.dll and other similar dll you find much in inet , the bigger problem in xp is that multitasking os are heavy and no other programs must be running because subtracts slices time to stepper task during stepping pulse ......lose steps and possibility to motor stall!
 

parallel port using vb6 windows xp

I don't know very much about stepper motor , but i 'm going to tell you how to control the parallel port using C++ under Windows environment .

you can use these instruction : -

outp, outw .

if you want to know the prototype of these instruction use the help of the C++ version . search for out instruction .

you only will need to know the number of your PC Parallel port . you can do this from the device manager - ports Tab . you 'll find it in name of LPT1 or LPT2 . it is usually with the number 3F8H .

you don't need win32 file or any inpout.dll or inpout32.dll , that easy .
if you need more help send me .
 

8086 program for parallel port programming in xp

You need a port IO dll for port access. Then use an ohmmeter to find the ground and windings lines. You will get a low reading and a low reading times 2. Times 2 reading means you are hooked to 2 windings, a times 1 reading means one of the lines is ground. Once you have found your power wires touch power to each of them in turn (one at a time). When you get one that turns the shaft mark it as one. When you find one that moves the shaft a little bit forward, mark it as 2. If it goes backwards mark it as 4. If it doesn't move, mark it as 3. This is the order of the wires. To halfstep it CW you go 1,2,3,4. To halfstep it CCW you go 4,3,2,1. To move in a full step omit 2 and 4.

To tiime the stepper use WinAPI calls QueryPerformanceCounter and QueryPerformanceFrequency.

Create some structures or a class to contain the data needed to control a stepper. Things
like RPM, direction, StepsPerRevolution and DegreesPerStep and so on. Two control two stepper motors you could then use a linked list of the two structure or classes and loop through the list until the reference to the next structure was NULL. Then you can link in or out any number of steppers you want to.

I used the Speech Recognition SDK from MS to do voice command and control of two stepper motors hooked up as a 'winch' and a 'base' for a friends project. He could command 16 speeds for the winch or the base, control eaches direction, stop them, reverse them and so on. It was actually a pretty siimple project but it had a pretty good wow factor and my friend got really high marks for it. And I got a free lunch.:D
 

vb stepper

Hey i think the interfacing part have been discussed...so i am nt going to discuss this/...if u have problem send me.......

2 amp current will not be a problem if u use steeper controller IC.....many ic's available like ULN2003,ULN2808.........its really a useful one....main problem of controlling steeper motor tht u hv to ground a big amount of current (more than 1A)through ur output port(data port 0x378) bt easily ULN solve this one......

i m sending u the pin diagram..........
here output port(2 to 9 pin) if u make high the pin2 that is.....

outportb(0x378,1) // make pin2 high at the diagram....0 0 0 1

its allow the yellow coil at pin16 in the ULN to be ground

here no current is pass through ur pc........if u wanna detail ask me:D
 

Attachments

  • stepper_motor_2047.jpg
    stepper_motor_2047.jpg
    69.9 KB · Views: 776

parallel port c#

how can we access the parallel port using VB6?? i need to signal the stepper motor controller IC...

thanks
 

controlling stepper motor with a parallel port

hi,anjosoviaj
You can use Inpout32.DLL by VB6 to control paralel port (see more detail at Parallel complete book by Jan Axeson). Here is the simple program by VB6 to control parallel port. hope it helpful to you
cheer
 

stepper motor vb6

i also wanted to know if it was possible to use the serial communication mscomm in vb6...because the vb6 i have is not Pro..i read that we can use the communication functions only in the pro edition..

thanks..
 

stepper motor interfacing parallel port by vb

if you need 2 A for each phase , i think parallel port can`t feed it ,by the way you can make anoter circuit for feed this power with using parallel port
 

control 2 stepper motor with parallel port

you can send the data to parallel port by doing a programming in Turbo C also.
But You can't send if you are Using Windows Xp x64 edition.
you can use Windows Xp x32 edition to send the data to parallel port.
There are Commands for sending the data to parallel port. and You can easily Control the direction and speed of stepper motor.
if you need more help, you are welcome.

-------------
Thank You....

vmax
 

    V

    Points: 2
    Helpful Answer Positive Rating
motor control with inpout32.dll

hi ,

i'm doing a project that requires parallel port communication in C#. On googling, i found that this can be done using the inpout32.dll. So i downloaded it and placed it in the system32 folder of Windows.But i'm not able to use it in the program. It is showing a missing library reference or assembly directive.

I'm not able to add it to the references.It is showing error.

Is any kind of registry problems associated with this dll??

please help..
 

stepper motor interfacing with parallel port

Hello !

YOu should use the Window 98 / Window ME for the parallel port.

If you are using the Window XP then you have to use the inpout32.dll for the parallel port interfacing.

For the current requirement you have to sonnect the extra circuitry. You can use the ULN2003 for the current requirement.

Dont forget to produce a delay between each pulse on the pins of the Stepper Motor.
 

stepper vb

By using user port you can send the data to parallel port in windows Xp(only 32 bit).
I have done that And I have Controlled stepper motor also.

Thank You...

vmax
 

hi Mr. vmaxusb,

can you give the code for controlling a stepper motor through parallel port? Im using a windows 2k, what DLL's do I need....thanks in advance...

email: Noriko_Basa1@yahoo.com
 

i am using winxp & using c language .here is a sample program.can anyone plz explain this
#include<stdio.h>
#include<conio.h>
#include<dos.h>
void main()
{
int i=15;
char c;
clrscr();
outportb(890,00);//890 is control port address
while(!kbhit())
{
outport(0x378,7);
msdelay(i);
outport(0x378,11);
msdelay(i);
outport(0x378,7);
msdelay(i);
outport(0x378,7);
msdelay(i);
}
}

what is "0x378","!kbhit"
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top