Control Your Electronics through a Parallel Port
Don’t throw away that old computer! If it has a parallel port, you can use it to control your electronic gadgets. Until a few years ago, all computers came equipped with a parallel port, which was used mostly to connect to a printer. Today, most printers connect to computers via USB ports.
The parallel port has one advantage over USB ports: It makes it easy to create your own circuits that interface directly with the port. These circuits can control low-current devices such as LEDs, or they can activate transistors or even mechanical relays that in turn can activate high-current devices such as motors, incandescent lamps, or sound systems.
After you’ve created the circuits to connect to a parallel port, it’s a simple matter to create a software program on the computer that sends data to the parallel port. When you run this program, your circuit can detect the data sent to the parallel port to control such things as LEDs or other low-power circuits.
The makeup of a parallel port
A standard parallel port has eight data pins, which are essentially TTL logic outputs, with +5 V HIGH representing 1 and 0 V LOW representing 0. In fact, the first parallel printer ports designed for the IBM PC back in 1980 actually used 7400-series logic chips.
Because of the TTL logic levels used by the parallel port, it’s a simple matter to create logic circuits that interface with the output from a parallel port. And after you build a circuit that connects to a parallel port, it’s a relatively simple matter to use software on the computer to send data to the parallel port. Then your circuit can respond to the data you send.
Unfortunately, few computers today come with a built-in parallel port. Before you waste your time building circuits to interface with a parallel port, you need to find a computer that has one. Your best bet is to scavenge for an old laptop computer. Almost any laptop computer 10 years old or so will do the job, because most computers that age have a parallel port.
If you can’t find a computer with a parallel port, you can buy an inexpensive parallel-port card that adds a parallel port to any computer. Online retailers such as Newegg sell them for less than $15 apiece.
In fact, it’s a good idea to use an add-on parallel port card even if your computer has a built-in parallel port. That’s because if you incorrectly wire the circuit that interfaces with the parallel port, you risk damaging the computer’s internal circuitry. Better to fry a $15 add-on card than your computer’s motherboard.
The DB25 connector and its pins
A parallel printer port uses a standard type of connector called a DB25 connector, which has 25 pins, each of which serves a different purpose in the port’s communication with a printer.
Like most data connectors, DB25 connectors come in both male and female variants. The male DB25 connectors consist of 25 pins, and the female connectors have 25 holes.
The connector consists of two rows of pins. The top row has 13 pins, and the bottom row has 12. The pin in the top-right corner of the female connector is designated as pin 1; the pin at top left is pin 13; pin 14 is at bottom left; and pin 25 is at bottom right.
The pin numbers for a male connector are the mirror images of the numbers of the pins in the female connector. This arrangement is necessary so that when the male connector is plugged into the female connector the pins connect properly (e.g., pin 1 connects to pin 1, pin 2 connects to pin 2, and so on.)