[{"element_type":"image_url","content":"https://github.com/cadet702/cadet702.github.io/assets/32227645/c0a65605-56df-42c6-bee9-a2c52a1106e7","metadata":{"alt":"Backlighting","caption":""}},{"element_type":"text","content":"\n        \u003ch1\u003eInspiration\u003c/h1\u003e\n\u003cp\u003eThis is a piece of \"found art\"; a multi-colored circuit board hiding inside some old discarded electronics.\u0026nbsp; It just needed a backlight and a frame to highlight its beauty.\u0026nbsp; 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.\u003c/p\u003e\n      ","metadata":{}},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n        \u003ch1\u003eMaterials\u003c/h1\u003e\n\u003cul\u003e\n\u003cli\u003e\n\u003cstrong\u003e6 small 12V LED strips (2 LEDs each)\u003c/strong\u003e\u003cbr\u003e\n\u003cul\u003e\n\u003cli\u003eFrom broken RV lighting\u003c/li\u003e\n\u003c/ul\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003cstrong\u003ePCB\u003c/strong\u003e\n\u003cul\u003e\n\u003cli\u003ePulled from something... a printer?\u0026nbsp; A TV?\u0026nbsp; I don't remember.\u0026nbsp; It was pretty, so I kept it.\u003c/li\u003e\n\u003c/ul\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003cstrong\u003eClear plastic screen cover\u003c/strong\u003e\n\u003cul\u003e\n\u003cli\u003eCut from a plastic salad tub\u003c/li\u003e\n\u003c/ul\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003cstrong\u003eDC power supply\u003c/strong\u003e\n\u003cul\u003e\n\u003cli\u003e12V wall transformer long separated from its original device\u003c/li\u003e\n\u003c/ul\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003cstrong\u003e3D printed case\u003c/strong\u003e\n\u003cul\u003e\n\u003cli\u003eTechnically new, but I don't count 3D prints if they displace buying other plastic\u003c/li\u003e\n\u003c/ul\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003cstrong\u003ePerfboard\u003c/strong\u003e\n\u003cul\u003e\n\u003cli\u003eNew, one segment of an \u003ca href=\"https://www.amazon.com/Prototype-Snappable-Arduino-Electronics-Gold-Plated/dp/B07ZYTZ48N?ref_=ast_sto_dp\u0026amp;th=1\"\u003eElectroCookie PCB Prototype Board\u003c/a\u003e\n\u003c/li\u003e\n\u003c/ul\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003cstrong\u003e555 timer IC\u003c/strong\u003e\n\u003cul\u003e\n\u003cli\u003eNew, from a \"learn to solder\" kit I never used\u003c/li\u003e\n\u003c/ul\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003cstrong\u003eNPN Mosfet\u003c/strong\u003e\n\u003cul\u003e\n\u003cli\u003eSalvaged (used for switching the LEDs)\u003c/li\u003e\n\u003c/ul\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003cstrong\u003ePotentiometer\u003c/strong\u003e\n\u003cul\u003e\n\u003cli\u003eNew, in a kit with other things\u003c/li\u003e\n\u003c/ul\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003cstrong\u003eScrew terminals\u003c/strong\u003e\n\u003cul\u003e\n\u003cli\u003eNew, in a kit with other things\u003c/li\u003e\n\u003c/ul\u003e\n\u003c/li\u003e\n\u003cli\u003e\n\u003cstrong\u003eMisc caps, resistors, indicator LED, wires\u003c/strong\u003e\n\u003cul\u003e\n\u003cli\u003eSalvaged or spare\u003c/li\u003e\n\u003c/ul\u003e\n\u003c/li\u003e\n\u003c/ul\u003e\n\u003cp\u003e\u003cstrong\u003eSalvage percentage 64%!\u0026nbsp; A beautiful nightlight made from mostly junk?!\u0026nbsp; Cool!\u003c/strong\u003e\u003c/p\u003e\n      \n\n\n\n\n\n\n\n\n\n\n\n\n","metadata":{}},{"element_type":"text","content":"\n  \n        \u003ch2\u003e555 what?\u003c/h2\u003e\n\u003cp\u003eSince the only feature I needed was a variable PWM signal to dim the LEDs, I decided that using a microcontroller was overkill.\u0026nbsp; 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.\u0026nbsp; 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!\u003cbr\u003e\u003cbr\u003eWhile 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.\u0026nbsp; 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%.\u0026nbsp; 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.\u0026nbsp; Just be sure to test it on a breadboard before soldering everything down!\u003c/p\u003e\n\u003cp\u003e555 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.\u0026nbsp; 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.\u003c/p\u003e\n      \n","metadata":{}},{"element_type":"image_url","content":"https://github.com/cadet702/cadet702.github.io/assets/32227645/9e2157a8-74fa-44be-8ec1-4c5dee296981","metadata":{"alt":"Internals","caption":""}},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n        \u003ch1\u003eCase Design\u003c/h1\u003e\n\u003cp\u003eMy 3D printed case had 3 chambers.\u0026nbsp; One for the electronics, one for the LEDs, and a thin slot a the front to hold the circuit board and clear plastic cover.\u0026nbsp; 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.\u0026nbsp; 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).\u003c/p\u003e\n\u003cp\u003eBefore closing up the case, test that it can be dimmed appropriately.\u003c/p\u003e\n      \n\n\n\n\n\n","metadata":{}},{"element_type":"image_url","content":"https://github.com/cadet702/cadet702.github.io/assets/32227645/da392485-2f53-489c-968a-3d0962e6766b","metadata":{"alt":"Layers","caption":""}},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n        \u003ch1\u003eFinal Result\u003c/h1\u003e\n\u003cp\u003e\u0026nbsp;\u003c/p\u003e\n      \n\n\n\n\n","metadata":{}},{"element_type":"image_url","content":"https://github.com/cadet702/cadet702.github.io/assets/32227645/666b58bb-4e5e-4d6d-9dfd-7a93c0d37f50","metadata":{"alt":"Testing","caption":""}}]