…with as few components as possible. Sorry for the blur, it was dark.

Power switch box with LED backlight

Here’s a box ioch made. It has eight quality thumb switches for their reliable “clunk!” and four backlight LEDs, mainly for the flare. To power LEDs from the mains, though, you’d need a transformer. That’s bulky, expensive and unimaginative.

So what’s the smallest schematic one could have, if 50 Hz flicker was not a problem? John remembered seeing something like this on the internet (and I zoomed out as much as I possible to make it even smaller):

Minimal circuit to power LEDs from mains

The components’ values were selected using an online circuit simulator. The resistor has to be rated for high power, and the capacitor for mains voltage.

Published January 29 2012 by ioch and rxdtxd