Connect with us

LED control circuit

Discussion in 'Electronic Basics' started by bob, Nov 4, 2004.

Scroll to continue with content
  1. bob

    bob Guest

    Im looking for a circuit to control 5 banks of 4 LEDs
    I want to use a single potentiometer, so as you turn
    the pot the first set of 4 LEDs start to light up and as
    they reach full brightness, I want the second bank to start
    lighting up, as they reach full brightness etc etc until all
    5 banks are at full brightness when the pot is at full throw.
    It need to give a nice smooth transition from one bank to
    the next, not just switching on one after the other.
    Not sure if this makes any odds but im thinking of using white LEDS.

    Thanks in advance

  2. Dmitri

    Dmitri Guest

    bob wrote:

    National Semiconductor has a series of display drivers for white LED, like
    this one:

    Check out their application notes, maybe you'll pick up some ideas there.
    It does seem that you'll also need to use a microcontroller with an ADC to
    accomplish what you are trying to do.

    Dmitri Abaimov, RCDD
    Cabling Forum, color codes, pinouts and other useful resources for
    premises cabling users and pros
    Residential Cabling Guide

    Article posted with Newsgroup Archive
    no-spam read and post WWW interface to your favorite newsgroup -
    sci.electronics.basics - 5359 messages and counting!
  3. I beleive there is no easy way doing this without using voltage comparators.
    If you choose comparators, you're building an 2 bits A/D converter.
    Tell me if I'm wrong, but I believe I'm right.

  4. 4x5...or 20 all together.
    How much overlap? In other words, only *after* the first bank reaches full
    intensity does the next one start to 'show?' Or sometime beforehand? How much
    overlap? Does it need to be adjustable?
    Gradual intensity increase, then. Either controlling current or PWM, I guess.
    Yes, that affects the voltage requirements and.. possibly, the current. Are
    these like those Luxeon multi-watt things? Or just simple white, non-descript
    LEDs (radio shack style)?

    In pure analog hardware, I believe this would either require some remarkable
    ingenuity and creative insight to make it simple (if possible); or else it may
    be done with a micro using PWM for intensity control.

  5. bob

    bob Guest

    "> 4x5...or 20 all together.

    No overlap at all, no need to adjust

    Non descript, simple "white" LEDs
    Hmmmm, thats a bit beyond my me , how about a five postion rotary switch
    and some kind of delay/ramp/decay etc arrangement so the LEDs take about one
    second to reach full brightness and one second to extinguish when switched off ?
    is that analogally possible?

    Thanks again
  6. Brian

    Brian Guest

    There is no question that a PIC chip would be the best thing to use. You
    can do it the old fashion way. It will take more circuitry though. I drew up
    a schematic for the old fasion way. You can see it at Take a look at it and see what you think.
  7. One thing to do would be to use the capabilities of the opamp to map the
    values appropriately, while using the fact that the output is clipped to
    the power rails.

    I would use a dual rail-to-rail opamp for each of the 5 LED circuits.
    Each would look like this (view with courier font):

    12V | |
    500k / /
    .----/\/\/-----. \ 47R \ 47R
    | | / /
    pot 100k | | \ \
    trimmer-/\/\/-. | | | |
    | | |\ | | |
    100k o----o---|-\ | .o-. .-o.
    | | >-------o | | | | 2 3.6V LEDs
    Vy ----/\/\/-' .---|+/ | '-o' 'o-' in series
    | |/ / | |
    | 47k \ | |
    ' / ----o---|
    / \ |
    \ 47k | |\ |
    / o-----|+\ |/
    \ | | >--| NPN
    | | .--|-/ |>
    | | | |/ |
    6V | '----------o
    | |
    / |
    \ \
    1k / /
    \ \ 10R
    | /
    GND | |

    Vy for each is one of A - E
    12V--- [1k] -A- [2k] -B- [2k] -C- [2k] -D- [2k] -E- [1k] --- GND

    created by Andy´s ASCII-Circuit v1.25.250804

    When the voltage at the trimmer is varied from 0V to 12V, the circuit
    will vary the current through the LEDs. The clipping will occur at
    different places, depending on the value of Vy.

    If the voltage at Vy is E, which is 1.2V, then the output will
    (mathematically) range from 0 to 60V. However, the output is constrained
    to be within the power rails of the opamp, so it'll really go from 0 to
    12 as the input goes from 12 to 9.6V, and then stay at 12V while the
    input goes the rest of the way to 0V. This will make the output current
    through the LEDs go from 0 to 12mA only on the first 1/5 of the range
    from 12V to 0V of the pot trimmer.

    Likewise, for the second segment, set Vy to be D, which is 3.6V. Then,
    mathematically, as the input goes from 12V to 0V, the output of the
    first opamp will go from -12 to 48V. However, again, its clipped, so the
    real action from 0 to 12V on the output will occur during the 2nd 5th of
    the input range, and so the LEDs will be off from 0 to 1/5 of the input
    range, will vary on linearly from 1/5 to 2/5 of the input range, and
    will be completely on for the rest of the range.

    Likewise for the other three LED drivers, using C will make the change
    during 2/5 to 3/5 of the input range, using B will make the change
    during 3/5 to 4/5 of the input range, and using A will make the change
    during the last 1/5 of the input range.

    The opamp should be rail-to-rail, otherwise the mappings won't be as
    exact. Also, the current through an LED isn't linear with its
    brightness. Doing that requires a multiplier.

    The 6V input voltage can be obtained from C. However, that might mess up
    the comparison voltages. I'd actually use a 1k/1k voltage divider from
    12V to GND.

    Robert Monsen

    "Your Highness, I have no need of this hypothesis."
    - Pierre Laplace (1749-1827), to Napoleon,
    on why his works on celestial mechanics make no mention of God.
  8. Sounds like a concept. But a little different from how I first read what you
    said (which seemed to be an entirely analog adjustment so that you can back off
    a bit, more back forward, etc.) If you use switches, the brightness of the
    first row is entirely controlled by time, I guess (your hypothetical 'one
    second'), rather than the position of the potentiometer. So how does all the
    row get reset back to 'off', after the time expires and it is at its brightest,
    so that you can restart that row? The concept seems a bit more fuzzy to me,
    now, than it was.

  9. Do you want each of the 4 LEDs in a bank to have identical brightness
    at any instant? Or are all 20 LEDs to be illuminated successively?

    In either case, you might consider an approach based on the 3914.
    Here's the data sheet.
  10. bob

    bob Guest

    Do you want each of the 4 LEDs in a bank to have identical brightness
    4 LEDS in one bank need to light at the same time, effectively the
    same as just one large LED but I need wider light coverage.

    Ive had a look at the LM3914 and it might just do what I want
    maybe even better, could I drive 4 LEDS from one output?
    What im trying to build is an iris effect, where an iris diaphragm uses
    lots of thin metal blades that slide over each other to reduce and aperture,
    all I want to do is to crudely simulate this movement with LEDs.
    So I was planning 5 consecutive rings of frosted glass/perspex etc
    that fit inside each other, and light them from behind with LEDs.
    Then drive the LEDs (rings) so the light aperture appears to get bigger and smaller.
    With the 3914 I may increase the number of rings to make the effect a bit

    Thanks for your help so far.


  11. First, the correct URL is:

    As you see there, output current is programmable from 2 mA to 30 mA.
    So yes, you could just about drive 4 LEDS from one output, but for
    high brightness, high current LEDs I expect a transistor stage would
    be necessary.

    Achieving the gradual increase in brightness for each ring (with up to
    10 rings possible from one 3914) should be quite an interesting
    challenge though. For just a single ring, your pot could connect pin 7
    to ground, and LED current would then be linearly dependent on its
    setting. But to use the same single pot so that it successively
    switched on additional rings, preserving the exact brightness of
    earlier rings 1, 2, N-1, while again gradually increasing the
    brightness of the Nth, as it was rotated from min to max, that's a bit
  12. bob

    bob Guest

    One web site stated that ...

    " With pin 9 not connected (floating), it is functioning in 'DOT' mode. Meaning,
    it will light up one led at a time. If you wish to use the 'BAR' mode, then
    connect pin 9 to the positive supply rail, but obviously with increased current consumption"

    Is "BAR" mode what I would need to achieve the effect im after?

    Al the best
  13. Yes. See the application notes on the data sheet.
  14. CFoley1064

    CFoley1064 Guest

    Subject: Re: LED control circuit
    <snip OP question and creative, elegant answer>

    You win the Robert Pease Award for the week! Not only that, but you've got me
    laughing at a napkin sketch I made over coffee this morning using an A-D
    converter with the top 3 bits determining which LEDs are fully on, the lower 5
    bits going through a resistor network to a level shifter and PWM circuit, and a
    lot of combinational glue logic to determine which LEDs are fully on and which
    one gets the PWM signal.

    Of course, a PIC is a good solution, too, but not nearly as fun.

  15. Thanks, Chris. I was afraid the description was so poor that nobody
    (including the OP) would be able to figure it out.

    One amazing thing to me was that the reference voltages for the
    different sections was so simple to generate. I'm guessing that the same
    strategy can be used for any number of sections (although the feedback
    resistor will need to be changed too, depending on the number of sections.)

    Robert Monsen

    "Your Highness, I have no need of this hypothesis."
    - Pierre Laplace (1749-1827), to Napoleon,
    on why his works on celestial mechanics make no mention of God.
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day