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 ads by
Signing UpStep 1: About the Parallel Port
I know today's computers no longer come with parallel ports but that isn't necessarily such a bad thing. First off who wants to put a valuable new computer at risk experimenting on it? I know I don't! Second parallel port cards are still available that will plug into any machine with a PCI slot. These add on cards offer several advantages over a built in parallel port as well so they are worth considering if you plan on trying this project for yourself. An add on Parallel Port Card is what I use. USB to parallel port adapters are outside the scope of this project so I won't be addressing those at all. My board will likely work with those as well within the limits of the USB specification. If you don't know what that means search for USB realtime to see if it applies to you.
The advantages of an add on card include the fact that the add on board isn't built into your PC, so there is less risk of damaging the motherboard connecting to one. These cards are far cheaper than motherboards so if you break one you are out a lot less. Also, the add on boards are often more robust than many built in parallel ports are, so a port card is a bit harder to break to begin with. Now if you have an old PC hanging around and you don't care too much if you break it fooling around then using that is fine too. Old PCs can be cheaper than cheap, free even. While add on parallel ports cards are pretty cheap they're not cheaper than free.
The whole point of this project is really not to break anything at all though. The point being that while yes it is fun to play around with stuff, it is less fun to play around with stuff and break it. The hardware discussed in this project is meant to shield and protect a PC from your external tinkering. Now I cannot guarantee that you still won't break something if you try this. But I can say that if you build this project right you will be able to do a bit more than you normally can with just a plain old parallel port.













































Visit Our Store »
Go Pro Today »




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.
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.
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.
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.
Would this be a suitable transformer?
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 will use my system to illustrate and hopefully you shall agree with my design decision.
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.
another recommendation would be to put DB connector on the board.
good article.
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.
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.