Binary Clock




Here is a simple example how to build cool looking binary 24 hour clock. Red LEDs shows seconds, green LEDs minutes and yellow LEDs hours.

Case contains four buttons to adjust the time. Clock works with 9 volts.

This clock is easy to do and parts cost only few bucks, so it is also cheap to do.

Step 1: Schematic and Parts

I used the blue colored case, because it was cheap and looked good to my eyes.

- Clock crystal (Q1) 32.768 kHz.
I think the easiest way to get that crystal is take it from the old wall clock.

- 560pF, 22pF capacitors and one 10M resistor

- 1 x 4060 IC, which is the 14bit ripple counter.
With 32.768 KHz clock crystal this IC gives 2Hz out from the pin number 3

- 3 x 4024 IC
This is 7bit ripple counter

- 2 x 4082 IC
Dual 4-input AND gate

- 1 x 2,1mm plugin

- 17 x led
Red, yellow, green or what ever you like

- 17 x 470 Ohm resistors
I used the 9 Volt supply, so the output from the pins is something around 9V. Typical forward
voltage for these LEDs are about 2 Volts. Let's want that, the current to the LED is something about
0,015 A = 15 mA, then (9-2)V / 0,015A = 466 Ohm -> 470 Ohm is size of resistors.

Now it's time to download 4020 14-stage ripple counter data sheet and we will find that, the
max output current is 4mA =), but it is enough and works anyway.

Step 2: Testing

It is better to test the circuit on bread board before to do the final soldering. When everything works as it should be, it is time to start solder.


4060 is 14-bit (/16,384) ripple counter with internal oscillator and it gives with the 32768 Hz crystal 2Hz signal at the last output Q14, which is pin number 3. Then the 2Hz signal goes to 4024, which is also 7-bit (/128) ripple counter.

With the 2Hz clock input, the output Q1(/2) pin number 12 is low one second and high one second. Q2(/4) pin number 11 is low two seconds and then high two seconds. Q3(/8) is low four seconds and then high four seconds. When the last four (most significant digits 111100 = 60) goes to 1, the 4082 dual 4-input AND gate turn its output to 1.

Signal goes to reset pin and the counter starts calculating again from zero to 60 and the same signal also goes to the second 4024 ripple counter clock input. This signal comes to clock input every 60s and it works same way than the first ripple counter, but it calculates minutes.

Step 3: Finalizing

Next we drill holes for the LEDs. My LEDs were 5mm so I used the 5mm drill. LED stays tight in that hole and no glue is needed. I cutted the board, so it fits perfectly to the bottom of the box.

I left the LED wires on purpose that long, so the LEDs are easier fit to their correct places.

Step 4: Setting the Time

I drilled three holes to left side of box for time setting buttons. Hours, minutes and seconds. There is also one button on other side, which is set-button.

When I put the power plug in the LEDs start blinking. Then I press the set-button to down and keep it down. Same time I adjust the right time to the clock with the other side buttons. When the time is correct, it is time to release the set-button.

Step 5: How to Read It?

Binary clock is easy to read. It only need little bit simple math.
Okay, If we want to set 11:45:23 to our clock

It is easier convert binary to decimal than decimal to binary. I try to explain both ways.
Base number is 2

Here is the key numbers: 1 2 4 8 16 32 64 128,...

Our decimal number is 11 and that we are converting to binary. Let's find out the smallest number, which is smaller than our number from the key number list. It is 8, Let's reduce that number from our number 11-8=3. It goes to our number one time so let's put the number 1 up.

Now our number is 3 (11-8=3). Now we have to take number which is next to that number what we just used. It was 8, so the next is 4. Let's do the same thing, how many times 4 goes to 3 ? zero! Let's put the 0 number up.

Next on list is after 4 is 2. How many times 2 goes to 3 ? one time! Ok, number 1 to up.

There is one number left and our number is 3-2=1 and the last number on that list is 1 and it goes to 1 one time and that's it no numbers left. Because it goes the one time our last marked number is 1.

What we have: 1011
So the number 11 with four bits is 1011, with five bits 01011, six bits 001011, seven 0001011 etc.

Okay, let's convert it back to decimal. It is easier anyway.
Our binary number is 1011.

And our magiz numbers =) is 1 2 4 8 16, ...

Let's put our binary numbers under the magiz numbers. We have to start read from least significant digit, so that's why the counting is from right to left
8 4 2 1
1 0 1 1

Now we have to do summation with the numbers which are over the every 1 number. There are 1, 2 and 8, right?
1+2+8 = 11

Rest numbers are 45 and 23.
45 is 101101
23 is 10111 with six bits it's 010111

11:45:23 is 01011:101101:010111

Easy? =)



    • Pets Challenge

      Pets Challenge
    • Frozen Treats Challenge

      Frozen Treats Challenge
    • Sensors Contest

      Sensors Contest

    139 Discussions


    2 years ago

    Have built this clock up on breadboard. Excellent design keeps really good time. The only issue I have is the control buttons seem to be a bit erratic. Sometimes advancing the binary counter by more than one each time pressed.

    Has anybody else had the same issue.

    Any solutions ?

    1 reply

    Reply 3 months ago

    I'm a bit late for you, but hopefully I can help someone else.
    The thing you've experienced is 'debouncing'. The button might make contact for very short amounts of time before properly making contact. This will be interpreted as multiple presses. I don't have enough knowledge to provide a solution, but you can google for 'button debouncing' and find someone who can solve your problem.


    2 years ago

    Why not using IC555 ?


    5 years ago on Introduction

    Hi, Im trying to build this and i was testing my and gates and the output pins stays high even when i pull all 4 inputs to ground. Help please!!


    6 years ago on Introduction

    Your link is dead. Is there any alternative mirror where I can download it?


    10 years ago on Introduction

    how is the whole part in front of the 4060 powered (with the crystal and all)?
    all i see there is ground, and no power at all...

    also you don't mention those pulldown resistors in your parts-list, maybe you should add them.

    i really like your clock and your instructable, though it's a bit short and hard to understand for starters

    sry, that's my first project of such kind ;)

    1 reply

    Reply 7 years ago on Introduction

    when you find the data sheets for the ICs you'll find that for the 4060 pin 8 goes to ground and pin 16 goes to power, and for the 4024s and 4082s pin 7 is ground and pin 14 is power.


    7 years ago on Introduction

    Anyone whose clock runs too slow should look at these links for the 4060 ic and the crystal oscillator.

    My clock was counting slowly so i changed some of the values for the crystal oscillator. I changed C1 to 10pf, C2 to 27pf, R1 to 15M, and added a 330k resistor between pin 10 of 4060 IC and the bottom junction of R1. After changing these values the clock works perfectly


    7 years ago on Introduction

    Hi there. As my name suggests, I'm a noob at this.
    I have all the pieces here, and I've started setting them up on a bread board, but I wanted to know if anyone could create a sort of testing diagram?
    i.e., After the 4060 IC chip, if I set it up to a LED, should the light flicker or stay solid?

    Also, can the rig work without buttons? I understand the time will be off. I just mean from a technical aspect.

    Thanks to anyone who may reply!

    2 replies

    Reply 7 years ago on Introduction

    The clock will operate without the "SET" buttons. You would simply have no connection where the 3 N.O. hour/min/sec set buttons are. I think those pull-down resistors should still be used though. The N.C. set button coming out of the 4060 could be just a solid connection.

    In what way did you want to test? To step the circuit manually, all you need to do is apply a voltage pulse to the CP/CLK+ (clock-pulse, pin 1 of 4024). However, that is exactly what the hour/min/sec set buttons are there for.

    As for the led, if you are placing an LED in series between the 14th-bit output of the 4060 (pin 3) and the CP/CLK+ (pin 1 of 4024), I would think it should oscillate at 2Hz. It may happen that the voltage drop ends up being an issue for triggering the "seconds" 4024 CP/CLK+ though. An LED would also oscillate at 2Hz if connected (same fashion as the others) to the first output of the "seconds" 4024 (pin 12)

    I just ordered my parts from DigiKey for about CA$10 and should get them in a few days, so I can finally build this thing! In the meantime, I've modeled the circuit with SPICE and have a pretty good understanding of it, with the exception of the crystal/4060 part and the importance of the values of the capacitors and the resistor.


    Reply 7 years ago on Introduction

    In case anyone was looking to have a battery backup, here's a schematic:

    That circuit will continue supplying power to the clock portion of the circuit while disabling the LEDs, in order to save power. The dual-diode configuration is a simple standard method to prevent "charging" of the battery by the power supply. In reality, the batteries would heat up and be damaged and/or cause damage. The transistor can be whatever run-of-the-mill NPN you want. I clocked my 5VDC circuit at maximum 50mA or so, so any NPN transistor will work. The transistor will allow current to flow from the LEDs' common cathode (-) to the circuit's ground (common/0V) while the main power supply (+9V) is on. The transistor can be omitted to remove this feature. The battery voltage should be whatever this circuit needs in order to run (3V, but maybe 4.5V needed, considering diode voltage drop). Also, a switch/button could be inserted between the collector and emitter of the transistor in order to enable the LED display by choice while on battery backup. If it doesn't work right with the transistor, maybe the 10KR resistor needs to be reduced? Also, if the supply power isn't switched quickly enough to eliminate delay (thus losing the time in the process), a capacitor could be placed parallel to either the +9V supply, or maybe the circuit's main supply.

    Another quick note, this circuit will operate off a USB connection just fine, just so long as the LED resistors are the correct value. I use 1KR value for these 3.2V/20mA super-bright LEDs I got.


    7 years ago on Introduction

    This is exactly the circuit I was looking for. Anyone know of a way I might be able to power this through USB (5VDC)? If I understand correctly, the main issue is to do with the load of the LEDs. If so, could the power from each output, to each LED, be bumped up with a transistor? I don't know the power limitations of USB off hand, but disregarding that, what might I need to change in order to convert this circuit to 5V instead of 9V? My issue is simply with needing to plug it into 120VAC with an adapter. It seems overkill, though I get the need for such voltage.


    This is what I was looking for!!! I was going to make a computer from scratch but this is where I wanted to start. Do you have a larger image of the schematic that I can use?


    7 years ago on Introduction

    I got this sort of working. Very nice schematic. I remade it in Eagle, and cleaned up the schematic based on my specific LED's and the capacitance of my crystal. I also changed the 4060 portion to match the circuit on the doctronics page (220k trimmer and 10M voltage limiter) I also changed it to a 15pF cap on pin 10 and 2.2-22pF trimmer cap on pin 11 of the 4060.

    I'm getting some skipped digits on the hours and minutes...I'm going to have to evaluate which digits and see if I can figure out what's causing it...but I'm very pleased with this circuit...I'm going to try and modify it to keep time with a watch battery and light the LED's with the 9V external power. Assuming the watch battery will power all of those CMOS IC's.


    7 years ago on Step 4

    Is the set button a momentary button like this:

    If so, how would the seconds 4024 counter get pulses when you release this button?


    7 years ago on Introduction

    I went to buy the parts, and the first thing I looked at were the 470 Ohm Resistors. They come in 1/8 Watt, 1/4 Watt, and 1/2 Watt...Which ones do I buy? Will I have that same issue with the other parts? Also are the capacitors microfarads or picofarads? I saw a 22 microfarad electrolytic that what I need?

    Thanks! Can't wait to build this!


    7 years ago on Step 2

    what if the clock gains or loses time? is that where the 39pF trimmer capacitor comes in? or should the oscillator keep accurate time no matter the value of the capacitor?


    7 years ago on Introduction

    I am having an issue my clock is counting however it is counting slower then it should it takes about 100 seconds for a minute to pass. I am doing this for a school project so help would be greatly appreciated. thank you