Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

24H 7-segment binary clock

Status
Not open for further replies.

spitfire

New Member
Hi, I am currently studying digital circuits and have been wanting to make a digital clock for some time now. I have made a simple 0 - 9999 counter using a pic but I would like to use BCD counters and gates to make a 24 Hour digital clock with 4 7-segment displays eg H H : M M format.

I have a rough idea of how to make it but I'm having trouble with the multiplexing of the displays as I would like this clock to be portable and run on batteries. I was thinking of making this circuit for the 1Hz clock pulse signal as I want it to be fairly accurate: https://en.wikibooks.org/wiki/Practical_Electronics/Plugins/1Hz_Oscillator
or is there a simpler way as I would like to keep the size and cost down of the project.

This is a basic layout of the circuit I will be using:**broken link removed**

also not shown on the picture but 4 x 74ls47 for the displays?

and for the multiplexing I had 2 x 74LS153 in mind. or 1 x any Quad 4 input mutiplexer.

Just need some adicve from people with experience to double check if this solution could work and if I would need more components (maybe use a decoder/dmux ic?)...or maybe even an easier way you might be able to suggest.

By the way this is my first time working with components like these on my own.

Thanks
 
This isn't the 1970's! :D

For low current consumption use CMOS logic, not power hungery TTL - or even better use a PIC - a single chip solution, and a LOT more versatile.
 
Even if you want to use obsolete logic, your 1Hz clock is still too complicated - you only need one IC!.

1-hz-png.10810
 
Thanks Hero999 for the diagram.

I would prefer not to use PIC because I want to get a good understanding of how it all works and its more fun this way for me atleast. Gotta start at the bottom to truly understand the operation.

I like the idea sticking with decade counters, gates and decoders, mux's...
but I dont know enough to pick the best possible IC or maybe one that can do most of it for me.

Im and currenty studying digital circuits and we are using TTL based logic so I thought I would stick with that but CMOS would be ok, they pretty much work the same way dont they? just more sensitive to static and use less power? I might just run it off a 12V plug pack if necessary.

Thanks.
 
Look under TTL clock in this forum.
I posted a while back here with TTL clock schematics.
 
spitfire said:
I thought I would stick with that but CMOS would be ok, they pretty much work the same way dont they? just more sensitive to static and use less power? I might just run it off a 12V plug pack if necessary.

You say 'less power' like it's a little bit less?.

It's not just a 'little bit', it's absolutely massively less current - TTL uses thousands of times more current than TTL - to the extent taht with CMOS and an LED display you can just ignore the power the chips takes, it's insignificant in comparison to the LED current.
 
Ive decided to go with CMOS for this. I wasnt sure because up untill today knew nothing about CMOS but thanks for clarifying it for me.
Here are the IC's I plan on using for the clock:
3 x 4566
4 x 4513
1 x 4521

or 4 x 4566 and not making the 1hz clock circuit (no 4521) but using a 12V AC plug pack to get 50Hz and divide that up.
I'm not going to worry about multiplexing because it would still draw too much current with the LED displays for a battery operated circuit and this mean less IC's which is good.

How does this sound?
 
Sombody else was working on a binary clock. You may want to look at robotbuilders binary clock. I am going to followthat schematic myself...

you may want to go with the HC series, very popular and widely used. the ol 4000 series doesnt supply as much MA output as the HC, and the HCseries can run from 2-6v. If you want 1 AA operation, go with the AUC series from Texas instruments. it can operate from 0.8-2.7v.

EDIT: Heres the link. Schematic and pictures are on the 2nd page
https://www.electro-tech-online.com/threads/binary-clock.98/?highlight=binary+clock
 
Last edited:
Perhaps slightly cheating, but I made a hybrid LED clock which uses a PIC for the hours & the minutes, and a 4521 dual BCD counter (what a hassle!), two 4511 7segment decoders and I used the seconds output from the PIC for an accurate reading. I think it looks pretty good, see if I can upload a pic...
 
Thanks, please post pic if you can.

Due to certain IC's being obsolete and not having much knowledge I have decided to try and make it using 6 x 4510 bcd up/down counters, 4 x 4511 bcd to 7 seg drivers, 1 x 4521 for signal and some AND and OR gates.
Note: Only 4 of 4511 because at the moment I only want to display H H : M M and i was thinking of using the 1Hz pulse to flash the 2 dot points in the middle every second.
 
sounds good, why do you need 6x 4510's? perhaps I am overlooking something?
Here are some pics of my clock, some of you may remember me talking about it earlier this year, well, here it is..
 

Attachments

  • IMG_2413.JPG
    IMG_2413.JPG
    871.8 KB · Views: 633
  • IMG_2414.JPG
    IMG_2414.JPG
    824.5 KB · Views: 401
  • IMG_2417.JPG
    IMG_2417.JPG
    809.5 KB · Views: 475
  • IMG_2418.JPG
    IMG_2418.JPG
    856.1 KB · Views: 421
I like retro digital clocks :)

Very nice Mike, I like you vertical standof segments idea. Cheers for the pics.

Well I bought 6 just incase and because my origional idea was to use 6 of them like on that basic diagram on my first post just to get the seconds counting up to minutes, now that you point it out its probably a stupid idea + a waist of IC's but I couldnt find a way around it. Is it possible to achive it with just 4?
 
Yeah, I see what you mean. You could just ditch the seconds part of the circuit, if that is what you were intending in your previous posts. Yes, you can make the clock with just four, so long as you don't want the seconds. Just out of intrest, will you be making the AND and OR gates using diodes and resistors (DRL), or will you go for a chip of them or both?
 
I already have 2 AND gate IC's and an OR gate but if i run out of space on my veroboard I might use diodes and resistors.

I would still need to use the 6 counters even if I didnt want to display seconds just to get the counts up to 59, is this correct? this is still using the 1Hz clock pulse.

Edit:Today I built the signal pulse circuit on veroboard and it is dead accurate, very pleased with it. The display I have is 4 segement common anode display all in one and silly me only realised when I was trying to get a 1 second counter working that the 4511 is a common cathode driver.
On the datasheet it says to use a NPN tansistor with resistors to drive a common anode but 28 transistors just to drive the segement is crazy so I either find a CA driver or buy a CC display
I cant find a common anode driver in the 4000 series besides the 4543B which noone seems to stock.
Any suggestions?
 

Attachments

  • 1Hz signal.JPG
    1Hz signal.JPG
    88.7 KB · Views: 607
Last edited:
yes, true, but if you like, you might want to use a 4520 dual bcd counter. it has two counters in one, but it is very fiddly and particular about its values. Basicly its a big hassle.. BUT the good news for you is that they are ridiculously cheaper (mine was 60cents compared to a single BCD at $1.40) and, i have already used them in a seconds configuration for my clock i showed you. If the chips are availiable to you, you might want to consider it, I will give you more info if that is so.
 
Yeh I actually found 2 4520's that I got from work in my component stash but they did seem alot more complicated for someone at my level in digital to setup for a 24H clock.

I emulated a seven segment display with 14 leds to test a 10 second counter and the number starts at 2...is this normal? or is it the 4000's series is slow to react and i need to place a cap somewhere to hold the clock pulse for a short period before it starts counting?
 
Are you using the 4510's? They should count (in binary) from zero to nine, then reset. If you need to reset earlier, you use an AND gate on the output pins to the input (in correct binary format for the number you want to reset at). Dont forget that even if you want an input to be zero or 0 logic level, you will need to use a pull-down resistor to avoid erratic reradings.
 
Thanks again Mike, I did not know that, what value resistor should I use, is this for all unused inputs that need to be logic 0, do I need pull up resistors for logic high? yes I'm using the 4510's but when I first switch it on it displays a 2, but once it counts a full cycle and resets it works normally. doesnt really matter because I wont be displaying seconds but it would be good to know why this happens.
 
10k resistors are quite common to use. For example, if I have a count input pin, that is triggered when the pulse is HIGH (1), then there should be a 10k resistor to ground (note that this is unneccisary if you are using the output of another chip to get a signal. Thats because the other chip will allready have the logic at either 1 or 0, not (as its called) floating.) Generally speaking, if the pulse required to trigger something is a 1 (high) then the resistor should be to the ground , and vice-versa.

As to why your counter starts up at 2, Im not 100% sure. I do know, that it shouln't - it should start from 0 (BCD outputs all low). Perhaps stray charges are infiltrating your 'count in' pin, so try the resitors suggested. If that doesnt work, perhaps the power supple, but this seems unlikely (I am assuming you're using a battery? this would eliminate these issues).

Try the methods suggested, then see what happens.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top