The point of this page is to tell you that I have developed a small circuit that a hobbyist can make up. The circuit is for putting between your computer's parallel port and any external electronics you choose to try to read from or drive.
The circuit provides for four opto-isolator protected inputs, and four outputs through relays. (Opto-isolators are explained farther down the page.)You can download a zip file (1.4meg) with images of 9 pages of handwritten notes, plus some computer drawn pcb artwork. I once had a m/r copy of a "draft" pcb... but it was for an older pcb CAD package, and that appears to be a file I had not backed up before a hard drive failed. However, all is not lost! There is an image of the single-sided PCB on page 7 of the notes I just mentioned. Making a pcb from that would not be terribly difficult. Alternatively, if you happen to work up a new machine readable version, using the free pcb CAD tool "KiCad", and would be willing for me to share it, please email me?
A great deal of fun can be had connecting electronics of your own devising to your computer. Even if you merely connect a few simple LEDs. The joystick and parallel ports are two easy points of attachment... and if you don't have either, there are cheap USB ways to get them. Furthermore, for the sort of things that are fun, an old Win98 box is fine which you can pick up secondhand for silly money. I've had a computer tracking the weather for several years. It cost me $45, but still manages to read, record and display several temperatures, rainfall, barometric pressure and wind speed.
There are two problems with connecting your own creations to your computer.
Read on to learn about both problems and how the circuit I'm offering addresses them.
"Outputs can't drive much": If you understand that already, bear with me while I offer some help to novices? I'll get to how the circuit addresses the problem in a moment.
You've probably heard of Ohm's law, or at least have an intuitive grasp of its implications? If you have a source of voltage, and run wires from it through a bulb, and back to the "zero volts", or "ground" connection to complete the circuit, electrons should flow, yes? Choose the right bulb for the voltage, and the bulb should glow brightly, but not too brightly. DO NOT TRY THIS: IF you were to connect a flashlight bulb to the household electricity, it would burn VERY brightly... but very briefly... wrong bulb for that voltage! None- the- less, you CAN buy bulbs that will operate properly on, say, 6 volts (four flashlight batteries)... and some are designed to glow more brightly than others. Are you getting something for nothing? No. Other things being equal, the brighter the bulb glows, the sooner the battery dies.
Now... again, don't do this, but what IF you were to attach those bulbs to the output of your parallel port? If you put a voltmeter on the port (after dealing with a few other things), with no bulb attached, you'd be likely to see 5v... which is near enough 6v for operating bulbs. However, if you connect a bulb, particularly one of those that glow brightly at 6 volts, the bulb might not glow. And the computer circuits might be damaged. The problem is that the voltage on the parallel port pins only stays at about 5 volts if the current flowing is below the level the designers said was your limit. You can't "suck" current out of a voltage source. The voltage source pushes; the bulb doesn't pull.
If you connect one bulb, a certain amount of current will flow. If the current is below the limit for the voltage source, all will be well. You may even be able to add a second, or third bulb in parallel with the first. Each will "see" 5 volts, but the total current flowing from the voltage source will go up, because there are more channels carrying electrons. (The wire to where the streams of electrons divide is not a significant bottleneck- resistance. The current is limited in each channel by the resistance of the bulbs.) However, if you keep adding bulbs, eventually the amount of current that would flow according to simple theory won't flow. Ohm's Law hasn't been repeal led. Look at the voltage when you have too many bulbs connected. It is no longer 5 volts. The battery, or whatever, only promises to deliver 5 volts if you promise not to connect a circuit of such low total effective resistance that the current would rise above a certain value (specific to the voltage source) if the voltage source were able to supply such a large current. (Adding bulbs in parallel reduces the total effective resistance.)
What's this got to do with the parallel port protection circuit? Two things: As I said earlier, connect the wrong thing, something of too little resistance, and you may damage the computer's port. It will probably survive, but don't take the chance... it may not. What I didn't explain earlier is that the parallel port protection circuit I offer here has an answer to the problem. In the circuit, the parallel port outputs connect to transistors. Those transistors are arranged to turn relays on and off. A relay is just an electrically operated switch. Users of the circuit will only ever attach things to the poles of the "switches" in the relays. Users might get things wrong, but relays are very robust. Even if a user manages to damage a relay (not easy), only the relay would need replacing. It would provide a firewall (in the pre-computer sense of the word) between the user's mistake and the delicate innards of your expensive computer.
Not only does the relay provide protection, but it also means that almost anything can now be controlled, through the parallel protection circuit, by the computer, because the thing being controlled is being controlled through a relay. Relays can switch higher currents than the parallel port could cope with. The circuit you are controlling doesn't need to be a 5 volt circuit. Note, though: You still should not use this to control household electricity unless you really know what you are doing.... a slight mistake can be disastrous. And there are ways to make mistakes of which you may not be aware. Just "being careful" is not enough. You need training.
Connect the wrong thing: Now we will move on to look at other aspects of the theme of "connect the wrong thing". In addition to what we've discussed already, and now we are also talking about connecting things which are inputs to the computer, even if you've got all the issues of current correctly judged, connect the wrong thing (or connect it the wrong way) and you can damage your computer. We've seen that the parallel port protection circuit on offer here puts a firewall on the lines used for output. The circuit also puts a firewall between the user's inputs and the computer. This time, instead of using relays, we're using opto-isolators. Your circuit will turn on (or off) an LED which is trapped in a "cave" inside a little blob of plastic. On the other side of the "cave" is a light sensor. THAT is what is connected to your computer. Mess things up, and you might burn out the LED, in which case you will have to replace the opto-isolator... but that is simple and not terribly expensive ($5?)... and it is hard to "mess up"... but not impossible! Better to be facing a bill of $5 than of the cost of a computer?
The circuit is a simple little thing, but there are numerous connections because of two 4 gate chips in it. It could be assembled on a prototyping breadboard, but the best way to go would be to make a pcb. I'm hoping someone out there will take on making the artwork necessary for creating pcb's photographically, and then share the results with the rest of us. I reserve most of the rights to the design, but grant non exclusive permission to anyone who wants to make and sell the board to do so. (If you are really serious about making up one of the boards, and can use Easy-PC or Gerber files, I could probably send those... email me.) If you start making them, please keep me informed? I'd probably buy a few (at your cost), and would be happy to market them for you. Either simply by telling people where to find you, or even as a distributor.
Page tested for compliance with INDUSTRY (not MS-only) standards, using the free, publicly accessible validator at validator.w3.org
....... P a g e . . . E n d s .....