Shop OBEX P1 Docs P2 Docs Learn Events
A simple LED question — Parallax Forums

A simple LED question

RogerInHawaiiRogerInHawaii Posts: 87
edited 2010-07-16 02:49 in Propeller 1
I want to have a set of LEDs that I can turn on and off. They should ALL go on and off at the same time. That is, I'm not trying to control each one individually. I went to http://led.linear1.org/led.wiz to design the array of LEDs, mainly because I wanted to make sure I'd use the correct resistors for the array. It lets you specify the properties of the LEDs and battery that you're using and it generates a circuit diagram. For my multi-LED circuit it shows that each LED has its own resistor. It's basically two parallel wires (for the + and - lines from the battery) with a set of resistor/LED pairs connected between them, i.e. a parallel circuit.

I understand the need for the resistors, in order to bring the voltage down to what the LED expects. But, I'm wondering, shouldn't it be possible to have a SINGLE resistor (near the battery, on the positive terminal side) instead of a separate resistor for each and every LED?

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2010-07-15 20:55
    The purpose of the resistor is to limit the current through the LEDs (through negative feedback) to something that they can handle (typically 10-20mA). If you have a high enough voltage power source, you can put lots of LEDs in series and have one resistor for the whole string of LEDs. You can also put several strings of LEDs in parallel, but you need a resistor for each string.

    For example, say you have a 12V power source and you're using red LEDs with a forward voltage of 1.7V. If you put six in series, that's 6 x 1.7 = 10.2V. With a 12V power source, that's 1.8V you need to drop in the resistor. If you want a 10mA current, by Ohm's Law, that's R = E / I = 1.8 / 0.01 = 180 Ohms.
  • John R.John R. Posts: 1,376
    edited 2010-07-15 21:00
    The danger there is that if an LED or two go off line, your total current would go down. This means that the voltage across the resistor would go down, and if this voltage goes down, and the source voltage remains fixed (i.e. a battery), then the voltage on the LEDs will go up. This tends to lead to further failures, and things start to go exponential.

    Also, it (single resistor) assumes (this is a bad thing to do) that all LEDs will behave identically. If one or two have a low internal resistance, the signle resistor concepts breaks down similar to above, just more gradually (at first).

    Your best bet is to always have a "series" circuit where all current for a given loop will go through the resistor and LED.

    I gues you could possibly do some LEDs in series, but this gets back to assuming they all behave close enough to the same to not cause damage to one another, and you would also get the old "one goes out, they all go out" thing.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    John R.
    Click here to see my Nomad Build Log
  • RogerInHawaiiRogerInHawaii Posts: 87
    edited 2010-07-15 21:04
    Excellent info. Thanks. I guess "one resistor per LED" is definitely the way to go.
  • LeonLeon Posts: 7,620
    edited 2010-07-15 21:26
    It depends. I once designed a high-power LED beacon that had two chains of six super-bright LEDs with one low value resistor (2R2) per chain. They were pulsed to give a high peak current through them for maximum brightness.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Leon Heller
    Amateur radio callsign: G1HSM

    Post Edited (Leon) : 7/15/2010 9:36:59 PM GMT
  • soshimososhimo Posts: 215
    edited 2010-07-15 22:25
    If you decided to wire your reisistor/LED pairs in parallel keep in mind your current. If you have three led's in parallel all drawing 10ma your total current will be 30ma so you could easily sink more current than the prop can supply.
  • Michael O'BrienMichael O'Brien Posts: 55
    edited 2010-07-16 02:49
    Roger,
    Hawaii must be very nice this time of year.
    I drive all my leds from 74hc595 shift registers, (out of spec) you should but don't need resistors - as the 595 puts out about close to a max of 15ma for red LED's for example - near their max brightness. On one of my breadboard circuits I am driving 80 LED's in parallel at around 1.4A at 3.3V or 5W for the whole circuit (Propeller, eeprom and 10 595's on top of the 80 leds).
    The max power from the 595's (LS or HC) is enough to multiplex 8x8 displays with 2 595's with very good brightness.
    I never drive led's directly from a propeller and then don't have to worry about overloading it - I find that the 595's (available from parallax are indispensible) and allow you to use only 3 pins to drive an unlimited amout of LED's.
    Here is clean circuit where·one·595 drives another·595 powering the·rows with a·138 driven by the low high bits of the first 595 - drives the common cathode column of 4 led digits
    thank you
    /michael

    Post Edited (Michael O'Brien) : 7/16/2010 3:08:18 AM GMT
Sign In or Register to comment.