We've all played with different transformers and power supplies that have an LED indicator that dims before going out entirely when the power supply is unplugged.

I'm working on designing an accent light which would involve a translucent crystal light source (probably made of resin or glass if I can find a cheap supplier) containing LEDs and certain electronics, and a base which would supply electrical current. For gamers, it might appear somewhat like a Welkynd Stone. My question is what is the simplest way to cause the LEDs to dim slowly (say over 2-10 seconds) when the crystal is removed from the base? Similar to the unplugged transformer, but with an intentional and controlled dimming.

I just purchased some LEDs and plan to build a test system over the next month or two. These LEDs are in a 5 meter strip divided into 3 LED series run in parallel and rated at 12v. I do not know the amp rating of the LEDs, but I'm guessing in the 20ma range (what I've read is average for bright white). I will probably use 4 series totaling 12 LEDs in the test build. LED strip link

If I have the transformer from AC power built into the base, I was guessing I could use a number of capacitors in parallel with a resistor to store electricity and slowly discharge it into the LEDs. But I'm a self-taught enthusiast so I honestly don't know if this would actually work. Nor do I know the number and ratings of capacitors and resitor that I would need.

If I have the transformer built into the crystal, the transformer and rectifier would retain a small amount of electricity, but I don't think it would be nearly enough to provide the effect I'm looking for, so something else would have to be added to make it last for several seconds.

A nicad battery with control electronics is literally my last resort for achieving this effect, and I'll probably give up on the idea before I go programming my own circuit board.

That's my main question. If anyone wants to toss in some thoughts on how to connect the crystal to the base, I'm open to suggestions. My original plan was to simply have a direct copper to copper connection with the base. But I've recently been considering an EM charging system (akin to a powermat or these wireless rechargable flashlights my dad has). The concern with the wireless is providing consistent power to the LEDs, though it is safer. I've also learned quite a bit already about constructing the power supply from perusing this SE site, but if anyone has any suggestions for that, too, I'm all ears. For the test build I'll probably hook it up to a computer power supply, or a laptop power supply if I can find a 12v one at Goodwill or the local electronics parts store.

If I get the test model to work, I plan on building possibly a dozen of these for accent lighting around my home.

  • 1
    \$\begingroup\$ When a transformer + diode bridge supply loses supply power, the gradual dimming of the output is primarily a function of the reservoir capacitors after the diode bridge, not of the transformer or bridge itself. What you would need first of all is a sufficiently large reservoir capacitor to hold sufficient energy for the slow dimming: In other words, the capacitor + load time constant needs to be correlated to the desired dimming duration. This is impossible to calculate without definitive or at least empirical data (use a multimeter) on the current drawn by the LEDs. \$\endgroup\$ Aug 26, 2013 at 5:13
  • \$\begingroup\$ Once you have the suitable capacitor to act as the energy store, basic decay dimming will work out of the box. For controlled dimming, typical would be a microcontroller generating a PWM signal with diminishing duty cycle, driving the LEDs through a BJT or MOSFET used as a switch. \$\endgroup\$ Aug 26, 2013 at 5:15
  • \$\begingroup\$ @AnindoGhosh Well, the LEDs arrive Tuesday (the same day fall classes start), and I have a multimeter so I ought to be able to provide some of that data sometime Wednesday. Should I test each series of 3 LEDs independently or 4 at a time or the entire strip or does it matter? Also, I am open to rough estimates based on averages. \$\endgroup\$
    – Thomas
    Aug 26, 2013 at 5:15
  • \$\begingroup\$ Test one set of 3, that will do fine. There aren't really any averages to work with, because LED strips can have a wide span of possible current requirements, from 10 mA to 100 mA or more, all in the 3528 chip LED form factor. Also you need to define how many seconds your desired fade should take. \$\endgroup\$ Aug 26, 2013 at 5:18
  • 3
    \$\begingroup\$ @Andyaka: Object at rest on/in pedestal, LEDs are fully lit. Object removed from pedestal, LEDs fade to nothing over 2-10s. \$\endgroup\$ Aug 26, 2013 at 12:24

2 Answers 2


The question aroused my interest enough to set up an experiment. I changed the question's parameters in one key aspect: Instead of an LED strip with multiple LEDs in series, I hooked up 3 blue LEDs (Vf = ~2.8 Volts each) in parallel, with a single 100 Ohm resistor to limit current to all 3, to a 0.047 Farad, 5.5 Volt coin type "motherboard supercap".

I know, sharing a resistor is really bad practice, so just use separate resistors for your own experiment.

The supercap was charged from a pair of AA alkaline cells (~3.12 Volts across capacitor after 3 minutes), then the wires to the battery were pulled out.


simulate this circuit – Schematic created using CircuitLab

While the dimming effect was an expected outcome, the results were startling: The LEDs stayed lit at diminishing intensity for over a minute after disconnecting the battery. Here is the video I took of the experiment.

The reason the LEDs stayed lit so much longer than expected is that a typical LED continues to be illuminated down to well under 5% of its nominal current - In the case of the LEDs I used, at around the 1 minute mark they were quite visible, if dim, with a mere 1 mA split between all three.

The LEDs finally dimmed to nothingness after perhaps 15 minutes.


  • A much smaller capacitance than the 0.047 Farad supercapacitor used here would be preferred for the purpose envisaged.
  • If one must use a 12 Volt 20 mA LED strip, instead of LEDs in parallel, then a set of 3 of these coin supercaps in series would work: The resultant capacitance of around 0.0157 Farad will provide a dimming duration closer to the OP's target of 2 to 10 seconds, instead of the unbearably long 1 minute dimming observed in the video.
  • The reason some previously posted capacitance calculations including my own 0.5 Farad comment were far off the mark is because the reducing current flow due to discharge, i.e. the very dimming effect being sought, was unaccounted for.
  • For any comments that might arise about the "unacceptably high" ESR of these motherboard supercaps, it is clear that theory needs to be backed up by practical experimentation, as done for this answer.

The supercapacitor I used is sold for under $2 a pair, including international shipping, on eBay:


Not quite the tens or hundreds of dollars that I, and others, had previously mentioned.

Addeddum thanks to discussion with @DavidKessener:

  • If using multiple supercaps in series and charged to a higher voltage for the string, than the individual capacitor's rated voltage, biasing resistors are required to prolong the life of the capacitors. Without these, the capacitors will charge unevenly, and will eventually die faster.
  • Based on this Maxwell appnote, and taking a leakage current per capacitor of 10 uA (the actual leakage current of these particular caps is much lower, so even safer), we get a 55 kOhm value for biasing resistors to pass 10 x 10 = 100 uA, so add 3 new 56k resistors as below, for using a 12 Volt supply and a 12 Volt LED strip


simulate this circuit

  • 1
    \$\begingroup\$ Wow! I think you just became my hero! I was going to pick up a used monster cap tomorrow and test that out, but this is a much more practical solution. I'll order those caps and start experimenting. This is a whole lot of effort to help me out, I really appreciate it! \$\endgroup\$
    – Thomas
    Aug 27, 2013 at 22:08
  • \$\begingroup\$ Thanks @Thomas. I just enjoy actually trying things out, so this was fun. \$\endgroup\$ Aug 27, 2013 at 22:11
  • \$\begingroup\$ I'll build the circuit as you have it laid out and post my results. Will there be any problem with adding or removing 3LED segments to that circuit to fine tune the dim time? \$\endgroup\$
    – Thomas
    Aug 27, 2013 at 22:19
  • \$\begingroup\$ @Thomas Post that video, I did exactly that - I added 6 more LEDs in parallel, at which point the dimming time dropped to a few seconds. \$\endgroup\$ Aug 27, 2013 at 22:20

The TL494 is usually used in power supplies as the control mechanism for a buck or boost switcher, but can easily be used for PWM control of a LED as well since each of its output transistors can sink 200mA.

Take a look at TI application report SLVA001E, "Designing Switching Voltage Regulators With the TL494 (Rev. E)", to see how to put it into single-ended mode and to use the DTC to control the PWM output; a RC circuit on the DTC pin should be sufficient to gradually reduce the duty cycle upon device removal.

TL494 Block Diagram


Here is an unoptimized circuit that can be used. Note that the fixture will need its own power supply for it to work.


simulate this circuit – Schematic created using CircuitLab

S1 can be either a lever microswitch or some sort of pair of contacts bridged with conductive material. When S1 is closed, DTC is held to 0V allowing maximum PWM duty cycle and therefore LED brightness. When S1 is disengaged, C1 slowly charges up through the R1/R2 voltage divider, slowly increasing the DTC voltage and thereby reducing the PWM duty cycle down to 5%.

  • \$\begingroup\$ OK, so the chip actually provides modulated power, which I read earlier is the "proper" way to dim LEDs. Definitely something I'll look into for my more refined models. Building the circuit is a bit complex for me right now, but I learn quick :) \$\endgroup\$
    – Thomas
    Aug 26, 2013 at 5:24
  • \$\begingroup\$ The chip uses PWM to turn the transistors on and off; the power is applied externally through the LEDs + transistors. \$\endgroup\$ Aug 26, 2013 at 5:25
  • 1
    \$\begingroup\$ Don't order directly from TI. Distributors such as Digikey or Mouser will let you purchase singles. \$\endgroup\$ Aug 26, 2013 at 6:28
  • 1
    \$\begingroup\$ Much more complex than the capacitor based solution, though. \$\endgroup\$
    – pjc50
    Aug 26, 2013 at 7:40
  • 2
    \$\begingroup\$ @IgnacioVazquez-Abrams Please consider your answer discredited, so we can avoid a certain person getting even more agitated than he is already: The title of the question states "when removed from power source", reinforced within the body of the question. Bad boy, Ignacio, bad! Naughty! Naughty! :-) \$\endgroup\$ Aug 26, 2013 at 12:48

Not the answer you're looking for? Browse other questions tagged or ask your own question.