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 ads by
Signing UpStep 1: Parts / Tools
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









































Visit Our Store »
Go Pro Today »




I am working on my own version in light of your clock. Can you shed some light on how your Hrs and Mins setting buttons work. How have you wrote the code. Just some clarification of the concept would help.
Thanx
The schematic files were available in the zip files, but I have also uploaded them now as images to the instuctable for easier viewing.
I what soft was made this .sch?
If you are interested, I can make it..
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)???
The PIC16F84A does not have an internal oscillator so would need extra components compared to the PIC16F628A to get it to work, the 16F628A is also cheaper than the 16F84A.
The compnents are listed in step 1 and steps 3, 4 & 5 show where they all go, but I'll try to get an updated schematic up in the next few days, I've only recently started using Eagle so I'm still finding my way around it.
You could impliment circuitry so convert the output from binary to decimal, but that kind of defeats the object I had in mind. An ADC would not help in this respect, you would need a binary to decimal decoder. It would be much easier to write an alternate program for the PIC to get it to output the time in the format you want instead though.
i create it again, with new parts. the new one,work well.
thank you
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 !
You asked in one of your other questions if you could use bell wire instead of the zero ohm links on the display PCB, if you did thta are you sure the wire isn't shorting out on the other tracks on the PCB?
Try replacing the "1 second" LED (bottom right) to see if that makes any difference.
Try replacing the 3 transistors.
Th eone I made has been happily running for over a year now so I'm not sure what has gone wrong with yours, the only other thing I can think of is that there is a break in one of the tracks on the PCB, or a blob of solder is shorting something out.
good !!!!!!
why zero ohm ?
could you explain this a little ?
The LEDs are multiplexed, so at any given time only 1 row is illumiated, the PIC is constantly turning each row on and off so fast that it looks as though all 3 rows are illuminated at the same time. All 17 LEDs are controlled by 6 data lines and 3 address lines.
First of all the PIC loads the data for the seconds into PORTB, it then sets the address line for the seconds row high (turning on the LEDs) after a very brief pause it sets the address line for the seconds row low (turning off the LEDs). Then it loads the data for the minutes row into PORTB, turns on the minutes address line, paues, then turns it off again. The hours are displayed in the same way, then the whole process starts again.
A good visual example of how to multiplex LEDs can be found here: http://www.franksworkshop.com.au/Electronics/RGB/RGB.htm
I hope this helps.
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.
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...
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.
By the way, I really like your word clock, I'm tempted to make one myself but I don't have room in my house for yet another home made clock.
my blog with few binary clocks
http://macoprojects.blogspot.com/
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).