Beautiful Arduino Binary Clock

Introduction: Beautiful Arduino Binary Clock

In this Instructable I'll be showing how to make a Aduino Binary Clock. Starting with this you can make a binary clock with any design and format as you like, just like any other clock.

Step 1: What Is a Binary Clock?

A Binary number is a number expressed in the binary numeral system or base-2 numeral system which represents numeric values using two different symbols: typically 0 (zero) and 1 (one). Because of its straightforward implementation in digital electronic circuitry using logic gates, the binary system is used internally by almost all modern computers and computer-based devices. Counting in binary is similar to counting in any other number system. Beginning with a single digit, counting proceeds through each symbol, in increasing order:

A binary clock is a clock that displays the time of day in a binary format. This projects aproach is the same as binary-coded decimal clocks, where is used six columns of LEDs to represent zeros and ones. Each column represents a single decimal digit, a format known as binary-coded decimal (BCD). Each row represents powers of two, from 2^0 (or 1), up to 2^3 (or 8). So all you have to do when reading the clock is to sum the value of the row if the LED is on. For instance, the first column from the right to the left of the image above have the 8-LED and the 1-LED turned on, adding 8 with 1 you get 9, so the ones of the seconds is 9, next column is the tens of the seconds, and the only turned on is the 4-LED, so you end up with a total value of 49 seconds, and the same for minutes and hours. Please note that here the hour is shown in the 24-h format.

Step 2: Materials

Arduino Pro Mini 328 5V (I used this one, but virtually any other Arduino will suit, and if you have never used the Pro Mini you will probably need the CP2102 to connect to the computer, you can buy the two together in this link)

DS1302 (I bought this one before I read that the use of DS3231 is advised, please note that the programming is made for the DS1302 module)

20x 10Ω resistors (you can find this easily at a local store, again, buying spare parts is recommended)

2x simple push buttons (again, you can find this easily at a local store and buying spare parts is recommended)

2x 10kΩ resistors (used here as Pull-up Resistors, easily found at a local store, buying spare parts is recommended)

Step 3: Prototype

I started making a prototype in the protoboard. Note that it is not needed for the final project, I just wanted to see how the LED matrix, the Arduino and the clock module could work together. For this part I used the Arduino Mega and simple red LEDs. It all worked well and as expected.

Step 4: Box

I wanted it to be at the same time futuristic (because it's a binary clock) and natural. The way was to make a wooden box with 10mm warm-colored LEDs on the front, the wood would be a contrast to the binary clock and give it a more retro look. I lack both ability and tools for woodworking, so I drew what I wanted and explained it to a local woodworker who makes handmade furniture, then he made the box. It is composed of two halves, that open to access the inside.

Step 5: Circuit

The LEDs are arranged in a matrix, so it use less arduino pins and still don't make use of a separate controller. This way 9 pins are used for the matrix. If you don't know what a LED matrix is, it is recommended that you read more about it (there is a great explanation in this link). After making the LED matrix like the image above, I soldered the connections to arduino, then the clock module, the buttons for the time adjustment, and at last the power supply. There is still some work to do in that part, but it's just finishing.

Step 6: Code

The code is based in the example of the Arduino Playgroud post about the DS1302 clock module. With the modifications to show the time on the LED matrix.

Epilog Challenge 9

Pocket-Sized Contest

Science of Cooking

Tips

Questions

16 Comments

Hi gpensky! Great binary clock! Can you point me to where in the code you declare the pins you are using for anode / cathode wires? I get that there's 9 pins: 4 cathode & 5 anode. And i see where you declare pins 11,12,13 for the clock. But how do you identify which anode column to turn HIGH or LOW? Sorry for my ignorance and thanks for your time!