Shop OBEX P1 Docs P2 Docs Learn Events
Multi LED with sx power question... — Parallax Forums

Multi LED with sx power question...

jgjonolajgjonola Posts: 27
edited 2006-01-14 20:05 in General Discussion
I am looking to make a project where the sx will be controlling about 15 led's off of 1 pin.·( times 3 pins, so a total of 45 led's)·I was wondering if anyone could help me...I was hoping to use a 12 volt power supply.· What is the best resistor configuration?· Parallel?· Series?·Here is a link to the led's that i will be using·http://www.eled.com/product.asp?catalog_name=LEDs&product_id=E7113PBC·. I imagine i will have to use a transistor to control them.· Anyway,·any help you can give me would be most appreciated!


Thank you,
John Gjonola
jg@ittservice.com
IT Tech Services

Comments

  • JavalinJavalin Posts: 892
    edited 2006-01-09 11:53
    Hi,

    I would look at using a darlington transister IC (or a suitably sized single transister) to act as a "switch" controlled by the SX pin. The SX is unlikely to be able to power 45 LEDS off of one pin. The darlington will switch the power on/off dependant on how the pin is set on the SX - i.e. High or Low.

    There is a Nults and Volts article on this, on the www.parallax.com website. Its book1, article number 6

    I would guess the leds in parallel would give the best brightness - not 100% but im sure somebody else will correct if this is not the case! I think serial leds will suffer from voltage drop further down the line.

    Hope this helps.

    James
  • BeanBean Posts: 8,129
    edited 2006-01-09 12:03
    John,
    · The datasheet shows that the forward voltage is 3.65V typical and could be as high as 4.2V. So with a 12 Volt supply you could only run 2 of them in series (with a resistor). Unless you bump up the voltage with a multiplier or something. And yes you will need a transistor because of the higher voltage and total current required.

    · Or you may want to investigate something like the STP16C596, I just discovered this beauty for a project I'm working on. It would allow you to control 32 of your LEDs with nothing more than this chip, it's even got constant current so you don't even need a resistor.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "SX-Video·Module" Now available from Parallax for only $28.95

    http://www.parallax.com/detail.asp?product_id=30012

    "SX-Video OSD module" Now available from Parallax for only·$49.95
    http://www.parallax.com/detail.asp?product_id=30015

    Product web site: www.sxvm.com

    "Ability may get you to the top, but it takes character to keep you there."
    ·
  • nick bernardnick bernard Posts: 329
    edited 2006-01-09 14:37
    how do you get 32led's out of the 16io device?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    engineer, fireman, bowler, father, WoW addict [noparse];)[/noparse]
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-01-09 15:38
    Nick,

    ·· Two in series on each I/O...Most likely through two ULN2803s or some transistors.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • BeanBean Posts: 8,129
    edited 2006-01-09 15:52
    Nick,
    · Right two in series connected to 12V. You don't need a driver chip. The STP16C596 IS the driver chip. So you would have +12V going to 2 of the LEDs in series, then right into the STP chip. It basically acts like a shift register with constant current sink capability. It also has a single resistor to set the sink current of all outputs.

    It's a great chip for controlling LEDs from voltages higher than +5V.

    P.S. The project I'm working on is a 4 digit 4" high 7 segment display. Yes each digit is 4" high and has (5) green LEDs in each vertical segments and (3) green LEDs in each horizontal segments. It will have a serial control input and will come with a 12V wall-wart to run it. Anyone interested ?

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "SX-Video·Module" Now available from Parallax for only $28.95

    http://www.parallax.com/detail.asp?product_id=30012

    "SX-Video OSD module" Now available from Parallax for only·$49.95
    http://www.parallax.com/detail.asp?product_id=30015

    Product web site: www.sxvm.com

    "Ability may get you to the top, but it takes character to keep you there."


    Post Edited (Bean (Hitt Consulting)) : 1/9/2006 3:55:39 PM GMT
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-01-09 16:05
    Interesting chip Bean, never heard of it before.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • BeanBean Posts: 8,129
    edited 2006-01-09 20:29
    Chris,
    · Another cool LED chip is the M5451 is is a constant current sink IC that controls 35 LEDs. Shift register in parallal outputs. Limited to 15mA sink per output, but nice when you have a bunch of LEDs to control since you don't need a bunch of resistors.
    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "SX-Video·Module" Now available from Parallax for only $28.95

    http://www.parallax.com/detail.asp?product_id=30012

    "SX-Video OSD module" Now available from Parallax for only·$49.95
    http://www.parallax.com/detail.asp?product_id=30015

    Product web site: www.sxvm.com

    "Ability may get you to the top, but it takes character to keep you there."
    ·
  • ElectronegativityElectronegativity Posts: 311
    edited 2006-01-09 22:07
    Here's a nice application note I found on using the STP16C596, it shows the details of how to clock in data.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    I wonder if this wire is hot...
  • JamesxJamesx Posts: 132
    edited 2006-01-10 21:13
    Bean:

    Interesting LED project you describe. As for other LED driver chips, I found a couple from TI for a project I'm working on. If you need brightness adjustability on 16 LED lines, check out TLC 5940 and/or TLC 5923. I like the 5923 because it's a little simpler, and still provides 127 brightness levels.

    Jim C
  • Paul BakerPaul Baker Posts: 6,351
    edited 2006-01-10 21:34
    Theres also the MAX7313, while it doesn't have all the capabilities of the TI devices (for instance it has a max LED voltage of 5V so it cannot be used in this application, and only has 16 levels of individual LED brightness), it does have the ability to set each channel (16) as input, output, or PWM, supports 25mA per channel simultaneous and is $.65 cheaper than the TLC5923. While each of the devices listed in this thread do pretty much the same thing, they all have a special neiche to fill.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·1+1=10

    Post Edited (Paul Baker) : 1/10/2006 9:37:22 PM GMT
  • jgjonolajgjonola Posts: 27
    edited 2006-01-11 08:45
    thanks for all the responses. I will look into a them and let you know how they worked out!

    John G
  • BeanBean Posts: 8,129
    edited 2006-01-13 02:28
    · If anyone cares, here is a picture of the 4" high 4-digit 7-segment green display.

    · I used a BS2(but the final project will be a SX28)·and STP16C596 and 4 PNP(2N3906) transistor with a 1K base resistor.
    You don't need any current limit resistors, just one resistor to set the current for all segments (that means equal brightness).

    · For size reference the development board in front of the display is the NX1000 24/40 board.

    · I'll try to get a schematic drawn and clean-up the code before I post it.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "SX-Video·Module" Now available from Parallax for only $28.95

    http://www.parallax.com/detail.asp?product_id=30012

    "SX-Video OSD module" Now available from Parallax for only·$49.95
    http://www.parallax.com/detail.asp?product_id=30015

    Product web site: www.sxvm.com

    "Ability may get you to the top, but it takes character to keep you there."


    Post Edited (Bean (Hitt Consulting)) : 1/13/2006 2:32:03 AM GMT
    811 x 533 - 73K
  • jgjonolajgjonola Posts: 27
    edited 2006-01-13 08:49
    Ok, I was looking at those chips, but they are a bit more complicated than I need. I am sorry, I should have been more clear in my original post. I am looking to put a board together that has an sx at its heart. It has an input pin that tells it to turn on, when activated, it starts a string of led's "crawling" so the first pin would be connected to 15 led's, second pin to 15 led's, and 3rd pin to 15 led's.


    like this:

    123123123123123123123123123123123

    As you can see, turning on pin 1, then 2, then 3 would make it look as if the led's are crawling. The 12v power source is not nessesary, I could just as easily use 5v. I'm just going to use a wall wart. There will be 13 of these boards connected to the same power supply, and there is a posibility that they would all be on steady at the same time.

    Thanks again,
    John G

    PS- Since i am in a hurry, I would be willing to pay for someone to design the schematics for me. (I really do want to tackle this myself, but time is running out) Contact me if you are interested!
  • BeanBean Posts: 8,129
    edited 2006-01-13 13:28
    John,
    I WOULD use the 12V supply. You will be able to put more LEDs in series with the higher voltage. With 5V you could only put 2 LEDs in series, with 12V you could put 5 LEDs in series.

    Basically you would have 3 strings of 5 LEDs and 1 resistor (220 ohms ?). Connect the one end of each string to +12V, connect the other end to a NPN (2N2222) transistor collector. Connect the transistor emitter to ground. Connect the transistor base to a 1K resistor, and the other end of the 1K resistor to an SX output pin. When the pin goes high the LEDs should light.

    Connect the other 2 strings (of 5 LEDs and 1 resistor) to +12V and to the SAME transistor collector.

    That takes care of 1 set of 15 LEDs.

    Now just repeat for the other 2 sets of 15 LEDs, using another transistor and another SX output pin.

    45 LEDs, 9 (220 ohm) resistors, 3 NPN (2N2222) transistors, 3 1K resistors.

    Sorry I don't have time to make a schematic right now.
    I hope this helps...
    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "SX-Video·Module" Now available from Parallax for only $28.95

    http://www.parallax.com/detail.asp?product_id=30012

    "SX-Video OSD module" Now available from Parallax for only·$49.95
    http://www.parallax.com/detail.asp?product_id=30015

    Product web site: www.sxvm.com

    "Ability may get you to the top, but it takes character to keep you there."
    ·
  • ElectronegativityElectronegativity Posts: 311
    edited 2006-01-13 16:09
    Hi Bean, is there any reason why Jgjonola couldn't work at 5V and put all the LED's on each string in parallel?

    They could be controlled in a simple manner from the SX by a Darlington array like this one, or equivalent:

    www.mouser.com/index.cfm?handler=displayproduct&lstdispproductid=748020&e_categoryid=279&e_pcodeid=51113


    ST makes a 5V regulator that puts out 5 amps and you can get it here for about $1.50:

    www.mouser.com/index.cfm?&handler=data.listcategory&D=*511LD1084D2M50TR*&terms=511-LD1084D2M50-TR&Ntt=*511LD1084D2M50TR*&Dk=1&Ns=SField&N=0&crc=true

    At 20mA/LED that's 250 LED's, and he could power the everything off the same supply.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    I wonder if this wire is hot...
  • BeanBean Posts: 8,129
    edited 2006-01-13 16:34
    Sure he could,
    But you would have to connect alot more resistors and it would be alot less power effecient.
    With a single LED and resistor you need 20mA per LED. With a string of 5 you need 20mA per 5 LEDs.
    So 5V @ 5 amps = 25Watts or 12V @ 1 Amp = 12Watts.
    Plus you would need heaver wire to carry the current.

    Depending on the physical construction it may make more sense to wire each LED individually though.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "SX-Video·Module" Now available from Parallax for only $28.95

    http://www.parallax.com/detail.asp?product_id=30012

    "SX-Video OSD module" Now available from Parallax for only·$49.95
    http://www.parallax.com/detail.asp?product_id=30015

    Product web site: www.sxvm.com

    "Ability may get you to the top, but it takes character to keep you there."
    ·
  • ElectronegativityElectronegativity Posts: 311
    edited 2006-01-13 17:00
    I am thinking of a situation with 15 20mA LEDs in parallel per string, and each string hooked up to one pin of the STP16C596.

    Since the driver can easily be set to output 300mA constant current per pin, you would only need a single resistor for all the LEDs.

    If power efficiency is an issue, the driver's supply voltage could be stepped down to slightly above Vf.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    I wonder if this wire is hot...
  • BeanBean Posts: 8,129
    edited 2006-01-13 17:44
    It's bad to connect LED in parallal without a resistor because each one will have a slightly different Vf voltage so you will get some bright LEDs and some dim LEDs.

    Besides the STP16C596 can only supply 120mA per output.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "SX-Video·Module" Now available from Parallax for only $28.95

    http://www.parallax.com/detail.asp?product_id=30012

    "SX-Video OSD module" Now available from Parallax for only·$49.95
    http://www.parallax.com/detail.asp?product_id=30015

    Product web site: www.sxvm.com

    "Ability may get you to the top, but it takes character to keep you there."
    ·
  • ElectronegativityElectronegativity Posts: 311
    edited 2006-01-13 17:59
    Hi Bean.

    Oops, you're right about the 120mA per pin, that would have been bad.

    If each LED has a slightly different Vf, then won't there be some bright and some dim regardless of whether they are in serial or parallel?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    I wonder if this wire is hot...
  • BeanBean Posts: 8,129
    edited 2006-01-13 18:19
    No, LED brightness is controlled by the amount of current that flows through them. In a series circuit all elements have the same amount of current flowing through them regardless of the voltage drop.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "SX-Video·Module" Now available from Parallax for only $28.95

    http://www.parallax.com/detail.asp?product_id=30012

    "SX-Video OSD module" Now available from Parallax for only·$49.95
    http://www.parallax.com/detail.asp?product_id=30015

    Product web site: www.sxvm.com

    "Ability may get you to the top, but it takes character to keep you there."
    ·
  • ElectronegativityElectronegativity Posts: 311
    edited 2006-01-13 18:24
    Thanks Bean, that's good to know.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    I wonder if this wire is hot...
  • BeanBean Posts: 8,129
    edited 2006-01-13 18:25
    Another thing you can do is connect 5 LEDs in series to +12V then through a 220 ohm resistor to a SX pin. The voltage drop through the diodes should be about 8.5 volts. That presents the SX pin with about 3.5V through the resistor. When the SX pin is high (+5) no current will flow, when the SX pin is low the LEDs will light and will only pull about 20mA from the SX pin.

    You don't need a transistor or anything. One SX pin controlling 5 LEDs.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "SX-Video·Module" Now available from Parallax for only $28.95

    http://www.parallax.com/detail.asp?product_id=30012

    "SX-Video OSD module" Now available from Parallax for only·$49.95
    http://www.parallax.com/detail.asp?product_id=30015

    Product web site: www.sxvm.com

    "Ability may get you to the top, but it takes character to keep you there."
    ·
  • jgjonolajgjonola Posts: 27
    edited 2006-01-14 05:26
    thanks everyone, i think that the last solution might be the best one. I would have to use more pins, but most of the other were going to be unused anyways...
  • StarManStarMan Posts: 306
    edited 2006-01-14 20:05
    Use a regulated supply so you know you're getting 12 volts.
Sign In or Register to comment.