Create a Cunning Chronograph with Arduino
I have to admit that I love light-emitting diodes (LEDs). As I often say, “show me a flashing LED and I’ll show you a man drooling.” For some reason, I’m also attracted to projects that involve displaying time in multifarious ways.
In the not-so-distant past, a few of my friends and I decided to engage in a friendly competition. The idea was to create a time-keeping device that we referred to as Cunning Chronograph using three rings formed from tricolor LEDs known as NeoPixels from Adafruit. The original devices we used employed red, green, and blue (RGB) sub-LEDs. I just revamped my clock using more recent RGBW (red, green, blue, and white) sub-LEDs. In this new implementation, the inner display is a 2852 ring with 12 pixels, the middle display is a 2861 ring with 24 pixels, and the outer display is a 60-pixel, 6.2 inch (in.) ring (outer diameter) formed from four 2874 quarter rings, each with 15 LEDs (Figure 1).
Figure 1: A 60-pixel 6.2 in. (outer diameter) ring formed from four 15-pixel 2874 quarter rings from Adafruit is ideal for displaying data like the minutes and seconds on a clock. (Image source: Adafruit)
The underlying idea behind this competition was to use the three rings to present the current time in the most intuitive manner possible. Although we never actually got around to fully defining the scoring schema, it was generally understood that extra points were to be awarded for any additional features such as a calendar display, the ability to respond to music, and so forth. Also, additional points could be scored for presentation in the form of the cabinet.
I have to give a shout-out here to my chum, Steve Manley, who hangs his hat in the UK. Steve was a competitor in the Cunning Chronograph challenge and—like yours truly—he presented his first prototype using the raw NeoPixels. However, when Steve took his prototype into work to show his friends, the lady pushing the tea trolly around said, “It doesn’t look like a clock because it doesn’t have any hands!”
Stung by these harsh words, Steve invested in a 3D printer which he used to create a shell to hold his NeoPixel rings. The shell is formed from a base and a front cover. The rings are inserted in slots in the base and the front cover is then attached to the base. Steve was kind enough to provide the design files for me to fabricate my own shell (Figure 2).
Figure 2: The 3D printed shell designed by Steve Manley. Also shown are a 24-pixel ring and a 1/4 segment of the 60-pixel ring. The rings are inserted in slots in the base (right) after which the front cover (left) is attached to the base. (Image source: Max Maxfield)
In order to increase the effect, I sprayed my front cover with silver paint to reflect any light outwards. A diffuser formed from a sheet of translucent white plastic (not shown here) was then attached to the front of the display.
For my Cunning Chronograph, I decided to use Arduino’s A000067 development platform for the ATmega2560 microcontroller from Microchip Technology because I happened to have that board lying around at the time. The first thing I added was a 255 ChronoDot ultra-precise real-time clock (RTC) V2.1 breakout board (BOB) from Adafruit (see also, “Use Arduino BOBs to Quickly Evaluate Sensors and Peripherals”).
Once I had the clock function working, I added a DEV-13116 spectrum shield from SparkFun. This shield provides two 8-bit MSGEQ7 audio spectrum analyzer devices, which can be attached to the left and right channels coming from an appropriate audio source (I used my iPod). Each MSGEQ7 accepts an audio stream as input and splits it into seven different frequency bands. The Arduino can then access this data and use it to control the color and brightness of the pixels forming the rings.
In the case of my case (if you see what I mean), my friend Carpenter Bob constructed a hexagonal cabinet along with a hand-carved ring boasting 12 Celtic knots—one for each hour (Figure 3). I should probably point out that Bob made a second cabinet for himself, and I finished it off with the electronics and displays, and we called it “even stevens”.
Figure 3: The hexagonal wooden case with hand-carved Celtic knots created by Carpenter Bob. Also shown are the prototype breadboard electronics, which were subsequently reworked as a custom shield for the Arduino. (Image source: Max Maxfield)
Have you ever noticed that if you purchase a piece of furniture like a chest of drawers, the back of the cabinet tends to be unfinished because the people who built it assume no one will look behind? I’ve observed that much the same thing happens with a lot of people’s hobby projects. In my case, however, I like to give the back of my creations a little pizzazz on the off-chance that someone will take a look.
For my Cunning Chronograph case, I decided that I wanted the back to be reminiscent of a vintage radio. I think I achieved this (Figure 4), but I also went the “extra mile” with the vent holes in the middle, which provide a Morse Code representation of the saying, “How did it get so late so soon?”, by Dr. Seuss.
Figure 4: In addition to having a vintage look, the Cunning Chronograph’s back panel features a quote by Dr. Seuss in Morse code. (Image source: Max Maxfield)
One of the things about my hobby projects is that they never really end. In the case of the Cunning Chronograph, for example, I’m planning on adding a 2472 BOB from Adafruit (Figure 5). This BOB features a 9-degrees of freedom (DoF) BNO055 microelectromechanical systems (MEMS) sensor from Bosch.
Figure 5: In addition to a 3-axis accelerometer, 3-axis gyroscope, and 3-axis magnetometer, the BNO055 sensor on Adafruit’s 2472 BOB also includes an Arm Cortex-M0+ processor that performs sensor fusion. (Image source: Adafruit)
In addition to a 3-axis accelerometer, a 3-axis gyroscope, and a 3-axis magnetometer, the BNO055 also contains a 32-bit Arm Cortex-M0+ processor, which can access the raw data from the three sensors, perform sophisticated sensor fusion, and provide me with the data I need in a form I can use without my brains leaking out of my ears.
One way I’m planning on using this sensor is to detect which face of the hexagonal case is being used as the base. If I pick the cabinet up and rotate it, then a second or so after I’ve set it back down again, I want the clock display to sedately rotate back to its original orientation. Another possibility is that if the Cunning Chronograph is laid flat on its back, I can use the magnetometer data from the BNO055 to change the display into a compass.
There are many ways to keep track of time, but the best way is to have fun doing it. A few components, a breadboard, some friends, and a 3D printer is all it took to make the Cunning Chronograph. I’m sure there are all sorts of additional features I could add to this bodacious beauty. Do you have any suggestions you’d care to share? Better again, do your own and send it along: I’d love to see it!
Key Parts and Components