A. PREFACE
Since I made a few kind of clocks design, I may very fond of to search many kind of clocks circuit on the net. Many unusual clock usually very interesting for me. This time my searching bump to a binary clock. Not a true binary in fact, because binary number hard to interpreted than binary coded decimal (BCD) number. A few kind of designs out there, but at last I found one that meet to my purpose, Binary Clock from Elektor Electronics magazine, jul-aug/2006 edition. You can find it at the download section (020390-1 for the article and 020390-11 for the firmware source code). The original version use PIC16C54 type of microcontroller. The pins compatible with PIC16F84/A type. Another kind is Dave's simple binary clock hard disk. He utilize a junk hard disk case and blue leds display. A cool color. My project inspired by the two of these designs. So the project begin. More enjoyable and more fun! I plan to place it at my living room. Cool clock design!
B. SCHEMATIC
Here I drawn the clock circuit again but with some modification to meet my purpose. As many of my clock design before, the clock must need a back-up battery to retain the time. Original version get the clock from main line 50 Hz frequency. We know that this may not to be very accurate while the processor run from a crystal in fact. So the modification also take the advantage of this option using optimization of the firmware itself. So the input that needs for the clock can be use for sensing the power failure option. PIC 16F84/A and PIC 16F628 type both are pins compatible with PIC16C54 type. So it does not the matter to the I/O section. Just use like that at all.
So the schematic are like this (BCD_ClkS.sch, BCD_Clock_Sch.pdf).
C. LAYOUT
Original version already included with PCB design. It was very compact. So for you who want to build it with the same version like the author can use that design. I prefer to make my own design, because I plan to use big LEDs with blue color. May be 12 mm if it could be found on the market. Very very cool. The PCB separate in 2 pieces, one for the controller and another for LEDs display. Here is the prototype looks like :
Here is the PCB layout (BCD_ClkP.pcb, BCD_Clock_Layout.pdf, BCD_Clock_Artwork.pdf).
D. PART LIST
Here are the part list for this BCD clock :
1. Resistors :
R1 ~ R6 = 2k2, 1/4W, 5% .................................... 6 pcs
R7 ~ R11, R16 = 220 Ohm, 1/4W, 5% .......................... 6 pcs
R12 ~ R14 = 10k, 1/4W, 5% .................................. 3 pcs
R17 = 4k7, 1/4W, 5% ........................................ 1 pcs
2. Capasitors : C1 ~ C2 = 22 pF (for oscillator) ........................... 2 pcs C3 = 100 nF (for IC decoupling, used as necessary).......... 1 pcs C4 = 33uF/16V .............................................. 1 pcs C5 = 100uF/16V ............................................. 1 pcs
3. Semiconductors : IC1 = PIC16F84/A (PIC microcontroller) ..................... 1 pcs IC1 alt = PIC16F628 (PIC microcontroller) .................. 1 pcs IC2 = 7805 (Voltage regulator) ............................. 1 pcs Q1 ~ Q6 = BC548B (NPN transistor) .......................... 6 pcs D2, D3 = 1N914 (Silicon diode) ............................. 2 pcs D1, BD = 1N4007 (Silicon diode) ............................ 5 pcs DZ = 4V7 (Zener diode) ..................................... 1 pcs LED1 ~ LED20 = 12mm, Blu (For indicator) .................. 20 pcs LED21 = 3mm, Red (For indicator) ........................... 1 pcs
4. Others : X1 = 4 MHz (Clock Crystal oscillator) ...................... 1 pcs Optional IC socket for 18-pins (use 20-pins) ............... 1 pcs Optional terminal connector CON1 ~ CON2 = 2 pin (power) .... 2 pcs S1 ~ S2 = Miniature push button (Push on) .................. 2 pcs TR1 = Miniature transformer, P-220V/S-12V, 100 mA .......... 1 pcs
E. FIRMWARE
Because the original firmware programmed for PIC16C54 type, some changes must be made to accommodate the newer type. But still doesn't mean at all, just only a protocol to support new type. This old firmware can be run also by my own modification. New firmware support for back-up battery option and more accurate time keeping. You can choose which one you want to use. Time keeping algorithm is the same as with the design for Digital clock version. Note that, bin_clk is the modified old version and bcd_clk is the new version for PIC16F84/A type. For another PIC16F628 type, please change the proper lines.
Here is the firmware : BCD Clock (Bin_Clk.asm, Bin_Clk.hex, BCD_Clk.asm, BCD_Clk.hex).
F. PROTOTYPE
For my prototype, I combine the controller board and display board to be one all, besides that I put some circuit to flash indicators for directions at night or when the moment unit or ten count become zero. These all a little hard to see in the dark. These leds will blink for 1 Hz rate, to show the seconds blink indicator also. The 1 Hz clock derivate from a piece of ex broken quartz clock. The idea come from Pino's one second time base. A good explanation. I use small transformers from ex panel indicator lamp. The rating about 220V to 6V, 100mA each. By connecting it serial, I get 12V, 100mA power. I hope that it could drive the leds, because the leds drive with multiplexing also.
G. IMPLEMENTATION
Here is the implementation of my prototype. The prototype assembled with an acrylic box (made from CD jewel box) to prevent it from dirty. I put it at my living room. So I can see it time to time with pleasure. It looks elegant with the big blue leds, isn't it? Make your own BCD clock!
H. HOW TO READ
Someone always ask, how to read the clock?
Hi there,
ReplyDeleteNicely made project! I am yet to assemble it but will do it soon. Just one thing, line 333 had an error, it was written Hours_ten instead of Hours_Ten. just letting you know! thanks again for a well written project.