LEDs, current and PWM


Closed Thread
Results 1 to 11 of 11
  1. #1
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    2,601

    Default LEDs, current and PWM

    I have one panel of my project that will consume 5.34 amps when I turn on all indicators using a TEST button. These are all standard LEDs, 7-segment LEDs and 14-segment LEDs; assuming 20mA each LED using 330R resistors and 5 VDC. I counted each segment as an individual LED in my tally.

    My plan is to use PWM and transistors to decrease current consumption. Is there a quick rule of thumb that I can use to get a general idea on what to expect?

    Or can I PWM a single LED, check the current and use that as new baseline instead of 20mA? Or is there more going on when hundreds of LEDs are involved with PWM?

    Robert "The PWM Noob"

  2. #2
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,615


    Did you find this post helpful? Yes | No

    Default Re: LEDs, current and PWM

    Hi, Robert zeu Great Moderator

    What's your question ??? : I have 267 Led segments on my circuit and I want to test them. But @ 20 mA each, and all together ... that draws 5.34 amps ...

    OK ...

    Now ... the questions

    1) is it compulsory to test them all together at the same time ( and is it possible ? - some multiplexing used or not ??? )
    2) you absolutely need 20 mA per segment ???

    PWM won't do anything for you ... cause you have to give some energy to light on your leds - whatever the way you provide it - just to be able to see them glow.
    a switching supply only could allow you to start from a higher voltage DC "mains"

    From that you could understand to reduce the current draw, you could quickly test groups of leds after groups ... ( say 7 seg, then 14 seg, then leds ... i.e )
    second way would be to use lower current for the test ... but that needs some scheme watching to tell if possible !

    No miracle when energy speaking ... never !

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  3. #3
    Join Date
    Jan 2006
    Location
    Istanbul
    Posts
    1,185


    Did you find this post helpful? Yes | No

    Default Re: LEDs, current and PWM

    You may want to use this one.
    MBI5026
    16-bit Constant Current LED Sink Driver.
    Output led current can be adjusted with a single resistor.
    and also you can use OE pin for PWM input to dim the leds.
    Last edited by sayzer; - 28th March 2012 at 18:47.
    "If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte

  4. #4
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    2,601


    Did you find this post helpful? Yes | No

    Default Re: LEDs, current and PWM

    Alain, I can't test a few LEDs at a time. The idea is to light up the hole board to make it easy to spot non-working LEDs. I have 4 preliminary panels drawn so far, at least 1 more to go and they look like this:



    I guess I could turn them on and off in sequence real fast, that should be just as good.

    Robert

    Light blue = rotary switches
    Purple = rotary encoders
    White = pushbutton
    Red = pushbutton

  5. #5
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,615


    Did you find this post helpful? Yes | No

    Default Re: LEDs, current and PWM

    Hi, Robert

    just consider you need a certain amount of energy to make your lights glow ...

    WHATEVER the way you give them that energy.

    NO miracle, as I told you ...

    so, the only way to get them all together lit is to reduce current to the minimum " readable " ... ( here PWM can be useful ... )

    or use very high efficiency leds ... as there's a lot here ... current can be reduced to ~ 5 mA per Led to get a nice visible glow.

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  6. #6
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,809


    Did you find this post helpful? Yes | No

    Default Re: LEDs, current and PWM

    You can increase the current to the maximum the LED's can accept in pulse operation and then light them in turn with a low duty cycle.

    Ioannis

  7. #7
    Join Date
    Jan 2006
    Location
    Istanbul
    Posts
    1,185


    Did you find this post helpful? Yes | No

    Default Re: LEDs, current and PWM

    May be I should have been more specific.

    Check MBI5026.
    This is a shift register. Use as many as you need.
    And the current can be adjusted.
    "If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte

  8. #8
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    2,601


    Did you find this post helpful? Yes | No

    Default Re: LEDs, current and PWM

    AN234, figure 11
    http://ww1.microchip.com/downloads/e...tes/00234a.pdf

    Name:  AN234 fig 11.jpg
Views: 3049
Size:  91.4 KB

    This is the technique I meant by blinking the LEDs in sequence (multiplexing right?).

    - Let's say a complete 7-segment LED consumes 20mA.
    - If I turn Q1 on/off, then Q2 on/off, and so on, really fast.

    Wouldn't it only consume 20mA since only one 7-segment is lit at one time?

    The human eye would see them as all on, no? Kind of like screen refresh rates.

    Robert

  9. #9
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,809


    Did you find this post helpful? Yes | No

    Default Re: LEDs, current and PWM

    If you light a LED for 10% of the time, fast enough, then your eye will of course see it ON but not bright. Maybe not 10% of the LED normal brightness but sure dim. So you have to increase the drive current.

    That is what Alain meant by "No miracle when energy speaking ... never ! "

    Ioannis

  10. #10
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    2,601


    Did you find this post helpful? Yes | No

    Default Re: LEDs, current and PWM

    Ok, so multiplexing LEDs really is the same as PWM but in a group.

    Time-sharing lightbulbs.

    I guess I won't have a choice but to make a compromise on what Alain suggested; PICs go through a pre-programmed sequence lighting a group of LEDs across all panels.

    Robert

  11. #11
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    2,601


    Did you find this post helpful? Yes | No

    Default Re: LEDs, current and PWM

    Quote Originally Posted by Acetronics View Post
    ...

    or use very high efficiency leds ... as there's a lot here ... current can be reduced to ~ 5 mA per Led to get a nice visible glow.

    Alain
    I put 16 high efficiency LEDs on a MCP23016 just to see what it looks like. They were just a bit too bright full on, so they come out just about right when pulsed in sequence, and current is kept at a minimum.

    I could even use a bit lower than the regular 330ohms too.

    Robert

Members who have read this thread : 2

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts