Inspiration
This is a piece of "found art"; a multi-colored circuit board hiding inside some old discarded electronics. It just needed a backlight and a frame to highlight its beauty. From the beginning, I knew this would become a nightlight and held onto the board until I had acquired the perfect combination of discarded LEDs and a few other components needed to make it shine.
Materials
-
6 small 12V LED strips (2 LEDs each)
- From broken RV lighting
-
PCB
- Pulled from something... a printer? A TV? I don't remember. It was pretty, so I kept it.
-
Clear plastic screen cover
- Cut from a plastic salad tub
-
DC power supply
- 12V wall transformer long separated from its original device
-
3D printed case
- Technically new, but I don't count 3D prints if they displace buying other plastic
-
Perfboard
- New, one segment of an ElectroCookie PCB Prototype Board
-
555 timer IC
- New, from a "learn to solder" kit I never used
-
NPN Mosfet
- Salvaged (used for switching the LEDs)
-
Potentiometer
- New, in a kit with other things
-
Screw terminals
- New, in a kit with other things
-
Misc caps, resistors, indicator LED, wires
- Salvaged or spare
Salvage percentage 64%! A beautiful nightlight made from mostly junk?! Cool!
555 what?
Since the only feature I needed was a variable PWM signal to dim the LEDs, I decided that using a microcontroller was overkill. A humble 555 timer IC is capable of generating a repeating high-low signal and the frequency and duty cycle is determined by the combination of resistors and capacitors connected to it. Making one of those resistors a potentiometer transforms the simple oscillator circuit into a PWM dimmer by making it possible to vary the duty cycle over a wide range!
While it's certainly possible to work through the calculations yourself, I opted to simply Google around until I found an example circuit that did what I needed. The circuit I found operated at 12V (just like my LEDs) and used a potentiometer I had in stock to vary the duty cycle from ~5% to ~95%. Unfortunately, I can't seem to find the original site that had dozens of 555 circuit examples, and I don't have the pictures needed to reverse engineer the circuit I used, but there's no shortage of 555 circuit examples online. Just be sure to test it on a breadboard before soldering everything down!
555 timers can be used to drive small loads directly, but since I was operating 6 LED strips in parallel, I used a NPN transistor that could tolerate the high current to switch the LEDs on and off directly from the 12V power rail based on the signal from the 555 timer. In the circuit pictured below, the small green indicator LED was so I could confirm the board was getting power even if the main LEDs weren't working for some reason.
Case Design
My 3D printed case had 3 chambers. One for the electronics, one for the LEDs, and a thin slot a the front to hold the circuit board and clear plastic cover. The reason for the separation was to make sure the LEDs were the right distance to illuminate the board and to minimize the light that leaked out that back of the frame while still allowing hot air to escape. The design was almost perfect, but I ended up having to cut a large slot in the back so I could replace the back wall with a slotted version for better ventilation (not pictured).
Before closing up the case, test that it can be dimmed appropriately.