Electronics newb LED question...

Discussion in 'Modding' started by tommarndt, 10 Nov 2003.

  1. tommarndt

    tommarndt What's a Dremel?

    Joined:
    10 Nov 2003
    Posts:
    6
    Likes Received:
    0
    ok, i know that i need to have a resistor and a capacitor to achieve a fading LED effect.
    Now for the newb question...
    say i have 10 switches on my case and 10 LEDs, when I flip one i want a LED to light up, then when you flip the switch off, have the LED fade out. I want that effect for all 10 switches.
    Is there a way to wire it up so i combine the resistors and capacitors so i don't have to use 10 of each?
    Thanks.
     
  2. whypick1

    whypick1 The über-Pick

    Joined:
    17 Oct 2002
    Posts:
    2,014
    Likes Received:
    2
    No.

    Let's say that you already tried it, and the wiring looks something like this:

    Code:
    +5v- - -v^v^v^v- - -||- - - -GND
                    |-v^v^v--|>|--|
                    |-v^v^v--|>|--|
                    |-v^v^v--|>|--|
                    |-v^v^v--|>|--|
                    |-v^v^v--|>|--|
                    |-v^v^v--|>|--|
                    |-v^v^v--|>|--|
                    |-v^v^v--|>|--|
                    |-v^v^v--|>|--|
                    |-v^v^v--|>|--|
    
    The fading effect occurs because electricity always takes the shortest path to ground. When first on, the short path is through the first resistor and cap. The cap takes time to fully chrage up, ~ 5 time constants (R*C). At 1 time constant, current will start to be diverted from the cap and go to the rest of the circuit. It'll be a small amount at first, but it'll grow just as the amount of current going to the cap shrinks, until the cap is almost fully charged (it can never be fully charged).

    Now, let's say you put a switch in front of all the LEDs. When this circuit is first active, current is still going to go through the RC circuit. So, for example, if you were to not turn on any of the LEDs until after 5 time constants, then they'd be at full brightness instantly because the cap is as fully charged as it can be and is not taking any current away from the rest of the circuit.

    So in short, you'll need 1 RC circuit per LED.
     

Share This Page