Instructables
Picture of Parallel Port Break Out Board (BOB)
Ever want to interface with a computer? I don't mean in the regular way either, I mean the real down and dirty strip wires and plug stuff in kind of interfacing! Yeah! No? Then this Instructable isn't for you and you should move on now.

Oh you're still here? Good! In this article I'd like to present a project where I did just that. Now I should say right up front that you can just buy these things and they're called Break Out Boards (BOB) and one will set you back anywhere from $25 to say maybe $50 or more depending on the features, or how greedy the seller is etc. My board cost me about $6 to make but I had some of the most expensive components on hand to work with. Namely the barrier terminal strips, which if you're creative you don't even really have to use.

These boards aren't much more than glorified terminal strips anyways but we'll be addressing just exactly what is going on here throughout the article. These are the features of this project:
  • Low port micro-ampere current draw
  • Reliable known output source or sink current of 24ma
  • Simple connection
  • Easy construction

OK now I know that doesn't sound like much and it really isn't but that isn't to say that this is trivial or unimportant either. I thought long and hard about the mysteries of the Parallel Port before I built mine and what this board primarily does is remove a lot of the unknowns from the interface. Unknowns such as just how much current can I draw from a Parallel Port? Go out and search I dare you to get a straight answer. Come back when you're as confused as I was and we'll talk about it.

Hook my board up and it is a cut and dried 24ma. If you draw more you're probably only out a 50 cent IC too. That alone HAS to be worth the price of admission! But wait there's more, it slices, it dices, it julians fries ... OK maybe it doesn't do those things. What it does do though is plug into a parallel port and give you convenient buffered connection points.

Like I said they sell these things commercially so it can't be that stupid. It really isn't either.
 
Remove these adsRemove these ads by Signing Up
WWC1 year ago
What did you do with the strobe pin #1?
pfred2 (author)  WWC1 year ago
Nothing. Perhaps some software needs it but not what I use.
Brittond141 year ago
shoot brother! With me seemingly fallen off the water melon truck yesterday and all, I'm having a lot of trouble figuring just what parts I would need to pull one of these together. Learning eagle is a tasking all by it self any change I can just get a close up of your boards (front and back) and a parts list?
pfred2 (author)  Brittond141 year ago
Schematics are always better to build by. A schematic shows every single connection, a picture of a circuit may not. This is a picture of the top of that board:

http://img191.imageshack.us/img191/4185/ppbbpic1.jpg

There isn't a whole lot of special stuff going on on the bottom of the board that would help you out any I'm afraid. This is a screen capture of the Eagle trace pattern:

http://i.imgur.com/IDbT0.png

I actually use that part of the program to help me put boards together, even if I am assembling them point to point. Learning some design software is worthwhile today in my opinion. I need to learn PCB myself. It sort of bugs me that I use Eagle as opposed to a GPL solution. PCB is very capable, so far I'm not very capable using PCB yet myself though.

http://pcb.geda-project.org/

I know what the board is on the background of that page though. I've chatted with the person who made it a few times. He is also one of the developers of pcb. That is his BLDC motor driver. It is pretty awesome! Well a little bit of it, this is a picture of the whole board:

http://www.delorie.com/electronics/bldc/

He thought it was funny when I mentioned I'd noticed it being used as the background graphic on PCB's home page.
frostvapor2 years ago
Sorry for the noob question, but what voltage caps should be used with this project. I am brand new to the electronics scene, and am going to try this BOB and your stepper motor controller. I will be etching the board, and need to make changes for your component corrections. I don't have the background for this, but am currently reading any information I can to understand. Think this is really cool. I am good with a multimeter and soldering so I am hoping all goes well. Was pretty successful with making a DVA adapter for checking coils on outboard engines, but it was a really simple circuit. Thanks for any help you can provide. I will give pictures if you are really interested in the progress.
pfred2 (author)  frostvapor2 years ago
My circuits are nice and all but there are better solutions available today. Cheaper, easier, all the things that make one decision better than another.

I will say this right here and now though. Your choice of power supply will dictate your overall project success. A bad supply will leave you with a poorly performing, or even a totally non-functional mess.

So if you want my advice then begin at the beginning. This is where it gets tricky though because it isn't crystal clear where you have to start. Often a system is like a maze where one parameter dictates earlier decision branches. So it makes sense to work backwards from what you want to where you need to begin.

Right now I know you want to run stepper motor drivers based on TB6560s. this tells me you need a specific voltage, and some multiple of current. the magic number with TB6560s seems to be about 28V don't let anyone, not even Toshiba snow you with that 32V maximum value. That doesn't take inductive feedback into account at all! Personally I run my drivers at 24V. They work great there too.

As far as your current requirements go that depends on your stepper motor, or motors you plan on running. I'll use a bit of my system as an example. Lets say I have 3 stepper motors that need 2 amps each. 3 times 2 equals 6. Easy math.

Now I know I need a 24V supply @ 6 amps. Just bear in mind one spike to 33 volts and it is game over. It could be for less than the blink of an eye but the IC will see it as a shot to the heart. Poof! I know it sounds funny up until it is your board smoking in front of you.

I'm interested in hearing you're happy like a kid on Christmas day. If you want to get there then get yourself the power supply you need. I can help you setup one of those import driver/interface boards right too. Last I heard a 3 axis board was going for $22. My circuits can't compete with that!

Though the right current sense resistors could potentially set you back another almost $20 Now you know why the boards may not ship with them :) I hear with some suppliers you can specify what you want, so keep that in mind. That, and a couple of other settings and you're off to the races!

My power supply.
You have given me much to think about. Fortunately I am doing this for the learning experience, and I believe that any knowledge gained is priceless. So the price of a $22 board does not make me jump at buying it; I would rather spend the money and gain the knowledge. Your explanation is wonderfully written by the way. I believe that I might just build the power supply in your instructable and stick with your BOB and driver, I believe I will learn more by doing so. Plus one of the best ways to learn is break stuff. I appreciate your feedback and welcome it. I plan on beating you down with questions though; if you don't mind. I'm in no hurry so I won't bombard you to much. Thanks for your help thus far.
pfred2 (author)  frostvapor2 years ago
My setup does work. Which is more than some of the $22 board folks can say. I went with a linear power supply because PWM motor drivers are pretty noisy all by themselves. I think half the people who have troubles with their stepper setups have them because they're using messed up switching supplies. There are reasons some of that stuff lands on the surplus market I suppose.

My driver, BOB, and power supply all do work together. I also bought a PCI parallel port card with a Netmos 9815 chip on it. My BOB will work on a regular built in port too but when I was making it I was a little worried about blowing a system up. I forget all of the gory details now but my BOB only draws a fraction of a milliamp from the parallel port on any given data line.

I worry about breaking stuff myself so I'm pretty careful. I've had some stuff not work for a bit until I figured it out, but so far nothing has broken on me yet. If you look closely at the breadboard prototype of my motor driver you can see I even made a copper scatter shield for the driver IC. I heard the chips had a bad habit of blowing up on a lot of people.

http://img580.imageshack.us/img580/8305/tb6560ahqnoflash1.jpg

I only ever made one of those scatter shields. It has never come into play yet for me. I still have all of my spare TB6560s I bought hanging around. I figured I'd probably blow up a few making my driver. I didn't fry one.
I'm definately building them. I have a couple of laptops with built in parallel ports that I will try. If I have any issues with the first one I will go with a PCI parallel port card for sure. I am going to start with the power supply first and keep you updated with my progress, once again thinks for the expertise. As the system design progresses I will post every think I am doing. Thanks a million, I now have to start sourcing my components.
pfred2 (author)  frostvapor2 years ago
Before you get too attached to any laptop for your project I suggest you check its latency. Your worst case latency is your base period, which is the heartbeat of your entire CNC system. Laptops by their nature usually have horrible latency figures.

System latency is unlike any other benchmark you're likely to be familiar with, but the only one that really matters when it comes to CNC. This is one of the pitfalls no one sees coming so I figured I'd warn you.

But let me know how you make out with that because it is nothing I've any firsthand experience with. I just avoided it all myself. For comparison my trash bin 1GHz P3 has a maximum latency of 23500ns An Intel atom board usually can score about 5400ns which is great. When I'm looking for some more performance it is one avenue I'll pursue.

BTW wise move to make the power supply first. It is what the rest runs on. I had a heck of a time locating a transformer that put out the right voltage and had the current handling capacity I wanted.

If you get really pressed rewinding a microwave oven transformer is a possible option. If you're rich just get a nice toroid. I used a combination of clever and luck myself. Turned out I had the right transformer hanging around all the time, I just had to use it funny. I ganged up two 10 volt windings in series of a transformer I pulled out of a PDP 11/34 minicomputer. Which got me a 20 VAC transformer. Rectified and filtered that took me up to about 26VDC, regulated dropped it to 24VDC Close enough.

I've never run any of my TB6560s over 24VDC I hear they do bad things when you over volt them. Someday I'll have to find out for myself I guess. I have seen some pictures of blown chips. Personally I doubt they could withstand much more than 28VDC input no matter what Toshiba says. If you read closely they never say 32VDC input they say total system voltage or something to that effect. That includes any inductive feedback from your stepper motors.

So anything past 24VDC input and you're on your own. Its no place I've been and nothing Toshiba is really promising either. This seems to be where lots of hard feelings start to me. Tread lightly.
I still have to check the latency of the laptops parallel port, but I figured I would let you know that I have started ordering the parts of the power supply. I figured I would focus on one project at a time, and it seems logical to start with the PSU first.Thanks for all the advice so far. Don't know what I going to use for the transformer yet either. Will keep you posted as I get time to work on this, unfortunately also building cabinets at the same time for mamma. I bet you can guess which one takes priority. LOL.
pfred2 (author)  frostvapor2 years ago
It is the entire system's latency time that matters. But you'll see when you get that far.

That transformer on ebay looks like it'd do the job to me. You're going to get more DC out of it than its AC rating after rectification and filtering. I'm guessing you should get about 32 VDC out of it or better. Anything under 40 and you're good. Recently going through a bunch of "24VAC" transformers I found most actually put out around 28 VAC. I guess transformer manufacturers don't want to short change people with 115VAC line voltage? Precision transformers have multiple taps to adjust for that sort of thing.

Be smart and use filter caps about double that voltage. I'm thinking 80 VDC caps would work well. Anything from 50,000-150,000uF should do the trick. You can parallel caps to add their uF. I used one big cap because I happened to have it.

For big bridges I prefer devices like this:

http://img.hisupplier.com/var/userImages/old/diode/diode$8195044.jpg

I'm sure other things work too, but I find the big blocks easy to work with.

Lots of folks just run with that. A transformer, rectifier, and filter cap. But then your voltage you get out of it has to be spot on. Building the rest of the adjustable regulated supply gives you some margin to play with. Sometimes a volt one way or another can matter. Sometimes it doesn't.

But that is why some shell out the big bucks for custom wound toroids for this application. If you have unlimited financial resources there is a lot to be said for that method. Some that can be said against it too. I think most who go that route do so because they have more cash than electronic skill. I also wonder how many close but no cigar transformers they store on their shelves, next to their over volted fried motor driver collection of course.

Then there's the switching regulator crap shooters. Sometimes they win, sometimes they lose ... I laugh when they lose because they never really know why. Though they have their theories, all wrong of course.
I also have a RTP1P5C030-T transformer out of an old audio receiver but I can't find any data sheets on it.
http://www.ebay.com/itm/TRANSFORMER-24V-12-5-AMP-50-60-hz-HI-POTTED-NEW-/130556995319?pt=BI_Circuit_Breakers_Transformers&hash=item1e65cda6f7
Would this be a suitable transformer?
A really useful and interesting project. You mentioned "opto-isolating" your INPUT lines, but shouldn't you isolate the outputs as well to protect against the failure of the controlled device?
pfred2 (author)  Dream Dragon3 years ago
For my particular application the short answer is no. The explanation is a bit lengthy as to exactly why. Put simply I've already isolation at the devices and optocouplers are huge speed liabilities that add up every time you pass data through one.

I will use my system to illustrate and hopefully you shall agree with my design decision.
  • Signal timing <5ms
  • TLP521 optocoupler speed >3ms
  • Most critical gain to be had isolating signal. Stopping noise produced by the motor driver from propagating throughout the system.

Really I'm just doing the best I can in a bad situation. Adding another optocoupler would only make it twice as bad without gaining me anything of value. I hope this has helped.

opto couplers (like all devices) do add delay but it is very small. according to datasheet for TLP521 delay is 3 micro seconds (not milliseconds!).
pfred2 (author)  panic mode3 years ago
Thank you for the correction. Switch ms for us in my post. In my haste I used the wrong abbreviation. In the world of digital electronics 3 MICROSECONDS is still thousands of times slower than logic buffers which are some nanoseconds. I hesitate to throw out a figure for fear of further correction. But if I had to guess because I can't be bothered looking the EXACT number up right now I'd say somewhere in the range of 15-20ns. My circuit is running on a 5000 nanosecond clock which is 5 MICROSECONDS. So my point still stands that the delay of the optocouplers is a substantially limiting factor in my circuit application!
there are much faster ones but since optos are not used for galvanic isolation, they can be eliminated to reduce component count. (both here and in driver with TB6560, opto couplers are used as inverters).
another recommendation would be to put DB connector on the board.

good article.
pfred2 (author)  panic mode3 years ago
Run two of these drivers without optical isolation from each other then get back to me as to just what happens. I already know.

DB motor connectors is the rookie solution when they price what DIN connectors cost. I had barrier strips and used them. Even if I hadn't had them they are an excellent choice for this application. DB connectors aren't. Show me one professional high performance motor driver that uses them. Then I'll show you the rest that use barrier strips.

Why this article was not featured I have no idea. I put far more work into this project than the rest combined. I guess it went unappreciated.
no, i meant DB that connects to LPT to be soldered to PCB instead of hanging on wires of ribbon cable.

even if some DB connectors do support high current, those are rather obscure (http://www.cablecomuk.com/hp_filter_dsub.htm for example)

looks like optocouplers, together with separate voltage regulator did fix noise immunity and that's all that matters.

i do not mean to put your effort down in any way, my comments are meant as improvement suggestions. i actually appreciate that you posted your work because i am planing to make one too.

but you can trust me about isolation because there is a circuit path around the couplers. for example one path to pin2 of IC40 from pin2 of OK1A is through emitting diode, R17, IC8 (pins 1-3), IC2 (pins 1-3), pin14 of IC40. those would be components stressed if elevated voltage difference was present.

most optos have rated isolation voltage of 1-5kV and this is what isolated circuits are expected to handle (only thing getting through is light). TLP521 for example is rated 5300V which is plenty.

to be fair, i doubt that there will be loose 5kV wire touching stepper electronics but i wouldn't mind 500-600V isolation but in this case even less would be damaging.

i am still gathering ideas for my build, reading data sheets and looking for parts. i will probably put everything on one board and use either separate power supplies or isolated DC/DC converter.
pfred2 (author)  panic mode3 years ago
I look forward to seeing what you make.
We probably would not hook up electronics to a new machine either. If you live in a fairly metropolitan area, you can get used personal computers for the most part a dime a dozen, though they are beginning to thin out real quick. Now most people have stated using the micro-controllers to do interfacing now.