Electronics Fading LED's?? Please help!

Discussion in 'Modding' started by Satyric_saint, 20 Oct 2006.

  1. Satyric_saint

    Satyric_saint What's a Dremel?

    Joined:
    4 Aug 2004
    Posts:
    265
    Likes Received:
    0
    I'm in the midsts of making my Halloween costume and I need a question answered about a (hopefully) simple circuit.
    I have 4 super bright LED's and I understand how to wire them together to work off of a 9V Battery but instead of them just coming on when I push the switch I want them to fade on gradually but not to slowly then when I flip the switch to off I want them to gradually go off at the same rate. I need to keep this as small as possible. (needs to fit into something quarter sized and only like 2 inches deep) Thanks for any help. :wallbash: :D
     
  2. japala

    japala What's a Dremel?

    Joined:
    8 Dec 2001
    Posts:
    503
    Likes Received:
    9
  3. Satyric_saint

    Satyric_saint What's a Dremel?

    Joined:
    4 Aug 2004
    Posts:
    265
    Likes Received:
    0
    In the words of Weird Al "Close but no cigar" Though it is a really cool concept. I was looking for more of a "Click-fades on to bright, Click-Fades off from bright" kind of result. :thumb: thanks though.
     
  4. JCG

    JCG What's a Dremel?

    Joined:
    1 Dec 2005
    Posts:
    396
    Likes Received:
    0
    Just guesing now but wouldn't a cap parallel to the led do the trick?
    So you get battery -> switch -> resistor -> led and capacitor parallel -> back to battery

    When you flick the switch the cap get charged but the resistor limited the current. When the voltage over the cap is high enough the led will light up. And when you turn the switch off the cap will empty himself and the led will fade out. But the last part I'm not sure about, because a led isn't voltage driven.
     
  5. Satyric_saint

    Satyric_saint What's a Dremel?

    Joined:
    4 Aug 2004
    Posts:
    265
    Likes Received:
    0

    I'll check into it and see if that will work. I have seen LED's fade on and off so I know its possible I'm just not sure what I exactly need to make it work and fit in a small space. :eyebrow:
     
  6. jakenbake

    jakenbake full duplex

    Joined:
    5 Jun 2005
    Posts:
    495
    Likes Received:
    3
    r-c circuit into a BJT to led
     
  7. Frogmonster

    Frogmonster What's a Dremel?

    Joined:
    14 Oct 2006
    Posts:
    76
    Likes Received:
    1
    Last edited by a moderator: 23 Oct 2006
  8. cpemma

    cpemma Ecky thump

    Joined:
    27 Nov 2001
    Posts:
    12,328
    Likes Received:
    55
    This should work, the transistor can be any little NPN with gain over 100. For a slower fade increase the capacitor size. Use 2 parallel strings of 2 LEDs with a resistor to limit current to about 10mA in each string.

    [​IMG]
     
    Last edited: 22 Oct 2006
  9. sjeeske

    sjeeske What's a Dremel?

    Joined:
    24 Oct 2006
    Posts:
    2
    Likes Received:
    0
    question

    Hi,

    I've justed build this little circuit above and I have a question. Can I regulate the fading time by adding a resistor in parallel with the cap. I've already replaced the 15K resistor with a diode to get a quicker "on" response and this works.
    What do think about the resistor guys and girls? Whitch value?

    Greetz
     
  10. cpemma

    cpemma Ecky thump

    Joined:
    27 Nov 2001
    Posts:
    12,328
    Likes Received:
    55
    Welcome to Bit, sjeeske! :thumb:

    Fade time is governed by the size of the cap and the load (the LED current); say it's 20mA. If the transistor has a gain of 100, the transistor base current will be limited to 0.2mA, falling as the cap discharges and the LEDs get dimmer. Anything that speeds up the cap discharge, like a resistor across it, will speed up the dim. A 47k resistor would roughly halve the dim time, or use a 100k pot with a series 1k resistor to vary the time and limit the maximum discharge current.

    There's no need for the diode for a fast turn-on, the open switch stops the cap charge from discharging that direction.
     
    Last edited: 24 Oct 2006
  11. Satyric_saint

    Satyric_saint What's a Dremel?

    Joined:
    4 Aug 2004
    Posts:
    265
    Likes Received:
    0


    You'll have to excuse my total newbness when it comes to this kind of stuff

    So I need??

    1 - 15k Ohm Resistor
    2 - 68 Ohm Resistors
    1 - 220uF Capacator
    1 - NPN Transistor 2N3904
    4 - LEDs
    1 - 9v Battery

    Is there anything special I need to look for when hunting down these components? Also if you can I was thinking that a 3 second fade would be great and since your speaking greek to me what would I need to replace with what to get to that or close to that. I really appreciate this guys

    As a side question if I wanted to install a 2 way switch and I have a small board that randomly makes a set of 4 leds fade on and off would this layout work? The first circuit is what I wanted (I think) but I thought maybe an add on would look nice where the multicolored ledboard added to it would look good when I flipped the switch one would fade out as the other single colored LEDs fade on so I can go from multi blinking colors to a single color with the flip of a switch and have a awesome transition between the 2. I'm probibly making this too complicated but it seems cool in my minds eye.

    [​IMG]

    :worried: sorry if I'm getting annoying with the questions.
     
    Last edited: 25 Oct 2006
  12. Satyric_saint

    Satyric_saint What's a Dremel?

    Joined:
    4 Aug 2004
    Posts:
    265
    Likes Received:
    0
    Hello? Anyone? :confused:
     
  13. jakenbake

    jakenbake full duplex

    Joined:
    5 Jun 2005
    Posts:
    495
    Likes Received:
    3
    the 15k resistor and the 220uF capacitor create a RC time constant. google "RC time constant" to find the equation and how it relates to the amount of time fading that you want.

    note that the 68 ohm resistor limits the current sent to the LED's. therefore, for your additional circuit that you added, a 68 ohm resistor may not do the job, you may have to go up or down. we would need more information on the "small board with leds that blink in sequence" board (like a schematic) if you want us to provide exact values. there are stickys that explain the whole LED and current limiting resistor if you wish to do it yourself.

    edit:
    rc time constant: http://www.tpub.com/neets/book2/3d.htm
    time = R(in ohms) * C(in farads)
    note that its in ohms, not K-ohms and farads, not micro-farads as are on the schematic

    info on leds:
    http://forums.bit-tech.net/showpost.php?p=927009&postcount=9
     
    Last edited: 26 Oct 2006
  14. Satyric_saint

    Satyric_saint What's a Dremel?

    Joined:
    4 Aug 2004
    Posts:
    265
    Likes Received:
    0

    After much hunting I get 3.3 sec. of fade time out of 15K and 220uF. I might be able to show you a layout of that board come Saturday I'll try to get it posted ASAP If you can help by monday at the latest it would be great if not thanks for the help anyway. :clap:
     
  15. cpemma

    cpemma Ecky thump

    Joined:
    27 Nov 2001
    Posts:
    12,328
    Likes Received:
    55
    The circuit I posted has the transistor acting as a voltage follower on the capacitor charge level. It's not a "switch", it's a "tap valve".

    See http://forums.bit-tech.net/showpost.php?p=650633&postcount=7
     
  16. Satyric_saint

    Satyric_saint What's a Dremel?

    Joined:
    4 Aug 2004
    Posts:
    265
    Likes Received:
    0

    The circuit you posted has a symbol marked with a SW1 which implies and on off switch is present I just want to swap that out with an on off on switch so that when the switch is in the 2nd on position the 2nd circuit comes on and the 1st circuit goes off.
    [​IMG]
     
  17. cpemma

    cpemma Ecky thump

    Joined:
    27 Nov 2001
    Posts:
    12,328
    Likes Received:
    55
    You don't need the resistor, capacitor and transistor in the second circuit, just a SPDT switch instead of my SPST, to switch 9V to the second circuit.
     
  18. jakenbake

    jakenbake full duplex

    Joined:
    5 Jun 2005
    Posts:
    495
    Likes Received:
    3
    but he still wants the second circuit to fade...

    i'm confused if you already have the circtuit Satyric_saint or if your designing it...

    anyway, post the board and i guess we'll see.
     
  19. Satyric_saint

    Satyric_saint What's a Dremel?

    Joined:
    4 Aug 2004
    Posts:
    265
    Likes Received:
    0
    Yea I want them both to fade on and off. :thumb: Actually I was trying to make this easy for myself and I was just going to buy one of those el-cheap-o bases that people put under those silly laser etched blocks (i.e. http://www.voga.co.uk/product-detail.php?id=560 )
     
  20. cpemma

    cpemma Ecky thump

    Joined:
    27 Nov 2001
    Posts:
    12,328
    Likes Received:
    55
    You'll have to find out what happens with the flashing module when you steadily reduce the supply voltage. It may just go off rather than fade.
     

Share This Page