{"id":1464,"date":"2018-12-04T17:21:50","date_gmt":"2020-02-18T06:55:22","guid":{"rendered":"https:\/\/redfrontdoor.org\/blg2\/?p=1464"},"modified":"2020-02-18T16:51:38","modified_gmt":"2020-02-18T16:51:38","slug":"post-1458","status":"publish","type":"post","link":"https:\/\/redfrontdoor.org\/blog\/?p=1464","title":{"rendered":"Studying a Hallowe&#8217;en LED flasher"},"content":{"rendered":"<p>A friend kindly gave us some flashing-light stickers for Hallowe&#8217;en, and the natural thing to do with them once the festivities were over was to dissect them.  So we did this, and found that each contained a square circuit board about 25mm on a side.  When you press a little button in the middle, three coloured LEDs &mdash; red, green, blue &mdash; flash rapidly for about twenty seconds.<\/p>\n<p>It looked like they were flashing round in a circle, but too quickly for me to be sure of the sequence.  To investigate, I set up the flasher approximately vertically, held in a lump of Blu-tack:<\/p>\n<p style=\"text-align:center\"><img decoding=\"async\" alt=\"\" src=\"\/blog\/wp-content\/uploads\/2018\/12\/photography-setup.jpg\"><\/p>\n<p>Then I turned off the lights, pressed the flasher&#8217;s button, and took some pictures with a &frac14;-second exposure while rotating the camera anti-clockwise about a vertical axis.  This had the same effect as moving the flasher from left to right across the field of view, but was easier to do.  The resulting photo is effectively a graph of when each LED is on, with time on the horizontal axis.<\/p>\n<p>Because the three LEDs were in a triangle, I had to do this three times, once each for each pair of LEDs being aligned vertically one above the other.  It took a few tries to get a good trace of the lights in the three orientations, but it did work:<\/p>\n<p>Comparing red (top) and green (bottom) traces (ignore blue traces as the blue LED is off to the left):<\/p>\n<p style=\"text-align:center\"><img decoding=\"async\" alt=\"\" src=\"\/blog\/wp-content\/uploads\/2018\/12\/R-above-G.jpg\"><span style=\"padding-left:24px\"><\/span><img decoding=\"async\" alt=\"\" src=\"\/blog\/wp-content\/uploads\/2018\/12\/R-above-G-trace.jpg\"><\/p>\n<p>The red LED turns on pretty much at the same time as the green one turns off.  Then when the red LED turns off, there is a period when neither the green nor the red is on.  (Presumably the blue one is one during that time, but we can&#8217;t tell that from this trace because of the offset of the blue LED.)<\/p>\n<p>Comparing green (top) and blue (bottom) traces (ignore red traces as the red LED is off to the left):<\/p>\n<p style=\"text-align:center\"><img decoding=\"async\" alt=\"\" src=\"\/blog\/wp-content\/uploads\/2018\/12\/G-above-B.jpg\"><span style=\"padding-left:24px\"><\/span><img decoding=\"async\" alt=\"\" src=\"\/blog\/wp-content\/uploads\/2018\/12\/G-above-B-trace.jpg\"><\/p>\n<p>The green LED turns on as the blue one turns off.  When the green turns off, neither blue nor green is on.  (Presumably the red is on during this time.)<\/p>\n<p>Comparing blue (top) and red (bottom) traces (ignore green traces as the green LED is off to the left):<\/p>\n<p style=\"text-align:center\"><img decoding=\"async\" alt=\"\" src=\"\/blog\/wp-content\/uploads\/2018\/12\/B-above-R.jpg\"><span style=\"padding-left:24px\"><\/span><img decoding=\"async\" alt=\"\" src=\"\/blog\/wp-content\/uploads\/2018\/12\/B-above-R-trace.jpg\"><\/p>\n<p>The blue LED turns on as the red one turns off.  When blue turns off, neither is on, but presumably green is.<\/p>\n<p>Putting this all together, we can be fairly sure that the sequence is green, red, blue, green, red, blue, etc.  I.e., the cycle is anti-clockwise.  Also, there is a consistent measurement of very close to four cycles of the pattern during the &frac14;-second exposure, so we can estimate that the flashing is happening at about 16Hz.<\/p>\n<h2>Extra study<\/h2>\n<p>Thanks to <a href=\"http:\/\/olivernash.org\/\">Oliver Nash<\/a> offering the use of his iPhone with its 240fps video capture ability, I was able to confirm the above.  YouTube has <a href=\"https:\/\/www.youtube.com\/watch?v=pT87a9oflU4\">the actual video we took<\/a>, cropped to the section of relevance, but the following GIF recreation gives a pretty good idea of what the flasher looks like at \u215b speed:<\/p>\n<p style=\"text-align:center\"><img decoding=\"async\" src=\"\/blog\/wp-content\/uploads\/2018\/12\/flasher-one-eighth-speed-recreated.gif\"><\/p>\n<p>The sequence matches what I got originally, and the estimate of 16Hz is supported by the video too &mdash; counting cycles gives an estimate of just over 14Hz.<\/p>\n<h2>Future work<\/h2>\n<p>Oliver also pointed out that there would be interesting things you could do if you mounted one of the flashers on a motor.  If you got everything lined up properly, then at various speeds of rotation you would get different effects.  I think you ought to be able to get all three colours mixing, giving the effect of a white light.  I initially thought you might be able to mix pairs of colours, but now I&#8217;m not so sure.  I&#8217;m unlikely to get round to this, but it would be cool!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A friend kindly gave us some flashing-light stickers for Hallowe&#8217;en, and the natural thing to do with them once the festivities were over was to dissect them. So we did this, and found that each contained a square circuit board about 25mm on a side. When you press a little button in the middle, three coloured LEDs &mdash; red, green, blue &mdash; flash rapidly for about twenty seconds. It looked like they were flashing round in a circle, but too quickly for me to be sure of the sequence. To investigate, I set up the flasher approximately vertically, held in a lump of Blu-tack: Then I turned off the lights, pressed the flasher&#8217;s button, and took some pictures with a<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1464","post","type-post","status-publish","format-standard","hentry","category-uncategorized","comments-off"],"_links":{"self":[{"href":"https:\/\/redfrontdoor.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1464","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/redfrontdoor.org\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/redfrontdoor.org\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/redfrontdoor.org\/blog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/redfrontdoor.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1464"}],"version-history":[{"count":2,"href":"https:\/\/redfrontdoor.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1464\/revisions"}],"predecessor-version":[{"id":3724,"href":"https:\/\/redfrontdoor.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1464\/revisions\/3724"}],"wp:attachment":[{"href":"https:\/\/redfrontdoor.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1464"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/redfrontdoor.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1464"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/redfrontdoor.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1464"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}