Instructables

Step 2: Schematic and brief explination

Picture of Schematic and brief explination
PDR_0003.JPG
Both modes ( fade on fade off, and instant on and fade off) use the same schematic, the slight difference between the two will be told later on

As drawn, it is setup as fade in and fade out... for the instant on, fade out version you can remove 1 part and you might be okay, but that one part prevents a very short (time wise) short circuit when first triggered,  and is generally a bad idea to omit the extra resistor, especially if your using current sensitive components to trigger the effect

So plan on 9 components no matter what, if you are feeling lucky you could go for 8, but its not advised (even though the short circuit is only very very brief)

How this works is as follows, when you switch +V the cap C1 is slowly filled though R1, if C1 is totally devoid of energy it is a short to ground, as time passes ( depending on the value of R1 vs C1) the capacitor becomes less and less of a short to ground, which is connected to the base of T1, as the current increases T1 passes more and more lighting up the LED

when you let go of the button voltage slowly comes from the storage of the capacitor,  back though the led fading it out, BUT once you hit a certain point the current will only barley pass though the LED (leaks), this presents a problem as the cap can sustain a couple volts for a few minuets, which causes the LED to glow for a long time (in the scale of things)

SO! the second transistor comes in, and is setup in reverse so that when the voltage on the base (provided by the capacitor) stays high  enough it switches the cap to ground, thus providing a path for the cap's current to discharge( otherwise the current is too weak to make a difference while the switch is held ) , the end effect is that the "fill up" time of the cap is roughly the same as its discharge rate, Instead of filling up in a second and never really fully discharging causing the led to glow for a long time
 
Remove these adsRemove these ads by Signing Up
vitya3 years ago
Just an idea: if you remove T2 altogether and put a diode between R3 and GND it works OK. See the attached image (I built it and it works with the given values.
my 0.02USD
LEDfader.png
lunerfox3 years ago
I was able to successfully implement this Circuit by changing R1 from the proposed 10k ohm to 1k ohm. Just an FYI for anyone attempting this.
osgeld (author)  lunerfox3 years ago
yea its not too picky, it either works or it doesnt
bdneeley3 years ago
Unless I am badly mistaken, transistor T2 has the collector and emitter backward. The way this is drawn, the emitter will ALWAYS be positive with respect to ground (and the collector). In addition, the base-emitter junction will only be forward biased when the switch is depressed. The picture of the breadboard appears to have the T2 emitter wired to ground (the way it should be).

 I hate to be critical, but the schematic shows a SPST (single pole single throw) switch, not a momentary closed pushbutton.

Otherwise, this is an excellent little project.
He does say on the first step that he's using an SPST, doesnt he?
Yeah, T2 is reverse biased. There's no way it can be switched to active state if the voltage at Emitter is greater than Colector's. Anyway, that's a clever design.