{"id":1860,"date":"2016-12-28T22:06:38","date_gmt":"2016-12-28T22:06:38","guid":{"rendered":"http:\/\/blog.paranoidprofessor.com\/?p=1860"},"modified":"2017-01-03T20:44:00","modified_gmt":"2017-01-03T20:44:00","slug":"evolution-of-led-lighting","status":"publish","type":"post","link":"https:\/\/blog.paranoidprofessor.com\/index.php\/2016\/12\/28\/evolution-of-led-lighting\/","title":{"rendered":"Evolution of LED Lighting"},"content":{"rendered":"<p>When the children were really young they had a very tiny little nightlight. \u00a0It didn&#8217;t really give off all that much light but it was enough to keep the boys happy. \u00a0But nothing lasts forever and as it turns out they were growing up and that cute little light was for little kids.<\/p>\n<p>This gave the perfect opportunity for me to get a large strip of RGB leds that could be mounted onto the end of bunk bed which would provide both the light and also provide a certain level of coolness.<\/p>\n<p>Getting the setup was trivial as it is possible to purchase a led strip along with a\u00a0power supply and remote control for switching the colors.<\/p>\n<h2>Version 1.0<\/h2>\n<p><a href=\"http:\/\/blog.paranoidprofessor.com\/wp-content\/uploads\/2016\/12\/bunkbeds.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter wp-image-1883 size-medium\" src=\"http:\/\/blog.paranoidprofessor.com\/wp-content\/uploads\/2016\/12\/bunkbeds-298x300.jpg\" alt=\"bunkbeds\" width=\"298\" height=\"300\" srcset=\"https:\/\/blog.paranoidprofessor.com\/wp-content\/uploads\/2016\/12\/bunkbeds-298x300.jpg 298w, https:\/\/blog.paranoidprofessor.com\/wp-content\/uploads\/2016\/12\/bunkbeds-150x150.jpg 150w, https:\/\/blog.paranoidprofessor.com\/wp-content\/uploads\/2016\/12\/bunkbeds-768x773.jpg 768w, https:\/\/blog.paranoidprofessor.com\/wp-content\/uploads\/2016\/12\/bunkbeds-1018x1024.jpg 1018w, https:\/\/blog.paranoidprofessor.com\/wp-content\/uploads\/2016\/12\/bunkbeds.jpg 1416w\" sizes=\"(max-width: 298px) 100vw, 298px\" \/><\/a><\/p>\n<p>The setup was really simple as the led strip has a self adhesive tape on the back.<\/p>\n<p>Pros<\/p>\n<ul>\n<li>Can be installed within minutes<\/li>\n<\/ul>\n<p>Cons<\/p>\n<ul>\n<li>A bit bright<\/li>\n<li>Gravity<\/li>\n<\/ul>\n<p>It was super easy to mount the leds but gravity kept taking its toll. \u00a0They wouldn&#8217;t\u00a0stay stuck on the board and\u00a0in the end I had to get some tacks to help keep the led strip in place. \u00a0I could have used glue but considering that they were mounted vertically it would have been\u00a0a pain to glue them on.<\/p>\n<p>More than that, I was uncertain how long this solution would last and if permanent attachment to the wood was a good idea.<\/p>\n<h2>Version 2.0<\/h2>\n<p>The boys really did like the led solution but every time I came into their room during the day I saw a led strips that were hanging on for dear life. \u00a0Sure it worked but it didn&#8217;t look neat or professional.<\/p>\n<p>In my mind the biggest problem with the existing solution was that it was attached to the bed. \u00a0There isn&#8217;t a lot of space between the bed and the wall. \u00a0If a problem were to actually occur with one of the led strips I\u00a0would have to kneel in the corner between bed and wall to fix it.<\/p>\n<p>The new plan was to create a small &#8220;light fixture&#8221; that could be mounted at the end of the bed. Because it is a light fixture I can take it to another room and work on it. \u00a0Doing this does have an additional level of effort as I did have to cut the strip into pieces and then to solder them back together once they were mounted to the board.<\/p>\n<div id=\"attachment_1862\" style=\"width: 2658px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/blog.paranoidprofessor.com\/wp-content\/uploads\/2016\/12\/ledlites.jpg\"><img aria-describedby=\"caption-attachment-1862\" decoding=\"async\" loading=\"lazy\" class=\"wp-image-1862 size-full\" src=\"http:\/\/blog.paranoidprofessor.com\/wp-content\/uploads\/2016\/12\/ledlites.jpg\" width=\"2648\" height=\"840\" srcset=\"https:\/\/blog.paranoidprofessor.com\/wp-content\/uploads\/2016\/12\/ledlites.jpg 2648w, https:\/\/blog.paranoidprofessor.com\/wp-content\/uploads\/2016\/12\/ledlites-300x95.jpg 300w, https:\/\/blog.paranoidprofessor.com\/wp-content\/uploads\/2016\/12\/ledlites-768x244.jpg 768w, https:\/\/blog.paranoidprofessor.com\/wp-content\/uploads\/2016\/12\/ledlites-1024x325.jpg 1024w\" sizes=\"(max-width: 2648px) 100vw, 2648px\" \/><\/a><p id=\"caption-attachment-1862\" class=\"wp-caption-text\">Led lighting version 2.0<\/p><\/div>\n<p>The assembly wasn&#8217;t terribly challenging but perhaps my\u00a0choice of wire for connecting the strips was less than optimal. \u00a0I had picked up a four wire extension core for led strips. \u00a0It was four wire extension cord that was red, green, blue and black. \u00a0The wires used matched the led strip but because they were all joined together like a flat cable and thus working with it was somewhat awkward.<\/p>\n<p>Pros<\/p>\n<ul>\n<li>Portable<\/li>\n<li>Organized<\/li>\n<\/ul>\n<p>Cons<\/p>\n<ul>\n<li>Brighter than before<\/li>\n<li>Gravity<\/li>\n<\/ul>\n<p>However, Gravity has not been rescinded just because I have chosen to take a slightly different approach for mounting the led strips. \u00a0The adhesive tape still doesn&#8217;t hold well enough by itself and in the end I had to glue down the led strip.<\/p>\n<p>The led solution is technically no brighter than before but they are now concentrated on a single board and they are now mounted lower on the bed across from a white wall. \u00a0This is\u00a0still a good solution but the lights are actually too bright for nighttime lighting.<\/p>\n<p>It was about this time that\u00a0I was feeling just lazy enough that I thought perhaps I could just purchase some sort of solution that would let me control the led strip over my network. \u00a0I was hoping that this solution would allow me to programmatically control the leds both colors and power via WiFi.<\/p>\n<h2>Version 3.0<\/h2>\n<p>I couldn&#8217;t find exactly the type of control that I was looking for. \u00a0The question came up in my mind was just how difficult would it be to roll my own solution.<\/p>\n<p>If you are a an electrical engineer coming up with custom electronics to control devices has most likely never been a problem. \u00a0For the rest of us, the mysteries of the electron and the catalog of parts that might be required\u00a0can create a bit of\u00a0a hurdle.<\/p>\n<p>The good news is that 2016 is in the decade of the do-it-yourselfer. \u00a0There is an amazing amount of small general purposes electronics boards that can be quickly and easily connected together.<\/p>\n<p>The electronic boards that are available range from micro-controller boards such as the <a href=\"https:\/\/www.arduino.cc\/en\/Guide\/Introduction\">Arduino <\/a>but range up to full computers sporting multiple cores such as the <a href=\"https:\/\/www.raspberrypi.org\/\">Raspberry pi<\/a>. Both of these devices\u00a0provide pins that can be used to connect them to other external devices or chips to allow for novel expansion.<\/p>\n<p>I am not a huge Arduino historian but it seems that it was previously possible to get a small addon board to allow it to connect via WiFi. \u00a0This was probably an incredible platform but it appears to have been supplanted with the ESP8266 board. \u00a0The ESP8266 board, or one of the numerous compatible boards, is essentially an Arduino with the WiFi chip on the same board. \u00a0This allows you to connect directly to the microcontroller via WiFi and then control whatever is connected to the I\/O pins.<\/p>\n<p>My solution is to use this new ESP8266 \u00a0and a relay to control the led strip. \u00a0I purchased small board with two relays. A relay is just switch that can be used to control on and off electronically.<\/p>\n<p>The change to the existing &#8220;lighting fixture&#8221; is to create a control board which routes the power through the relays which are controlled by the ESP8266. \u00a0I decided that the lowest overhead way to communicate with the ESP8266 was to send it commands via <a href=\"https:\/\/en.wikipedia.org\/wiki\/User_Datagram_Protocol\">UDP packets<\/a>.<\/p>\n<div id=\"attachment_1863\" style=\"width: 650px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/blog.paranoidprofessor.com\/wp-content\/uploads\/2016\/12\/control-board.jpg\"><img aria-describedby=\"caption-attachment-1863\" decoding=\"async\" loading=\"lazy\" class=\"wp-image-1863 size-large\" src=\"http:\/\/blog.paranoidprofessor.com\/wp-content\/uploads\/2016\/12\/control-board-1024x829.jpg\" width=\"640\" height=\"518\" srcset=\"https:\/\/blog.paranoidprofessor.com\/wp-content\/uploads\/2016\/12\/control-board-1024x829.jpg 1024w, https:\/\/blog.paranoidprofessor.com\/wp-content\/uploads\/2016\/12\/control-board-300x243.jpg 300w, https:\/\/blog.paranoidprofessor.com\/wp-content\/uploads\/2016\/12\/control-board-768x622.jpg 768w, https:\/\/blog.paranoidprofessor.com\/wp-content\/uploads\/2016\/12\/control-board.jpg 1260w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/a><p id=\"caption-attachment-1863\" class=\"wp-caption-text\">Control board<\/p><\/div>\n<p>The nice thing about this solution was that I could add the electronics to a small piece of wood and add it on as a controller board without having to completely redo the &#8220;lighting fixture&#8221;.<\/p>\n<p>In order to add the control board to the &#8220;light fixture&#8221; I had to make two small changes to the original wiring. \u00a0The first change is to feed the ground of the main power through the first relay. \u00a0This makes it possible to cut off all the power to the leds, which is essentially an off switch. \u00a0The second change is to feel the ground wire to the relay which allows me to enable or disable the last four led strips.<\/p>\n<p>This allows two strips to be lit and create some lighting for nighttime while still having the opportunity to turn on all the led strips.<\/p>\n<p>Note: this just controls the power, the actual color selection or effects are still done via the remote control.<\/p>\n<div id=\"attachment_1864\" style=\"width: 3530px\" class=\"wp-caption alignnone\"><a href=\"http:\/\/blog.paranoidprofessor.com\/wp-content\/uploads\/2016\/12\/ledlites-final.jpg\"><img aria-describedby=\"caption-attachment-1864\" decoding=\"async\" loading=\"lazy\" class=\"wp-image-1864 size-full\" src=\"http:\/\/blog.paranoidprofessor.com\/wp-content\/uploads\/2016\/12\/ledlites-final.jpg\" width=\"3520\" height=\"2328\" srcset=\"https:\/\/blog.paranoidprofessor.com\/wp-content\/uploads\/2016\/12\/ledlites-final.jpg 3520w, https:\/\/blog.paranoidprofessor.com\/wp-content\/uploads\/2016\/12\/ledlites-final-300x198.jpg 300w, https:\/\/blog.paranoidprofessor.com\/wp-content\/uploads\/2016\/12\/ledlites-final-768x508.jpg 768w, https:\/\/blog.paranoidprofessor.com\/wp-content\/uploads\/2016\/12\/ledlites-final-1024x677.jpg 1024w\" sizes=\"(max-width: 3520px) 100vw, 3520px\" \/><\/a><p id=\"caption-attachment-1864\" class=\"wp-caption-text\">Led lighting version 3.0<\/p><\/div>\n<p>Pros<\/p>\n<ul>\n<li>Lights can be turned on and off via WiFi<\/li>\n<li>Thermometer<\/li>\n<\/ul>\n<p>Cons<\/p>\n<ul>\n<li>Two power cords<\/li>\n<li>Unable to control leds colors via WiFi<\/li>\n<\/ul>\n<p>I will explain all of the construction and setup in the next part,\u00a0<a href=\"http:\/\/blog.paranoidprofessor.com\/index.php\/2017\/01\/03\/evolution-of-led-lighting-hardware-and-tools\/\">Evolution of LED Lighting &#8211; hardware and tools<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When the children were really young they had a very tiny little nightlight. \u00a0It didn&#8217;t really give off all that much light but it was enough to keep the boys happy. \u00a0But nothing lasts forever and as it turns out &hellip; <a href=\"https:\/\/blog.paranoidprofessor.com\/index.php\/2016\/12\/28\/evolution-of-led-lighting\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[3],"tags":[80],"_links":{"self":[{"href":"https:\/\/blog.paranoidprofessor.com\/index.php\/wp-json\/wp\/v2\/posts\/1860"}],"collection":[{"href":"https:\/\/blog.paranoidprofessor.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.paranoidprofessor.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.paranoidprofessor.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.paranoidprofessor.com\/index.php\/wp-json\/wp\/v2\/comments?post=1860"}],"version-history":[{"count":33,"href":"https:\/\/blog.paranoidprofessor.com\/index.php\/wp-json\/wp\/v2\/posts\/1860\/revisions"}],"predecessor-version":[{"id":1954,"href":"https:\/\/blog.paranoidprofessor.com\/index.php\/wp-json\/wp\/v2\/posts\/1860\/revisions\/1954"}],"wp:attachment":[{"href":"https:\/\/blog.paranoidprofessor.com\/index.php\/wp-json\/wp\/v2\/media?parent=1860"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.paranoidprofessor.com\/index.php\/wp-json\/wp\/v2\/categories?post=1860"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.paranoidprofessor.com\/index.php\/wp-json\/wp\/v2\/tags?post=1860"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}