Crates.io | rp-rs-radio-clock |
lib.rs | rp-rs-radio-clock |
version | 1.0.1 |
source | src |
created_at | 2022-06-27 20:57:30.927543 |
updated_at | 2024-11-03 18:21:15.780018 |
description | DCF77 and MSF receiver on a Raspberry Pi Pico |
homepage | |
repository | https://codeberg.org/rene0/rp-rs-radio-clock |
max_upload_size | |
id | 614320 |
size | 57,845 |
This is a receiver for both the German DCF77 and British MSF time transmitters. Wikipedia has detailed information on both stations. Reception of the two stations happens independently from each other. If reception allows, the clock displays the current dates and times as broadcast by the two transmitters after a few minutes.
Refer to the schematic for the various components. The KY040 (both the push button and rotary encoder) are currently unused, but they might be used in the future.
This work is licensed under MIT OR Apache 2.0 Copyright 2022-2024 René Ladan rene0+codeberg@freedom.nl
To build the program, you will need a recent version of Rust (the current code is developed on Rust 1.79) with the thumbv6m-none-eabi target installed as this is the what the Raspberry Pico runs. After compilation, load the compiled program on your Raspberry Pico, after which the program should start.
The group of three LEDs (connected to pins 12-14 is used by DCF77:
The group of four LEDs (connected to pins 2-5) is used by MSF:
When powering on the clock, LEDs 12 and 14 are on until the first pulse of DCF77 is received, and LEDs 2 and 5 are on until the first pulse of MSF is received.
The display is divided in two parts, with DCF77 using the top two lines and MSF using the bottom two lines:
DCF77 cbaymdwhmt =MS
YYMMDD WW HHmmSS TCL
MSF dcbaymdwhmt = !
YYMMDD WW HHmmSS Tdd
The station names are displayed on the top lines. Normally the first letter of the station name is in uppercase, but it switches to lowercase if the current minute was overflowing and next minute was predicted by the software itself instead of being decoded from the transmitter. After the station name, various characters can show up in case the software detected an anomaly.
The first three ('cba' for DCF77) or four ('dcba' for MSF) letters appear in case of a parity error. These letters are in lowercase if the parity could not be calculated and in uppercase if the calculation succeeded but mismatched the expected value.
The next seven characters (same for DCF77 and MSF) appear if a value (e.g. month) jumped unexpectedly:
The last three characters on the lines with the station name indicate miscellaneous things:
DCF77 cbaymdwhmt =MS
YYMMDD WW HHmmSS TCL
MSF dcbaymdwhmt = !
YYMMDD WW HHmmSS Tdd
The second and fourth line show the current date and time. All numerical values are two digits long and optionally preceded by a '0', and show up as '**' if they could not be decoded.
The last three characters show miscellaneous aspects: