1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Electronics RGB LED controll with PWM

Discussion in 'Modding' started by Transience, 19 Nov 2006.

  1. Transience

    Transience What's a Dremel?

    Joined:
    19 Nov 2006
    Posts:
    2
    Likes Received:
    0
    I recently got several High Flux LED's, and i want to use them to light up my computer any color. I know i should use pulse width modulation to do this, but i want to use a potentiometer so i can adjust the color manually, as opposed to using a microcontroller to cycle through different colors. I've found a few PWM circuits online, but they're designed for motor controll, not LED controll.
    Here are the circuits that i've found:

    http://www.dprg.org/tutorials/2005-11a/index.html

    http://www.bit-tech.net/modding/2001/12/03/pwm_fan_controller/1.html

    will any one of these do? Or is there something i'm missing?
     
  2. SteveyG

    SteveyG Electromodder

    Joined:
    23 Nov 2002
    Posts:
    3,049
    Likes Received:
    8
    The usual way to do this without a microcontroller or PWM controller is to create a sawtooth wave with a pair of op-amps. A triangle wave will also work, but the brightness will increase more rapidly with a turn of the potentiometer. Then feed the triangle wave into an op-amp set up as a comparator. The other input of the comparator is your input (from the potentiometer) so that when the voltage has ramped up to the level at the input, the output turns on until the next cycle. This gives you your PWM.

    Edit: I forgot to add, you can use the same triangle wave generator for as many different channels as you want. You just need to add a comparator for each stage.
     
    Last edited: 19 Nov 2006
  3. Lardarse

    Lardarse What's a Dremel?

    Joined:
    17 Nov 2004
    Posts:
    25
    Likes Received:
    0
    How do you generate a sawtooth wave?
     
  4. LuitvD

    LuitvD What's a Dremel?

    Joined:
    13 Aug 2006
    Posts:
    263
    Likes Received:
    0
    an electrolytic capacitor parallel on a ceramic capacitor is one way to do this... you can also use an NE555 to generate some sort of signal for PWM... I'll ask my friend for some sort of schematic, he has already made one lately :D
     
  5. SteveyG

    SteveyG Electromodder

    Joined:
    23 Nov 2002
    Posts:
    3,049
    Likes Received:
    8
    Google: opamp sawtooth generator
     
  6. Lardarse

    Lardarse What's a Dremel?

    Joined:
    17 Nov 2004
    Posts:
    25
    Likes Received:
    0
  7. fat-tony

    fat-tony What's a Dremel?

    Joined:
    26 Mar 2006
    Posts:
    23
    Likes Received:
    0
    I realize that you've already expressed a desire to not use a microcontroller, but I think that that perspective may be misplaced.

    Many micros have built-in ADCs. This would allow you to hook your pots up to the ADCs, and have it read the value from the pots and adjust the PWM outputs. The reason I suggest this is cost and ease of implementation. With a micro, you don't have to dick around with a bunch of discrete components with varying tolerances to try to get the perfect waveform out.
     
  8. cpemma

    cpemma Ecky thump

    Joined:
    27 Nov 2001
    Posts:
    12,328
    Likes Received:
    55
    This circuit will give pot-control of LEDs from off to full. Make C1 22nF-47nF to avoid any flicker,
     
  9. SteveyG

    SteveyG Electromodder

    Joined:
    23 Nov 2002
    Posts:
    3,049
    Likes Received:
    8
    That's the shizzle :)
     
  10. Transience

    Transience What's a Dremel?

    Joined:
    19 Nov 2006
    Posts:
    2
    Likes Received:
    0
    cpemma-

    i can't seem to load the page you linked. perhaps because i'm in the US?

    EDIT--
    It works now.
     
    Last edited: 21 Nov 2006
  11. LuitvD

    LuitvD What's a Dremel?

    Joined:
    13 Aug 2006
    Posts:
    263
    Likes Received:
    0
    strange, didn't know it was your site, but I saw it before when looking for PWM circuits :) nicely done cpemma
     

Share This Page