LED Binary Clock

LED Binary Clock
This is the second revision of my PIC based LED binary clock. The original version was the first PIC project I attempted, it used a PIC16F84A to do both the timekeeping and control the display matrix, unfortunately it didn't keep good enough time and gained about a minute every week.

This second version is based around a PIC16F628A running at 4MHz to control the display, it also uses a DS1307 realtime clock chip to do the timekeeping. Every second the DS1307 sends a pulse to the PIC chip, the PIC then reads the internal time from the DS1307 over the I2C bus and then displays the time in binary on the LED display.

The bottom row of LEDs display the seconds, the middle rows shows the minutes and the top row is for hours. The time displayed in the picture is 01100:010011:011011 or in decimal 12:19:27. The time is in 24 hour format so goes up to 10111:111011:111011 or 23:59:59

The PCB could be made double sided, or as I have done here single sided with 7 wire links soldered in place instead of the top copper layer. It has a 5 volt regulator so could be powered from any 9 - 15 volt DC power supply.

 
Remove these adsRemove these ads by Signing Up
 

Step 1Parts / Tools

As well as basic PCB making and soldering equipment you will need the following components:

1x PIC16F628A & programmer
1x DS1307 realtime clock chip
1x 32.768kHz watch crystal
3x BC548 (or similar) transistor
2x PTM pushbuttons
1x 78L05 regulator
2x 220uF electrolytic capacitors
17x Surface mount LEDs
1x DC power jack socket
5x 4.7K surface mount resistors
8x 100 ohm surface mount resistors
1x 2k surface mount resistor
12x zero ohm links (Or 11 zero ohm links and CR2016 backup battery)
1x 100nF surface mount capacitor
50cm single stranded bell wire
1x 9v - 15v DC power supply with DC jack

« Previous StepDownload PDFView All StepsNext Step »
34 comments
May 18, 2011. 11:40 PMbotronics says:
I would like to make this small enough to make a pocket watch out of it. To save power, is there a way to have the leds come on only when needed? Maybe this would work: If power to the pic only is left off, will the correct time show when the pic is turned on for a moment? While all the time the DS1703 is always running in the background to keep the time base.
Nov 3, 2009. 3:23 PMshuttleu93 says:
could you please draw up the schematic so it is easier to read please?
Mar 17, 2011. 6:47 AMdava_2 says:
.sch file isn't working with my software: ExpressSCH .

I what soft was made this .sch?
Apr 8, 2011. 12:47 AMdava_2 says:
Thank you, works now!
Apr 8, 2011. 12:47 AMdava_2 says:
Anyone made PCB without those SMD components?

If you are interested, I can make it..
Nov 5, 2009. 7:06 AMpravardhan says:
Nice Idea. But, why are you using PIC16F628A instead of PIC16F84a?

There is no schematic in jpeg format in the ZIP files and the one given in the site does not have the values of the components....!

And, is there any converter that can convert from Binary to Decimal? May be something like ADC (Analog to Digital Converter)???


Nov 9, 2009. 2:27 AMmerseyless says:
the fact that the time reads out in binary is the desired affect, if this is not to your tast then you could easily reprogram the chip to output the time to the serial port of a LCD display. but if you where capable of doing this then you would probably be content with learning how to read the time in binary form to confuse your friends. 2 + 2 = 10 in base four, I'm fine!
Mar 21, 2011. 9:02 AMsebborn says:
hi how long did it take to build it
Nov 9, 2009. 2:28 AMmerseyless says:
also, this project is pure genius!
Mar 21, 2011. 9:03 AMsebborn says:
hi
May 7, 2010. 12:52 AMmoapz says:
thanks eleven.
i create  it again, with new parts. the new one,work well.
thank you

Dec 28, 2010. 11:37 AMMuzamil Ali says:
CAN YOU PLEASE SEND ME THE DETAILED NOTES OR CIRCUIT DIAGRAM OF THIS PROJECT...
Apr 19, 2010. 3:04 AMmoapz says:
hey. thank you for this.
it's finished, and work well :) but after 2day , it's off :( and i don't know why it is not work !
all LEDz is off!
i check voltages and it's good but i don't know why not work !
i changed all parts and create it again but not work !
Feb 26, 2010. 8:19 AMdimjan says:
nice job
good !!!!!!
Feb 1, 2010. 1:55 PMmoapz says:
can I use bell wire instead of zero ohm ?
why zero ohm ?
Jan 16, 2010. 5:06 PMlachlanmiller says:
Could you clarify the concept of operation, i don't understand, how you are able to individually address each led from the pic, im assuming that you dont need to, and with this combination at any given time, you can turn on the required combination of led's to display the time.

could you explain this a little ?
Nov 19, 2009. 2:07 PMfrank the destroyer says:
hey use the atmega128 you can make it do some pretty nifty tricks when tied to the rs232r serial converter chip ! 
Nov 5, 2009. 12:22 PMmr monoply33 says:
& bookmarked.
Oct 28, 2009. 11:58 PMRob K says:
Interesting.

You are setting the time to the clock chip  with buttons instead of already already having the time set with the pic to the chip through a ICSP. Good for resetting time when the clock is too fast or too slow, or changing  time zones.

As for the time being to fast that might be a watch crystal tolerances error.
Nov 5, 2009. 11:03 AMraykholo says:
 This gives me an interesting idea:  if one were to mass produce these it might be better to add support for setting the time through another device and then connect it to this through a header/socket or maybe a set of pogo stick connectors so that the time can be set by touching a bundle of four, for example, onto printed contacts on the pcb itself.  
Bottom line:  make an easily settable time-keeping circuit, and then just touch it onto the corner of a remade pcb for this project to set it should a lot be made...
Oct 29, 2009. 1:24 AMdrj113 says:
Excellent work.

I love the simple single sided look, as well as the extra display PCB. 

I have had a PIC binary clock illuminating my room for a year or so now.  It doesn't have a case either - There is something cool about the 'look inside' kind of project.

Regarding the inaccuracy of your previous version, I have spent lots of time mucking around with clocks, and the technique I use to deal with crystal tolerances, is to add or subtract a 0.1 second every 10 minutes, or hour, or whatever time is needed to improve the accuracy.  It takes a little while, and you need to keep accurate records, but in my case, the PIC 16F877 based Binary clock beside the bedside looses about a second every 2 months.
Oct 29, 2009. 9:17 AMmacobt says:
Good binary clcok,here is mine with PIC16F84
my blog with few binary clocks
http://macoprojects.blogspot.com/
c5.JPG
Oct 29, 2009. 1:27 AMdrj113 says:
A technique I have used when there are no ICSP connections, is to use a short ICSP header cable, directly soldered onto the appropriate pins.  That has saved me *many* times :-)
Oct 28, 2009. 2:52 PMKiteman says:
Now you need some sort of case.

Actually (and this is a minor point, not meant to detract from a great project), if the LEDs faced "outwards" (away from the lower PCB), you could put it all in an opaque case, with holes drilled for the LEDs to shine through (although that's really just my personal aesthetic speaking there).

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
9
Followers
4
Author:ElevenOf9