My home-made Adafruit-inspired clock

IMG_2304

 

My wife was recently away traveling and I decided that I wanted a project to keep me busy and out of trouble in her absence.   I determined that I would build her a custom clock while she was gone.   I began sketching out my design and found some great parts on Adafruit for my project.

I decided on using a pair of Adafruit’s 16×8 matrices that include the I2C control backpacks.  An Adafruit Feather Huzzah seemed the logical choice for microcontroller, both for its Wi-Fi connectivity but also it’s generous computing resources (particularly when compared with ATmega 328s).

I also thought it would be cool to leverage an Adafruit Feather OLED display shield as a secondary display (for date, etc.).  This, too, is I2C-controlled.  A DS3231 was to serve as the Real Time Clock (RTC) for its TCXO and extremely low drift. I used Adafruit’s Feather DS3231 shield.

A level shifter was necessary as some components were 3v logic (the Huzzah, RTC and Feather OLED) while others 5v, such as the matrices.  Adafruit’s bidirectional-level shifter made this very easy.

Using a number of commonly-available libraries I was able to build  sketch which connects to my local Wi-Fi, syncs the RTC to NTP and then displays, time, date and temperature on the screens.   We re-sync with NTP periodically.  The “1.0” version of the code, fully functional and polished, was just shy of 1000 lines.  Were it not for the copious available libraries this would be much more!

IMG_2267

The complete parts list:

First there was some prototyping and ensuring my concept worked.

IMG_2272

IMG_2274

Then I cut the project box with a cheap, crappy Xacto knife.  It took a while but eventually (sloppily) cut the pattern that I needed.   Then I sanded and primed!

 

IMG_2283

Now paint:

IMG_2292

While the satin black paint on the enclosure was drying, I got all of my components in a semi-final state:
IMG_2287

I did some testing here and figured out I should be using a capacitor on the 5v power with my NeoPixel (status LED) as well as a 300-500 ohm resistor on its data line.

IMG_2307

With this completed and tested, I focused on final assemblyIMG_2294

Eventually I got everything secured and glued into place.

Success!  It works!

IMG_2296

I did some cleaning and put on the final touches.  Hurray, it’s done!

IMG_2304

The code is now posted on Github!

Leave a Reply