Clock Project

Discussion in 'The Projects Forum' started by kurtruk, Oct 2, 2012.

  1. kurtruk

    Thread Starter Member

    Aug 26, 2012
    140
    6
    A while before I received help with making a clock schematic. Now I have the schematic completed and the layout for the boards. Because of the limitation of the free version of eagle and the enclosure I am putting my project in their are actually four boards. The first is for the power supply (to isolate it). Then the second and third contain the "guts" of it. The fourth is the display. These boards will be connected together with ribbon wire. I included a master schematic of the whole thing.

    So these are my questions:

    1. is my fuse right? here is the link to the datasheet:
    http://www.digikey.com/product-detail/en/5MF%20300-R/507-1258-ND/1009030

    2 I changed my clock from 24 hour to 12 hour. Did i do this right?

    3 Is my time setting mechanism correct?

    4 In general is their anything wrong or that could be improved?

    My version of eagle is 6.2.0

    Any help at all is greatly appreciated.
    Thank You
     
  2. kurtruk

    Thread Starter Member

    Aug 26, 2012
    140
    6
    Please respond quickly I might have might have my chance to use a friends laser printer tomorrow. THANKS
     
  3. kurtruk

    Thread Starter Member

    Aug 26, 2012
    140
    6
    here are the images as a .png



    :) any help at all is greatly appreciated :)
     
  4. ScottWang

    Moderator

    Aug 23, 2012
    4,855
    767
    I'm not sure why you don't want to use CD4518?
    The carry connects to the input of the next stage's counter, it should be connecting to EN, EN is active by trailing edge, active from clk is for normal counter, if you use clk for a clock or timer, then it will loss the last half cycle of the input carry clock.

    .........__
    Ten ← ▏↓ unit

    CD4518,CMOS DUAL UP-COUNTERS, BCD counter.
    http://www.datasheetcatalog.org/datasheets/120/109587_DS.pdf
     
  5. kurtruk

    Thread Starter Member

    Aug 26, 2012
    140
    6
    I'm not sure I understand. if the pulse form the counters went to the enable then wouldn't it just flash on and off? I am confused. Doesn't enable just enable it to count not actually count?
     
  6. MrCarlos

    Active Member

    Jan 2, 2010
    400
    134
    Hello kurtruk

    no, not really, the counters will not be turning on and off.
    Enable signal is to pass the clock signal to the counter but not to enable the counter itself.

    If the enable signal is true just the counter will not count. That's all

    regards
    at your service
     
  7. ScottWang

    Moderator

    Aug 23, 2012
    4,855
    767
    You just don't thinking too much, you can see the Functional Diagram of page 1, clk(A1) passed through a inverter, but EN(A2) didn't, so their basic function is the same.

    In another ways, if you series a inverter on the clk(A1), then the function of clk(A1) will become the EN(A2).

    if you series a inverter on the EN(A2), then the function of EN(A2) wil become the clk(A1).

    .........__...........__
    Ten ← ▏↓ unit ← ▏↓ ← Clock

    The input of unit still have to connecting to EN(A2), otherwise, it will also lose the half of first clock.
    Actually many people didn't know about this, I have been design the industrial Counter And Timer, so I knew their difference.


    Functional Diagram on page 1.
    http://www.datasheetcatalog.org/datasheets/120/109587_DS.pdf
     
    Last edited: Oct 5, 2012
  8. kurtruk

    Thread Starter Member

    Aug 26, 2012
    140
    6
    Ok I don't understand why I would lose half of my clock signal? what is the differance between 4518 and 4520? Which one should I use?
     
  9. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    The 4518 is BCD (Binary Coded Decimal; counts to 10 or 1010), and the 4520 is binary (hex; counts to F, or binary 1111). You should use the 4518 unless you want to create a hexadecimal clock.
     
  10. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    Would not aslo using the 4510 in some places be a good idea in this design?
     
  11. kurtruk

    Thread Starter Member

    Aug 26, 2012
    140
    6
    What has been changed:
    1. 4520s replaced by 4518s
    2. previous nets going to CLK have been moved to EN and CLK then was grounded
    3. I decided to change my diodes with resistors to actual OR gates (4071)

    heres the datasheet for my 4518:
    http://www.ti.com/lit/ds/symlink/cd4518b.pdf

    My Questions:
    1. Did I chose the right fuse? (datasheet is in first post)

    2. My clock is supposed to be a 12 hour clock so after 12:59:59 it goes back to 1:00:00. Did I do this right?

    3. Are there any other problems with the schematic?

    4. What errors could I make while laying out the board?


    :) Any help at all is greatly appreciated :)
     
  12. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,394
    1,606
    The fuse is fine. There is a slight chance it will blow just by charging the caps at turn-on, but it is safe to try.

    Personally I would NOT connect the AC ground to your circuit ground. It is correct but unnecessary. A simple 2-prong plug, either polarized or unpolarized, is fine.

    I don't think so. The 4518 reset is not controlled by the clock line, it is a level sensative input. Thus as soon as hours reaches 12 it will reset to zero.

    Since you need a counter that counts 1-2-3-4-5-6-7-8-9-0-1-2 (repeat) and not just 0 to 9 you need a different style of counter. I would suggest one with pre-load inputs, so you load "1" when the time goes from 12 to 01.

    You also need to AND lines from both hours & 10's of hours to detect those conditions.

    None I saw in the 4 minutes I looked.

    Seriously? <grin>


    Generally, so far, so good. Keep trying (and save that schematic!)
     
  13. kurtruk

    Thread Starter Member

    Aug 26, 2012
    140
    6
    I have tried for a while using 4510 for the reset. In circuit maker (computer software) I've got it to to go 0 1 2 3 4 5 6 7 8 8 10 11 12 0 but i cant seem to get it back at one.
    Also I have thought that i need to change my other and gates from activating at 6 and 10 to activating at 5 and 9. My theory is that when it goes to 9 it will go high then it will restart going back to zero and the and will go low making the next 4518 go to 1 right? Please help. I guess my main problem is making the preset enable go high at the right time also isn't 4510 counting on the positive edge instead of negative like i need it?
     
  14. ScottWang

    Moderator

    Aug 23, 2012
    4,855
    767
    1. I modified the CD4518 of the circuit for 4 right digits, from 00~59,00~59.

    2. I also added the 12:59:59 detector, on the upper of the left side.

    3. When you want to turn the clock from 12:59:59 to 01:00:00, this part not complete yet.
    About this part, I thought two ways, one was like ErnieM said, to use CD4510, another is still use CD4518, I'm not sure which way is easier.

    You can check the part of blue color.
     
  15. kurtruk

    Thread Starter Member

    Aug 26, 2012
    140
    6
    I changed:
    1. the 4518s on the very left to 4520s
    2. added a on-off switch for the seconds display. Did I do this right?
    3. Changed the Vdds going to reset to GND. The resets are active high.
    4. Changed the output of the AND to go to clk. My theory is that once it is 0110 the AND will go high resetting the 4518 and sending a signal to the clk of the next 4518. (I am very skeptical that I did this right)
    5. I got rid of the ground from the AC main.

    My Qs
    1. Did I do the on-off switch for the second display correctly?

    2. Did I change the tens digit correctly (see above)?

    3. Now the time set signal is going to clk instead of enable. is this ok?

    4. I'm still stuck on making it go to 1:00:00. since the reset is active high I don't think I would need the huge AND, but could instead sense when it is 13 with AND gates which would then make reset high of both the hours and the ten hours. So I think I got it to go 0 1 2 3 4 5 6 7 8 9 10 11 12 13 (for a very short time) 0 1 2 ... So I just need to send a high signal to the 4518 clk at the right time which is the difficult part. I have tried a bunch of different things and non of them have worked.

    5. What purpose does the resistor that is used as "reset delay"-why is that needed/helpful?
    6. Are you sure that 100k for these resistors is right? It seems quite big.
     
    Last edited: Oct 6, 2012
  16. chrischrischris

    Member

    Feb 18, 2012
    283
    10
    From my limited knowledge of clocks, a 4510 is a single up/down counter. A 4518 however is a dual up/down counter. This means that your hours can be handled with 1 only 4518 as can minutes, and seconds (i.e. 3 in total only - rather than 6).

    The following link might help you out a bit...

    Clock1.jpg
    Clock2.jpg
    :)
     
  17. kurtruk

    Thread Starter Member

    Aug 26, 2012
    140
    6
    Yes I know this already. In eagle it separates each half of the 4518 in the schematic for purposes of versatility.

    The link did not help me much because it was for a 24 hour clock not a 12 hour clock, but thanks anyway.

    Any help with any of the previous questions in my previous post would be greatly appreciated.

    I'm thinking maybe if I used a resistor and capacitor to delay the signal (to start at 1 instead of zero) so that the reset is back low and it will advance to one. Would this work?
     
  18. kurtruk

    Thread Starter Member

    Aug 26, 2012
    140
    6
    What I changed:

    1. I added a resistor and capacitor to illustrate my idea.

    2. I grounded the input D of the 4511s of the ten minutes and ten hours because it is unnecessary if the count only goes up to 59.

    3. I chagned a few other things you can see in the pic.

    My Qs

    1. Will my seconds display on-off switch work? Should i instead for simplicity move it so it turns the ground of the display off?

    2. Will my idea for resetting back to 1:00 work?
    a. According to my calculations it will delay the signal for 10 miliseconds-is
    that too short or too long or just right?

    3. What is the purpose of resistors R47 and R49?
    a Is 100k good; it seems quite big?

    4. I probably need some isolating resistors in my 12 hour reset (if it even works) but I'm not sure where

    note: anything that is circled in blue is changed and their are other notes and questions in the picture.

    I now realize once again my signal between the tens and the ones is wrong I think should put the and gate back on 6 (4+2 or 0110). Am I correct on this?
     
    Last edited: Oct 7, 2012
  19. MrCarlos

    Active Member

    Jan 2, 2010
    400
    134
    Hello kurtruk

    Take a look at the notes in the attached image

    Always a counter that counts from X to Y should be detected when it reaches Y + 1 and at that moment restore to X or zero.

    In the seconds and minutes, should be detected when it reaches 59 +1 Then reset to 00.
    Within hours, watch style 12 Hrs. detects when it reaches 12 and at that time reset to 01.

    Hope that helps.

    Greetings
    at your service
     
  20. kurtruk

    Thread Starter Member

    Aug 26, 2012
    140
    6
    Ok I changed my and gates back.

    Qs I still have

    1. My simulator is rather unimpressive and I cannot test both "analog" and "digital" at the same time. The simulator classifies a capacitor as analog so therefor I can not test the 12 hour reset.
    -------My logical theory is once the clock hits 13 (after 12:59:59) the AND gate will go high resetting both the tens digit and the hour digit. It will also charge the capacitor. Once it goes back low the capacitor will discharge causing the counter to advance to one. Maybe their is a easier way?

    2. My other question is if I have a 100K resistor couldn't that practically just block all current because it is so big?

    3. Then in general is there anything else that is wrong or needs improvement?

    Any help at all is greatly appreciated :) :)
     
Loading...