Introduction: Binary Clock

Picture of 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

Picture of 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

Picture of 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

Picture of 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

Picture of 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? =)


phoenix74 (author)2017-05-21

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 ?

braulio777 (author)2017-02-26

Why not using IC555 ?

DavisM (author)2014-02-05

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!!

mmendoza11 (author)2012-09-22

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

justMaD (author)2009-01-29

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 ;)

dsmith84 (author)justMaD2012-06-15

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.

BIOhazard_inc (author)2012-05-26

I am confused

I need to build this

Gas_ (author)2012-05-23

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

NoobHobbyist (author)2012-02-13

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!

aj2004 (author)NoobHobbyist2012-02-29

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.

aj2004 (author)aj20042012-03-11

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.

aj2004 (author)2012-02-23

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.


WakeUpWolfgang (author)2012-01-02

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?

lehthanis (author)2011-12-30

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.

sgandhi (author)2011-12-28

Is the set button a momentary button like this:

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

lehthanis (author)2011-12-16

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!

Nitemare (author)2011-09-06

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?

jermatln (author)2011-08-15

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

sxdemon (author)2010-01-11

Why are you taking outputs from different pin numbers on the first and second ripple counters? (the ones calculating seconds and minutes respectively) Would you not be trying to get the same value of 60 from each counter? (60 seconds = 1 minute and 60 minutes = 1 hour)

ktucek (author)sxdemon2011-07-26

the 14 bit counter reduces the frequency to only 2 hz, which means that you need to count 2 signals for one second - that's why the first counter in loop is moved by one bit... on the "next step" its explained ;)

zezin (author)2011-07-04

Where is the 4020 in the schematic?

jensenr30 (author)2011-06-27

I really like this project. It is very well-documented. The pictures are great!

I'm subbed.

iiisao (author)2011-04-07

this never worked out for me ... i tried lot's of things, and the clock never did anything.

ASDF3 (author)2008-09-12

Could you please elaborate with respect to the components in the upper-left portion of your diagram? What are the components listed as SET_SEC, SET_MIN, SET_HOUR, PULL_DOWN_SEC, PULL_DOWN_MIN, PULL_DOWN_HOUR, J1, VDD and VSS? Also, what is SET connected to terminal 3 of the 14 bit counter? I am eager to try to build this, but want to know exactly what to do first. Thank you for your help!

iideetee (author)ASDF32008-09-13

SET_SEC, SET_MIN, SET_HOUR, SET are on/off buttons.
PULL_DOWN_SEC, PULL_DOWN_MIN, PULL_DOWN_HOUR are pull down resistors.
J1 is 2,1mm plug in. VDD is voltage and VSS is ground.
Hope it helped =)

NetReaper (author)iideetee2009-02-04

What does the plug for? does it need to be plugged in?

iideetee (author)NetReaper2009-02-05

Yep, it will kill 9V battery too fast, that's why there is also change to use transformer.

OMGitsSwanny (author)iideetee2010-05-26

Shoot.. this blows my plan of installing all this in a Altoids tin and having it be portable. Anyway i could make it portable? I'm totally new to this Circuits and Electronics thing, but am willing to take a headfirst plunge into it. Any suggestions?

Okay, i have a idea. Would it be possible to cut the power to the LED's but keep the power to the rest as to save the time and not wipe it. Installing a press switch to activate the LED's then let go to turn them off? I don't know anything about this stuff, so, i'm basically trying to be creative on conserving energy.

Yea, if you were interested you could definitely add a push button or a switch to cut off power to the LEDs. Since all the LEDs are connected on one side to ground, simply connect a N.O. button between the LEDs and ground. When you press the button the LEDs would then get power (more accurately a ground source) and can light.

davidmac2003 (author)iideetee2009-10-09

Quick question - it looks like SET_SEC, SET_MIN, and SET_HOUR must be N.O. switches, and SET must be N.C.  Is that correct?

iideetee (author)davidmac20032009-10-09

Yes it is =)


Something like that.

ASDF3 (author)iideetee2008-09-14

Yes. Thank you very much! =D

trogdorian1 (author)2011-01-03

looks possible, this downloads safe people.

build it and post pictures! i'll follow closely

beehard44 (author)2010-11-20

i'm trying to make a dirt cheap binary clock because, well, my budget is small. I only need minutes and not seconds, which ICs and components do i omit? sorry if i am a n00b

olso2095 (author)2010-07-09

Here's a good resource for learning more about using the crystal oscillator to make the time more accurate. Also, gives you an idea of how things are calculated if you need to troubleshoot a clock running too fast (like mine) or too slow.

uerliza (author)2010-06-24

I apologize if either my english or my question or both are dumb, but I really want to make it and there are some information missing since I never did anything eletronic at all. The question is: How do I know what is a pull-down resistor ? I tried to buy this and couldn't find anywhere. I did some research and maybe it is a normal resistor just to make sure the signal will be 0 or 1? Could someone explain me? What do i have to buy? Thank you in advance...

309 (author)2008-08-11

hey man, this is an awesome project, but is there anyway that you can get a clearer schematics image up. I am having a really hard time reading this one.

J-Five (author)iideetee2010-02-07

Thanks I couldn't read it either.

J-Five (author)2010-02-03

One Word Cool!!!

kd8gby (author)2010-01-12

 Ok, I see three rows of LEDs. Where are the 4 LEDs for the 8? The way I see this red is 1, green is 2, and yellow is 4. Any help would be nice.

sxdemon (author)kd8gby2010-01-12

oh, ok.

The way it work is you start with One then for the other you need to take the anwser of the last and multiplie it by two.

So the first led from right to left is
  #1:                      1
 #2                       :  1*2=2
 #3                       : 2*2=4
 #4                        :4*2=8
 #5                         :8*2=16
 #6                        :16*2=32

Then, for each lited LED, you add the values together.

So let's say the first, the third, the fourth and the sixth LEDS are lit.
#1 led=1
#3 led=4
#4 led=8
#6 led=32

Yellow is for hours
Green for minutes
and Red for seconds in this case.

so if:

Green #1,3,4 and 6 are lit
Red: #1 and 5 are lit
and Yellow 5 is lit.

Green: 1+4+8+32= 45 minutes
Red: 1+16=17 seconds
Yellow: 16 hour.

So it's  16:45:17   or 4:45:17 PM

kd8gby (author)sxdemon2010-01-12

 Now I get it!!! when I looked at it I though that I had two digits for each (hour:min:sec) Thanks a ton :-)

sxdemon (author)kd8gby2010-01-17

you are welcomed. I took me about 15min to write it down, thats awesome to me thanked.


StingzLD (author)2010-01-11

Where did you find that enclosure mate? I really like it, and you said it was cheap. Sounds perfect to me.

sxdemon (author)StingzLD2010-01-11

I would say Radio Shack.

But why is your SEC led connection start on pin 11 while all others start on pin 12?

lazardj (author)2009-12-03

 i have 1 more problem :(

my clock is 180 times faster then it shude be :(
in 20 sec it pass 1 hour :)

what can be problem? :)


lazardj (author)2009-12-03

 can some1 help. my IC 4060 is getting hot fast? what can be problem?

About This Instructable




More by iideetee:Atmega16/32 Development Board With LCD30$ Surveillance System With User InterfaceBinary Clock
Add instructable to: