Skip to main content

24h /12h Digital clock using ic555 ,7490 decade counters and 7447 bcd-7seg decoders tutorial (1/2)

This photo is from this instructables project here


There are many stuff on the internet about this project, but we are gonna add something or two.
This circuit was a school project and it was a 24h clock, but i decided to extend it to 12h and 24h with the transferring between them using a switch so you can choose whatever mode you want.
Anyway, i made this circuit just for fun so i just simulated it on proteus, i.e we're not going into pcb design.

The final project





First of all we're going to divide this tuorial into 3 parts:
- How it works in the 24h mode.
- How it works in the 12h mode.
- How to transfer between them using simple switch.

So... let's get started with the first one..




The main parts of the circuit are as follows:

1- Timer 555: Responsible for generating the clock pulses for the counters, the frequency of the output shoul be 1 hz which means 1 second for each pulse.

2- Counters: Responsible for generating the time in BCD (Binary Coded decimal).

3- Decoders : Takes the BCD of the counter as input and produces 7 segment output .

4- 7 segments : Displays the time, of course! 

* Seconds have 2 displays , 2 decoders and 2 counters. The same for minutes and hours.


One thing you should know before explaining how the circuit works is that 7490 decade counters 
respond only to the negative going edge of 555 pulses, which means it will change its state only when the clock goes from 1 to 0.


Now you are ready...

The circuit works as follows :

555 timer produces 1 seconde pulses to the clock input of the first counter which is responsible the first column of seconds, so its output will change every second.

The counter produces numbers from 0 to 9 in BCD form and automatically resets to 0 after that.
so the output of the first counter will count from 0 to 9 every second and that's exactly what we want from it, so we are done here. let's move to the next one.

What do we want here?
First, we want the 2nd counter to start counting when the 1st one moves for 9 to 0 (that makes 10 seconds!)

How can this be done?
let's check the output of the fist counter in BCD :

MSB---LSB
0:  0000
1:  0001
2:  0010
3:  0011
4:  0100
5:  0101
6:  0110
7:  0111
8:  1000
9:  1001
0:   0000

Remember that 7490 decade counters  respond only to the pulses that go from 1 to 0 and notice that this case only happens in the BCD code above when the output changes from 9 to 0 (the Most significant bit changes from 1 to 0). So, we'll just connect the clock input of the 2nd counter to the most significant bit of the output of the first counter.


Second, Since we have 60 seconds in the minute we want the 2nd counter to count only to 5, that makes 59 seconds maximum, when it take another pulse it doesn't count to 60, instead it resets itself to 0 and send a pulse to the first counter in minutes to tell it to count 1 minute

How can this be done?

From the BCD code above (6: 0110) when the output is 6 the two middle bits are 1 (Q1,Q2), 
So By ANDing these two bits the output will be 1, This output will be connected to the reset pin of the same counter (2nd one) and the clock input of the next one(3rd).
When the output is 6 the AND gate output (1) will reset the same counter and its outputs goes 0000 so the output of the and gate again goes to 0 (1---->0), that will clock the next counter. Beautiful!

*Notice that the output of the counters are named : Q0 , Q1 , Q2 , Q3 

The 4th counter will be the same as the second one so we are clocking it using the Most Significant Bit of the output of the previous one.

Again, the 5th counter is the same as the 3rd one and takes its clock from the AND gate.

The 5th and the 6th counters are responsible for hours so they are  limited to 23, and resets themselves to 00 when the 5th counter is 4 and the last one is 2 (24).
This is done using and gate with Q2 (3rd bit) of the 5th counter as one input and Q1 (second bit) of the last counter as the other input, and the output of this AND gate will be connected to both resets of the last 2 counters.

When the last counter is 0(0000) or 1(0001), Q1 which is one of the inputs to the AND gate will be 0 so the output of the AND gate will be zero. when it counts to 2 this bit will be 1 so the output of the and gate will depend on the the other input which is Q2 of the previous counter, and this bit will be zero until it reaches 4 (0100),So, the output of the and gate will be 1 (0--->1) resetting both counters to 00,



The output of these counters are converted to 7 segment output using 7447 decoders, then to the 7 segment, we won't get into the details of their datasheets.

In the next part we're going to explain how to modify this design to make it only 12 hours mode (the problem will be that when we reset the hours it has to go to 01 not 00) and how to design both modes in the same ciruit with transferring between them using a simple switch...


Comments

  1. can you post the next part please we need a digital clock circuit with 12 hours mode. thank you so much :)

    ReplyDelete
    Replies
    1. okay i will try to post the next part by the end of the week. :)

      Delete
    2. please can u send this project in file >

      Delete
    3. student : http://s000.tinyupload.com/index.php?file_id=64712485861091484501

      Delete
  2. how to put alarm on this using 12 hour mode? thanks a lot!

    ReplyDelete
    Replies
    1. You can use 555 timer to generate one shot pulse whenever the hours clock get a clock pulse.
      here you can find some details about the 555 in the monostable configuration (one shot) :
      http://www.electronics-tutorials.ws/waveforms/555_timer.html

      Delete
    2. Here's how you can do it in the clock circuit:

      http://i.imgur.com/NcjYakx.png

      The output of the OR gate is always zero except for the times the hours recieves a clock pulse, it goes 1 then back to 0(because of the reset mechansim).

      The NOT gate will make the output of the OR gate always 1 exept for the clock time it goes to 0 which exactly what we need for the monostable configuration.

      Of course we replaced the push-button with our signal from the NOT gate and the led for the speaker.

      Hope I helped :)

      Delete
  3. how can i reset the hours to 1 instead to zero? im using 7490 and 7447 ic. please help me

    ReplyDelete
  4. do you still have this project?

    ReplyDelete
  5. Afreminarnu Cindy Collins download
    condculgepi

    ReplyDelete

Post a Comment

Popular posts from this blog

24h /12h Digital clock with alarm using ic555 ,7490 decade counters and 7447 bcd-7seg decoders tutorial (2/2)

Hello again! in the first part we've seen how the basic 24h clock works (the hour coulmn counts to 24 and then resets to 00). It was quite easy and there were no problems, but let's extend the idea a little bit. What if we want to design a 12h clock?  well.. it's the same idea but there was a little problem which is: when the hours reachs 12 and counts to the end of the hour 12.59 we don't want it to reach 13, we rather want it to reset to...? 01 not 00 so i had to make a small trick you'll see later. How the circuit works? It's the same circuit as the first part   but we've to edit the hours coulmn so it resets to 00 when it reachs 13 and then clocks the first coulmn of hours so it becomes 01 .. simple! So that's how i made it , the two AND gates U9 and U10 detect the case when the hours coulmn is 13 and their output(A) then will be 1.  Output A has two jobs to do : - The first is to reset the boths hours coulmn so it's

A deep look at the internals of arduino IR library; how it works and how to implement one by yourself

Introduction Last few days, I have been interested in IR remotes and how they work and whether I can write a code that sends a command to my crappy Chinese receiver. I had no idea about IR remotes or how the protocol works so I had to learn a few things about it first then learn what is the exact protocol used by my receiver. This isn't an IR tutorial, there are many good tutorials that explains the concept very well out there, So I will just go quickly through it, then try to understand how some existing codes work. How does IR remote works? When you press a button on your remote control, it emits an infrared light with a specific pattern that contain information to tell your commanded device what to do. When I say pattern, I mean "Protocol", the protocol tells us how to send a specific information to a specific device.These information usually are the command (volume up,down,OK...) and the address or the device these information are sent to. There are many IR protoc