<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Crayfish Matrix on Medium]]></title>
        <description><![CDATA[Stories by Crayfish Matrix on Medium]]></description>
        <link>https://medium.com/@highenergybeams?source=rss-1120f5efa92c------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*f0PgkEx6p1YWFgkO.jpg</url>
            <title>Stories by Crayfish Matrix on Medium</title>
            <link>https://medium.com/@highenergybeams?source=rss-1120f5efa92c------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 14:43:30 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@highenergybeams/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Low-quality USB cables cannot charge your phone as quickly]]></title>
            <link>https://highenergybeams.medium.com/low-quality-usb-cables-cannot-charge-your-phone-as-quickly-ba69c64ab486?source=rss-1120f5efa92c------2</link>
            <guid isPermaLink="false">https://medium.com/p/ba69c64ab486</guid>
            <category><![CDATA[smartphones]]></category>
            <category><![CDATA[electronics]]></category>
            <dc:creator><![CDATA[Crayfish Matrix]]></dc:creator>
            <pubDate>Wed, 25 Nov 2020 02:09:51 GMT</pubDate>
            <atom:updated>2020-11-25T02:22:34.655Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xb6_aypLHfvUH-KK2phlAw.png" /></figure><p>Cheap micro “USB” cables that ship with cheap devices as power cables often only contain power and ground lines within them and omit the necessary data lines in order to save a few cents.</p><p>Normal USB 1.0, 1.1 and 2.0 cables contain 4 wires within them. Power, ground, D+ and D-. The latter two are the data lines that are actually used to transfer data.</p><p>This means these cables cannot be used as serial data cables and could fairly could be called “fake” USB cables, the spec of which was meant to implement a serial data bus.</p><p>While these cables can provide some power, there is also another effect of omitting data lines: D+ and D- are used to negotiate the amperage level with compatible chargers.</p><p>Without being able to negotiate power levels, the cable will not be able to supply as much power. USB 1.1 is supposed to supply 500 milliamps over the power and ground lines, which at 5V is 2.5 watts. But if it’s able to negotiate, compatible chargers can supply several times as much power.</p><p>Apple chargers, for example, indicate that they can supply more than 1 amp to the device by supplying 2 volts on the D- line and 2.68 volts on the D+ line. Sony, meanwhile, sends 3.3 volts on both D+ and D-. There’s another scheme in official USB specs, and there are probably countless others, all constantly changing as vendors try to make devices that can uniquely identify their own proprietary chargers. But all such schemes use the D+ and D- lines in order to do it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/615/1*VvrtaKbqu-4uKBIJOwzS6w.png" /></figure><p>To test this theory, I used two micro USB cables for which I had tested the presence of the D+ and D- lines: one with the data lines and one without, and a high-<a href="https://amzn.to/3o6MZ7t">quality Anker charger</a>, a <a href="https://amzn.to/3pYEJbf">USB power meter</a>, and the same Android phone.</p><p>Sure enough, the “fake” cable was only able to charge the phone at 0.4 amps and 2.1 watts, and the real USB 1.1 cable supplied 1 amp and 5.4 watts.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YoGZTHl3NSqQZBMZI7Fv2w.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jebEynLylaNnSxoUw6Bhkg.jpeg" /></figure><p>The fact that these cables behave so differently despite externally looking the same and the issue is so easy to test for (here it comes) <a href="https://www.tindie.com/products/16907/">I designed my own simple tester</a>. The theory of operation is as simple as possible: it just lights up leds for which lines are available, which can also tell you if a cable is too worn out.</p><p>I wrote some silly product copy and put it up on <a href="https://www.tindie.com/">tindie</a>, which is sort of like etsy for electronics.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MSuBPpQFC7UgKkFJRKRV7w.jpeg" /><figcaption>an early one I assembled by hand, note the somewhat creatively-applied soldering</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*13iieHkYw-QT_YdUN-L_CA.jpeg" /><figcaption>how you use it. I used fiverr to get this usage diagram made.</figcaption></figure><p>Getting it ready for a small production run was a journey in itself, but a good learning experience given the extremely simple design. Everyone I’ve given one to and hopefully most of the people who’ve bought one loved the idea.</p><p>References</p><ul><li><a href="https://www.maximintegrated.com/en/design/technical-documents/tutorials/5/5936.html">https://www.maximintegrated.com/en/design/technical-documents/tutorials/5/5936.html</a></li><li><a href="https://www.eetimes.com/usb-battery-charging-its-harder-than-it-looks/#">https://www.eetimes.com/usb-battery-charging-its-harder-than-it-looks/#</a></li><li><a href="https://electronics.stackexchange.com/questions/123172/what-is-the-ideal-way-to-handle-data-pins-d-and-d-on-a-usb-power-adapter-to-be">https://electronics.stackexchange.com/questions/123172/what-is-the-ideal-way-to-handle-data-pins-d-and-d-on-a-usb-power-adapter-to-be</a></li><li><a href="https://www.usb.org/sites/default/files/USB_Battery_Charging_1.2.pdf">https://www.usb.org/sites/default/files/USB_Battery_Charging_1.2.pdf</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ba69c64ab486" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[LED Matrix clock]]></title>
            <link>https://highenergybeams.medium.com/led-matrix-clock-810e5b2c9417?source=rss-1120f5efa92c------2</link>
            <guid isPermaLink="false">https://medium.com/p/810e5b2c9417</guid>
            <category><![CDATA[esp8266]]></category>
            <category><![CDATA[diy]]></category>
            <category><![CDATA[led]]></category>
            <category><![CDATA[arduino]]></category>
            <dc:creator><![CDATA[Crayfish Matrix]]></dc:creator>
            <pubDate>Mon, 04 Mar 2019 18:43:47 GMT</pubDate>
            <atom:updated>2019-03-04T23:35:48.385Z</atom:updated>
            <content:encoded><![CDATA[<h3>Cardboard LED Matrix clock</h3><p>I had the idea to use a cheap led matrix to make a clock.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*evqjNOEKvWvgD9uOHxHdCg.jpeg" /></figure><p>I chose an ESP8266 to drive the matrix. With the ESP8266’s native wifi, I would be able to get the time from NTP, so it would always have perfect time including automatically adjusting for daylight savings.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_f7s5QI1SmVziVRg6v9vxQ.jpeg" /></figure><p>For the display, I used 4 part 8x8 led matrix array, with a built in MAX7219 controller chain. These can easily be found on ebay or <a href="https://www.amazon.com/Wangdd22-MAX7219-Arduino-Microcontroller-Display/dp/B01EJ1AFW8">amazon</a>. Since I was running the led matrix off of USB bus voltage (5V) I used an SN74AHCT125N as a level shifter to the ESP8266’s 3v logic.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BPip0RyI2NAsm-QFww-glw.jpeg" /></figure><p>I used the excellent <a href="https://github.com/olikraus/u8g2">U8g2</a> graphics library to drive the display, and spent ages making custom fonts to fit the time, day of week, month and day of month onto the mere total 256 pixels of the display.</p><p>I realized that it would look much cooler to have the LEDs shine through something rather than having the bare LED matrix by itself. This way it’s kind of “impossible” looking, and it looks a lot cleaner than having to look at the LED pixels that are inactive. I considered mylar, but ultimately decided to just use ordinary printer paper. You could also use acrylic plastic, a thin wood veneer, or some kind of cloth for this effect.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cx0mtAfj9TkeiHmUwUPjQA.jpeg" /></figure><p>I decided it would be kind of annoying if the LEDs were on full brightness at night, so I decided to add a light sensor. The ESP8266 will detect the ambient light level in the room and adjust the LED brightness accordingly, full brightness during daylight and dimming automatically when the lights are turned off at night. Instead of using one of those old fashioned analog cadmium photocells, I splurged and got a new-fangled digital lux sensor. I used a TSL2561 sensor <a href="https://www.adafruit.com/product/439">from Adafruit</a>. This way I wouldn’t need to come up with a logarithmic calibration curve nor deal with the ESP8266’s funky analog input support, with just one ADC pin that is only safe at up to like 1.5v. Another, smaller benefit is that if anyone were to eat the clock they would be less poisoned.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NH_hz13BGwXaYPk_v9fUmA.jpeg" /></figure><p>For the assembly I decided to get a little fancy and connectorize. I knew that in the enclosure I would need to shove the matrix and the light sensor somewhere away from the controller board and it’s always nice to be able to do this without having to have every party already permanently connected to every other party. Even with the correct tools, crimping the wires can be somewhat time consuming. I didn’t have dupont connector housings so I used some pre-made dupont ribbon jumper wires and replaced one end of them with JST-PH connectors. I superglued the dupont housings together in the correct pin order on the opposite side.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fQgwyXUcZWwloJftOBiC7w.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0FtSM5llmP5BuIgRUmydXQ.jpeg" /></figure><p>For the enclosure I decided to use super thick 1&quot; corrugated cardboard.</p><p>It started like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lt2Mt2FhLNg85FgD8l65JA.jpeg" /></figure><p>I hacked at it with a box cutter and a pocket knife until it looked like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*m4rK1ZPc-S-yLN5p1pk8Bg.jpeg" /></figure><p>I considered trying to use a laser cutter to make the cuts perfect but felt like the weathered, imperfect look was an interesting contrast against the perfect, futuristic led display.</p><p>The cardboard didn’t end up being quite thick enough so I had to add a couple layers of ordinary packing cardboard. Corrugated cardboard, by the way, is really surprisingly sturdy as long as it hasn’t been bent.</p><p>I seated the led matrix into the cardboard. I protected the solder pin lugs with kapton tape to prevent shorts from the controller board that would be placed against it:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LJmIVih16dUkflimL8fPrg.jpeg" /><figcaption>.</figcaption></figure><p>I seated the lux sensor into the little extra square hole and the controller assembly against the back of the led matrix:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AU1ctMw7z_APxNavJZJk4g.jpeg" /></figure><p>I used clear gift wrap tape to keep the matrix flush in against the front of the cardboard. I cut the paper to size and attached it to the front of the box with double sided tape.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*v3ygmWAK2Gkp-HAjNbHM5g.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZVCMueLx4J20C-mIDRb47w.jpeg" /></figure><p>The finished product. The leds look pretty overexposed in the photos (PWM probably confuses the camera CCD) but are a much more even red color in real life:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Pw3EuBjqD52ji4kYloSzGQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*evqjNOEKvWvgD9uOHxHdCg.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JEo-r9IbuU9HzgUq6tmsLA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8o0-2VidqSfgPXwRLqytPg.jpeg" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=810e5b2c9417" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Adding some buttons and dials]]></title>
            <link>https://highenergybeams.medium.com/adding-some-buttons-and-dials-e26493e9ef98?source=rss-1120f5efa92c------2</link>
            <guid isPermaLink="false">https://medium.com/p/e26493e9ef98</guid>
            <category><![CDATA[led]]></category>
            <category><![CDATA[arduino]]></category>
            <category><![CDATA[electronics]]></category>
            <dc:creator><![CDATA[Crayfish Matrix]]></dc:creator>
            <pubDate>Sun, 21 Jan 2018 03:08:13 GMT</pubDate>
            <atom:updated>2018-01-21T03:22:41.085Z</atom:updated>
            <content:encoded><![CDATA[<p>I decided to take my <a href="https://medium.com/@highenergybeams/led-logo-sign-609e9a42d622">LED controller</a> to the veritable “next level” by making it configuration with a bunch of buttons and dials somehow.</p><p>There’s a fair amount of different parameters you could change in the algorithm. I thought about this for a while. How should a simple set of buttons and switches and whatnot form a physical interface for this purpose?</p><p>Eventually I decided on the following design: Three flap switches represent a 3-bit register address selector (i.e., values = 0–8), and a rotary encoder to increment or decrement the register selected by the switches.</p><p>If you don’t know what a rotary encoder is, it’s like the volume knob on your stereo but it spins forever rather than having max and min stopping points, and instead of being a variable resistor like a volume knob it sends out digital pulses for each tiny increment you turn it that have to be interpreted digitally by a microcontroller. It has no absolute position like a volume knob, but instead you can only say that it turned left or right and by how much, and assign whatever meaning you want to that.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/402/1*bN_BlgZVRHb5A0tuGFP1rw.png" /><figcaption>VHS-quality image of a couple of rotary encoders found via google image search.</figcaption></figure><p>I had a bag of rotary encoders that I had ordered from China from ebay several weeks prior already on hand.</p><p>I also threw in a big power switch and a panel mount button to act as a reset button. The big power switch was rated for high AC or DC current, but it actually does not directly switch power off, but instead it’s read by the microcontroller as a digital input and the microcontroller shuts off the LEDs and puts itself into sleep mode. Since it’s all digital you can do whatever you want programmatically, so I gave it a cool shutdown/startup animation, complete with an 8 bit implementation of a cubic easing function, so basically it’s almost an iPhone at this point.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*EOwflVFZfqmuFAzQ-YIwAg.png" /><figcaption>Example of a panel mount momentary switch, better known as a “button”.</figcaption></figure><p>I also added a reset button, in the form of a separate panel mount switch. The name of the game with all of this is to look for “panel mount” buttons/switches, that way you can just cut a fitting hole through whatever your enclosure is and the component comes with nuts and washers that hold it in place. Incidentally the momentary switch was ludicrously bouncy, every time you press it there are several false positive state changes — this happens from vibrations or something when the springs inside microscopically slap together and momentarily close/open more than once over the course of a few nanoseconds.</p><p>I was fussy about the flap switches and couldn’t find any that I liked that I had on hand and went ahead and ordered <a href="https://www.jameco.com/z/1MS9T6B11M1QE-Toggle-Switch-On-None-Off-Single-Pole-Single-Throw-Toggle-Solder-Lug-5A-120VAC-28VDC-Volt-Panel-Mount_317287.html">some that looked nice from Jameco</a>.</p><p>I got some fresh tupperware to contain everything in. I would need to cut holes in it for connectors to fit through and onto which the panel mount stuff would be panel mounted.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LoMRbMDG8vj10Mq2S15fJQ.png" /><figcaption>The board as I started to modify it. The capacitors and resistors form an RC network for the rotary encoder’s two digital outputs. Incidentally I used different debouncing techniques for every single type of input out of some misplaced sense of novelty-seeking overengineering. The column of pins on the left side across rows 17–23 will form part of a connector for all of the input components along with a shared ground.</figcaption></figure><p>I measured the sizes of all of the new components, and made a template in inkscape with everything nice and symmetrical. I printed the template out and taped it to the back of the enclosure and… created the holes by melting through the plastic with the soldering iron. So far I haven’t been struck down by any offended gods yet, though I realize that I might have tempting exactly such a fate. I didn’t take any picture of this part so as far as anyone knows it never happened.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*67t71MMkWOD64aupwSRmYQ.png" /><figcaption>Inkscape template.</figcaption></figure><p>Anyway, the rest of the hardware construction was just wiring. I used the nice silicone coated stranded wire that’s all the rage these days. It’s very flexible, the silicone doesn’t melt and it’s insulative enough you can press on it with your finger while soldering to it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QrnDZG8mWGMb-fQLF0Fl4w.jpeg" /><figcaption>Construction in progress, mostly finished.</figcaption></figure><p>For the software, I defined 8 different parameters and gave them all mins, maxes, increments, and defaults, and found ways to fit them all in 8 bits each. It was fun writing the logic to overflow and/or bound the values to these custom limits while also preventing any actual unintentional programmatic 8 bit overflows.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cI0GdJh0sDhXnRofVyCogg.png" /><figcaption>Code to define the registers. Each register gets an address 0–7 as per its #define macro.</figcaption></figure><p>And it all works.</p><p>What do the parameters do? Essentially the LED strip is represented as a circle flying through a curved 3d Perlin noise space. So you can move in any 3d direction or zoom in or out or go backwards or forwards. You can interpolate the density of Perlin noise to different color palettes. And you know, control the brightness. That sort of thing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SnRkzhI-ggn4cBceGE3Lbw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*svCDGyw_AkWSba-dQsN9UQ.jpeg" /><figcaption>Finished, outside and inside.</figcaption></figure><p>I wanted to extend the 3 pin RGB led cable but I didn’t have any matching ribbon wire so I soldered part of a broken unshielded USB cable to it instead and ignored the data+ wire. Also I used a lovely pink real USB cable to actually power the thing in situ.</p><p>That’s it! Hopefully this project will bring lots of mysterious fun to the office.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e26493e9ef98" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[LED logo sign]]></title>
            <link>https://highenergybeams.medium.com/led-logo-sign-609e9a42d622?source=rss-1120f5efa92c------2</link>
            <guid isPermaLink="false">https://medium.com/p/609e9a42d622</guid>
            <category><![CDATA[led]]></category>
            <category><![CDATA[arduino]]></category>
            <category><![CDATA[laser-cutting]]></category>
            <category><![CDATA[diy]]></category>
            <dc:creator><![CDATA[Crayfish Matrix]]></dc:creator>
            <pubDate>Mon, 18 Dec 2017 01:32:59 GMT</pubDate>
            <atom:updated>2017-12-18T18:28:31.081Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*u5g-4cnIJ7fwxw0_0LlIsg.png" /></figure><p>A coworker mentioned during lunch on Monday that he was thinking of having a holiday party. He further continued that it could be be LED themed.</p><p>“Interesting,” I said. “I have heard of these LED thingies before and would be interested in learning more about them.” It was a propitious prospect, and I was excited.</p><p>Later he suggested that that we should have a sign with our company’s logo on the door, so people would know what house it was. He described its size with his hands, about a foot or two across.</p><p>Since he is a product manager, by the laws of nature I was compelled to carry out his design. As he spoke, I came up with an engineered solution to this problem in my mind.</p><p>My idea was a simple cut out logo, backlit by LEDs, built using whatever materials I could find.</p><p>I started with the Twitter logo. I found an SVG version of it and imported it into <a href="http://inkscape.org/">Inkscape</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/956/1*4PGoNvCmN0oBHQ4PrBF2cg.png" /></figure><p>I used the Outset Path command in Inkscape to make a larger version of the path. This is where the LEDs would be mounted.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/602/1*SyabaJaDAbPnvbJNdIlMFg.png" /></figure><p>I tried to size the logo such that the length of the outset path was exactly the length of the led strip I had (1 meter). Ultimately I got it a little wrong and had about 6 leds extra.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KO4VfMXSG-l2yUsX9b4Cpw.png" /></figure><p>Next, I used a laser cutter to cut the logo out of a piece of scrap wood.</p><p>It came out looking fantastic. The edges of the wood did not look singed or scorched, a common problem with trying to laser cut wood. I have no idea what kind of wood this is so I guess I got lucky with the laser settings.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*e0OZx0hhQx0cAJc8RFdIDQ.png" /><figcaption>All the laser cut layers just after cutting.</figcaption></figure><p>Next, I cut the outset logo out of cardboard. I used discarded Amazon boxes. I guessed that the width of my led strip was about 3 thicknesses of corrugated cardboard, which turned out to be exactly right.</p><p>I also cut a rectangle back layer and a layer of white paper. All of this took about twenty minutes.</p><p>Assembly was simple. I used an extra led strip that I had laying around. I taped the strip to the inside of the cardboard outset logo using packing tape, then taped all of the cardboard layers together using the packing tape.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*46NKLJyXpGTnqcT7jCLghw.png" /><figcaption>Led strip taped into inside edge of the cardboard outset.</figcaption></figure><p>I cut out a channel in the innermost layer of cardboard near the bird’s mouth (sorry <a href="https://www.today.com/money/twitter-bird-has-name-larry-235179">Larry</a>) for the wires to feed out from, manually using a box cutter.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ta8ZiOBv7Sn_jgbNZolamA.png" /><figcaption>All the cardboard layers + paper layer taped together.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JxHTUZ7YkiG9cfVq2jO7Tg.png" /><figcaption>How the wood layer fits over the inner cardboard layers.</figcaption></figure><p>I then glued the wood layer on top of the cardboard layers using hot glue.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yA-q8nNU04ZN51EfgwqXEg.png" /><figcaption>The completed physical construction</figcaption></figure><p>As for the controller, I used a Arduino clone that I got from a high quality seller in China. I buy these in batches occasionally and always have a bunch of them laying around. I installed a button to change modes (didn’t end up using this much), and a couple passive components to help with driving the LED strip from the microcontroller.</p><p>I put the controller in a hard plastic food container that had temporarily been involved in another project that already had a bunch of holes cut in it. Ideally I would have liked to make the controller fit within a hole cut out of the layers of cardboard, but didn’t feel like investing time on this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Z7WFiH1yf8fxQCJB-jJ40A.png" /></figure><p>Power was supplied from an iPhone charger and a spare micro USB cable.</p><p>For the algorithm, I used a <a href="https://en.wikipedia.org/wiki/Perlin_noise">Perlin noise</a> function. Perlin noise is really cool. It’s a function to deterministically create a random-looking n-dimensional walk. You can fast forward or rewind it, zoom in or out, revisit, etc., arbitrarily without needing to keep any track of state, and it always stays within a given set of bounds. So if you wanted two dimensional noise, you feed it two parameters as input and it will output a random-ish number as a result. As you change the two numbers the output of the function will change the random-ish number proportionally. You can use this to generate a texture, just plug in the (x, y) coordinates for every point along a plane. It’s really cool and Ken Perlin won an Academy Award for the usefulness of the algorithm in early computer animation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*Tcx-4Y2qyfqRuxXI2Q9XHw.png" /><figcaption>An example of some 2D Perlin noise. (<a href="https://stackoverflow.com/questions/37508938/perlin-noise-algorithm-does-not-seem-to-produce-gradient-noise">source</a>)</figcaption></figure><p>I used three dimensions. I assume the logo is a perfect circle, and use two dimensions to form an angle. Angles being circular means you often can’t sensibly use normal math on them, because they loop around: E.g., the difference between 360° and 0° is zero. But you can <a href="https://www.mathsisfun.com/polar-cartesian-coordinates.html">convert angles into two more manageable cartesian dimensions</a>. Representing the led strip as a circle in this way means that patterns will loop around evenly rather than being discontinuous across an arbitrary point. I move along these two dimensions according to a sine function to give it a sort of pulsing effect rather than just monotonously shifting. The third dimension is a function of time and so moves linearly over the course of time.</p><p>Oh, and I used the excellent <a href="http://fastled.io/">FastLED</a> library to interface with the WS2812b leds. I can’t say enough good things about FastLED.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*z_bc_tv8aZZA7EdrU0LvlA.png" /><figcaption>Page full of code, showing the important part of the algorithm. Ultimately I used <a href="https://gist.github.com/StefanPetrick/5e853bea959e738bc6c2c2026683e3a4">a found snippet using Perlin noise</a> and tweaked it, most importantly to represent a circular ring using polar conversion rather than a square matrix.</figcaption></figure><p>I got up early before work and spent about 90 minutes to two hours playing around with the algorithm. This ended up taking up the largest amount of time of any part of the project. The result was really great:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fplayer.vimeo.com%2Fvideo%2F247731732&amp;dntp=1&amp;url=https%3A%2F%2Fplayer.vimeo.com%2Fvideo%2F247731732&amp;image=http%3A%2F%2Fi.vimeocdn.com%2Fvideo%2F673063331_1280.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=vimeo" width="1920" height="1080" frameborder="0" scrolling="no"><a href="https://medium.com/media/8c2c5a14ca1b730d4c0820940223b906/href">https://medium.com/media/8c2c5a14ca1b730d4c0820940223b906/href</a></iframe><p>We hung it up outside of the party and no one had any trouble finding the place. It looks even better in the dark. Everyone seemed to appreciate the LED goodness.</p><p>It’s great having a project where almost everything went right. I purchased nothing to make it, making entirely out of extra junk I had laying around and refuse other people were throwing out. I had more ambitious idea to make an acrylic led-lit badge for party attendees, came up with a good design for it and acquired all of the materials to make them but didn’t have enough time to put it all together, so we’ll have to shelve that for another time.</p><p>If I want to spend more time on the project especially if I were to put it up at work, I might put some dials on the enclosure so you can play with the parameters of the animation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*O0jfNCKNSbyRq9speiKdEQ.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=609e9a42d622" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>