Question:

Is it possible to power up more than 8 LEDs via. computer parallel port?

by  |  earlier

0 LIKES UnLike

Basically what the question says, if so, how many max? Need to be powered up one by one, not like 2 on each pin.

 Tags:

   Report

5 ANSWERS


  1. Think the limiting factor here is the current the parallel port can supply. (I think the wording means the LEDs and any controlling electronics are to POWERED by the computer, rather than a battery/mains adaptor)

    Think it can do up to 2.6 mA per data pin

    Not sure about the other pins....

    perhaps use low current LED's?

    ---

    How many LEDs you can drive depends on the current the parallel port can handle, how much current an LED needs to be visible (times the maximum number of LEDs drawing power at any one INSTANT time), and how much current is consumed by any interfacing/control electronics.

    ---

    You can address as many LEDs as you like, but you need to have some-kind of protocol to encode the data, send in through the 8bit parallel port, and then decode the transmitted data at the other side (you still need to power the LEDs though)

    Multiple word addressing would let you send more data than you can squeeze into 8 bit. Simply break the data in 8 bit chunks and send each chunk through the parallel port in order. It's a form of Time division multiplexing.

    You could make it LOOK like there were several LEDs on at once, when in reality only one was on at once. Simply work through the LEDs, that are to be on, really fast, and persistence of vision will make them ALL seem to be on.  (it's much like how CRTs address the pixels on a screen)

    Perhaps feed all 8 of the data lines into serial to parallel convertors, (making it possible to address 8*2^(the bit width of the serial registers).

    place an "and" gate on each output line, and use a counter/decoder(driven by a Multivibrator) to cycle through all possible outputs, ALL possible outputs will then end up being being strobed (so only one LED on at once). True you'll have "glitches" in which LEDs are "visible" while data is being updated but each update shouldn't take too long.


  2. You can use the strobe signal, and break the 8 data lines into address and data. For example 3 address lines gives you 8 addresses, and 5 data lines x 8 addresses is 40 bits.

    You will need to decode the 3 address lines to 8, and you will need 8 sets of latches, 5 wide.

    or 2 address lines give you 4 addresses x 6 = 24 bits.

    or 4 address and 4 data gives you 16 x 4 = 64 data bits.

  3. If I understand your question correctly, using the 8 data lines, you could have a 4 by 4 matrix so control 16 LEDs.

    With the addition of a bit of circuitry you could individually control 256 LEDs.

  4. First, LED's connected between power and ground have low resistance, and are easy to smoke. So, to limit the current, a dropping resistor is normally put in series with each LED. To figure out how big to make the resistor, use Ohm's Law, E=IR or volts/current =R. Subtract the diode drop from the power supply. For example on the data lines, 3.1V supply, 1.8V LED drop, needing 1mA:

    (3.1V - 1.8V) * 1000 / 1mA = 1300 Ohms. On the control lines with no external dropping resistor, (5V - 1.8V)*1000 / 4700Ω = 0.7mA. The resistor value is usually not critical because the voltages and current can vary a lot, so it's usually OK to be off some on the resistance.

    There are 8 data lines which you can use. There are also 4 other outputs, probably 2 or 3 of them usable. Pin 1 is the strobe line, it is normally high, but goes low to indicate the data is valid. You may not be able to set this one separately, so it may be 11 total possible. Pin 14 is AutoFeed, 16 is Initialize, 17 is SelectIn (take printer offline). These should all work.

    One issue, especially with the control outputs, is how much current and voltage each pin can supply. LED's have different requirements for voltage and current. Blue and white tend to need more voltage. Small red LED's use the least, lowest current one I could find uses 1.8V @1mA for 2mcd brightness. Bright LED's can use more than 50mA. Any LED should still be visible with current well below their rated output. Test to be sure.

    Different parallel ports have different capabities. You could test how much by using a diode with different resistors between a pin and ground, and measure the voltage and current for each one. If the measure the resistor before you use it, then use E=IR to determine the current. Start with a large resistor to limit current for the LED, then measure the voltage drop across the resistor and calculate the current. Then, go to smaller resistors if it won't light.

    From http://www.lvr.com/jansfaq.htm

    "The data outputs on the original parallel port were 74LS374 outputs, which can source 2.6 milliamps at 2.4 guaranteed, 3.1V typical. The data outputs on most parallel ports are at least as strong as the original port's, but no guarantees. If you need 5V, you can use one of the high-efficiency step-up regulators from Maxim & others (Max756). The newer port controller chips often have IEEE-1284 Level 2 outputs, which can source 12 milliamps at 2.5V. The Control outputs were originally open-collector TTL with 4.7K pullups, so these are less useful as current sources."

    http://computer.howstuffworks.com/parall...

    http://en.wikipedia.org/wiki/Parallel_po...

    If the control lines on your parallel port are like that, the control LED's will be dim unless you have very efficient low power LED's, because a 4.7k pull-up will only deliver about 0.7mA, as calculated above. It this is OK, should have 11 total LED's.

    To brighten the LED's on the control lines, you could use the LED's backwards, using the control lines to sink current rather than source. To do this, you leave one data line on all the time (with no LED), and drive contol line LED's thru dropping resistors to each control lines. They would turn on when the control lines are low, which is backwards from what you might expect. When you program them, you just remember to send a zero to turn on, 1 to turn off. This would leave 10 LED's total.

    Another issue is how to drive the parallel port. You need software to do it. You should be able to set or reset the control lines independently except maybe Strobe (pin 1), but I'm not positive. Also, newer parallel ports have 3 modes: SPP, ECP, and EPP. The control lines act somewhat differently in the different modes. You may have to set the mode you want. I would look at the sites found in your search to pick some freeware to drive your port.

    Google parallel port for more info. Many, many hobbyists have done projects with the parallel port, and published their project on the internet. It is not hard once you get the info.

    If you need more than the 8 to 12 you can get from the parallel port, you might as well get a microcontroller, say from PIC, and interface it to your computer. It's fairly complicated, but an educational experience.

  5. The previous answers leave out a couple of assumptions.  They are assuming you either want only one LED on at a time or you are willing to change the data rapidly so the eye sees more than one because of the persistance effect on the eye.

      If you actually want more than 8 LEDs on at a time, you will have to set up a bunch of addressable latches that hold the setting.

    The maximum with complete control would be 128 (where either 128 ON locations and 128 OFF or 7 bits address and one bit ON/OFF)  If it were some kind of random lighting effect, you could have 256, but not know which were on and which off.

Question Stats

Latest activity: earlier.
This question has 5 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.