Build up your own binary clock

Hello folks, today I will show you how can you create a simple binary clock using an Arduino.

Before to start

Building a binary clock using an Arduino is very simple. Anyway it is required that you know some principles of electronics circuits. For example it is necessary to be able to read a simple schematic, or to be able to make a new one.

All you need in order to proceed is:

  • 1 Arduino board (of course). I have used the model named Arduino uno

  • 1 breaboard

  • 10 diode led of 5mm: 4 of them are necessary in order to represent the hours and 6 for the minutes. I suggest you to use two different colors: one for the hours and one for the minutes.

  • 2 switch buttons in order to manually set the local time.

  • cables.

Put all together

All you have to do merely is to download this source code, then upload it in your arduino, using the Arduino software.
Such a code merely provide a set of instructions necessary to turn on every 60 seconds a defined set of leds. It also defines the roles of the two switch buttons. These two buttons are connected to the Arduino via pin 2 and pin 3 (these two pins are particular pins used to manage interrupts). In fact every time one of these two buttons is pressed, a certain interrupt is thrown (see functions int_setMin() and int_setHour()).

The links between the Arduino and the breadboard, which can be deducted by looking at the source code, are not reported here, since they may vary according your implementation on the breadboard.
In fact such links may vary according the followed circuital scheme. The only important thing, in order to use my code, is to follow the comments reported on it (e.g., pin 4 goes to the less significative bit used for the minutes and go on).

Anyway, if you want to use my circuital scheme, or you want to print an ad-hoc PCB, here you may find my the eagle schematics.

The figure below shows the final result.

binary clock