Controlling LED intensity

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

  1. kballing

    kballing Thread Starter Member

    Joined:
    Jun 18, 2007
    Messages:
    18
    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.
  2. bertus

    bertus Administrator Staff Member

    Joined:
    Apr 5, 2008
    Messages:
    12,611
    Location:
    Amsterdam,Holland (GMT + 1)
  3. mik3

    mik3 Senior Member

    Joined:
    Feb 4, 2008
    Messages:
    4,846
    Location:
    Cyprus, but now in UK (GMT+0)
    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.
  4. StephenDJ

    StephenDJ Active Member

    Joined:
    May 31, 2008
    Messages:
    54
    Location:
    Mississippi
    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
  5. kballing

    kballing Thread Starter Member

    Joined:
    Jun 18, 2007
    Messages:
    18
    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.
  6. wy6k

    wy6k New Member

    Joined:
    Nov 4, 2008
    Messages:
    1
    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.
Similar Threads
Forum Title Date
The Projects Forum Controlling Multiple Solenoids by varying voltage Aug 5, 2014
The Projects Forum Controlling Fans' speed with potentiometers! Jul 22, 2014
The Projects Forum Need help with relay for controlling electric projector screen, schematic included May 11, 2014
The Projects Forum controlling 12 volts with 3.5 volts May 7, 2014
The Projects Forum how can i reduce speed of motor with controlling its direction May 1, 2014

Share This Page