This will be the story and a guide of how you can create a wall clock like on this video. It’s a digital clock, I named it QClock, the outer light is the “long arm” for the minutes, the inner light is the “short arm” for the hours. The time, colors, method of showing the time, animations - all can be controlled on a small website, hosted by the clock itself.
The plan is to publish in two parts, the software will come soon, but first: the hardware.
Years ago we’ve bought a nice Braun wall clock and we loved it. It was clean, minimalistic, and what the family valued most: quiet. Years passed, and it became louder - well, relatively louder, it’s ticking was almost inaudible for me, but it bugged the rest of the family. We endured for a few weeks, then set off to get a new wall clock.
But the available clocks were terrible! Either large rectangles, with boring liquid-crystal displays, or loud mechanical ones. Some had alarmingly red glowing numbers… so in the end, the stressful “meh, I should build one” moment came!
Let’s see the specification:
- round (I’m kind of a conservative, on the topic of wall clocks)
- has arms (see above)
- quiet - has absolutely no sound
- does not light up the room in the evening
- but can be seen in the dark
- does not cost a fortune
Planning & Ingredients
Some ideas emerged, like magnetic arms, huge e-ink numbers (turns out there is such a thing), words, but none of these was right for us. Then one spring afternoon having coffee, an idea popped into my mind and started drawing. The project looked really promising as this plan was based on a few hardware elements, I was familiar with:
- NeoPixel RGB LEDs
- Tessel Microcontroller
NeoPixel LED strips
NeoPixels are bright, RGB - or RGBW, if you choose those - LEDs, which can be connected to each other, to form a strip of lights. To make things even more awesome, you can program a whole strip at the beginning, using 3 pins:
- Ground point,
- the signal input,
- a 5V power source, where the longer your LED strip the more current it will need (sometimes more than 2 Amperes!)
The LED strips are available with various “resolutions” - the number of LEDs on a 1-meter strip. I picked the average one, simple RGB with 60 LEDs on a meter. I needed approximately twice of the circumference of the planned clock since there is a strip inside and outside of the round frame.
As it turned out, to drive the NeoPixels from the Tessel you either need custom firmware or treat the LED strip as a servo engine (sort of) and figure out the rest yourself. This wasn’t an option for me, but luckily Tim Pietrusky from Live:JS showed me a small piece of hardware, that was designed specifically to drive the NeoPixels: the FadeCandy
This tiny piece of board can control 512 LEDs on 8 channels (thats 64 LEDs per channel). It can be connected to any computer - even the Tessel - with USB and has a well-documented protocol. The nicest part with FadeCandy, that it can interpolate between the data frames. This means it’ll calculate the transitions between the data you send it, based on the frequency you update the data.
This will be the frame of the clock, on which the LEDs are glued, basically a circle of any material. This was surprisingly easy to get: round embroidery wooden hoop, 30cm (~12”) in diameter, but these are available in several sizes. Pick the one you’d like!
To cover the LEDs, a circular bezel should be glued to the frame. Not too narrow, because the LED’s omit some light sideways, and they can be visible and distracting. Also not too wide, because if it hides too much light from the LEDs, reading time can be problematic, not too precise.
The material of the bezel is also significant, he less translucent, the better. I made mine from several layers of fine white paper, and it’s still letting some light through - which is not too nice.
First, I’ve wrapped the strip around and inside the wooden bezel so I could see how many LEDs are around the outer and the inner side of the frame - this will be the base of several further calculations.
Turned out that there are 60 LEDs outside, and 58 inside. FadeCandy can control 64 LEDs per channel, so it’s not possible to handle the whole clock as one single strip. The simplest solution is to treat the outer and the inner circle as separate channels.
Connecting to FadeCandy and power consumption
The NeoPixel strips have 3 ports on each end: GND, 5V, and DATA. For this size, the GND and the 5V on the two strips can be wired together. Above these, there is one data port for each strip, so a 4-wired cable is enough to connect the clock to the FadeCandy.
For larger setups, the LEDs use a lot of power, so usually, the 5V port is coming from a dedicated power supply with at least 2 Amperes. Luckily in our case, the power consumption is much lower. The FadeCandy has a small “hacker port” where the 3.3V point from the USB is accessible, so I tried to power the LEDs from that one, and it worked!
From this stage, connecting the FadeCandy to the Tessel is pretty easy, just connect a USB to Micro-USB cable to one of the Tessel’s USB ports. To make things a bit more sturdy, I packaged everything in an old ChromeCast box. This way I can put the clock controls to safety, minimizing the possibility of no accidental disconnection.
Stay tuned for the exciting second part, where I share some details of the software!