close-circle
Close
0%
0%

"Connect" to an atomic clock in space! GPS, DCF77

This project is a clock with radio receivers which can receive the exact time from the GPS satellites or from the DCF77 transmitter.

Similar projects worth following
close
This project is a clock with radio receivers which can receive the exact date and time from the DCF77 time signal transmitter or the UTC from the GPS satellites and display it on a 128x64 pixel graphic display. DCF77 transmitter and GPS is synchronized to an atomic clock. So basically this project can "connect to" an atomic clock.

This project is an open design: open hardware and open source software.

Objectives:

  • receiving date and time from the DCF77 transmitter, decoding it, displaying it on a 128x64 pixel dotmatrix display
  • receiving UTC from GPS satellites with a GPS module, displaying it on a 128x64 pixel dotmatrix display
  • stand-alone date and time clock based on a real time clock (if radio signal reception is not possible)
  • measuring and displaying temperature
  • measuring and displaying battery voltage
  • displaying SW version information
  • simple menu system for configuration
  • alarm function
  • beep sound on button press

HW block diagram

On the picture below You can see the HW block diagram.

I built the project around a PIC microcontroller. The goal was during the micro selection is to have a low power consumption but yet powerful enough controller to decode the DCF77 and GPS signals and to drive the display. I also choose a type which I familiar with.

The display is a chip-on-glass type which can be powered from 3.3V. It can be controlled via a simple SPI protocol. Another advantage is that no mounting required, it can be simply soldered on the PCB, but i will use a header adapter so the display can be changed easily.

The LED backlight is powered with an NCP5005 boost driver. The clock will be running from 3 AA batteries. To decrease the power consumption the SW has to have some intelligence: dimming, or even switch off the backlight at certain time of the day.

I used a small 32768 kHz real time clock crystal, so the clock can remain relatively punctual even when no DCF77 or GPS reception is possible.

For temperature measurement an analog LM20 sensor is used.

In order to measure the output of the temperature sensor and the battery voltage accurately an LM4041 voltage reference is used.

Programming and debugging is performed with a PICkit3 programmer, so a header adapter is connected to the ICSP of the micro as programmer connector.

For powering the whole circuit 3 AA battery is used and a very low drop 3.3V voltage regulator.

For easier debugging and for measurement purpose during the development a red LED is directly connected to a micro output with a series resistor.

To be able to operate the menu and set the date and time 3 taktile type push buttons is connected to 3 microcontroller inputs with pull-up resistors.

A TDK PS1720P02 piezo buzzer is used for generating a sound signal when a button is pressed and for the alarm clock functionality.

For UTC reception from a GPS satellite a PmodGPS module is used from Digilent.

For exact time and date reception a DCF 77 receiver module with digital output is used from Conrad electronics.


Schematic

On the picture below You can see the schematic of my project.

I tried to isolate the main blocks therefore I added a grey dashed line frame around them to easily identify which block is doing what.

I used Eagle 6.6.0 PCB editor for creating the schematic.


System design: GPS signal processing

What is the interface protocol of the PmodGPS module?
According to the data sheet "The PmodGPS uses sentences based on National Marine Electronics Association (NMEA) protocols for data output. Each NMEA message begins with a '$' dollar sign. The next five characters are the talker ID and the arrival alarm.
The PmodGPS talker ID is 'GP' and the arrival alarm is the specific sentence output descriptor. Individual comma separated data fields follow these five characters. After the data fields there is an asterisk followed by a checksum. Each sentence should end with <CR><LF>. <CR> is the carriage return its ASCII value is 13, <LF> is the line feed character its ASCII value is 10.

You can see an example GPS sentence on the picture below:

Some other examples:
$GPGGA,064951.000,2307.1256,N,12016.4438, E,1,8,0.95,39.9,M,17.8,M,,*65<CR><LF>
$GPRMC,064951.000,A,2307.1256,N,12016.4438,E,0.03,165.48,260406,3.05,W,A*55<CR><LF>

How we receive these GPS sentences?
Each character in the GPS sentence corresponds to one UART (Universal Asynchronous Receiver Transmitter) byte. The data value of this byte is equals to the corresponding...

Read more »

View all 10 components

View all 17 project logs

  • 1
    Step 1

    Prepare DCF77 receiver module

    1a. Drill 6mm hole in Deltron 479-0140 enclosure

    1b. Solder DCF77 receiver to a 3.5mm jack, epoxy glue components to enclosure.

    1c. Screw back the top cover: DCF77 receiver box is ready

  • 2
    Step 2

     Prepare clock

    2a. Drill 6mm hole in Deltron 479-0160 enclosure

    2b. Super glue 3xAA battery golder into the enclosure

    2c. solder 3.5mm jack to wires and connector, heatsrink it

    2d. prepare PCB

    2e. populate PCB

    2f. Super glue PmodGPS module into the enclosure

    (note: as turned out super glue is not the best idea, since when the glue hardens it emits some kind of fume which precipitate on the inner side of the enclosure leaving a white layer so it not so nice)

    2g. connect wires

    2h. Screw PCB into final position. Clock is ready!

  • 3
    Step 3

    3a. Connect antenna and clock with a 1.5m 3.5mm jack cable! Enjoy the exact time! 

View all 3 instructions

Enjoy this project?

Share

Discussions

Bela Kucsera wrote 04/14/2016 at 08:56 point

Üdv

Nagyon nagyon szükségem lenne hasonló órára kisebb modosításokkal

Fel tudnánk venni a kapcsolatot emailon? vagy telefonon?

nteacdj@gmail.com

üdv

  Are you sure? yes | no

Jose Czwienczek wrote 01/06/2016 at 14:09 point

Excelente proyecto!!! y gracias por compartir el formato AT de GPS!!!

  Are you sure? yes | no

hkdcsf wrote 12/08/2015 at 15:26 point

Dear Followers,

A new Christmas related project is on its way.

I am about to finish the documentation of it.

I going to post it tomorrow.

Stay tuned,
hkdcsf

  Are you sure? yes | no

SengChuary wrote 10/04/2015 at 02:29 point

Very nice clock! Support the landlord!

  Are you sure? yes | no

ramyo wrote 10/02/2015 at 16:00 point

Hi, nice project. Do you have a Bill of Material list. Thanks 

  Are you sure? yes | no

Reactor wrote 09/06/2015 at 14:52 point

Or, you know, buy a cheap Android phone. (That's a joke--I know this is HaD. But it's useful to keep things in perspective when we're very focused on our projects.)

  Are you sure? yes | no

Elliot Williams wrote 07/02/2015 at 19:14 point

Fantastic schematics, and a very well done project!  It's a joy to see something like this.

  Are you sure? yes | no

josephchrzempiec wrote 07/02/2015 at 17:38 point

Hello which lcd is that?

  Are you sure? yes | no

hkdcsf wrote 07/02/2015 at 18:41 point

The LCD is DOGL128:
http://www.lcd-module.com/eng/pdf/grafik/dogl128-6e.pdf

  Are you sure? yes | no

josephchrzempiec wrote 07/02/2015 at 17:37 point

Hello i know your project uses a gps to get time and date but for someone like me that is Impossible because i live in a apartment complex and can't use gps inside would there be another way of getting time and date maybe by a wireless device from the pc so can just plug it in and grab the time and date maybe bluetooth?  But great clock idea i like it a lot.

  Are you sure? yes | no

josephchrzempiec wrote 07/02/2015 at 18:48 point

i kinda like yours better :)

  Are you sure? yes | no

Winston wrote 09/10/2014 at 13:36 point
Very nice. One thing that would greatly increase its usefulness, at least for me, would be a USB interface that would allow the time to be sent to a PC.

  Are you sure? yes | no

Jasmine Brackett wrote 08/15/2014 at 23:43 point
Hello hkdcsf, I've just checked your project and it meets the documentation requirements for it to be considered for the next round of The Hackaday Prize. Thanks & good luck.

  Are you sure? yes | no

mr.jb.swe wrote 07/19/2014 at 16:40 point
Tip of the day

Could probably replace both PIC and current GPS
( and his has plenty of capacity to do more then be a "watch" )
http://navspark.mybigcommerce.com/navspark-arduino-compatible-development-board-with-gps/

My personal favorite ( Integrated 3-Axis Accerometer and 3-Axis Magnetometer )
http://navspark.mybigcommerce.com/sup800f-gps-antenna-module-7-dof-imu/

/JB

  Are you sure? yes | no

Adam wrote 07/18/2014 at 19:45 point
Any chance you would make a mode for displaying GPS coordinates?

  Are you sure? yes | no

Magnus Svantesson wrote 07/18/2014 at 11:44 point
Oliver Brett is using a DSP-solution to cope with radio interference to DCF77. http://home.btconnect.com/brettoliver1/Master_Clock_MK2/Master_Clock_MK2.htm.
He uses Blinkenlight's solution which of cours demands a lot from the processor.
http://blog.blinkenlight.net/2014/06/01/2873/

  Are you sure? yes | no

Elia wrote 07/05/2014 at 13:59 point
I really am a sucker for any kind of time keeping / display equipment and I have to say you did a really good job here!
This clock looks sexy with it's blue PCB front panel and free standing graphics LCD.

Plus: it connects to an atomic clock in freakin' space (GPS) :D

  Are you sure? yes | no

hkdcsf wrote 07/05/2014 at 14:43 point
Thank You very much for the compliment!
I was experiencing with different PCB colors (red, blue) with different case colors (blue, yellow, green, black), but I have to say that the blue PCB with the blue case combination seems to be the winner in my opinion too.

  Are you sure? yes | no

nathan wrote 06/19/2014 at 23:14 point
I really like your project, And having both the DCF77 and GPS is awesome! Even tho The gps would obviously be more reliable Sans being near a window for clear reception. the dcf77 will not work in the states. :( There are/Were available units for wwvb however there all but extincted which is a real bummer do to the new phase shifted signal format. If someone was to fill that void and release wwvb units using the new phase shifted method, That would be a game changer........ There are still many who prefer the old school RF method. So cheers to you!! Continue the great work!

  Are you sure? yes | no

hkdcsf wrote 06/20/2014 at 09:46 point
Hi nathan,

Thank You very much.
Yes, you are right, the GPS is more reliable and allows global reception while DCF77 is only covers mainly Europe and the receiver module I have is a bit sensitive to industrial noise. I checked only briefly but seems that wwvb bit encoding format is quite similar to the DCF77 one, so most of my code could be re-useable for decoding that too. I hope those receiver modules will be avaiable soon.

  Are you sure? yes | no

Adam Fabio wrote 06/09/2014 at 06:21 point
This is a great clock! Thanks for entering into the running for The Hackaday Prize! Any chance of a WWV or GPS fallback for those of us not too far from DCF77?

  Are you sure? yes | no

hkdcsf wrote 06/09/2014 at 07:28 point
Hi,

Thats a great Idea, You inspired me, I really considering a GPS version now, because then my project could be used globally. I think GPS reception may be a bit more reliable too. So I try to modify the schematic in a way that I can connect easily a GPS module in the future, but right now I concentrating on to finish the project with the normal DCF77 version.

For those who interested in WWV: as I see WWV encoding is nat so far from DCF77, so since my project will be fully open source, I think you can easily re-use some of my code, and HW solutions.

  Are you sure? yes | no

hkdcsf wrote 06/09/2014 at 15:32 point
Hi,

I have updated the block diagram and the schematic with a GPS interface now.
I order the parts tomorrow, cant wait for a bit of a breadboard time, hope it will work!

  Are you sure? yes | no

Adam Fabio wrote 06/12/2014 at 01:40 point
GPS time would be awesome, and really open the project up. On the WWV side, I'm waiting for the new receiver chips to become available, but you're right - it should be easy to add to your project.

  Are you sure? yes | no

DL101 wrote 06/08/2014 at 14:09 point
Hi.

I've tried poking with that DCF77 reciever, and it is very unstable, I had to go on my balcony to get any reception at all, indoors there is too much interference from the computer and other electronics. What is your plan to obtain a stable connection??

  Are you sure? yes | no

hkdcsf wrote 06/08/2014 at 15:30 point
Hi,

Thank you for the very good question.

My current plan to increase reception robustness is the following:

- first I try to improve the robustness from SW side as much as possible. E.g. you can help a bit on interference with the decoding algorithm, for example my current algorithm applies a windowing method, this means that after I received the “minute mark”, my algorithm accepts an edge transition only in the near vicinity of the possible edge transition times, so unwanted edge transition caused by the interference can be filtered
- than I may poke with the HW sensitivity too
- i find that the ferrite antenna is quite sensitive to nearby (~cm) metallic objects (PCB, battery) so I try to design an enclosure where the ferrite antenna is relatively far from these objects
- i may implement some FET preamplifier like solution, but now the SW solutions are in focus

I plan to implement some convenient feature:
- when i have a frame correctly received I will picture an antenna symbol on the display, so the user is aware that in the last few minutes the clock is synchronized

Currently I concentrating on the back-end, but when I switch to front-end again I will share my experience and solution.

  Are you sure? yes | no

DL101 wrote 06/08/2014 at 16:07 point
I do hope it will work. I see you are from Hungary, and I am currently in Zagreb (Croatia), so the signal levels that you will be receiving will be similar to what I have here, and the situation here is kinda bad. My plan was to build a small device that would have the DCF77 receiver, a solar cell and a 433MHz transmitter in it, and that would be places somewhere outside, receiving the DCF77 signals, and re transmitting them on 433MHz, which could be easily received by the clock that is indoors.
Another idea that i had is to put a bnc connector, and connect the antenna which is located elsewhere via a coaxial cable.

  Are you sure? yes | no

Uhrheber wrote 07/18/2014 at 11:51 point
dajgoro.labinac, take a look at http://www.ethersex.de/index.php/Clock_%28Deutsch%29
Unfortunately in german, but google should help.
Ethersex can (amongst many other things) receive DCF77, run it's own ntp server, connect to other nodes or to the LAN via RFM12 rf modules (433 or 868MHz), USB, Ethernet.
All on a single AVR micro.

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates