1. 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.
    Dismiss Notice

Synching Quartz Master clock to DCF77/MSF

Discussion in 'Electronic Projects Design/Ideas/Reviews' started by oliverb, May 15, 2009.

  1. wombweller

    wombweller Member

    Joined:
    Sep 1, 2007
    Messages:
    364
    Likes:
    0
    Hi Oliver

    You can go on and on with these things!!

    My project uses a 1 sec pendulum for the timebase but other than a calender dial I also wanted a comparator indicator.This idea is similar to what was used in Power stations to regulate the power supply to the grid.

    I wanted to test the my master clocks time against real time and thought of either using mains frequency or MSF. to measure this. The idea is that msf.or frequency time advances an indicator (one hand on a dial) say clockwise and my master clock advances the same had anticlockwise then over a period of time I would see how my master is running.All this is just another visual aspect to the project.

    The same method was used in the power stations.

    A master run pretty much bang on time and gave a pulse to a comparator meter.The mains frequancy also did the same but again advancing the meter in the opposite direction.Once again you could see if the grid electricity was beginning to be used up or drained (for want of a better word) if the meter showed that the mains frequency began to lag in relation to the Master then more juice would be put into the grid to compensate.

    I'm hoping at some point in time my comparator may self adjust my master to correct time as mains frequancy is more suitable these days.Only trouble is you can end up chasing your tail.

    I've not got this running yet as I'm looking at how best to do the stepping on the meter, I was thinking of using stepper motors.

    Cheers!!
     
  2. Mr RB

    Mr RB Well-Known Member

    Joined:
    Jul 22, 2008
    Messages:
    4,716
    Likes:
    194
    Location:
    Out there
    The comparator dial thingy sounds cool. Doing it in software is probably easiest, with just the dial part done as hardware but that's a bit boring.

    But if you do it in hardware with a stepper you risk conflict where the signals may become in phase and the stepper tries to turn both ways at the same time.

    You could get around that by generating opposite pulses every second, (so the stepper dial goes tick tock so to speak) but make the generation of a pulse based on the requirement of a counter exceeding a set value.

    So you still basically have 2 accumulators counting pulses and trying to step the dial, but the stepping events themselves can only occur out of phase at at a predetermined period.
     
  3. oliverb

    oliverb Member

    Joined:
    Oct 7, 2005
    Messages:
    212
    Likes:
    6
    Location:
    England
    I have changed the value of C6 (used in combination with R11 to reject short duration pulses) to 0.47µF and R11 is now 5K preset. I think this may be due to my DCF77 being 5v and my Master being 6.7V as it has to drive 30 sec drive coils.

    The main thing is that C6 and R11 rejects short duration pulses and allow the 1st inverter to trigger on 100ms and 200ms pulses.


    I have been thinking about using this circuit to sync my master. My master sends out 30 second and 1 sec pulses to drive my slaves. I am therefore limited to syncing my Master to within 1 second or my slaves will be out of sync.

    My plan is to run my master a fraction fast (it does this anyway). This means the Master will work as normal but the 32.7KHz dividers will be reset or synchronized to the DCF77 pulse whenever it has received an error free frame. This means that as long as the Master is less than 1 second fast when it is synchronized by the DCF77 the slave seconds driven by the 1 second pulse will remain correct. In real terms this means one sync pulse from the DCF77 per couple of weeks to keep my master on time.
    If for example the DCF77 failed to output a pulse for 3 weeks and my master was just over 1 second fast it would sync at exactly 1 second fast.

    In real life my DCF77 sends out a good pulse every minute so this should not happen.
    I have had my old binary quartz master connected to my DCF decoder for the last few days reseting the quartz dividing ICs as above and it is keeping perfect time.

    I am going to try and connect it to my main Master Weds but will be fitting a switch so I can turn off the sync pulse if it causes problems.

    I think if I get error pulses (more than 1 per min) my master will run slow depending on what part of the second the dividers where at when they were reset.
     
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. Mr RB

    Mr RB Well-Known Member

    Joined:
    Jul 22, 2008
    Messages:
    4,716
    Likes:
    194
    Location:
    Out there

    Hi again, it seems the only potential error mode is getting an extra (fault) pulse to cause an extra reset. Is there any chance you can get noise on the cable between the output of the synchroniser and the input to the master clock? That's probably not likely if they are in the same box I guess?

    I guess you could add one more RC filter on the reset pin inside the master, that will mean the sync pulse has to have a duration longer than X to cause a reset, which should eliminate any chance of a short noise spike causing a false reset.

    And, just to play devils advocate, what happens IF your master just happens to run a bit slow?? Do xtals get faster as they age or slower?
     
  6. oliverb

    oliverb Member

    Joined:
    Oct 7, 2005
    Messages:
    212
    Likes:
    6
    Location:
    England
    I have added a false base to the bottom of my master clock so the DCF77 decoder can mount under the main board. The wire to the master is only a few cm long so noise should not be a problem.

    If my master runs a bit slow then the mins will not count as the seconds count will be reset before they step on the mins. However a second later they will step from 59 to 00 and step on the mins.

    I have always set my master to run fast as it was easier to sync by holding the seconds sync button (resets seconds dividers)than changing the seconds forward. Don't forget all my slaves would have to have the seconds advanced as well. Stopping the seconds stops all my slaves so they all stay in sync.

    I'm not sure if quartz crystals slow down or speed up with age but my master has allways drifted forwards since set that way some years back.

    I suppose a "pulse sync error" circuit can be fitted that only allows sync pulses for 1 second after the master has pulsed. This could take the 1 min pulse from the master and compare it with the DCF77 pulse. I think in one of my earlier designs for this circuit I included something similar. I think I used a flip flop- I'll have to check back in this thread.
     
  7. oliverb

    oliverb Member

    Joined:
    Oct 7, 2005
    Messages:
    212
    Likes:
    6
    Location:
    England
    I spent Weds adding the DCF77 decoder into my Master clock. I had already pre-built and labeled the new switch mount along with the labeling for the LEDs (Lazertran onto aluminium).

    To keep all the circuits together I added a new base to my Master and fitted it with another hinge so I have easy acces to the DCF77 board. There is now a hinge for the top and another for the base. The lower hinge is a lift off type so the whole clock can be removed from the wall.

    After completing the mod I discovered that "the sync on 60seconds" switch in my Master is not required and can be left on all the time. I have added a note on my schematic on line.

    The clock has now run overnight and is still "in sync". I will keep a close eye on it for the next few months.
    I am pleased with the reception of the ebay DCF77 module from ebay and have decided not to fit it outside but to perm fix it hidden behind the curtain track near my master. This way I can route the 1m aerial and power cable around the picture rail so it can't be seen. The only time it looses reception is when the LCD TV mounted a few feet from the master is turned on. The Green "frame sync" and red "pulse error" LEDs come on and stay on while the TV is on. Unless the TV is on for a couple of weeks this will not be a problem!


    I will have to give my Electronic Master Clock web site a bit of a rebuild as it is now getting messy due to all the add ons.

    Again thanks for all your contributions to this thread.
    Brett.
     
    Last edited: Jun 4, 2009
  8. dougy83

    dougy83 Well-Known Member

    Joined:
    May 18, 2008
    Messages:
    2,677
    Likes:
    215
    Location:
    Brisbane, Australia
    Clever! I was wondering what the master sync line was doing in your schematics; that's why I left it out of the one I drew up. Just an idea (which you've probably already thought of): you can implement this function using one of the spare AND gates on the board. Just AND the minute sync pulse from the new dcf sync board with the master minute sync (if it lasts for a second).
     
  9. oliverb

    oliverb Member

    Joined:
    Oct 7, 2005
    Messages:
    212
    Likes:
    6
    Location:
    England
    I had thought about using one AND gates for this but the pulse is not 1 second long. Would not be too difficult to set up though. Off the top of my head using a divider output from IC5 (4024) that is 0 for 1 sec at 60 sec. This can be inverted see freeing up inverters below.


    Another thought on the AND gates is to use 1 to indicate the 1 min pulse instead of 2 of the inverters. This would free up the 2 inverters if they were ever needed.
     
  10. oliverb

    oliverb Member

    Joined:
    Oct 7, 2005
    Messages:
    212
    Likes:
    6
    Location:
    England
    DCF77 module from Ebay

    I have contacted the supplier of the DCF77 module on ebay and they have confirmed they we will be stocking the module as a long term stock item. The modules cost £12.85 with £1.85 postage. Looks like they will post world wide as well.
    This module seems to work well in the UK, I'm just south of London. It will loose signal near LCD TVs or low wattage light bulbs but then they prob all do.

    See links below.

    http://cgi.ebay.co.uk/DCF-77-Antenn...34.c0.m14.l1262&_trkparms=|301:1|293:1|294:30

    eBay UK Shop - ShockWaves Shop:

    Brett.
     

    Attached Files:

    Last edited: Jun 4, 2009
  11. dougy83

    dougy83 Well-Known Member

    Joined:
    May 18, 2008
    Messages:
    2,677
    Likes:
    215
    Location:
    Brisbane, Australia
    I can't imagine it would be hard to make a DCF77 receiver yourself. Have you ever considered it? The frequency is so low you can use opamp bandpass filters around the carrier frequency. I would try myself, but I don't think my location is the best for DCF77 (or any other radio timecode for that matter)..
     
  12. oliverb

    oliverb Member

    Joined:
    Oct 7, 2005
    Messages:
    212
    Likes:
    6
    Location:
    England
    From reading many sites on radio controlled clocks the receiver is the part that causes most problems. My old Maplin project clock from the late 90s was the same and setting up the reciver was a real pain.

    I can just about cope with logic cicuits, opamps etc I have not looked at them since college in the late 70s early 80s.

    I'm going to take the plunge and learn a bit about PICs. I want to make a calendar clock from analogue movements or flip displays or both controlled from my master. I want it to auto correct the days of the month etc.
     
  13. oliverb

    oliverb Member

    Joined:
    Oct 7, 2005
    Messages:
    212
    Likes:
    6
    Location:
    England
    System layout incorporating the DCF77 decoder

    Here is a very basic layout of my system with the DCF77 module and decoder board included showing some very basic interconnections.
     

    Attached Files:

    Last edited: Jun 5, 2009
  14. Mr RB

    Mr RB Well-Known Member

    Joined:
    Jul 22, 2008
    Messages:
    4,716
    Likes:
    194
    Location:
    Out there
    Yay! There will be no limit to the cool things you can make, usually with just one chip. ;)
     
  15. wombweller

    wombweller Member

    Joined:
    Sep 1, 2007
    Messages:
    364
    Likes:
    0
    Hi Brett

    Great news with the DCF. hope is proves to be worth the effort and works well.I had trouble with my MSF. receiver but I think in the end it ended up being the PSU. interfering with the circuit.

    Now you've got your master just about where you want it have you thought about version 2 IE. same but using a PIC?

    I too would have gone down the same route as you but I do feel with reading your threads and your website you are knowledgeable enough to at least try and take the step in to PIC's. How do you feel about this?

    PIC's can be a little daunting but also very rewarding , I know this because I've given it ago with a clock project and the calender project.I did not do these projects all by myself as I had no knowledge at all on them I asked the questions, got the replies and very kind people offered the help and advice.

    What if you do the DCF. project again but using a PIC. I realise you would have to buy some hardware but it would be a very interesting thread.If you start to ask the questions and seek the advice I'm sure that the people know your intent and commitment with what you've done so far, so on that I'm sure some would be more than happy to help out.


    Well done.

    W.
     
  16. wombweller

    wombweller Member

    Joined:
    Sep 1, 2007
    Messages:
    364
    Likes:
    0
    Brett

    Do you know you that there are impulse flip clocks available? Ebay comes up with some from time to time that are slave flip/ticket clocks.they seem to be foreign made, Solari is a name that springs to mind.

    Heres one from a NZ. contact also very interested in clocks

    http://www.youtube.com/watch?v=6jMMcZSrM0k&feature=related

    Cheers!!!
     
    Last edited: Jun 6, 2009
  17. oliverb

    oliverb Member

    Joined:
    Oct 7, 2005
    Messages:
    212
    Likes:
    6
    Location:
    England
    If I ever built another master I would use a PIC. I have no further plans at present and have a spare of every part of my master just in case anything goes wrong.


    I am definitely going to give PICs a go, just got to find out what hardware and software to go for as there is so much choice.


    In answer to your next post I ordered a cheap flip clock yesterday from ebay so I can take it apart and do some measurements. I have also started drawing up some calendar dials just to see what thy look like.

    I must admit I do like the look of the all in one flip clock and calendar but will have to see one in the flesh before I spend a load of money on it.
     
  18. oliverb

    oliverb Member

    Joined:
    Oct 7, 2005
    Messages:
    212
    Likes:
    6
    Location:
    England
    DCF77 signal update

    Now my DCF77 decoder is fitted in my master Clock I am no longer getting any signal problems when my LCD TV mounted a few feet away is on.

    When I had the problems it was with the circuit on test and the decoder had temp leads all over the place including the display LEDs resting on the TV itself.



    During the heavy thunderstorms that hit the South East of England this morning the DCF77 module performed error free without loosing sync.

    Things are looking good.

    I have written up my whole Master Clock including the DCF77 on a large word doc and will upload it to my Master Clock thread as soon as the forum allows. The file is 21meg zipped but I get a security token error when I try to upload it.
    Brett.
     
  19. Mr RB

    Mr RB Well-Known Member

    Joined:
    Jul 22, 2008
    Messages:
    4,716
    Likes:
    194
    Location:
    Out there
    Congrats it's all done! :)

    And yeouch on the 21Mb!! :eek:
     
  20. oliverb

    oliverb Member

    Joined:
    Oct 7, 2005
    Messages:
    212
    Likes:
    6
    Location:
    England
    I think its almost almost there, a couple of months of perfect time keeping and I will be happy.
     
  21. wombweller

    wombweller Member

    Joined:
    Sep 1, 2007
    Messages:
    364
    Likes:
    0
    Hi Brett

    Well done. hope it goes well.

    BTW. got the word file.

    Cheers!!
     

Share This Page