24 Hr Digital Clock only with basic CMOS Chips

 by Mattosx
Featured
redclock.jpg
mainimage.png
WholePCB.jpg
A 24 hour based clock based on dual decade counters, AND gates, OR gates, BCD to Decimal Converters, and a crystal oscillator. No micro controllers here. This instructable contains PCB art so you can easily make your own. 

Quantity is in parentheses. Item number at Digikey.com is in brackets.

(6) 74HC390 Dual Decade Counters [568-1442-5-ND]
(6) 4543 BCD to Decimal Converters [568-3138-5-ND]
(2) 4020 Divide by 16384 Counter [296-2039-5-ND]
(1) 74HC32 Quad OR Gate [568-1434-5-ND]
(1) 74HC08 Quad AND Gate [TC74HC08APF-ND]
(39) 500Ω or 1000Ω drop down resistors for 7 segment displays
(3) 10kΩ Resistors
(6) Common Anode 7-Segment Displays [160-1575-5-ND]
(4) 3 mm Green LEDs
(1) 100 uF Capacitor
(1) 0.1 uF Capacitor across Crystal Oscillator
(1) CMOS 32.768 KHz Crystal Oscillator  [SER3618CT-ND]
(3) Momentary Switches [P8071SCT-ND]
(4) 3 mm Green LEDs
(1) Power Plug [CP-102A-ND]
(1) 5V Power Supply
 
Remove these adsRemove these ads by Signing Up

Step 1: The gist of how it works

Block DIagram.jpg
A 32,768 Hz oscillator provides the clock pulse and this is divided by two CMOS 4020 Divider chips down to 1 Hz. The 1 Hz signal is fed into the first dual decade counter [IC3] that runs from 0-9. The binary coded decimal from IC3 is fed into a 4543 [IC4] that is converted for a seven segment display. The block diagram omits showing the drop down resistors, but they're really there. Use either 500Ω for a bright display or 1000Ω for a dimmer display.

IC3 triggers IC5 by feeding its IC3's q3 output into IC5's clock input. IC5 runs from 0-5 and resets via an AND gate when it hits 6. The AND gate also feeds into IC7 which is the minutes section. IC9 resets at 6 as well. This completes the minutes section. 

The AND gate from the minute section increments the hour section. Another AND gate in the hours section resets IC11 and IC13 simultaneously when  they collectively reach 24. 

This probably sounded all convoluted, dense, and confusing. Refer to the diagrams below for more clarity.

Notice part numbers from DIgikey.com are included in the block diagram
hannishah says: May 28, 2013. 10:22 PM
can any one tell me if I want to add the alarm in this clock then what will be its logic and how can i do that??????"plzzzz zzzz"
jsumon says: Mar 31, 2013. 10:12 PM
make a clock
trialex says: Aug 20, 2012. 7:36 PM
Excellent work!

Do you know what the average current draw is?
Mattosx (author) in reply to trialexAug 20, 2012. 7:44 PM
Yes, I seem to recall it's hovering around 150 mA. One of the nice thing about this clock is that when the power goes out which it did during a thunder storm two days ago, it keeps the time. The logic seems to run off the 100 uF smoothing cap for a while. The ICs appear to use next to nothing for current.
trialex in reply to MattosxAug 22, 2012. 8:54 PM
Cool, thanks for the reply. That current draw is way less than I was expecting.

Having never been formally taught electronics logic, I've been trying to teach myself a bit, and a CMOS/TTL clock is what I'm hoping to achieve next. I think my biggest stumbling block has been the 60sec/60minute reset, so I'm studying your layout. Can't say I understand it yet, so standby for more questions :-)

I've been planning on using 4026's (http://www.ti.com/lit/ds/symlink/cd4026b.pdf) for my clock - they seem to be a combination of the 390's and 4543's (as in decade counter + 7 seg driver) you use. I'm still comparing datasheets, but can you comment on any advantage/disadvantage of the two options? Seems like using 4026's would save one chip per digit - note that this may not be a good thing if you are going for geek cred :-). The 4026's do have a very small output current limit which might mean transistors are needed before the LEDs, which means you lose the advantage of a smaller part count.

Thanks again
Mattosx (author) in reply to trialexAug 23, 2012. 6:10 PM
You would have a boatload of transistors if you use the 4026. You need a transistor for each segment and 6x7 = 42 transistors = 126 PCB holes for the transistors. The six 4543s would have 6x16 = 96 PCB holes. And I bet the transistors used as switches would consume more current.

Regarding the logic, the decade counter does what it says, it counts from 0-9. Such a decade counter handles the right digit of something like 59. Now we want the left hand digit to only go up to 5 obviously. So when the left digit hits six, or 0110, we feed the 11 of 0110 into an AND gate and the AND resets the 6 back to 0. It happens so amazingly fast that you never see the 6 on the display.
edwardholmes91 in reply to MattosxMar 28, 2013. 4:45 AM
According to this website it says many different 7 - segment displays can be powered from the 4026 when operating it on 9V. We used this IC at school and we powered 7 - segment displays from it just fine. To me it seems a little at that a 7 - segment display counter IC would exist if it wasn't suitable for connecting it straight to an output?
trialex in reply to MattosxAug 27, 2012. 7:15 PM
I think I was trying to take the reset signal off the lines between the BCD->7seg chip and the display, rather than straight after the decade counter. I couldn't get these to reliably trigger an AND gate, so reset never happened. I have no idea why I didn't try it at the decade counter output, when I saw yours it was an aha! moment.

Looking more at the 74HC390 chip, it's a DUAL decade ripple counter, with totally separate inputs, outputs and resets. It seems like you could use a single 390 to drive two 7seg displays (i.e. seconds and 10's of seconds using the same chip). Any thoughts on this? (Still waiting for my 390's to arrive to test it myself).
Mattosx (author) in reply to trialexAug 27, 2012. 7:37 PM
Yes, the 390 is a dual ripple counter. I just used one on each for simplicity. I designed the first PCB layout between the 390 and 4543 and just copied the design six times. The design could shave off three chips.

bholeman says: Nov 3, 2012. 3:44 PM
Awesome. I thought it was such an unique project, that I went through and made one myself.

http://www.flickr.com/photos/geemo88/8151914312/in/photostream
Mattosx (author) in reply to bholemanNov 4, 2012. 8:54 AM
Awesome! I am glad it works! You made my day making this!

I really like your acrylic case. I made a second clock and it's sitting in a box. Ready to be displayed. Did you buy it or make it?

It seems you also used photosensitive PCB boards? It seems that the traces came out very clean. And you are more daring than me — soldering the ICs onto the board without sockets!
bholeman in reply to MattosxNov 4, 2012. 6:43 PM
I saw your Instructables post and decided to follow the steps to make it. The traces were made by spraying a sheet of copper with black flat paint then cutting the mask using a 60 watt laser cutter. After the mask was done, I dunked it in a combination of muriatic acid and hydrogen peroxide. As for the ICs, I totally missed that you used them at all until I was halfway through soldering. I cut the acrylic on the same laser cutter as the PCB. Would you like one? We have some different color plastics: smoke, clear, blue, red, orange, etc.? I still have the files to cut it. I'd be happy to cut one for you!
akshay+jadhav says: Oct 21, 2012. 2:38 AM
I am trying to remake the PCB layout , and I found that diodes in it, which are not there in the component list. So please give me the component number.

And I cant find where I should connect  Input power pins in your Design, Please can you point out that particular point in your layout.


Regards-
Akshay Jadhav
Mattosx (author) in reply to akshay+jadhavOct 21, 2012. 5:44 AM
Hi there, I basically just used left over diodes. I believe any small signal Zener diode will do. They are quite small.

Regarding the power -- they really can be conned Nyerere, but if you look at the PCB art there are two large squares on the left. These can be used as the power connectors. The top would be positive and bottom square negative.
akshay+jadhav in reply to MattosxOct 21, 2012. 6:20 AM
Ohh thanks a lot brother !
Incase i need any help please help me further
In next 2-3 days I'll submit my project
And A Big Thank to you and your Project :)
Have a nice day ! :)
trialex says: Oct 8, 2012. 1:57 AM
Hey I finally finished mine!

I made a few changes:
- I used a 4060 to divide a 32.678 crystal down to 2Hz - Which was then divided by a 4024 to 1Hz
- Used both "sides" of the 390's to save three ICs
- Used some ex-military displays that I salvaged from an old work project. They had the binary to 7 seg portion built in.
- Used point to point wiring

Still need to sort out a case / way to display it and what power supply I want to use.

Anyways thanks again for your help, I don't ever think I would have got the 60/24 reset working.

Photo attached (I think)






DSC06204 (Large).JPGDSC06206 (Large).JPG
Mattosx (author) in reply to trialexOct 21, 2012. 5:47 AM
Cute design! You really kept the component count down with those embedded chips in the displays themselves. That really cuts down on a lot of wiring. great implementation.

I chose to only use one side of each 390 to reduce the trace complexity on my PCB. It made it more linear.

How goes the time keeping? I am happy after two months mine has kept excellent time
ramesh says: Sep 9, 2012. 7:42 AM
Lovely clock project, and would like to know what is the minimum voltage level (peak to peak) of the clock signal required to run properly, for the dual decade counter 74HC390 counter. What is the minimum power supply voltage that can be feed to the logic circuitry only, to keep the correct time, in case of power failure? will 3x1.5 V dry cells or 4x1.2 V rechargeable NiCd/NiMH betteries would run the logic circuit satisfactorily?
Mattosx (author) in reply to rameshSep 9, 2012. 9:20 AM
I am unsure, but I suspect the digital logic power requirements would be quite minimal. I have had a power failure and the clock kept its time basically. I suspect the 100 uF smoothing capacitor I added was supplying it satisfactorily.
jmartinez pedrero says: Sep 5, 2012. 3:29 PM
hi, does any one can explain how to put the crystal because i dont understand if is of two legs or four and also why are two square join and the other two alone.
Mattosx (author) in reply to jmartinez pedreroSep 5, 2012. 5:22 PM
I was originally going to build a crystal oscillator using a crystal itself, but it was being ... finicky.

My design instead uses a 32 Khz crystal oscillator CMOS chip. The chip is a tiny surface mount device that has four legs that solder onto the pads. Each leg of the chip solders onto one of the four squares.

Here is the data sheet: http://www.eea.epson.com/portal/pls/portal/docs/1/1409560.PDF
Llamarama says: Sep 3, 2012. 2:32 PM
I love this, everything about this seems so neat and tidy. Thanks for sharing 5 stars :)
suchatavi says: Sep 1, 2012. 8:14 PM
Very nice idea and work! Can’t wait to build this or use it as an excuse to learn Eagle! I want to modify it to support 1.5″ 7-segment displays. I’d also like to figure out a way to make it more educational by adding the block diagram to the front of the pcb. Perhaps printing out and attaching the block diagram to the board before mounting the components or (better yet) figuring out a way to silk screen pcbs at home! Every Arduino enthusiast and high school robotics club should have one on their wall to demonstrate how far we have gone in a relatively short period of time! Now to make one with tubes!!!
Mattosx (author) in reply to suchataviSep 2, 2012. 5:28 AM
Thanks for the compliment!

Those are some big LED displays! I guess you'd need to extend the board size from 5x8 to something like 6x8.

The boards I bought were one sided. One crazy idea I had which I didnt do was to make a front side silkscreen mask by printing it out in toner and ironing it on. If you could find a way to do it in white toner (does that exist?) it would be perfect.

My other dilimena is drilling holes. I use a small hand drill and it takes some hours to go through a board such as this.
acer1992 says: Aug 27, 2012. 1:52 AM
good work!
akshay+jadhav says: Aug 23, 2012. 12:23 PM
Which Cad software have you used, that u got such curvy tracks ?
Mattosx (author) in reply to akshay+jadhavAug 23, 2012. 1:49 PM
I drew the entire PCB in Adobe Illustrator
akshay+jadhav in reply to MattosxAug 24, 2012. 12:20 PM
Is that a Cad software, how is it possible frm that soft ?
jst gv me a hint how was it done
Please ! :)
Mattosx (author) in reply to akshay+jadhavAug 24, 2012. 11:01 AM
Illustrator is a general purpose drawing app for graphic design. Its really for drawing logos and designing graphics. Im sure PCBs never crossed their mind when they designed Illustrator. It was a bit of pain though as I have to space out exactly the ic pads and everything. You could really do some crazy traces with it if you wanted to.
omnibot says: Aug 21, 2012. 6:22 AM
It's .. beutiful *_*
amandaghassaei says: Aug 19, 2012. 2:52 PM
love how you included all the exposed components in your final design, looks great!
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!