Controlling LED intensity

Discussion in 'The Projects Forum' started by kballing, Oct 27, 2008.

  1. kballing

    kballing Thread Starter Member

    Joined:
    Jun 18, 2007
    18
    0
    A project that I am planning is an automated glockenspiel (xylophone) that uses a serial controller and a bunch of soleniods to bang out the notes. The instrument has 37 notes and the shift registers in the circuit have 8 channels each making 5x8 = 40 channels, 40-37 = 3 left over. So I was thinking of what to do with the other three channels. I thought, why not add light to the project and include a channel for R, G, and B leds. The circuit only controls on/off via transitors without dimming, which seemed a bit boring to me.

    I'm not asking for a detailed schematic or long lecture on LED physics, but what are some ways I can control the intensity of each LED so I can get more colors?

    I have a few piezo pickups that I got really cheap. One idea I had was to use the audio signal to modulate the LED intensity, but don't know where to start there.

    I don't know much about LEDs, but I can figure it out. Any other cool suggestions are welcome.
     
    #1
  2. bertus

    bertus Administrator

    Joined:
    Apr 5, 2008
    13,920
    1,752
    #2
  3. mik3

    mik3 Senior Member

    Joined:
    Feb 4, 2008
    4,846
    60
    Each leds illuminates only one colour,which depends on the material the led is contructed or more strictly on its badgap, unless it is a two or three colour led. You can vary the intensity (brightness) of the leds by varying the current through it but not its colour.
     
    #3
  4. StephenDJ

    StephenDJ Active Member

    Joined:
    May 31, 2008
    58
    0
    The original poster's project is very interesting (i'm a musician too). I'm assuming the shift registers are of the serial-in/parallel-out type. If it were possible to add an extra shift register, the 8-bit binary output of it could be feed into a resistor network to produce an analog voltage level that can vary the brightness of all LEDs that happen to be on at any one time. But you'll need a transistor operating in analog mode rather than switching mode to make this digital-to-analog scheme work, tho. Oh well, just a suggestion.
     
    Last edited: Oct 28, 2008
    #4
  5. kballing

    kballing Thread Starter Member

    Joined:
    Jun 18, 2007
    18
    0
    Thanks Bertus, a light/color organ is exactly what I was thinking about (I just forgot). StephenDJ, interesting idea, but not what I'm going for.

    I guess I can just use an op-amp for 3 band-pass filters, and then I'll probably put the LED under a cool engraved plexi-glass bezel.

    maybe if I get really ambitious I'll add a RGB led for each note and use the extra three channels to control the on/off state of each color so that I can modulate color according to how many notes are played or something.

    This thread isn't closed, new ideas are still welcome.
     
    #5
  6. wy6k

    wy6k New Member

    Joined:
    Nov 4, 2008
    1
    0
    The accepted way to do this is to drive the LEDs with a pulse train. By varying the duty cycle, you can vary the intensity. The beauty is that you can do this totally digitally, under program control - no analog stuff.

    You can either send a pulse train on each of the three channels or you could build it to send a control word that specifies the duty cycle and then let the logic in the unit convert that control word to a pulse train. When you want to change the duty cycle, and therefore the intensity of each color, you send a new control word.
     
    #6
Loading...