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.

DCF77 as time base for digital clock

Status
Not open for further replies.

darko31

New Member
Hi guys I'm new to this forum, I don't have a lot of experience so I am asking for help. We are currently at school building digital clock and I have assignment to use DCF77 module as 1Hz time base for our clock. I don't have a clue how to accomplish that so I hope somebody could help me out.
Thanks
 
OK, here are a couple of clues for you.

DCF77 is a standard frequency and time transmitter located in Germany.
It transmits on a frequency of 77.5khz.

I do not know what "DFC77 module" you are supposed to use, I suggest that you ask your teacher.

When you have the module working, hopefully it will have a 1hz pulsed output.*
Use that output as the clock for a suitable counter circuit which can count seconds minutes and hours.

JimB

* See later in post #4
 
Last edited:
Hi darko31,

there seems to bee a serious error in your school assignment.

DCF77 is a time transmitter allowing to synchronize digital clocks once per hour.

It does NOT provide a one second time pulse to advance the clock connected!

All it does is synchronizing clocks within a few minutes when they are put into operation the first time and thereafter do that at hourly intervals.

So your quartz driven clock has to have a reasonable accuracy of ± 1 minute within an hour (could also be two minutes off) and be corrected in time not to loose or gain more time.

Kitchen clocks are fitted with a DCF77 receiver and interfaced with the clocks. They cost about €5,00 in household and watchmaker's shops.

Boncuk
 
Last edited:
Boncuk wrote:
It does NOT provide a one second time pulse to advance the clock connected!

All it does is synchronizing clocks within a few minutes when they are put into operation the first time and thereafter do that at hourly intervals.

I am sorry but you could not be more wrong.
DCF77 transmits a time code throughout each minute period, the code is sent by amplitude modulating the carrier at precise 1 second intervals*.

Have a read at this:
https://www.compuphase.com/mp3/h0420_timecode.htm

And many other references which can be found on the world wide interwebs.

JimB

* On edit, taking my own advice and reading the specifications for the DCF77 time coding, it does not modulate the carrier EVERY second, but misses the 59th second of each minute.
The 59th second is only modulated if there is a leap second to be transmitted.

This would make my simple idea of just counting 1 second pulses a non starter.

You could of course use the signal as intended and read the full time code, but the problem as stated by the OP was to use DCF77 as a 1hz clock, that is a bit more problematic.
 
Last edited:
I've built 2 different DCF Clocks at the last years.

You can find some librarys for dcf decoding in the internet for different Microcontrollers.

To get more information about DCF for exaple look here: https://en.wikipedia.org/wiki/DCF_77

To decode the signal I used a little Microcontroller.
I programmed a internal crystal based clock, that was syncronized by the dcf signal once in a minute.

The Start condition for decoding is the missing Pulse at the 59 second of the dcf signal.
Then the dcf signal was decoded bit by bit until the missing 59 pulse is arrived again.

A additional counter ensures that the arrived Time Information is correct, e.g. after the minute 34 has to follow the minute 35.
When that goes wrong a Quality counter was set to 0. That will be done at receive errors and changing between Summer- and Winter Time ( Summertime is 1hour forward ).
Only when 6 following Time Informations ( takes 6 complete Minutes ) confirm the changing the internal clock will take the received Time.
Additional in the DCF signal are included some parity bits. On an error the parity goes wrong.
At a double error it could be right again but the information is failed.

With this scheme you get a clock with a absolute correctness of 1 minute.

An additional Idea is to correct the internal second counter at arriving of the 28 second after checking the received parity bits. So you can achieve a absolute correctness of 1 second.

When you only want to have a pulse every second you can use the carrier of the DCF transmitter. The carrier has a frequency of 77,5kHz and is generated out of a atomic clock.
To get a proper signal i suggest you to use a PLL.

I've a source code for an Atmel ATMEGA Controller - Will that be useful for you?
The I'll send it to You via PM.
 
Our clock that we are building is simple clock based on 7490 counters and I have already read about DCF77 on wikipedia. I have read this www.bit.ly/DCF77domaci manual and 1Hz is mentioned in it and don't quite understand how to extract 1Hz time base only. I know that DCF77 is a bit "overqualified" for this task and I originally wanted to use simple oscillator from analog clocks but teacher said that it was too inaccurate (about 5 minutes a week).

@JimB
OK, first I'l get DCF77 from teacher and get to know it a little bit better. If 1Hz time base isn't possible to use, well we will use something else.

@wkrug
Thanks but we at school have yet to learn about micro controllers (just finished digital electronics basics) so I wouldn't know how to use it.
 
I am sorry but you could not be more wrong.

Sorry, my bad. I admit that I just assumed it's the way I described. Why do the clocks have their internal 1Hz time base then?

Reading your reply kicked my back about 55 years when I got my homework back corrected by the teacher, who had the priviledge to use red ink for corrections.

And that's one thing you can't possibly more wrong about either. :mad:
 
Well Darko I congratulate the fact you are learning this at school. Here in GB we never even got close to this level of design. I did many decoders in the 1990's more of a way to learn assembler language and moved on to C decoders using multiplexed LEDs and dedicated LCD displays. I was decoding MSF from what was then Rugby in the UK. I was also in my 20's.

If it's simply a 1 Hz timebase you are after, then you may get away with a simple negative edge non retrigerable monostable to trigger on the accurate 1 second edge on the data output. This will remove any data and just give a pulse every second. Looking at the spec of DCF77, a 1/2 second time constant will do. There may be an issue with second 59 as this appears to not have a pulse. I would have to read a bit more and get back to you.
 
Thank you WTP Pepper its a very good idea. We have some 555 monostables at school built as mini-projects so they will come in handy. I will also read a bit more about DCF77. Tomorrow I will get my hands on DCF77 and then I will hook it up to oscilloscope and see what exactly happens. Thanks everyone.
 
Hi,

I am not sure you are interested in this, but there are much much more accurate time bases out there, in the form of a single chip *without* an external crystal, and are accurate enough to be used as a digital clock time base and not be too inaccurate over a full year (like a minute or something). They do not need a crystal as they have a temperature compensated crystal oscillator inside.
I'd have to look up the part numbers, but you could do a web search for one.
They are typically a little more expensive (on the order of 6 to 8 dollars each) but they are worth it. The interface is a simple digital output of 32768Hz which can be used with a micro controller or some counter divider chips. Power consumption is very low too.
Again, you may not be interested in this for this very project but it might be interesting for you to take a look at these anyway.
 
Last edited:
Darko31 said:
I originally wanted to use simple oscillator from analog clocks but teacher said that it was too inaccurate (about 5 minutes a week).
I cannot see why a crystal oscillator should not be used, an average crystal oscillator can be trimmed to 1 part in 10^6 quite easily.
This is a lot better than the 5 parts in 10^4 proposed by the teacher. (There are 10080 minutes in a week, so 5 minutes per week is 5 parts in 10^4).

I cannot help but think that the OPs teacher is one of the "blind leading the blind".

JimB
 
Boncuk said:
your reply kicked my back about 55 years

I am so happy to take you on a trip down memory lane:):)

JimB
 
Darko31 said:

I cannot see why a crystal oscillator should not be used, an average crystal oscillator can be trimmed to 1 part in 10^6 quite easily.
This is a lot better than the 5 parts in 10^4 proposed by the teacher. (There are 10080 minutes in a week, so 5 minutes per week is 5 parts in 10^4).

I cannot help but think that the OPs teacher is one of the "blind leading the blind".

JimB

It is easier, and I have already took apart cheap kitchen clock and took out oscillator with 1Hz time base, but that's too easy and teacher thought that would be a bit more of a challenge to find a way to use DCF77(and we have one lying around at school not being used for anything).
 
Last edited:
It is easier, and I have already took apart cheap kitchen clock and took out oscillator with 1Hz time base, but that's too easy and teacher thought that would be a bit more of a challenge to find a way to use DCF77(and we have one lying around at school not being used for anything).

It surely is a challenge, because such a clock would be fully dependent of receiving the radio signal and therefore very unreliable. It would stop ticking as soon as the signal is lost. Also no pulse at 59th second will be a problem like mentioned before.
 
It surely is a challenge, because such a clock would be fully dependent of receiving the radio signal and therefore very unreliable. It would stop ticking as soon as the signal is lost. Also no pulse at 59th second will be a problem like mentioned before.

Ok, let me rephrase, professor doesn't know is this doable, so my job was to find out is it. I have googled a bit more about DCF77 and it used in every clock with micro controllers, not counters, because it needs decoding. So forget DCF77, I am going to find some old analogue clock and pull out oscillator circuit (the old one isn't working :) ) and use it.

Anyway thanks guys for help.
 
Hi,


Crystals are not that easy to use for long term time telling clocks, but the single chip real time clock oscillators are. They are made specifically for the purpose of long term time clocks. All you do is connect power and ground (maybe a small power supply bypass cap), then use the output for your clock signal perhaps divided down. What could be simpler. Nothing to calibrate, one chip with no crystal needed, done.
 
Hi,


Crystals are not that easy to use for long term time telling clocks, but the single chip real time clock oscillators are. They are made specifically for the purpose of long term time clocks. All you do is connect power and ground (maybe a small power supply bypass cap), then use the output for your clock signal perhaps divided down. What could be simpler. Nothing to calibrate, one chip with no crystal needed, done.

Thanks for the advice, I have found some old motherboard and on it DALLAS DS12887A RTC. The lowest frequency for square wave output is 2Hz which is good as I only need one counter to divide it. Just have to learn to use it. I will have to read the datasheet a few times :).
 
Hi again,

Actually the parts i was talking about are much easier than that one to use. I'll have to look up the part number.
I think it was something like DS32KHZ. Accurate to 1 minute per year at normal indoor temperatures.

One special note here however. The device that the DS32KHZ feeds must be able to accept a relatively slow rise or fall time. This may not include some micro controllers with direct feed but may require a CMOS Schmitt Trigger inverter to go between this oscillator and the micro. Without that the micro (or other device which depends on a faster rise time) may detect more than one rising clock edge for each single clock edge of the oscillator. This complicates the design slightly but isnt too bad as only one cheap CMOS gate would be required. A Schmitt is really required here too not a regular inverter as a regular inverter may pass some of the slow rise near some particular point which may cause multiple edges anyway.
 
Last edited:
when i was in the Army, we had a WWVB receiver that had a crystal oven and a PLL in it that kept the crystal oven within 1 part in 10E10 of 10Mhz. i forget the model number but the frequency standard was made by HP. a series of decade counters could extract a 1pulse/sec output from it. the method for locking a 10Mhz oscillator to a 60khz signal was a bit convoluted, but it worked, and worked well. i'm pretty sure the "DCF module" you are describing is somewhat similar, but smaller and less expensive (and probably not quite as accurate, but for most uses, that's ok).

so i did a quick search, the receiver was an HP 117A like the one shown here: https://www.prc68.com/I/117A.shtml the system prints out a continuous graph of the frequency comparison.
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top