All About Circuits Forum  

Go Back   All About Circuits Forum > Electronics Forums > The Projects Forum

Notices

The Projects Forum Working on an electronics project and would like some suggestions, help or critiques? If you would like to comment or assist others with their projects, this is the place to do it.

Reply   Post New Thread
 
Thread Tools Display Modes
  #1  
Old 02-06-2010, 03:47 AM
Bluebirdiran Bluebirdiran is offline
Member
 
Join Date: Feb 2010
Posts: 62
Talking Driving an opto-isolator circuit from the LPT port

Hi,
I have this chinese made step motor driver which I would like to control through the LPT port on my PC for CNC work. The software is mach3. The driver is opto-isolated and needs clock and direction signals to drive each axis. But the LPT pulses don't seem to be able to supply enough current to do the job. Some sort of a buffer circuit is needed but exactly what, I don't know. Is there such a circuit ready made which can be purchased or does anybody have any idea how to make such a buffer. It needs to have at least six channels. It also needs to have some sort of protection to prevent possible damage to the LPT electronics. What is such a device called? I don't seem to be able to search for anything useful, so I think I am not using the right jargon in my searches. Thanks for any leads in this respect.
Cheers, Bluebirdiran
Reply With Quote
  #2  
Old 02-06-2010, 07:51 AM
eblc1388's Avatar
eblc1388 eblc1388 is offline
Senior Member
 
Join Date: Nov 2008
Location: UK
Posts: 953
Default

Quote:
Originally Posted by Bluebirdiran View Post
But the LPT pulses don't seem to be able to supply enough current to do the job.
Are you using the LPT port on a laptop? They do not provide sufficient voltage or current like those on desktop PCs. There are also several LPT modes which user can select in BIOS. Your best choice would be the EPP mode.

Quote:
Originally Posted by Bluebirdiran View Post
Some sort of a buffer circuit is needed but exactly what, I don't know. Is there such a circuit ready made which can be purchased or does anybody have any idea how to make such a buffer. It needs to have at least six channels. It also needs to have some sort of protection to prevent possible damage to the LPT electronics. What is such a device called?
The suitable IC device is called a buffer and its part number is 74HCT244. It has eight channels and offer protection between your printer port and external connected circuit. It will also need a separate +5V supply to function.

However, this assumes that all the signals from your parallel port to the stepper motor controller is output only(i.e. in one direction). Perhaps its best to ask the manufacturer of the driver to clarify this.

Google "74HCT244" to get hold of a data sheet.
__________________
L.Chung
Reply With Quote
  #3  
Old 02-06-2010, 12:37 PM
Bluebirdiran Bluebirdiran is offline
Member
 
Join Date: Feb 2010
Posts: 62
Default Thanks you

Thanks a lot Mr. Chung for your reply.
I am using a PC - NOT a laptop.
I have set the BIOS to EPP but has made no difference.
I need at least 6 outputs to the driver, ie. LPT pin No. 2 and 3 for X and 4 and 5 for Y and 6 and 7 for Z movement and direction control. I also have inputs to the LPT port on pin 10 and 11 which consists of the limit switche circuits that control the table home positin. Others such as emergency stop etc. may be input as well.
Electronics not being my strong point (I am better in the Mechanical field) I would appreciate it if you could be a bit more specific as to implementing the 74HCT244 which you have recommended. A little sketch would be very helpful. Assume you are talking a dummy!! Thanks again
Reply With Quote
  #4  
Old 02-06-2010, 01:03 PM
eblc1388's Avatar
eblc1388 eblc1388 is offline
Senior Member
 
Join Date: Nov 2008
Location: UK
Posts: 953
Default

First you ought to prove that the PC printer port is actually working properly. I have assumed you have already done that via a real printer.

You must have some text/image/photo information regarding the stepper driver itself or signal interface requirement by the driver, i.e. which LPT port pin(s) connections are required. Can you post it so that a circuit diagram for the 74HCT244 can be produced?

You still have to get a 5V supply for the circuit to work. It might be possible to get this +5V from game port or PS2 port of the PC or even from the stepper motor driver board if there is one.

If you want 6 outputs and 2 inputs, the circuit arrangement will be different to 7 outputs and 3 inputs because the signal has to go somewhere to the LPT port pins.
__________________
L.Chung
Reply With Quote
  #5  
Old 02-06-2010, 01:42 PM
BMorse's Avatar
BMorse BMorse is offline
Senior Member
 
Join Date: Sep 2009
Location: Vermontville, Michigan (GMT -5)
Posts: 1,810
Default

these are the typical connections of a 3 Axis (up to 4) CNC to a parallel port... atleast this is how I have mine setup, I do not use mach3 much, I am still using KCam...

Quote:
Parallel Port Pin Functions using port &H378
Pin/ I/O/ ADDRESS/ BIT/ STATE/ STEPPER CONTROLS

1 O &H37A 0 INVERTED SPINDLE RELAY
2 O &H378 0 NORMAL X-STEP
3 O &H378 1 NORMAL X-DIR
4 O &H378 2 NORMAL X-ENABLE
5 O &H378 3 NORMAL Y-STEP
6 O &H378 4 NORMAL Y-DIR
7 O &H378 5 NORMAL Y-ENABLE
8 O &H378 6 NORMAL Z-STEP
9 O &H378 7 NORMAL Z-DIR
10 I &H379 6 NORMAL NU
11 I &H379 7 INVERTED X-HOME SWITCH
12 I &H379 5 NORMAL Y-HOME SWITCH
13 I &H379 4 NORMAL Z-HOME SWITCH
14 O &H37A 1 INVERTED Z-ENABLE
15 I &H379 3 NORMAL NU
16 O &H37A 2 NORMAL M CODE FUNCTION
17 O &H37A 3 INVERTED M CODE FUNCTION
18-25 GROUND
__________________
There is no spoon -Neo-
Disclaimer: The example programs,circuits, projects and information I provide or post on this web site are for educational purposes only. By copying anything from this site posted by me, you agree to the "as is" nature of the programs, circuits, information and to the statements listed in this disclaimer.No warranty or liability is expressed or implied. Working with AC /DC voltages can be dangerous and even deadly. Proceed at your own risk!
Reply With Quote
  #6  
Old 02-06-2010, 02:14 PM
Alberto Alberto is offline
Senior Member
 
Join Date: Nov 2008
Posts: 876
Default

A simple way to interface the parallel port with the external world is using a ULN2803 (array of 8 NPN darlington) and than you will have up to 350 milliAmps of current available. The good thing with ULN2803 is that you don't need any additional external components.

Alberto
Reply With Quote
  #7  
Old 02-06-2010, 05:21 PM
Bluebirdiran Bluebirdiran is offline
Member
 
Join Date: Feb 2010
Posts: 62
Default

Mr. Chang
Yes the printer port works ok. In fact I had made a interface using the ULN2803 and everything was ok and all of a sudden without any visible accident the board's cupper got blown off the back of the PCB and it in fact damaged pins 2 and 4 of the printer port. But through the software I have assigned pins 6 and 7 to replace 2
Reply With Quote
  #8  
Old 02-06-2010, 05:39 PM
Bluebirdiran Bluebirdiran is offline
Member
 
Join Date: Feb 2010
Posts: 62
Default

Mr. Chang
Yes the printer port works ok. In fact I had made a interface using the ULN2803 and everything was ok and all of a sudden without any visible accident the board's cupper got blown off the back of the PCB and it in fact damaged pins 2 and 4 of the printer port. But through the software I have assigned pins 6 and 7 to replace 2 and 4. I am attaching the information sheet for the driver. I am using one of these for each axis. If you want to design a board for me, you can design it with more inputs and outputs that the required minimum. I may want to add a fourth axis in the future. These drives are opto-isolated internally and that is the what is causing my troubles, because the opto-isolators draw a lot of current. I think an independant voltage source of 5 volts would be the right choice so as not to intefere with the internals of the motherboard.
Thanks a lot
Attached Files
File Type: pdf Q2HB44.pdf (513.8 KB, 49 views)
Reply With Quote
  #9  
Old 02-06-2010, 05:40 PM
eblc1388's Avatar
eblc1388 eblc1388 is offline
Senior Member
 
Join Date: Nov 2008
Location: UK
Posts: 953
Default

Quote:
Originally Posted by Bluebirdiran View Post
In fact I had made a interface using the ULN2803 and everything was ok and all of a sudden without any visible accident the board's cupper got blown off the back of the PCB and it in fact damaged pins 2 and 4 of the printer port. But through the software I have assigned pins 6 and 7 to replace 2
It is possible that some other part of the parallel port control IC on the PC motherboard has been damaged in the process.

From the pdf data sheet you have just posted, to control each stepper motor, three(3) output signals and one(1) input signal from the LPT is needed. Therefore a normal good LPT port can control at most four motors, with 12 output signals and 4 input signals. However, you already have two of the LPT port pins damaged so are now left with only 10 output signals from the LPT port. I doubt you can add a 4th drive to it.

The ULN2803 is the correct part to use for driving the step driver and it should not blow up your interface circuit. Looks like your connection is wrong somehow.

It would be easier to locate what you have done wrong in the existing interface than building another interface(using the same ULN2803).

Please post your existing circuit diagram.
__________________
L.Chung

Last edited by eblc1388; 02-06-2010 at 06:03 PM.
Reply With Quote
  #10  
Old 02-06-2010, 07:39 PM
Bluebirdiran Bluebirdiran is offline
Member
 
Join Date: Feb 2010
Posts: 62
Default

Hello Mr. Chung

I am attaching the existing circuit diagram but pls. note the following. Where you see J2, it is actually an array resistor A103J. Pins 1 and 2 of J1 and J5 are inputs for the two axis ( I am only using 2 at the moment) and the output is taken from 1 to 4 on J4. I would prefer a new design as I don't trust this one. It was not done professionally, I think.
Anyway I leave that to you as long as you can give me a robust design.

This interface worked for hours without any problems. Then I switched off and when I returned and switched back on, it did not work any more. On inspection I noticed that the copper connecting the right side of D1 to pin2 of J3 was blown (pls. see the attachment). I hope this information is enough, but pls. feel free to ask me if you need to know anything else.
Thanks a lot
Attached Files
File Type: pdf buffer.pdf (12.7 KB, 27 views)
Reply With Quote
Reply   Post New Thread

Bookmarks

Tags
, , , , , , , ,

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Nokia 3310 LCD through LPT port SRM Programmer's Corner 0 02-01-2009 11:08 AM
Driving an SSR through a Serial Port fester225 The Projects Forum 4 11-12-2008 06:08 PM
Driving a relay through a printer port fester225 The Projects Forum 2 11-12-2008 02:24 AM
Ti Chipcon CC1110/CC2510 SPI problem Hamilton Embedded Systems and Microcontrollers 8 09-15-2008 02:27 AM
16F676 port problems lazerspot Embedded Systems and Microcontrollers 1 02-17-2008 04:56 AM


All times are GMT. The time now is 10:39 PM.


User-posted content, unless source quoted, is licensed under a Creative Commons Public Domain License. Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.