Outrageously cool WS2812-NeoPixel-based clock

April 20, 2015

Max The Magnificent-April 20, 2015

Well, I am all aquiver with excitement. When I returned from my trip to the UK last week (to celebrate what would have been my dear old dad's 100th birthday) I found a package waiting for me in my office.

The outside of the package informed me that its sender was my chum Duane Benson, so I was reasonably confident that this was going to contain the PCB he'd created to implement the spectrum analyzer shield for my BADASS Display. And, indeed, when I opened the box, the first thing I saw was a small plastic bag containing a couple of these PCBs along with the associated headers.

Actually, the main package was significantly larger than this board. I remember thinking at the time that Duane was being a tad enthusiastic on the packaging front. In fact, I was just about to throw the box away when I realized it contained something else. When I looked closer, I discovered a 60-element NeoPixel ring (this is actually formed from four 15-element NeoPixel segments) from AdaFruit.

Now, I've been using NeoPixels in a lot of my recent projects (see Using WS2812-based NeoPixels in embedded systems), and I'd been lusting after one of these rings for a while, so I was jolly excited to finally have one in my sweaty hands. I was just starting to ponder some of the things I could do with this little beauty when I realized that it was accompanied by a custom-designed circuit board.

Well, what would you do? There wasn't any note accompanying the ring, but there was a micro-USB socket on the board almost begging for power to be applied, so I immediately did so, and the ring lit up looking much like the image above.

It didn’t take too long to realize that this was a clock. The pink pixels indicate the hours, the yellow pixel indicates the current hour, the green pixel indicates the current minute, and the blue pixel (a bit hard to see here) indicates the current second.

Sometime later, when I finally got around to checking my email, I found a message from Duane saying: "The spectrum analyzer board should be there when you get back. Also, you'll need these instructions for a little something extra I put in the box." This link took me to the LeoNeo Clock Kit page on Duane's website where I discovered this video, detailed build instructions, and the source code for the sketch (program) running the clock.

In addition to the MCU (which looks like an Arduino Leonardo to the Arduino IDE), there is a real-time clock (RTC) chip, an ambient light sensor, and two control buttons. You can use the buttons to vary the overall brightness of the NeoPixels and to set the time. Whatever brightness you set as the base level, the system will use as a starting point to brighten or dim the display based on the ambient light.

Now, I want to go on record here as saying that Duane has done a masterful job. His circuit board is a joy to behold (not the least that he solders all of the surface-mount components by hand), and the board-ring combo looks absolutely amazing in real life. On the other hand... displaying the hours, minutes, and seconds on the same ring can be a tad confusing to the observer. Also, I always feel that the more tri-colored pixels you have, the better life is (this is a simple rule-of-thumb, but it's served me well over the years).

The bottom line is that I started to ponder making one of these little beauties of my own. Unlike Duane with his custom board, I'll start out using an Arduino Uno or Arduino Mega for my prototype (I may move on to a custom board later). I also started to think about augmenting the 60-pixel ring with a 24-pixel ring and a 12-pixel ring as illustrated below.

In the case of the real-time clock, I'm going to use a ChronoDot Module from Adafruit, because I've already deployed these in my Vetinari Clock and my Inamorata Prognostication Engine projects; they are easy to use and work really well.

I'm still noodling about all of this, but my current thoughts are to place the NeoPixel rings behind a circle of translucent white glass, which will be embedded in an equilateral triangle of black/ebonized wood. The triangle's corners will be rounded off, and the whole thing will have an ultra-simplistic look and feel as illustrated below.

Of course, this ultra-simplistic look will be deceiving. For example, it will be possible to place the triangle using any of its faces as the base, and the clock's display will automatically respond to accommodate this. I could achieve this using two or three simple Tilt Ball Switches, but I'm rather tempted to performing some experiments with a Triple Axis Gyro, or perhaps even an all-in-one 9-DOF Sensor (where "DOF" stands for "degrees of freedom"). In the case of this latter unit, a 3-axis accelerometer can tell you which direction is down towards the Earth (by measuring gravity) or how fast the board is accelerating in 3D space; a 3-axis magnetometer can sense where the strongest magnetic force is coming from (generally used to detect magnetic north); and a 3-axis gyroscope can be used to measure spin and twist. By combining all of this data, the clock will have a really good idea as to what is happening around it (yes, I said "will" because while writing this I've decided that my masterpiece deserves nothing less than a 9-DOF sensor).

I'm also planning on adding a sound effects card that can play and mix multiple audio streams. A few of us have been looking into designing and building our own card (see this column for more details). However, Duane just pointed me towards a very interesting card called the WAV Trigger from SparkFun that appears to offer most of the capabilities I need.

In addition to playing various sounds to indicate the passing of the hours, minutes, and seconds, I'm also planning on having the clock respond to being tapped or moved, saying things like "Oi! Have you washed your hands?" and "Hey! Don’t be so rough!" and "Oooh... that feels nice."

The really cool thing is that I showed Duane's clock to my chum Ivan who sits in the next bay. Ivan and I are both somewhat competitive, so he's decided to build one of these clocks also, and then we're going to compete with each other to try to out-do the other with the sophistication of our effects. We've both ordered our 60-, 24-, and 12-pixel rings and ChronoDot real-time clocks. (Ivan doesn’t yet know that I've ordered a WAV Trigger card -- you have to keep a little something in reserve LOL.)

I'll be posting update blogs and videos in the weeks to come. I'll also be making all of my design files and program source code files available for anyone else who wants to build one of these. Actually, it would be great if you decided to build one yourself, because then you could join in the competition with Ivan and myself to see who can come up with the best effects. In the meantime, I'd be very interested to hear your thoughts on all of this.

Join over 2,000 technical professionals and embedded systems hardware, software, and firmware developers at ESC Boston May 6-7, 2015, and learn about the latest techniques and tips for reducing time, cost, and complexity in the development process.

Passes for the ESC Boston 2015 Technical Conference are available at the conference's official site, with discounted advance pricing until May 1, 2015. Make sure to follow updates about ESC Boston's talks, programs, and announcements via the Destination ESC blog on and social media accounts Twitter, Facebook, LinkedIn, and Google+.

The Embedded Systems Conference, EE Times, and are owned by UBM Canon.

Loading comments...