{"id":34,"date":"2025-10-07T09:27:59","date_gmt":"2025-10-07T08:27:59","guid":{"rendered":"https:\/\/blinkbonnie.xyz\/?p=34"},"modified":"2025-11-13T03:31:42","modified_gmt":"2025-11-13T03:31:42","slug":"finished-the-light-box","status":"publish","type":"post","link":"https:\/\/blinkbonnie.xyz\/?p=34","title":{"rendered":"Finished the Light Box"},"content":{"rendered":"\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"871\" src=\"https:\/\/blinkbonnie.xyz\/wp-content\/uploads\/2025\/10\/lightbox.jpg\" alt=\"The picture shows a square wooden box sitting on a table. It is about 20 cm on each side and maybe 5 cm deep.\nThe front face of the box is made of polycarbonate with a frosted layer behind it so that the RGB LEDs inside shine through. It is illuminated with a rainbow of magenta, cyan, green and yellow, Hope this helps.\" class=\"wp-image-35\" style=\"aspect-ratio:1;width:840px;height:auto\" srcset=\"https:\/\/blinkbonnie.xyz\/wp-content\/uploads\/2025\/10\/lightbox.jpg 800w, https:\/\/blinkbonnie.xyz\/wp-content\/uploads\/2025\/10\/lightbox-276x300.jpg 276w, https:\/\/blinkbonnie.xyz\/wp-content\/uploads\/2025\/10\/lightbox-768x836.jpg 768w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><figcaption class=\"wp-element-caption\">The finished light box displaying the random colour pattern.<\/figcaption><\/figure>\n\n\n\n<p>Well I finished the light box I was working on.<\/p>\n\n\n\n<p>It\u2019s taken me, what, 2 months or so but I\u2019ve got the firmware loaded and it runs. So let me expound.<\/p>\n\n\n\n<p>While I was working on the kitchen shelves, I ended up with some strips of pine that didn\u2019t work out as edging for the lazy susan shelves. I decided to try to make something with them.<\/p>\n\n\n\n<p>Carefully cutting them to size and cutting the joints, I ended up with a square timber box. I decided that I could fit the inside with LEDs, left over from when I made my bedside lamp. I\u2019d originally planned to use a PIC for that purpose, but in the meantime I had purchased some Raspberry Pi Pico Ws.<\/p>\n\n\n\n<p>I managed to fit the Pico into the box, but in testing I discovered that trying to run a pile of RGB LEDs off the Pico was not a good idea.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"804\" height=\"308\" src=\"https:\/\/blinkbonnie.xyz\/wp-content\/uploads\/2025\/10\/led_driver-1.png\" alt=\"The picture shows a screengrab of a Fritzing circuit layout consisting of a piece of stripboard and some NPN transistors and 330\u03a9 resistors. It is intended for use as a module to drive LEDs at 5v from a 3.3v input.\" class=\"wp-image-37\" srcset=\"https:\/\/blinkbonnie.xyz\/wp-content\/uploads\/2025\/10\/led_driver-1.png 804w, https:\/\/blinkbonnie.xyz\/wp-content\/uploads\/2025\/10\/led_driver-1-300x115.png 300w, https:\/\/blinkbonnie.xyz\/wp-content\/uploads\/2025\/10\/led_driver-1-768x294.png 768w\" sizes=\"auto, (max-width: 804px) 100vw, 804px\" \/><\/figure>\n\n\n\n<p>I opened up Fritzing and created a simple LED driver circuit using Vero board. It uses a bunch of BC548s to switch the 5v from the USB connection.<\/p>\n\n\n\n<p>I built 4 of these and fitted them inside the box. Each module controls one strip of 4 RGB LEDs. I also added a push button for manual control of the Pico.<\/p>\n\n\n\n<p>In testing, I discovered that I couldn\u2019t simply use any random pins to drive the LEDs with PWM. The PWM circuits of the Pico consist of, uh, anyway, you can\u2019t PWM on one pin and then try to PWM on certain others because they share the PWM circuitry, and also the frequency circuitry is shared, or something.<\/p>\n\n\n\n<p>Anyway, after soldering up the Pico as I wanted to, I had to desolder it and use 12 pins from 0-14.<\/p>\n\n\n\n<p>Testing further revealed that the red LEDs on one of the strips wouldn\u2019t light up. It turned out that one of the transistors was faulty. After replacing that all the electronics seemed to work.<\/p>\n\n\n\n<p>I created a cardboard insert that slides in from the front with sides that fold up to hide all the wiring. It also serves as a reflector, improving the light output and the LED strips are stuck directly to the flaps.<\/p>\n\n\n\n<p>I tried using double sided tape to stick the flaps to the timber, but it hasn\u2019t worked totally well and you can see some gaps where the flaps don\u2019t sit straight against the edge of the frame. If I do it again I\u2019ll angle the sides of the insert so it kind of bevels.<\/p>\n\n\n\n<p>I fitted a sheet of diffuser plastic and rigid polycarbonate that I salvaged from one of the old laptop screens. Cutting the polycarbonate is tricky, but I managed it with a sharp knife and lots of cuts. No sawing. No snapping. On the back I screwed a piece of plywood. It works but it\u2019s a bit ratty. I think if I modified the frame, the plywood could sit inside a rebate or somesuch.<\/p>\n\n\n\n<p>So there it is. The hardware complete. Now I had to program it.<\/p>\n\n\n\n<p>Originally written <a href=\"http:\/\/10.1.1.201\/index.php\/2025\/08\/13\/finished-the-light-box\/\">August 13, 2025<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Well I finished the light box I was working on. It\u2019s taken me, what, 2 months or so but I\u2019ve got the firmware loaded and it runs. So let me expound. While I was working on the kitchen shelves, I ended up with some strips of pine that didn\u2019t work [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":35,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-34","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog"],"_links":{"self":[{"href":"https:\/\/blinkbonnie.xyz\/index.php?rest_route=\/wp\/v2\/posts\/34","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blinkbonnie.xyz\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blinkbonnie.xyz\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blinkbonnie.xyz\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blinkbonnie.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=34"}],"version-history":[{"count":1,"href":"https:\/\/blinkbonnie.xyz\/index.php?rest_route=\/wp\/v2\/posts\/34\/revisions"}],"predecessor-version":[{"id":38,"href":"https:\/\/blinkbonnie.xyz\/index.php?rest_route=\/wp\/v2\/posts\/34\/revisions\/38"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blinkbonnie.xyz\/index.php?rest_route=\/wp\/v2\/media\/35"}],"wp:attachment":[{"href":"https:\/\/blinkbonnie.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=34"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blinkbonnie.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=34"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blinkbonnie.xyz\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=34"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}