PDA

View Full Version : Controlling DC & Stepper motors using my PC



exchequer598
02-12-2009, 03:47 PM
I need to control 4 DC motors (no speed control, only direction) and 1 stepper motor (again no speed control, only direction) for an engineering project of mine using a PC. I am not sure if I should use the serial or the parallel port. Also, I'm comfortable using VB. So it would be helpful if someone could help me with the interfacing circuits and the code or atleast point me to some resources! Please help :!:

avinash_g
02-12-2009, 05:16 PM
Hello,

If you go for Parallel port you can control motors directly with PC but you need 4 motor and a stepper. For this you have to go for a more decent method. You can have a MCU connected to PC over serial line (only three wire). Then we can send commands over this channel and control any no of motors (limited by the number of i/o lines of MCU, usually lot more than a parallel port). And differenet commands will control motors and steppers.

See
http://extremeelectronics.co.in/avr-tutorials/using-the-usart-of-avr-microcontrollers/
For PC - MCU communicatio over RS232 serial port.

See
http://extremeelectronics.co.in/avr-tutorials/dc-motor-control/
For Motor Control with MCU

If you are new to MCU my site www.extremeelectronics.co.in will help you.

In the PC/MCU communication part I have used Hyper Terminal as PC end software but it can be replaced by custom VB software one all command have been tested. How to do it?
Well I will give you futher info later.

:D

exchequer598
02-12-2009, 05:25 PM
Essentially, I'll be driving only 2 motors, that too, in the same-direction or the opposite-direction. Can you help me with using the parallel port? One of my friends said I need to add an opto-coupler before directly connecting the port to my driver IC. Is that so?

avinash_g
02-12-2009, 05:43 PM
Hello,

Opto coupler increases the safety. Thus reduces the chances of frying your PC mother board. It is a very simple project just see the page i given you for a basic knowledge of l239d motor control chip and thats it ! Just varry 4 bit digital signal to control 2 motors. But even if u need help try googling it there lots of info on net
see www.logix4u.net for parall port tutorial

exchequer598
02-12-2009, 05:46 PM
Okay thanks a lot Avinash! :)

firoz
02-12-2009, 09:57 PM
My stepper driver can take step and direction.
and the inputs are opto based.
have a look here
http://www.roboticsindia.com/modules.php?name=Forums&file=viewtopic&t=3782

sam_chd
01-09-2010, 08:44 PM
its quite easy use 8bit data out port of lpt ie printer port it is ttl compatible connect some driver ics or transistors to drive motors if ur working with c it will not work in xp n later os since it has no pure dos in it so try using vb or go for win 95 /98

allbits
01-10-2010, 02:41 AM
its quite easy use 8bit data out port of lpt ie printer port it is ttl compatible connect some driver ics or transistors to drive motors if ur working with c it will not work in xp n later os since it has no pure dos in it so try using vb or go for win 95 /98


what language was that??
I had to read it atleast 4 times to assume what you might have probably meant. Please use proper language. If I just take one part of it ,it reads like :
connect some driver ics or transistors to drive motors if ur working with c


I hope you got my point.

sam_chd
01-17-2010, 02:27 PM
that was just english n i dint knew punctuation was that important !!!!!