Shop OBEX P1 Docs P2 Docs Learn Events
electronics question — Parallax Forums

electronics question

bomberbomber Posts: 297
edited 2011-08-17 03:36 in General Discussion
I will have 30 red LEDs connected to a nine volt battery in parallel. What value of resistor will I need and where do I place them in my circuit?

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-08-16 14:36
    You'll be wasting a lot of energy by connecting all 30 in parallel, and each would need its own current-limiting resistor. I would recommend creating multiple strings of, say, four LEDs in series, each of which will include a series resistor to limit current.

    -Phil
  • bomberbomber Posts: 297
    edited 2011-08-16 14:40
    That might work... although I may have to make a few adjustments to the layout. What resistance would you recomend for the multiple strings of four LEDs in series?
  • bomberbomber Posts: 297
    edited 2011-08-16 14:56
    Scratch that. It will work.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-08-16 14:57
    What is the forward voltage of your LEDs at the current you want to run?

    -Phil
  • $WMc%$WMc% Posts: 1,884
    edited 2011-08-16 14:58
    Rs = (Vcc - VLed) / Led I
  • bomberbomber Posts: 297
    edited 2011-08-16 15:02
    Parallax doesn't give any specs... but it is this one.
  • GordonMcCombGordonMcComb Posts: 3,366
    edited 2011-08-16 15:04
    If this is a 9-volt "transistor" (as in old style radio) battery it's not going to last very long running 30 LEDs. Even if you cut down the current draw to each LED to 5-10 mA, that poor old battery is going to run out of juice in no time.

    The way they usually do this is to multiplex the LEDs, and strobe them one (or smaller groups of 3-5) at a time. They look like they're all on at the same time because of persistence of vision.

    A microcontroller would do this, but so could a 555 and 4017 counter chip. You'd probably also want a driver like the ULN2003, because I don't think the 4017 can drive more than a couple LEDs on each pin.

    All of a sudden this is a lot more complicated than it started out as!

    -- Gordon
  • bomberbomber Posts: 297
    edited 2011-08-16 15:10
    Or I could just use my trusty 12V 500mA power supply.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-08-16 15:25
    bomber,

    The forward voltage of that LED is probably around 1.7V. So 4 x 1.7V = 6.8V. To limit your current to 10 mA, say, with a full 9V source, you would need a (9 - 6.8) / 0.010 = 220 ohm resistor in series with each string. As Gordon suggests, though, your battery will not last very long.

    With your 12V supply, you could put six LEDs in a string. I'll let you calculate the series resistor this time, since I've shown you how to do it.

    -Phil
  • bomberbomber Posts: 297
    edited 2011-08-16 15:49
    according to my calculations, I will need a 10.4 ohm resistor in sereies with strings of four LEDs with the 12V 500mA power supply. Is that correct?
    It seemed like such an odd number.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-08-16 15:56
    No, I'm afraid that's not even close. And, with 12V you should use five or six in a string, not four, to save power. How did you come up with your answer?

    -Phil
  • bomberbomber Posts: 297
    edited 2011-08-16 16:04
    Forward voltage of LED is 1.7V. 4 x 1.7V = 6.8V. Current 500 mA,12V, (12 - 6.8) / 0.500 = 10.4 ohm resistor .
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-08-16 16:12
    Oh. You definitely don't want to run 500 mA through your LEDs! The 500 mA spec is how much the supply can source if you need it, but you don't anywhere near that much here. Try the computation with somewhere between 10 mA and 20 mA. Also, is your supply regulated or just a wall wart? If the latter, be sure to measure the actual voltage with no load, since it will probably be a lot more than 12V.

    -Phil
  • bomberbomber Posts: 297
    edited 2011-08-16 16:19
    It is a regulated adapter. with 30mA (to be on the safe side) I need 173.3 ohm resistor
  • SRLMSRLM Posts: 5,045
    edited 2011-08-16 16:54
    The "safe side" of LEDs is a lower current. With too high of a current the LEDs will start to lose their color and produce a more whitish output and with way too much current the LEDs will pop and die. Most LEDs will be lit even with very low current, and you can always work your way up to a higher current if you need more brightness.
  • bomberbomber Posts: 297
    edited 2011-08-16 17:10
    Recalculation! 260 ohms!
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-08-16 18:19
    I wouldn't go any higher than 20 mA with those LEDs.

    -Phil
  • GadgetmanGadgetman Posts: 2,436
    edited 2011-08-17 03:36
    With LEDs, unless you're building a flashlight, you dance the Limbo...

    'How low can you go'?

    Take into consideration the ambient light where they're being placed, the surface around them and all that.

    You may be able to go below 10mA if it'd a 'dark and dank' situation.
Sign In or Register to comment.