{"id":3930,"date":"2017-01-07T18:55:32","date_gmt":"2017-01-07T16:55:32","guid":{"rendered":"http:\/\/heiniger-net.blog-net.ch\/?p=3930"},"modified":"2017-02-02T21:51:43","modified_gmt":"2017-02-02T19:51:43","slug":"lavalamp-project-1","status":"publish","type":"post","link":"https:\/\/heiniger-net.blog-net.ch\/en\/archives\/3930\/lavalamp-project-1\/","title":{"rendered":"Lava lamp project, part 1 \u2014 hardware"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-215 alignright\" src=\"\/files\/2017\/01\/5680e7ea166b032a3eed723a-6-original-300x300.jpg\" width=\"300\" height=\"300\">I want\u00aded to build a device that can light in dif\u00adfer\u00adent col\u00adors, and where the col\u00adors can be con\u00adtrolled from a com\u00adput\u00ader. My idea was to hook it up with a com\u00adput\u00ader, who then should sig\u00adnal some state by light\u00ading the appro\u00adpri\u00adate col\u00ador. For exam\u00adple, while build\u00ading and com\u00adpil\u00ading a pro\u00adgram, the lamp should blink in blue col\u00ador. When the build is fin\u00adished, the lamp should light either in green (when the build ran fine) or red (when some\u00adthing went&nbsp;wrong).<\/p>\n<p>I found the lava lamp shown to the right, which is equipped with a col\u00ador-chang\u00ading <span class=\"caps\">LED<\/span> and is pow\u00adered from <span class=\"caps\">USB<\/span>. I bought one and intend\u00aded to mod\u00adi\u00adfy the con\u00adtrol\u00adling elec\u00adtron\u00adics to my purposes.<\/p>\n<p><!--more--><a href=\"\/files\/2017\/01\/changingLED.pdf\"><img loading=\"lazy\" decoding=\"async\" class=\"alignright wp-image-3942 size-full\" src=\"\/files\/2017\/01\/color-changing-led.jpg\" width=\"236\" height=\"72\"><\/a>The lava lamp has a built in col\u00ador <span class=\"caps\">LED<\/span> with a con\u00adtroller chip, that goes through all the rain\u00adbow col\u00adors in a pre\u00adset tim\u00ading. Indi\u00advid\u00adual col\u00adors can not be dis\u00adplayed as need with this kind of <span class=\"caps\">LED<\/span>. Only the col\u00ador red can be achieved by puls\u00ading the input volt\u00adage. This <span class=\"caps\">LED<\/span>, there\u00adfore, does not ful\u00adfill the intend\u00aded purpose.<\/p>\n<p><a href=\"\/files\/2017\/01\/48002-dimensions.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignright size-medium wp-image-3932\" src=\"\/files\/2017\/01\/48002-dimensions-300x141.jpg\" alt width=\"300\" height=\"141\" srcset=\"https:\/\/heiniger-net.blog-net.ch\/files\/2017\/01\/48002-dimensions-300x141.jpg 300w, https:\/\/heiniger-net.blog-net.ch\/files\/2017\/01\/48002-dimensions.jpg 650w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\"><\/a>Instead I need a <span class=\"caps\">RGB-LED<\/span>, whose col\u00adors can be con\u00adtrolled indi\u00advid\u00adu\u00adal\u00adly. That kind of <span class=\"caps\">LED<\/span> can be bought in your favorite elec\u00adtron\u00adics mar\u00adket, for exam\u00adple this one with com\u00admon cathode.<\/p>\n<p>What I need\u00aded now is some con\u00adtrol elec\u00adtron\u00adics, that can inter\u00adface to <span class=\"caps\">USB<\/span>, can be pro\u00adgrammed from the com\u00adput\u00ader, and con\u00adtrol the col\u00ador of a col\u00adored <span class=\"caps\">LED<\/span>. A friend of mine told me about the Picaxe micro\u00adcon\u00adtroller as an easy way to receive ser\u00adi\u00adal sig\u00adnals and which also has dig\u00adi\u00adtal or ana\u00adlog out\u00adputs to con\u00adtrol an <span class=\"caps\">LED<\/span>. There\u00adfore, this is what I came up&nbsp;with:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3948\" src=\"\/files\/2017\/01\/Projekt-1-3.png\" alt width=\"700\" height=\"274\"><\/p>\n<p><a href=\"\/files\/2017\/01\/Lavalamp-Print.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-213 size-medium alignright\" src=\"\/files\/2017\/01\/Lavalamp-Print.png\" alt=\"Lavalamp Print\" width=\"300\" height=\"285\"><\/a><span class=\"caps\">J1<\/span> is the main con\u00adnec\u00adtor with these&nbsp;pins:<\/p>\n<ol>\n<li><span class=\"caps\">VDD<\/span>, <span class=\"caps\">5V<\/span><\/li>\n<li>Ser\u00adi\u00adal&nbsp;out<\/li>\n<li>Ser\u00adi\u00adal&nbsp;in<\/li>\n<li><span class=\"caps\">VSS<\/span>, or Ground, or&nbsp;<span class=\"caps\">0V<\/span><\/li>\n<\/ol>\n<p><span class=\"caps\">J2<\/span> cor\u00adre\u00adsponds to <span class=\"caps\">SW1<\/span> and it can be used for doing what\u00adev\u00ader the Picaxe can be pro\u00adgrammed to do with it. Maybe it can start a fixed col\u00ador-chang\u00ading pro\u00adgram, or it can turn the <span class=\"caps\">LED<\/span> on or&nbsp;off.<\/p>\n<p><span class=\"caps\">R6<\/span> is a pow\u00ader resis\u00adtor sup\u00adposed to warm the lava lamp water a lit\u00adtle, so that the glit\u00adter in the water gets moving.<\/p>\n<p>Now I need a USB-to-ser\u00adi\u00adal adapter. I bought this one, whose fat plug I removed and sol\u00addered the <a href=\"\/files\/2017\/01\/usb-serial-adapter.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignright wp-image-3939 size-medium\" src=\"\/files\/2017\/01\/usb-serial-adapter-300x277.jpg\" width=\"300\" height=\"277\" srcset=\"https:\/\/heiniger-net.blog-net.ch\/files\/2017\/01\/usb-serial-adapter-300x277.jpg 300w, https:\/\/heiniger-net.blog-net.ch\/files\/2017\/01\/usb-serial-adapter.jpg 460w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\"><\/a>rel\u00ade\u00advant pins direct\u00adly to <span class=\"caps\">J1<\/span> of my cir\u00adcuit above. Now I only need to attach the whole thing in the foot of the lava&nbsp;lamp&nbsp;<\/p>\n<p>With this con\u00adstruc\u00adtion, I end up with a <span class=\"caps\">USB<\/span> device that announces itself to the com\u00adput\u00ader as a ser\u00adi\u00adal <span class=\"caps\">COM<\/span> port, which is attached to the <a href=\"http:\/\/www.picaxe.com\/\" target=\"_blank\">Picaxe micro\u00adcon\u00adtroller<\/a>. The Picaxe can be pro\u00adgrammed with the help of the nor\u00admal \u201c<a href=\"http:\/\/www.picaxe.com\/Software\/PICAXE\/PICAXE-Editor-6\/#download\" target=\"_blank\">Picaxe Edi\u00adtor 6<\/a>\u2033 <span class=\"caps\">IDE<\/span>. I will talk about the nec\u00ades\u00adsary firmware pro\u00adgram\u00adming in anoth\u00ader article.<\/p>\n<p>As a con\u00adclu\u00adsion, one can say that my project idea requires mas\u00adtery of the fol\u00adlow\u00ading three challenges:<\/p>\n<ol>\n<li>The&nbsp;<strong><em>Hard\u00adware<\/em><\/strong> must be built. I described this process here roughly.<\/li>\n<li>The&nbsp;<strong><em>Firmware<\/em><\/strong>&nbsp;for the Picaxe must be writ\u00adten. This is a piece of soft\u00adware, that reads the desired col\u00ador com\u00adbi\u00adna\u00adtions from the <span class=\"caps\">USB<\/span> port and lights up the three col\u00adors of the <span class=\"caps\">LED<\/span> accord\u00ading\u00adly. I wrote this firmware already.<\/li>\n<li>The&nbsp;<strong><em>Soft\u00adware<\/em><\/strong>, that sends the nec\u00ades\u00adsary col\u00ador codes to the <span class=\"caps\">USB<\/span> port as a result of more or less com\u00adplex events in the com\u00adput\u00ader has only just begun its devel\u00adop\u00adment phase. I am afraid that this part has the great\u00adest com\u00adplex\u00adi\u00adty. In oth\u00ader words, it is pos\u00adsi\u00adble to invest a huge amount of effort in order to cre\u00adate a more or less lux\u00adu\u00adri\u00adous thing. This part may nev\u00ader real\u00adly be finished.&nbsp;\ud83d\ude42<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<p><a href=\"\/en\/archives\/3965\/lava-lamp-project-part-2-firmware\/\">Here is part 2 of this series<\/a>.<\/p>","protected":false},"excerpt":{"rendered":"<p>Sor\u00adry, this entry is only avail\u00adable in Deutsch.<\/p>\n <a class=\"more-link\" href=\"https:\/\/heiniger-net.blog-net.ch\/en\/archives\/3930\/lavalamp-project-1\/\"><span class=\"more-msg\">Con\u00adtin\u00adue reading&nbsp;\u2192<\/span><\/a>","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"wp_typography_post_enhancements_disabled":false,"iawp_total_views":10,"footnotes":""},"categories":[11,13],"tags":[],"class_list":["post-3930","post","type-post","status-publish","format-standard","hentry","category-computer","category-home-stories"],"_links":{"self":[{"href":"https:\/\/heiniger-net.blog-net.ch\/en\/wp-json\/wp\/v2\/posts\/3930","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/heiniger-net.blog-net.ch\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/heiniger-net.blog-net.ch\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/heiniger-net.blog-net.ch\/en\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/heiniger-net.blog-net.ch\/en\/wp-json\/wp\/v2\/comments?post=3930"}],"version-history":[{"count":2,"href":"https:\/\/heiniger-net.blog-net.ch\/en\/wp-json\/wp\/v2\/posts\/3930\/revisions"}],"predecessor-version":[{"id":4005,"href":"https:\/\/heiniger-net.blog-net.ch\/en\/wp-json\/wp\/v2\/posts\/3930\/revisions\/4005"}],"wp:attachment":[{"href":"https:\/\/heiniger-net.blog-net.ch\/en\/wp-json\/wp\/v2\/media?parent=3930"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/heiniger-net.blog-net.ch\/en\/wp-json\/wp\/v2\/categories?post=3930"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/heiniger-net.blog-net.ch\/en\/wp-json\/wp\/v2\/tags?post=3930"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}