{"id":6494,"date":"2015-05-21T15:50:34","date_gmt":"2015-05-21T20:50:34","guid":{"rendered":"http:\/\/spookyblue.com\/spookyblog\/?p=6494"},"modified":"2015-05-21T16:52:43","modified_gmt":"2015-05-21T21:52:43","slug":"build-a-flickering-led-candle-amplifier","status":"publish","type":"post","link":"http:\/\/spookyblue.com\/spookyblog\/build-a-flickering-led-candle-amplifier","title":{"rendered":"Build A Flickering LED Candle Amplifier"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" style=\"border: none; padding: 4px; background: #000; border-radius: 6px;\" src=\"\/spookyblog\/spblogpix\/2015\/01\/cemetery-gate-flickering-led-lamps.gif\" width=\"275\" height=\"343\" class=\"alignright wp-image-6512 size-full\" \/><\/p>\n<p>Shadow Wood Cemetery, nestled in the heart of Spooky Hollow, boasts a growing population that enjoys an active nightlife. A pair of flickering LED &#8220;gaslight&#8221; lamps ensures that everyone finds his way home before sunrise.<\/p>\n<h3>How many ways are there to make an LED flicker?<\/h3>\n<p>Lots, and solutions range in complexity, from our fairly pedestrian driver circuit, to more complicated arrangements that include timer chips, logic gates, and even a programmable logic controller. As it turns out, making an LED turn on and off in a seemingly arbitrary pattern is a complex task, and the more random-looking the effect, the more you approach a Rube Goldberg device.<\/p>\n<p><!-- more --><\/p>\n<p><a href=\"http:\/\/#??n=B0064RFHHO\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" style=\"border: none;\" src=\"\/spookyblog\/spblogpix\/2015\/01\/ubiquitous-flickering-led-candle.gif\" width=\"150\" height=\"150\" class=\"alignleft wp-image-6533 size-full\" title=\"Good price on a bazillion flickering LED candles\" srcset=\"http:\/\/spookyblue.com\/spookyblog\/spblogpix\/2015\/01\/ubiquitous-flickering-led-candle.gif 150w, http:\/\/spookyblue.com\/spookyblog\/spblogpix\/2015\/01\/ubiquitous-flickering-led-candle-144x144.gif 144w\" sizes=\"(max-width: 150px) 100vw, 150px\" \/><\/a>We&#8217;re all about economy here at the skunk works, and what&#8217;s more economical than robbery? For instance, the ubiquitous <a href=\"http:\/\/#??n=B0064RFHHO\" target=\"_blank\">flickering LED candle<\/a> already contains its own flicker circuit, miniaturized and encased inside the LED. We&#8217;re going to swipe that functionality and use it to drive three Ultrabright LEDs.<\/p>\n<p>To accomplish this, we&#8217;ll be using the good ol&#8217; <a href=\"http:\/\/www.#??n=B00CZ5DVPY\" target=\"_blank\">2N2222 NPN transistor<\/a> and a handful of resistors. Well, fewer than a handful; three, to be precise. And we&#8217;re all about precision here at the skunk works; next to economy, that is. Economy and precision. Yes, that&#8217;s what we&#8217;re about.<\/p>\n<h3>How do transistors work?<\/h3>\n<p><strong><em>Perhaps the\u00a0better question is &#8220;why on earth do I care?&#8221;<br \/>\n<\/em><\/strong>Because Homo\u00a0erectus dreamed about\u00a0bar-B-Q, and discovered fire. Further innovations followed, and soon we had flash lights and space shuttles. That&#8217;s not to say that Ogg,\u00a0the inquisitive caveman, triumphantly waving his flaming log around, didn&#8217;t get chased out of the cave with sticks.<\/p>\n<p>The point being; a little technology goes a long way, and the benefits of learning something new\u00a0almost always\u00a0outweigh the possibility of getting chased with sticks. Call it an occupational hazard.<\/p>\n<p><strong><a href=\"\/spookyblog\/spblogpix\/2015\/04\/spookyblue-npn-2n2222.jpg\" class=\"imgpop\"><img loading=\"lazy\" decoding=\"async\" src=\"\/spookyblog\/spblogpix\/2015\/04\/spookyblue-npn-2n2222.jpg\" alt=\"2n2222 NPN Transistor\" width=\"214\" height=\"232\" class=\"alignright wp-image-6580\" \/><\/a>In simplest terms<\/strong>, a bipolar transistor is a current-controlled device that\u00a0is generally used as a switch or an amplifier. It consists of three sections called the base, the collector, and the emitter.<\/p>\n<p><strong>NPN transistor<\/strong><br \/>\nAs current increases at the base, the transistor starts to conduct electricity from the collector to the emitter. The more current at the base, the more current flows out the emitter. Decrease the base current and the emitter current decreases. This is how we&#8217;ll vary the brightness of our\u00a0LEDs.<\/p>\n<p><strong>PNP transistor<br \/>\n<\/strong>Although we&#8217;re not using this type of transistor, it&#8217;s worth mentioning that a PNP transistor works completely bass-ackwards from the NPN variety. It only turns on when there is <strong><em>no<\/em><\/strong> current at the base, and\u00a0current flows from the emitter to the collector. Where the NPN transistor is triggered by a high signal, the PNP is triggered by a low signal (ground).<\/p>\n<p><strong>Flickering LED amplifier circuit<\/strong><br \/>\nIn both transistor types, a small amount of current can be used to switch a larger amount of current, which is exactly what we&#8217;re doing.<\/p>\n<p><a href=\"\/spookyblog\/spblogpix\/2015\/04\/spookyblue-flickering-led-amplifier.gif\" class=\"imgpop\"><img loading=\"lazy\" decoding=\"async\" src=\"\/spookyblog\/spblogpix\/2015\/04\/spookyblue-flickering-led-amplifier.gif\" alt=\"Flickering LED amplifier\" width=\"338\" height=\"284\" class=\"  alignleft wp-image-6569\" \/><\/a><a href=\"\/spookyblog\/spblogpix\/2015\/04\/spookyblue-flickering-led-amplifier.gif\" class=\"imgpop\"><\/a>Current reaches the base of the\u00a02N2222 transistor through the flicker LED. The amount of current is varied by the LED&#8217;s internal circuitry. \u00a0When the flicker LED reduces the current at the base, less current flows out the emitter, and the ultra-bright LEDs grow dim. When the flicker LED allows more current through to the base, an increase in emitter current causes the ultra-brights to grow brighter.<\/p>\n<h3>And there you have it<\/h3>\n<p>Our flickery little flap-happy\u00a0runs on 12VDC,\u00a0which is fairly easy to come by. We power ours with a <a href=\"http:\/\/spookyblue.com\/spookyblog\/12v-haunt-lighting-with-hacked-led-christmas-lights\">recycled low voltage landscape light transformer<\/a>. Mount\u00a0one or two of these guys inside a lantern, hurricane lamp, or that beat up solar &#8220;garden light&#8221; you&#8217;ve been saving in a box out in the garage. If your lamp&#8217;s globe is clear glass or plastic, lightly mist with white spray paint to act as a diffuser. This would look pretty cool behind a <a href=\"https:\/\/www.google.com\/search?site=&amp;tbm=isch&amp;source=hp&amp;biw=1920&amp;bih=955&amp;q=fresnel+globe&amp;oq=fresnel+globe&amp;gs_l=img.3..0i24.1943.4193.0.4394.13.10.0.3.3.0.93.703.10.10.0.msedr...0...1ac.1.64.img..0.13.709.tx9I8H8cuto\" target=\"_blank\">&#8220;Fresnel Globe&#8221;<\/a>.<\/p>\n<h3>We owe a debt of gratitude to our forebear, Ogg<\/h3>\n<p>He overcame obstacles, and not just of the technical kind, because he almost surely faced a superstitious crowd. Douglas Adams described this reaction to technology in\u00a0the following set of rules &#8230;<\/p>\n<ol style=\"margin: 0 2em 0 2em; padding: 0 0 0 1em; font-size: 0.9em; color: #f4d9c0; line-height: 1.4em;\">\n<li style=\"margin: 0 0 1em 0;\">Anything that is in the world when you&#8217;re born is normal and ordinary and is just a natural part of the way the world works.<\/li>\n<li style=\"margin: 0 0 1em 0;\">Anything that&#8217;s invented between when you&#8217;re 15 and 35 is new and exciting and revolutionary and you can probably get a career in it.<\/li>\n<li style=\"margin: 0 0 1em 0;\">Anything invented after you&#8217;re 35 is against the natural order of things.<\/li>\n<\/ol>\n<p>Despite getting chased with sticks, Ogg understood technology as a means to an end. This point wasn&#8217;t lost on Adams, who, in addition to his rules listed above, also observed,\u00a0&#8220;<span>We are stuck with technology when what we really want is just stuff that works.&#8221;<\/span><\/p>\n<p>I&#8217;m fond of the\u00a0LED candle amplifier project, and I encourage anyone who likes to sling solder to give it a go. All you really need is patience, time, meticulous attention to detail, and a decent insurance policy.<\/p>\n<p>Or if what you really want is just stuff that works, order a few dozen of <a href=\"http:\/\/lighthouseleds.com\/led-component-lighting\/animated-leds-flashing-blinking\/5mm-led-candle-flicker-round-top-leds.html\" target=\"_blank\">these<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Shadow Wood Cemetery, nestled in the heart of Spooky Hollow, boasts a growing population that enjoys an active nightlife. A pair of flickering LED &#8220;gaslight&#8221; lamps ensures that everyone finds his way home before sunrise. How many ways are there to make an LED flicker? Lots, and solutions range in complexity, from our fairly pedestrian [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[337,4,3],"tags":[338,336],"_links":{"self":[{"href":"http:\/\/spookyblue.com\/spookyblog\/wp-json\/wp\/v2\/posts\/6494"}],"collection":[{"href":"http:\/\/spookyblue.com\/spookyblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/spookyblue.com\/spookyblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/spookyblue.com\/spookyblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/spookyblue.com\/spookyblog\/wp-json\/wp\/v2\/comments?post=6494"}],"version-history":[{"count":0,"href":"http:\/\/spookyblue.com\/spookyblog\/wp-json\/wp\/v2\/posts\/6494\/revisions"}],"wp:attachment":[{"href":"http:\/\/spookyblue.com\/spookyblog\/wp-json\/wp\/v2\/media?parent=6494"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/spookyblue.com\/spookyblog\/wp-json\/wp\/v2\/categories?post=6494"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/spookyblue.com\/spookyblog\/wp-json\/wp\/v2\/tags?post=6494"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}