Connect with us

Building a simple clock

Discussion in 'General Electronics Discussion' started by Nilius, Nov 19, 2013.

  1. Nilius

    Nilius

    3
    0
    Nov 19, 2013
    Hi,

    this is my first post, hope to post it into the right section.

    I studied electronics many years ago, and now I am trying to return to my passion making some little circuits. The one I am willing to realize is a clock, to know what time is it.
    I need for this a timing circuit, tuned on 1 Hz, then a set of counters that holds minutes and hours, the logic that implements 59 to 60 minute transition and 23 to 24 hour transition and 7 segments led to diplay it.
    I have 3 questions, or, better, need 3 advices, since I am out of these things for years.

    1 How to realize the 1Hz clock. I hava a 32K quarts, but I am not sure what IC choose to have a good precision while containing complexity and costs. Having a 32k clock and 14 frequency divisor should make a good 1Hz clock... but which astable to choose? 555? I don't want the clock to loose too many secs in a month.

    2 To realize the display, I will have BCD data, and really don't want to use BCD to 7 segments decoder to have a littler board. Is there a 7 segment dislpay with BCD logic integrated, like TIL308, but CMOS, as all other components I have are CMOS technology?

    3 Is it possible to program a PIC to control a clock, maybe with RTC, so I could add later some controls, like timing lights at home or similar things? Is it an overkill? Which PIC could be the simpler one (and less costly) to perform such a duty?

    Hope not to be too noobish, or irritating with my questions. I really am out of business since eons.


    Thanks for any suggestion
     
  2. duke37

    duke37

    5,226
    718
    Jan 9, 2011
    The CMOS 4060 will make a crystal oscillator and 14 stage divider all in one. The oscillator will need to be trimmed with a variable capacitor if high accuracy is required.
     
  3. Nilius

    Nilius

    3
    0
    Nov 19, 2013
    Thanks

    It sounds good. Very thanks!

    So I assume using a PIC could be an overkill...

    What if I need a pulse every minute, would I add an 8 bit counter and wait for 60 cycles or I can modify frequency altering capacitors value? What would be more accurate?
     
  4. duke37

    duke37

    5,226
    718
    Jan 9, 2011
    You could do the whole lot with circuitry but it would doubtless be better to use a PIC or similar. An input of 1 pulse per second would be easy and the computer could do further division and display driving
    It is 30 or 40 years since I used a 6502 so I may be out of date.

    Accuracy will not depend on a frequency divider, it will depend on the oscillator.
    You do not say where you are, it is not the UK, but here we have an accurate mains frequency which can be used for a clock. On the odd occasion when the clock runs slow, the time is made up. I was advised to set the clock at midnight on sunday.

    A variable capacitor will not be able to 'pull' the oscillator frequency to any extent. The output pulse could be compared with radio time signals from MSF, WWV, WWVH or from GPS satellite. You will need to wait a considerable time to see a phase shift to reset the capacitor.
     
  5. Nilius

    Nilius

    3
    0
    Nov 19, 2013
    I write from Italy, we have here a 50Hz mains frequency, it is also very accurate, and with some simple conversion could be used as reference for a clock; but I will not be connected to mains, but on batteries (hence the CMOS propension).

    Thank you very much for the help, it will be put to practice soon!
     
  6. BobK

    BobK

    7,626
    1,654
    Jan 5, 2010
    Using a PIC to make the 1 Hz clock is overkill, since the PIC could replace all of the rest of your logic as well!

    Bob
     
  7. kong

    kong

    122
    2
    Sep 26, 2010
    Like was said by duke37, a 4060 is a good choice for an oscillator. I myself am currently working on a similar project and am utilizing a 4060 with a 32.768kHz crystal divided down to 1Hz using all available stages from the 4060 + a 4027 flip flop for the last one.

    It gives a fairly reliable clock signal-but it depends on the application. My timer does not require the accuracy that a digital clock would.

    I went the route of 4000 series and 7 segment display. It's relatively easy to breadboard but can become much more complicated (as I am discovering) when soldered to a board.

    Good luck with your project!
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-