LED Binary Clock

From SolidStateDepot
Jump to: navigation, search

The binary clock is a fun (and cryptic) way to tell time. Unless you're really into binary though, it's a little bit harder to read than a typical digital clock, so it is mostly for the hacker and artistic appeal that you would make one. There are plenty of apps you can download to get one on your computer screen, but I decided to build an LED-based one to sit on my desk.


  • LED display
  • Simple form
  • Correct time


http://en.wikipedia.org/wiki/Binary_clock http://blog.thelifeofkenneth.com/2010_02_01_archive.html


I did some research into other builds that people had done and decided to base my design on this blog that I found:


The core components are

  • ATMega328 chip from an Arduino Uno (I used an old one with a fried pin) for the logic
  • DS3234 Real Time Clock breakout from Sparkfun for keeping the time
  • 3 LED drivers for powering the LEDs

Most of the design follows Ken's blog, especially the schematics. However, I made a few customizations:

  • Instead of an LED array, I used individual red, blue, and green LEDs for the hours, minutes, and seconds, respectively
  • I was building this as a permanent fixture, so I soldered it to a PCB once I had it working on the breadboard and placed it inside a project box from Radio Shack
  • I used a basic wall wort AC adapter for powering the Arduino and the LED drivers

To read the clock, you have to be able to convert the numbers from binary into decimal. My clock is set up like this (a quick google search will turn up more descriptive diagrams):

0 0 0
0 0 0 0 0
0 0 0 0 0 0
0 0 0 0 0 0

Where the first pair of columns is hours, the second pair of columns is minutes, and the third pair of columns is seconds. The first column in each pair is a 10s column and the second column is a 1s column. The bottom row is 1s (2^0), the second row is 2s (2^1), the third row is 4s (2^2), and the 4th row is 8s (2^3). The basic concept is find the rows that are lit, add those values together, multiply by the column factor, then add the columns together. So if we look at the seconds section and see the first and third row are lit in the 10s column and the 1st and 4th row are lit in the 1s column, you would get (1+4)*10 + (1+8)*1 = 59.

The fact that it's divided up into hours, minutes, and seconds (with 10s and 1s for each) is why I call it pseudo-binary. If it was truly binary, it would just be one long string of LEDs. However, that is much harder to read.

The DS3234 is a very cool chip. It is accurate enough that, using this design, I never foresee having to reset it. Because I used the breakout board from Sparkfun that includes a backup battery, I can also unplug the clock and not worry about losing the time. Simply plug it back in and it will have the current time on it. The board is a little expensive for such a simple project, but I installed it using a socket so if I ever decide to use it for another project, I can repurpose it.

One bad thing about this design, however, is that I did not allow the user to have any inputs without taking the entire clock apart. This means that setting/adjusting the time does require popping out the DS3234 and reprogramming it with a separate Arduino.


Andy Tracy


June 2013

After having the clock around for a while, I have had some time to reflect on the design. There are a few drawbacks to the way that I built it:

  1. The time must be set manually. This is fine for most of the year, as the DS3234 keeps time extremely accurately. However, whenever daylight savings time changes, I have to pop the box open and change things forward or backward and hour. I'll probably add a button to do this in the future
  2. The brightness of the LEDs prevents me from keeping this anywhere near the bedroom, as it's too bright to sleep next to. I think this could easily be fixed with a potentiometer that would look nice on the front of the box.

In general, I am very pleased with the outcome. It makes a great clock and piece of art for friends who don't have any interest in learning binary.

September 2012

I went and picked out a project box to put it in, so I'm ready to start soldering things to the PCB. I'm not going to say that I'm a master solderer or circuit designer, so it's a little bit messy. But hey, it works:

Clock Guts.JPG

Drilled a few holes, added a strain relief, and viola: a finished binary clock. It's now happily telling time on my desk at home.

Clock Final.JPG

August 2012

All the electrical parts are in and I have them attached to a breadboard for testing/coding. Here's a picture of the setup (you can see the different components laid out, and the seconds and minutes working):

Clock Breadboard.JPG

Here is my code: Binary Clock Code