# General Electricity Questions and Controlling LEDs with Parallel Port

#### kaashif

Joined Sep 19, 2009
1
Hi,

A few questions:
- What do resistors do? Resistors take up the extra voltage you don't need right? But isn't this is wasteful? It's like this: I want one book, but the store has 10 of them. So I buy them all, and throw away the 9 I don't need (the garbage bin is the resistor). I ask, why not just buy 1 book in the first book (ie. bring less voltage into your circuit). Or does voltage not matter, and current is what really matters?

I want to control LEDs with the parallel port.
- So I'm thinking, I'll draw power directly from the 8 pins of the parallel port, to light 8 LEDs.
- Apparently the parallel port gives +5v. Does that mean each pin gives that much? Do I connect resistors with the LEDs, in series (ie a common resistor) or in parallel? A minimalistic schematic for the parallel port LED setup would be nice.
- Why are there 8 ground pins on the parallel port, isn't one enough, and all ground connections could that pin?
- What's this about current rating? I heard something about 12mA current rating on the parallel port. Is that the max current that can be drawn from each data pin?

I'm missing some basics here it seems. Your help is appreciated.

#### SgtWookie

Joined Jul 17, 2007
22,201
Hi,

A few questions:
- What do resistors do?
They limit current. They also act to allow measuring current via the voltage drop across the resistor.
E = IR, or Voltage = Current(Amperes) x Resistance(Ohms)
1 Ampere through a resistance of 1 Ohm will measure 1 Volt across the resistance.
Resistors take up the extra voltage you don't need right? But isn't this is wasteful? It's like this: I want one book, but the store has 10 of them. So I buy them all, and throw away the 9 I don't need (the garbage bin is the resistor). I ask, why not just buy 1 book in the first book (ie. bring less voltage into your circuit). Or does voltage not matter, and current is what really matters?
Voltage, current, and resistance all matter. Explore Ohm's Law here: http://www.allaboutcircuits.com/vol_1/chpt_2/index.html

I want to control LEDs with the parallel port.
- So I'm thinking, I'll draw power directly from the 8 pins of the parallel port, to light 8 LEDs.
- Apparently the parallel port gives +5v. Does that mean each pin gives that much? Do I connect resistors with the LEDs, in series (ie a common resistor) or in parallel? A minimalistic schematic for the parallel port LED setup would be nice.
- Why are there 8 ground pins on the parallel port, isn't one enough, and all ground connections could that pin?
- What's this about current rating? I heard something about 12mA current rating on the parallel port. Is that the max current that can be drawn from each data pin?

I'm missing some basics here it seems. Your help is appreciated.
Lots of information on this link:
http://www.epanorama.net/circuits/parallel_output.html

If you're going to experiment with a parallel port, I strongly advise you to not use the port built in to the motherboard. If you make a mistake, you will destroy your motherboard.
Purchase an aux I/O board that has a parallel port. These are cheap, and if you blow it up, they are simple to replace.

Virtually all parallel ports in the last few decades use low-current CMOS drivers, which are very easy to "zap" with static electricity.

If your operating system is later than Windows 98, you will have a tough time controlling your LPT port directly. See the link for more details.

As far as the multiple grounds; those are to provide isolation between the data channels in the ribbon cable to minimize "crosstalk". Otherwise, signals would be coupled between adjacent wires.

#### Wendy

Joined Mar 24, 2008
21,840
I recently bought a card with a parallel port precisely because of what Wookie was talking about. I like my computer, I want to experiment with it, but I don't want to opps it. I had a little trouble finding one though, seems that parallel printer ports are not in vogue any more. I spend $17 for mine after a lot of searching. Wookie, can't you use DMA with later OS's to access these cards? As a general rule of thumb (and trying to get around it will cost you in money and parts) resistors with LEDs are not optional, but required. Have you read this? LEDs, 555s, Flashers, and Light Chasers Bill Bowden's website has some pretty good articles and schematics on using parallel printer slots as interfaces. Definately worth the read. http://www.bowdenshobbycircuits.info/ #### SgtWookie Joined Jul 17, 2007 22,201 I haven't bought such a card in a number of years now. Not much need to, as my printers are USB and Ethernet compatible, and post-Win98 OSs have made it a pain to deal with LPT I/O. They used to be$8 to \$12, depending on where you looked.

Win2K, WinXP, and later MS OSs grab ahold of the various devices like a gorilla and doesn't want anything else to fiddle with the hardware. You need special drivers to get around it.