Parallel Port Breakout - Page 1
Forum section: electronics / beginners

author: Zillolo
author_rank: Contributor
timestamp: November 18, 2013, 08:08:50 pm
content: Hello friends,this is my first thread, so please excuse any silly errors I make.I have been tasked with designing a breakout board for a parallel port. Now after playing around a bit I came up with what I attached,but since this is my first real project I'm rather sceptical about it.I just wanted to ask what you would do differently or whether I should just throw this schematic in the bin.Thanks in advance for any help!

author: Kremmen
author_rank: Super Contributor
timestamp: November 18, 2013, 08:25:43 pm
content: It depends. Almost certainly the op amps are not what you actually need. Or they might be - it is not obvious.What is the application of the breakout board, i.e. what will it connect to the PC?Maybe the attached schematic might give you some ideas. It is a breakout board for small 4 axis CNC routers i made some time ago. Feel free to use anything you want and if you have questions i am happy to help.The mystery circuit around Q1, Q3 and Q15 is a charge pump that only enables the outputs after the PC delivers a steady pulse of > 10 kHz to port pin 1. This is needed because the parallel port pins are in random states after boot. Not good for machinery that need to be under control at all times.Also all inputs/outputs are opto isolated for partial noise and common voltage protection.

author: Zillolo
author_rank: Contributor
timestamp: November 18, 2013, 08:31:50 pm
content: Thanks for the answer.The breakout board is supposed to be connected to a CNC router, like yours.Sadly I cannot seem to be able to open your attachment.Also since this CNC router has 5 axis there are no pins on the parallel port available for the charge pump,do you maybe have any advice for that?Thanks in advanceEdit: I have been able to open the attachment now, Google Chrome seems to have some issues with it.

author: kxenos
author_rank: Frequent Contributor
timestamp: November 18, 2013, 08:36:55 pm
content: Have you considered schmitt triggers? Also is there a requirement that the outputs must be isolated like Kremmen's circuit? If not, the CNC's ground will be attached to the PC's ground. Is this what you plan?

author: matkar
author_rank: Regular Contributor
timestamp: November 18, 2013, 08:37:36 pm
content: Search the web for examples. Here is one:http://www.cuteminds.com/index.php/optobreakUsually isolation is a good thing and use buffers/inverters instead of voltage followers. Adding a local voltage regulator for the supply might make sense.

author: Zillolo
author_rank: Contributor
timestamp: November 18, 2013, 08:42:25 pm
content: Quote from: kxenos on November 18, 2013, 08:36:55 pmWhat are the disadvantages of connecting the both grounds? Could this be a possible source of errors?Quote from: matkar on November 18, 2013, 08:37:36 pmThanks for the site, will have a look at it!I already get a regulated 5V in from my power supply, so I think another voltage regulator would be overkill? Correct me if I'm wrong please.Thanks in advance and thanks for the help guys!

author: kxenos
author_rank: Frequent Contributor
timestamp: November 18, 2013, 08:58:39 pm
content: ground loops and ground bounce have to be avoided but the most significant factor is protection of the motherboard in case something goes wrong to the outside circuit. Especially when you have a power circuit connected like stepper motor drivers etc. where there is a possibility that in case of fault more than 5V go to the parallel port

author: matkar
author_rank: Regular Contributor
timestamp: November 18, 2013, 09:43:07 pm
content: Quote from: Zillolo on November 18, 2013, 08:42:25 pmI don't know what kind of connector are you planning to use for alimentation but in case of terminal block you risk reverse connection. At least place some components to protect your circuit against reverse polarity.And definitely use optocouplers or other means of isolation.

author: Kremmen
author_rank: Super Contributor
timestamp: November 18, 2013, 09:59:36 pm
content: Quote from: Zillolo on November 18, 2013, 08:31:50 pmThe axes on my board are all with individual enable outputs. If you can manage with a common enable then that will free 3 outputs and you can have one more axis with pulse/dir and one with pulse only. Or if you handle enable with other means, then you might be able to have 5 pulse/dir channels.Please be aware that the charge pump functionality is not really optional; you need it unless you can be sure that no motion is possible before the PC software has properly initialized the parallel port. You can do it with other means but the charge pump is commonly used for that purpose and most PC based CNC control software supports it.

author: Zillolo
author_rank: Contributor
timestamp: November 18, 2013, 10:07:21 pm
content: Quote from: matkar on November 18, 2013, 09:43:07 pmI will keep that in mind, thank you!Quote from: Kremmen on November 18, 2013, 09:59:36 pmI've got it something like this: 5 x Step, 5 x Dir,1 x Spindle PWM for the outputsDo you have any suggestion on how I could do this with this limited amount of pins?As far as I understand I NEED 10 outputs for the step/dir signals, so I have only got 1 left

author: IanB
author_rank: Super Contributor
timestamp: November 18, 2013, 10:15:04 pm
content: Quote from: Zillolo on November 18, 2013, 10:07:21 pmYou could in principle send binary coded values to the port and decode them on the breakout board to generate individual signals. Four pins would give you 15 outputs (treating 0000 as "off"), and eight pins 255 outputs. But then of course the driver software on the PC would have to know how to drive the port...

author: Zillolo
author_rank: Contributor
timestamp: November 18, 2013, 10:26:16 pm
content: Quote from: IanB on November 18, 2013, 10:15:04 pmThat's a wonderful idea, but I don't think my software can do that.I could use 2 parallel ports at the same time, the only problem with that is, that we don't have any PCs with 2 parallel ports.EDIT: What do you guys think about using 2 parallel ports? Maybe I could organize an old PC with 2 connectors. That would solve the problem, wouldn't it?

author: Kremmen
author_rank: Super Contributor
timestamp: November 19, 2013, 07:51:47 am
content: 2 parallel ports is the "standard" way to solve this problem. You can buy an adapter board to get the 2nd port to a computer that doesn't have one as standard. Software such as LinuxCNC and Mach 3 have the capability to use dual parallel ports.