{"id":11131,"date":"2021-02-20T15:45:57","date_gmt":"2021-02-20T15:45:57","guid":{"rendered":"https:\/\/wolles-elektronikkiste.de\/dcf77-radio-controlled-clock"},"modified":"2025-06-13T13:38:50","modified_gmt":"2025-06-13T13:38:50","slug":"dcf77-radio-controlled-clock","status":"publish","type":"post","link":"https:\/\/wolles-elektronikkiste.de\/en\/dcf77-radio-controlled-clock","title":{"rendered":"DCF77 &#8211; Radio Controlled Clock"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\" id=\"uber-den-beitrag\">About this Post<\/h2>\n\n<p>After I reported in <a href=\"https:\/\/wolles-elektronikkiste.de\/en\/ds3231-real-time-clock\" target=\"_blank\" rel=\"noopener\">my last post<\/a> about the real-time clock module DS3231, a follow-up article about DCF77 radio clocks fits very well thematically. <\/p>\n<p>I will deal with the following points:<\/p>\n<ul>\n<li>What is the DCF77 time signal?<\/li>\n<li>Decoding of the DCF77 signal.<\/li>\n<li>DCF77 Receiver Modules<\/li>\n<li>Detection and evaluation of the DCF77 signal with the Arduino.<\/li>\n<li>Using the DCF77 receiver comfortably with the RTCLib.<\/li>\n<\/ul>\n\n<h2 class=\"wp-block-heading\" id=\"der-dcf77-zeitzeichensender\">The DCF77 time signal<\/h2>\n\n<p>DCF77 is a time signal used to transmit the current date and time digitally on the long wave frequency 77.5 kHz. The time zone is CET (Central European Time) or the CEST (Central European Summer Time).&nbsp;<\/p>\n<p>The DCF77 transmitter is located in Mainflingen near Frankfurt in Germany. <a href=\"https:\/\/www.google.de\/maps\/place\/DCF77\/@50.0170735,9.010565,1131m\/data=!3m1!1e3!4m5!3m4!1s0x47bd3f9e35f54435:0xa3fc4ec0a27c19c2!8m2!3d50.0158722!4d9.0111643?hl=de\" target=\"_blank\" rel=\"noopener\">Here<\/a> you can admire it on Google Maps. It has a range of about 2000 kilometers and controls a large part of the radio clocks in Western Europe. Other parts of the world have time signals that use different frequencies and are also encoded differently.&nbsp;<\/p>\n<p>DCF77 means:<\/p>\n<ul>\n<li><strong>D<\/strong>: Germany<\/li>\n<li><strong>C<\/strong>: Abbreviation for long wave<\/li>\n<li><strong>F<\/strong>: Proximity to Frankfurt<\/li>\n<li><strong>77<\/strong>: Transmission frequency<\/li>\n<\/ul>\n<p>More information about the DCF77 signal and its history can be found <a href=\"https:\/\/de.wikipedia.org\/wiki\/DCF77\" target=\"_blank\" rel=\"noopener\">here<\/a>.<\/p>\n\n<h2 class=\"wp-block-heading\" id=\"wie-das-dcf77-signal-aufgebaut-ist\">How the DCF77 signal is structured<\/h2>\n\n<p>The information is transmitted by reducing the amplitude of the carrier to 25 percent once per second for either 100 or 200 milliseconds. A reduction for 100 milliseconds corresponds to a &#8220;0&#8221;, 200 milliseconds corresponds to a &#8220;1&#8221;. A full sequence is one minute. This would transfer 60 bits, but the last bit is omitted to clearly separate the sequences.<\/p>\n<p>Most DCF77 receiver modules are designed to deliver a HIGH signal while the time signal is reduced, otherwise it is LOW. This will give you sequences that look like the following:<\/p>\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2021\/02\/DCF77__Signal_Scheme-1024x395.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"395\" src=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2021\/02\/DCF77__Signal_Scheme-1024x395.png\" alt=\"Diagram of the DCF77 signal at the output pin of the receiver module\" class=\"wp-image-11064\" srcset=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2021\/02\/DCF77__Signal_Scheme-1024x395.png 1024w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2021\/02\/DCF77__Signal_Scheme-300x116.png 300w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2021\/02\/DCF77__Signal_Scheme-768x296.png 768w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2021\/02\/DCF77__Signal_Scheme-1536x592.png 1536w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2021\/02\/DCF77__Signal_Scheme-1320x509.png 1320w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2021\/02\/DCF77__Signal_Scheme.png 1635w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption class=\"wp-element-caption\">Diagram of the DCF77 signal at the output pin of the receiver module<\/figcaption><\/figure>\n\n<p>If you have a module that works the other way around, you need to rethink and modify the example sketches accordingly.<\/p>\n\n<h3 class=\"wp-block-heading\" id=\"decodierung-des-dcf77-signals\">Decoding the DCF77 signal <\/h3>\n\n<p>Certain bits or sections are reserved for a specific part of the information to be transmitted:<\/p>\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2021\/02\/DCF77_Signal_Table-1024x527.png\"><img decoding=\"async\" src=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2021\/02\/DCF77_Signal_Table-1024x527.png\" alt=\"Meaning of bits of a DCF77 sequence\" class=\"wp-image-11067\"\/><\/a><figcaption class=\"wp-element-caption\">Meaning of bits of a DCF77 sequence<\/figcaption><\/figure>\n\n<ul>\n<li>To read the weather information, you would need to purchase a license.<\/li>\n<li>The actual transmission of the time and date begins after bit 20. I don&#8217;t look at anything before that.<\/li>\n<li>For two-digit numbers, the &#8220;ones&#8221; and the &#8220;tens&#8221; are transmitted separately, but each digit is transmitted as a binary number &#8211; a somewhat strange mixture of binary and decimal systems.<\/li>\n<li>The times coded in a sequence refer to the next start bit.<\/li>\n<\/ul>\n<p>The parity bits can be used to check the transmitted data for correctness. The parity of the parity bit plus the parity of the corresponding data is always even. This can best be explained with an example. The minutes are coded in the bits 21 to 27, i.e. 7 zeros or ones. All ones are added. If the result is an odd number, the parity bit is an odd 1. If, on the other hand, the result is an even number, the parity bit is 0. The same applies to the hours (bits 29-34) and the date (bits 40-57). In other words, the parity of the parity bit equals the parity of the bit sequence to be checked.<\/p>\n<p>If all parities are OK and you have received 59 bits in a sequence, you can be quite sure that the data transfer was correct.<\/p>\n\n<p><a href=\"https:\/\/dcf77logs.de\/live\" target=\"_blank\" rel=\"noopener\">Here<\/a> you can follow live what the DCF77 transmitter is currently transmitting. <\/p>\n\n<h2 class=\"wp-block-heading\" id=\"dcf77-empfangermodule\">DCF77 Receiver Modules<\/h2>\n\n<p>You can get a module with antenna for 5 to 15 euros in online shops. I paid 11 euros for the model shown here and am quite satisfied with its reception quality:<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><a href=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2021\/02\/DCF77_complete_and_back-1024x460.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"460\" src=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2021\/02\/DCF77_complete_and_back-1024x460.jpg\" alt=\"A DCF77 receiver module with antenna\" class=\"wp-image-11074\" style=\"width:702px;height:auto\" srcset=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2021\/02\/DCF77_complete_and_back-1024x460.jpg 1024w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2021\/02\/DCF77_complete_and_back-300x135.jpg 300w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2021\/02\/DCF77_complete_and_back-768x345.jpg 768w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2021\/02\/DCF77_complete_and_back-1536x691.jpg 1536w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2021\/02\/DCF77_complete_and_back-2048x921.jpg 2048w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2021\/02\/DCF77_complete_and_back-1320x593.jpg 1320w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption class=\"wp-element-caption\">A DCF77 receiver module with antenna<\/figcaption><\/figure>\n<\/div>\n<p>This model here cost only half and is much smaller: <\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><a href=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2021\/02\/dcf77_2-1024x430.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"430\" src=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2021\/02\/dcf77_2-1024x430.jpg\" alt=\"An alternative DCF77 module\" class=\"wp-image-11076\" srcset=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2021\/02\/dcf77_2-1024x430.jpg 1024w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2021\/02\/dcf77_2-300x126.jpg 300w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2021\/02\/dcf77_2-768x323.jpg 768w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2021\/02\/dcf77_2-1536x645.jpg 1536w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2021\/02\/dcf77_2-1320x554.jpg 1320w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2021\/02\/dcf77_2.jpg 2000w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption class=\"wp-element-caption\">An alternative DCF77 module<\/figcaption><\/figure>\n<\/div>\n<p>There was no documentation for it (not even regarding the supply voltage!), and I also got significantly more incorrect measurements with it than with the other module under the same conditions. So there are clear differences in quality here.<\/p>\n<p>However, invalid sequences are not only a question of module quality, but also the orientation of the antenna, the weather, the location (geology) and other factors can influence the reception. However, a few incorrect measurements are not a problem as long as you identify them and your code is not dependent on receiving a valid data set every minute. If you experience too many incorrect sequences, try to position the antenna differently. What can also help with some modules is battery operation.<\/p>\n\n<h4 class=\"wp-block-heading\">\u201cRC8000\u201d modules<\/h4>\n\n<p>Then there are the DCF-1060N-800 and DCF-3850M-800 modules, whose circuit board is labeled \u201cRC8000\u201d. I have had wonderful experiences with these, especially with the DCF-3850M-800, which is also characterized by a small antenna. There were hardly any incorrect measurements, regardless of the positioning of the antenna. According to the seller, the DCF-1060N-800 has a slightly higher sensitivity, but I cannot confirm this. The DCF-3850M-800 module can be found in many radio-controlled alarm clocks (thanks, Claus!).    <\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><a href=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2021\/02\/RC8000-1024x530.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"530\" src=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2021\/02\/RC8000-1024x530.jpg\" alt=\"\" class=\"wp-image-24053\" style=\"width:707px;height:auto\" srcset=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2021\/02\/RC8000-1024x530.jpg 1024w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2021\/02\/RC8000-300x155.jpg 300w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2021\/02\/RC8000-768x397.jpg 768w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2021\/02\/RC8000-1320x683.jpg 1320w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2021\/02\/RC8000.jpg 1500w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption class=\"wp-element-caption\">DCF-3850M-800<\/figcaption><\/figure>\n<\/div>\n<p>If you want to buy a module, it is best to see if there is a data sheet or at least basic technical data for it. Some representatives can apparently only tolerate up to 3.3 V, others up to 5 V or even more. For the power consumption, I have found consistent data of &lt; 100 microamperes.<\/p>\n\n<h3 class=\"wp-block-heading\">The Canaduino Board<\/h3>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><a href=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2024\/01\/canaduino_dcf77.webp\"><img loading=\"lazy\" decoding=\"async\" width=\"976\" height=\"554\" src=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2024\/01\/canaduino_dcf77.webp\" alt=\"My favorite: The DCF77 module from Canaduino\" class=\"wp-image-20071\" style=\"width:623px;height:auto\" srcset=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2024\/01\/canaduino_dcf77.webp 976w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2024\/01\/canaduino_dcf77-300x170.webp 300w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2024\/01\/canaduino_dcf77-768x436.webp 768w\" sizes=\"auto, (max-width: 976px) 100vw, 976px\" \/><\/a><figcaption class=\"wp-element-caption\">My favorite: The DCF77 module from Canaduino<\/figcaption><\/figure>\n<\/div>\n<p>In my experience, the technically best module is the Canaduino model shown above (the DCF-3850M-800\/RC8000 module wins the \u201csize prize\u201d, however). I paid 20 euros for it, including shipping costs from Canada. You can operate it with 3 -15 volts, it has automatic amplification and has a regular and an inverted output. The quality of the signals was excellent, even in places where other modules had difficulties. A short manual for the module is available <a href=\"https:\/\/universal-solder.ca\/downloads\/CANADUINO_Atomic_Clock_Receiver_Kit_SMD.pdf\" target=\"_blank\" rel=\"noopener\">here<\/a>.    <\/p>\n<p>Please pay particular attention to the alignment of the antenna relative to the module. For fast signal acquisition, connect PDN to a pin on your microcontroller board and switch it to Output \/ LOW in setup(). <\/p>\n\n<h2 class=\"wp-block-heading\" id=\"das-dcf77-signal-empfangen-und-auswerten\">Receiving and evaluating the DCF77 signal<\/h2>\n\n<h3 class=\"wp-block-heading\" id=\"schaltung\">Wiring<\/h3>\n\n<p>As already mentioned, the modules vary in their design. For the module shown above I used the following wiring:&nbsp;<\/p>\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2021\/02\/wiring_dcf77-1024x560.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"560\" src=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2021\/02\/wiring_dcf77-1024x560.png\" alt=\"Wiring for the DCF77 Example Sketches \" class=\"wp-image-11080\" srcset=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2021\/02\/wiring_dcf77-1024x560.png 1024w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2021\/02\/wiring_dcf77-300x164.png 300w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2021\/02\/wiring_dcf77-768x420.png 768w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2021\/02\/wiring_dcf77-1320x723.png 1320w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2021\/02\/wiring_dcf77.png 1383w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption class=\"wp-element-caption\">Wiring for the DCF77 Example Sketches <\/figcaption><\/figure>\n\n<ul>\n<li>The LED is not essential, I use it for some example sketches.<\/li>\n<li>The Enable Pin can be used to turn the module on and off (not every module has this feature).<\/li>\n<li>For most of my sketches, the signal pin must be connected to an interrupt pin.<\/li>\n<\/ul>\n\n<h3 class=\"wp-block-heading\" id=\"ein-einfacher-funktionstest\">A simple function test<\/h3>\n\n<p>If you just want to check if your module receives data at all, you can use this sketch:<\/p>\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-group=\"dcf77_test_interrupt.ino\" data-enlighter-title=\"dcf77_test_interrupt.ino\">int interruptPin=2;\nint ledPin=7;\n\nvoid setup(){\n  pinMode(ledPin, OUTPUT);\n  pinMode(interruptPin, INPUT);\n  attachInterrupt(digitalPinToInterrupt(interruptPin), DCF77_ISR, CHANGE);\n}\n\nvoid loop(){\n  \n}\n\nvoid DCF77_ISR(){\n  if(digitalRead(interruptPin)){\n    digitalWrite(ledPin, HIGH);\n  }\n  else{\n    digitalWrite(ledPin, LOW);\n  }\n}<\/pre>\n\n<p>Alternatively, it would work without interrupt, for example like this:<\/p>\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-group=\"dcf77_test_without_interrupt.ino\" data-enlighter-title=\"dcf77_test_without_interrupt.ino\">int dataPin = 2;\nint ledPin = 7;\n\nvoid setup() {\n  pinMode(dataPin, INPUT);\n  pinMode(ledPin, OUTPUT);\n}\n\nvoid loop() {\n  if(digitalRead(dataPin)){\n    digitalWrite(ledPin, HIGH);\n  }\n  else{\n    digitalWrite(ledPin, LOW);\n  }\n}<\/pre>\n\n<p>The interrupt method has the advantage that the main loop is empty, so you can do anything else in parallel. I will therefore build on the interrupt method.<\/p>\n<p>When the sketch is running, the LED should flash every second. If you look closely, you will notice that the LED lights up shorter times and sometimes longer. Once per minute, the pause is almost two seconds. Interference with reception is usually noticeable by rapid and irregular flashing. &nbsp;<\/p>\n\n<h3 class=\"wp-block-heading\" id=\"sequenzen-erfassen\">How to capture sequences<\/h3>\n\n<p>With the next sketch, we measure the signal lengths and capture entire sequences. A few comments on the signal length:<\/p>\n<ul>\n<li>After the interrupt is triggered, it is checked whether the interrupt pin is HIGH or LOW. This reveals whether the completed phase is the 100\/200 millisecond signal or the pause.<\/li>\n<li>The signal length is determined by the <code>millis()<\/code> function.<\/li>\n<li>All HIGH signals shorter than 150 milliseconds are interpreted as &#8220;0&#8221;, the longer ones as &#8220;1&#8221;. The optimum value may differ for some module\/board combinations.<\/li>\n<li>A LOW phase greater than 1500 milliseconds indicates the minute tag.<\/li>\n<\/ul>\n<p>Another few comments on the sequence:<\/p>\n<ul>\n<li>The 59 bits of a sequence fit into an eight-byte <code>uint64_t<\/code> variable (= unsigned long long on an AVR Arduino), which I have named currentBuf.<\/li>\n<li>The counter for the position in currentBuf is bufCounter.<\/li>\n<li><code>currentBuf |= ((uint64_t)1&lt;&lt;bufCounter);<\/code> inserts a &#8220;1&#8221; into the sequence. Without the conversion of the &#8220;1&#8221; to <code>uint64_t<\/code>, it will not work. It took me a long time to come to this realization.<\/li>\n<li>The <code>Serial.print()<\/code> function is not compatible with <code>uint64_t<\/code> variables. I use <a href=\"https:\/\/wolles-elektronikkiste.de\/en\/logical-operations-and-port-manipulation\">bit operations<\/a> to divide the currentBuf variable into two <code>uint32_t<\/code> pieces to be able to output them.<\/li>\n<li>The sequence is output when the minute tag is detected.<\/li>\n<\/ul>\n<p>At 9600 BAUD, the <code>Serial.print()<\/code> calls take a total time in the millisecond range (per second). That&#8217;s why I chose 115200 BAUD.<\/p>\n<p>The sequence ends with the long LOW pause after the 59th HIGH signal (= no. 58). This is followed by the start bit of the next sequence. We use these 100 milliseconds for evaluation and output.  &nbsp;<\/p>\n\n<div class=\"scroll-paragraph-long\">\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-group=\"dcf77_get_sequence.ino\" data-enlighter-title=\"dcf77_get_sequence.ino\">#define MIN_HIGH_SIGNAL 150 \/\/ min. high signal - test and adust\n#define MIN_END_SIGNAL 1500 \/\/ min. low phase after 59th signal\nint interruptPin = 2;\nunsigned int bufCounter = 0;\nvolatile unsigned long lastInt = 0;\nvolatile uint64_t currentBuf = 0;\nvolatile bool newSignal = false;\nvolatile bool newSequence = false;\nvolatile unsigned long highDur = 0;\nvolatile unsigned long lowDur = 0;\n\nvoid setup() {\n  Serial.begin(115200);\n  Serial.println(\" HIGH  \/  LOW\");\n  pinMode(interruptPin, INPUT);\n  attachInterrupt(digitalPinToInterrupt(interruptPin), DCF77_ISR, CHANGE);\n}\n\nvoid loop() {\n  if(newSignal) {\n    newSignal = false;\n    Serial.print(bufCounter);\n    Serial.print(\". \");\n    Serial.print(highDur);\n    Serial.print(\"  \/  \");\n    Serial.println(lowDur);\n    bufCounter++;\n    \n    if (newSequence) {\n      uint32_t highBuf = (currentBuf&gt;&gt;32) &amp; 0x7FFFFFF;\n      uint32_t lowBuf = (currentBuf &amp; 0xFFFFFFFF);\n      newSequence = false;\n      newSignal = false;\n      bufCounter = 0;\n      Serial.print(\"Signal, upper 4 bytes: \"); \n      Serial.println(highBuf, BIN);\n      Serial.print(\"Signal, lower 4 bytes: \"); \n      Serial.println(lowBuf, BIN);    \n    }\n  }\n}\n\nvoid DCF77_ISR() {\n  unsigned int dur = 0;\n  dur = millis() - lastInt; \n  \n  if(digitalRead(interruptPin)){\n    lowDur = dur; \n    newSignal = true; \n    \n    if(dur &gt; MIN_END_SIGNAL) {\n      newSequence = true;\n    }\n  }\n  else{\n    highDur = dur;\n    \n    if(dur &gt; MIN_HIGH_SIGNAL) {\n      currentBuf |= ((uint64_t)1&lt;&lt;bufCounter);\n    }\n  }\n  lastInt = millis();\n}<\/pre>\n<p>&nbsp;<\/p>\n<\/div>\n\n<h4 class=\"wp-block-heading\" id=\"ausgabe-von-dcf77-get-sequence-ino\">Output of dcf77_get_sequence.ino<\/h4>\n\n<p>Here you can see a snapshot of the output:<\/p>\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2021\/02\/output_get_sequence.png\"><img loading=\"lazy\" decoding=\"async\" width=\"889\" height=\"465\" src=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2021\/02\/output_get_sequence.png\" alt=\"DCF77 Example sketch: Output of dcf77_get_sequence.ino\" class=\"wp-image-11083\" srcset=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2021\/02\/output_get_sequence.png 889w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2021\/02\/output_get_sequence-300x157.png 300w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2021\/02\/output_get_sequence-768x402.png 768w\" sizes=\"auto, (max-width: 889px) 100vw, 889px\" \/><\/a><figcaption class=\"wp-element-caption\">Output of dcf77_get_sequence.ino<\/figcaption><\/figure>\n\n<p>The HIGH and LOW phases differ a little from the ideal lengths, but zeros and ones are clearly distinguishable.<\/p>\n<p>The first recorded sequence will only be a complete one in 2 out of 60 cases, namely when you in the last two seconds of a running sequence. <\/p>\n\n<h3 class=\"wp-block-heading\" id=\"die-erfassten-sequenzen-auswerten\">Evaluating the captured sequences <\/h3>\n\n<p>Now let&#8217;s evaluate the received sequences. To do this, the ISR passes the currentBuf sequence to the <code>evaluateSequence()<\/code> function. This first splits the sequence into the relevant sections (minute, hour, day of the week, etc.).<\/p>\n<p>For the parity check, I use the function <code>parity_even_bit()<\/code> . To use it, you need to include utils\/parity.h. This file is part of the Arduino or AVR standard package, so you don&#8217;t have to install it. <code>parity_even_bit()<\/code> expects a byte value as an argument. The function returns &#8220;0&#8221; (false) for parity &#8220;0&#8221; and &#8220;1&#8221; for parity &#8220;1&#8221;. The date piece is greater than one byte, so I&#8217;ll check the parities of the calendar day, day of the week, month, and year individually. If the sum of the parities is an even number, then the total parity is 0. If it is odd, the parity is \u201c1\u201d. <strong>If you are not using an AVR board (Arduino UNO, Nano, Mega, etc.), do not include parity.h and uncomment the replacement function at the end of this and the following sketches.<\/strong><\/p>\n<p><code>rawByteToInt()<\/code> splits the raw value of minute, hour, day, etc. into the digits and returns the sum as an integer. These values are then output.<\/p>\n\n<div class=\"scroll-paragraph-long\">\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-group=\"dcf77_sequence_evaluation.ino\" data-enlighter-title=\"dcf77_sequence_evaluation.ino\">#include &lt;util\/parity.h&gt; \/\/comment out if you don't use an AVR MCU\n#define MIN_HIGH_SIGNAL 150\n#define MIN_END_SIGNAL 1500\nint interruptPin=2;\nunsigned int bufCounter;\nvolatile unsigned long lastInterrupt = 0;\nuint64_t tempBuf = 0;\nvolatile uint64_t currentBuf = 0;\nvolatile bool newSignal = false;\nvolatile bool newSequence = false;\nvolatile unsigned long highDur = 0;\nvolatile unsigned long lowDur = 0;\n\nvoid setup() {\n  Serial.begin(115200);\n  Serial.println(\" HIGH  \/  LOW\");\n  pinMode(interruptPin, INPUT);\n  attachInterrupt(digitalPinToInterrupt(interruptPin), DCF77_ISR, CHANGE);\n}\n\nvoid loop(){\n  if(newSignal) {\n    newSignal = false;\n    Serial.print(bufCounter);\n    Serial.print(\". \");\n    Serial.print(highDur);\n    Serial.print(\"  \/  \");\n    Serial.println(lowDur);\n    bufCounter++;\n      \n    if (newSequence) {\n      uint32_t highBuf = (currentBuf&gt;&gt;32) &amp; 0x7FFFFFF;\n      uint32_t lowBuf = (currentBuf &amp; 0xFFFFFFFF);\n      newSequence = false;\n      tempBuf = currentBuf;\n      while(digitalRead(interruptPin)) {;} \/\/ we wait for the first Low\n      currentBuf = 0;   \n      bufCounter = 0;\n      newSignal = false;\n      Serial.print(\"Signal, upper 4 bytes: \"); \n      Serial.println(highBuf, BIN);\n      Serial.print(\"Signal, lower 4 bytes: \"); \n      Serial.println(lowBuf, BIN); \n      evaluateSequence();\n    }\n  }\n}\n\nvoid evaluateSequence(){\n  uint8_t dcf77Year = (tempBuf&gt;&gt;50) &amp; 0xFF;    \/\/ year = bit 50-57\n  uint8_t dcf77Month = (tempBuf&gt;&gt;45) &amp; 0x1F;       \/\/ month = bit 45-49\n  uint8_t dcf77DayOfWeek = (tempBuf&gt;&gt;42) &amp; 0x07;   \/\/ day of the week = bit 42-44\n  uint8_t dcf77DayOfMonth = (tempBuf&gt;&gt;36) &amp; 0x3F;  \/\/ day of the month = bit 36-41\n  uint8_t dcf77Hour = (tempBuf&gt;&gt;29) &amp; 0x3F;       \/\/ hour = bit 29-34\n  uint8_t dcf77Minute = (tempBuf&gt;&gt;21) &amp; 0x7F;     \/\/ minute = 21-27 \n  bool parityBitMinute = (tempBuf&gt;&gt;28) &amp; 1;\n  bool parityBitHour = (tempBuf&gt;&gt;35) &amp; 1;\n  bool parityBitDate = (tempBuf&gt;&gt;58) &amp; 1;\n\n  if((parity_even_bit(dcf77Minute)) != parityBitMinute){\n    Serial.println(\"Minute parity not OK\"); \n  }\n  \n  if((parity_even_bit(dcf77Hour)) != parityBitHour){\n    Serial.println(\"Hour parity not OK\");\n  }\n  \n  if(((parity_even_bit(dcf77DayOfMonth) + parity_even_bit(dcf77DayOfWeek) \n  + parity_even_bit(dcf77Month) + parity_even_bit(dcf77Year))%2) != parityBitDate)\n  {\n    Serial.println(\"Date parity not OK\");\n  }\n  \n  Serial.println(\"Current date and Time:\");\n  Serial.print(\"Year: \"); Serial.println(rawByteToInt(dcf77Year));\n  Serial.print(\"Month: \"); Serial.println(rawByteToInt(dcf77Month));\n  Serial.print(\"Day of Month: \"); Serial.println(rawByteToInt(dcf77DayOfMonth));\n  Serial.print(\"Day of the Week: \"); Serial.println(rawByteToInt(dcf77DayOfWeek));\n  Serial.print(\"Hours: \"); Serial.println(rawByteToInt(dcf77Hour));\n  Serial.print(\"Minutes: \"); Serial.println(rawByteToInt(dcf77Minute));\n}\n\nunsigned int rawByteToInt(uint8_t raw){\n  return ((raw&gt;&gt;4)*10 + (raw &amp;0x0F));\n}\n\nvoid DCF77_ISR(){\n  unsigned int dur = 0;\n  dur = millis() - lastInterrupt; \n  lastInterrupt = millis();\n  \n  if(digitalRead(interruptPin)){\n    lowDur = dur; \n    newSignal = true; \n    \n    if(dur &gt; MIN_END_SIGNAL) {\n      newSequence = true;\n    }\n  }\n  else{\n    highDur = dur;\n    \n    if(dur &gt; MIN_HIGH_SIGNAL){\n      currentBuf |= ((uint64_t)1&lt;&lt;bufCounter);\n    }\n  }\n}\n\n\/\/uncomment the following lines if you don't use an AVR MCU\n\/\/bool parity_even_bit(uint8_t val){\n\/\/  val ^= val &gt;&gt; 4;\n\/\/  val ^= val &gt;&gt; 2;\n\/\/  val ^= val &gt;&gt; 1;\n\/\/  val &amp;= 0x01;\n\/\/  return val;\n\/\/}<\/pre>\n<p>&nbsp;<\/p>\n<\/div>\n\n<h4 class=\"wp-block-heading\" id=\"ausgabe-von-dcf77-sequence-evaluation-ino\">Output of dcf77_sequence_evaluation.ino<\/h4>\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2021\/02\/output_dcf77_sequence_evaluation.png\"><img loading=\"lazy\" decoding=\"async\" width=\"889\" height=\"465\" src=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2021\/02\/output_dcf77_sequence_evaluation.png\" alt=\"DCF77 Example sketch: Output of dcf77_sequence_evaluation.ino\" class=\"wp-image-11088\" srcset=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2021\/02\/output_dcf77_sequence_evaluation.png 889w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2021\/02\/output_dcf77_sequence_evaluation-300x157.png 300w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2021\/02\/output_dcf77_sequence_evaluation-768x402.png 768w\" sizes=\"auto, (max-width: 889px) 100vw, 889px\" \/><\/a><figcaption class=\"wp-element-caption\">Output of dcf77_sequence_evaluation.ino<\/figcaption><\/figure>\n\n<p>So it&#8217;s Sunday, February 14, 2021, 12:59. It works, but the formatting still leaves opportunities for improvement.<\/p>\n<p>For example, the names for the months or days of the week could be inserted as:<\/p>\n<p><code>char dayName[7][12] = {\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"};<\/code><\/p>\n<p><code>Serial.print(dayName[dcf77DayOfWeek]);<\/code><\/p>\n<p>But I&#8217;m going down a different, much more comfortable &nbsp; path.<\/p>\n\n<h2 class=\"wp-block-heading\" id=\"den-dcf77-mit-der-rtclib-nutzen\">Using the DCF77 with the RTCLib<\/h2>\n\n<p>I introduced the RTCLib <a href=\"https:\/\/wolles-elektronikkiste.de\/en\/ds3231-real-time-clock\" target=\"_blank\" rel=\"noopener\">in the last post<\/a> as a library for the DS3231 real-time clock module. In addition to this task, the RTCLib also offers (among other things):<\/p>\n<ul>\n<li>A wide range of formatting options for date and time.<\/li>\n<li>Calculation operations with date\/time and time periods.<\/li>\n<li>Software simulation of a real-time clock (SoftRTC).<\/li>\n<\/ul>\n<p>I had presented all this in my last post. If you don&#8217;t understand the next sketch, it&#8217;s best to go back there.<\/p>\n<p>You can download the RTCLib via the Arduino IDE or directly from GitHub <a href=\"https:\/\/github.com\/adafruit\/RTClib\" target=\"_blank\" rel=\"noopener\">here<\/a>.<\/p>\n<p>We use SoftRTC and set this &#8220;software watch&#8221; regularly with the DCF77 receiver. In between, the clock runs based on millis().<\/p>\n<p>Of course, you can use the DCF77 receive to set a DS3231 module as well.<\/p>\n\n<h3 class=\"wp-block-heading\" id=\"dcf77-und-softrtc-der-sketch\">DCF77 and SoftRTC &#8211; the sketch<\/h3>\n\n<p>I freed the code used in the last sketch from all non-essential <code>Serial.print()<\/code> parts. Then I combined it with the example sketch softrtc.ino of the RTCLib and adapted it somewhat.<\/p>\n<p>The clock is initially set to 1\/1\/2000, 00:00. You could also use the computer&#8217;s system time, but I wanted an obviously wrong start date to make it clearer when the clock is set by the DCF77 module.<\/p>\n<p>The clock is only set if there is a valid record, i.e. if 59 bits have been submitted and the three parity bits are correct.<\/p>\n\n<div class=\"scroll-paragraph-long\">\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-group=\"dcf77_softRTC.ino\" data-enlighter-title=\"dcf77_softRTC.ino\">#include &lt;util\/parity.h&gt; \/\/comment out if you don't use an AVR MCU\n#include \"RTClib.h\"\n#define MIN_HIGH_SIGNAL 150\n#define MIN_END_SIGNAL 1500\n\nint interruptPin = 2;\nvolatile unsigned long lastInterrupt = 0;\nvolatile uint64_t currentBuf = 0;\nvolatile unsigned int bufCounter;\n\nRTC_Millis rtc;\n\nvoid setup() {\n  rtc.adjust(DateTime(2000, 1, 1, 0, 0, 0));\n  Serial.begin(115200);\n  pinMode(interruptPin, INPUT);\n  attachInterrupt(digitalPinToInterrupt(interruptPin), DCF77_ISR, CHANGE);\n}\n\nvoid loop(){\n  static DateTime now = rtc.now();\n  now = rtc.now();\n  char buf1[] = \"Today is DDD, MMM DD YYYY\";\n  Serial.println(now.toString(buf1));\n  char buf2[] = \"Current time is hh:mm:ss\";\n  Serial.println(now.toString(buf2));\n  Serial.println();\n  \n  delay(3000);\n}\n\nvoid DCF77_ISR() {\n  unsigned int dur = 0;\n  dur = millis() - lastInterrupt; \n  lastInterrupt = millis();\n  \n  if(digitalRead(interruptPin)) {\n    \n    if(dur &gt; MIN_END_SIGNAL) {\n      \n      if(bufCounter==59) {\n        evaluateSequence();\n      }\n      bufCounter = 0;\n      currentBuf = 0;\n    }\n  }\n  else{\n    if(dur &gt; MIN_HIGH_SIGNAL) {\n      currentBuf |= ((uint64_t)1&lt;&lt;bufCounter);\n    }\n    bufCounter++;\n  }\n}\n\nvoid evaluateSequence(){\n  uint8_t dcf77Year = (currentBuf&gt;&gt;50) &amp; 0xFF;    \/\/ year = bit 50-57\n  uint8_t dcf77Month = (currentBuf&gt;&gt;45) &amp; 0x1F;       \/\/ month = bit 45-49\n  uint8_t dcf77DayOfWeek = (currentBuf&gt;&gt;42) &amp; 0x07;   \/\/ day of the week = bit 42-44\n  uint8_t dcf77DayOfMonth = (currentBuf&gt;&gt;36) &amp; 0x3F;  \/\/ day of the month = bit 36-41\n  uint8_t dcf77Hour = (currentBuf&gt;&gt;29) &amp; 0x3F;       \/\/ hour = bit 29-34\n  uint8_t dcf77Minute = (currentBuf&gt;&gt;21) &amp; 0x7F;     \/\/ minute = 21-27 \n  bool parityBitMinute = (currentBuf&gt;&gt;28) &amp; 1;\n  bool parityBitHour = (currentBuf&gt;&gt;35) &amp; 1;\n  bool parityBitDate = (currentBuf&gt;&gt;58) &amp; 1;\n\n  if((parity_even_bit(dcf77Minute)) == parityBitMinute){\n    \n    if((parity_even_bit(dcf77Hour)) == parityBitHour){\n      \n      if(((parity_even_bit(dcf77DayOfMonth) + parity_even_bit(dcf77DayOfWeek) \n           + parity_even_bit(dcf77Month) + parity_even_bit(dcf77Year))%2) == parityBitDate){\n        rtc.adjust(DateTime(rawByteToInt(dcf77Year) + 2000, rawByteToInt(dcf77Month), \n            rawByteToInt(dcf77DayOfMonth), rawByteToInt(dcf77Hour), rawByteToInt(dcf77Minute), 0));\n      }\n    }\n  }\n}\n\nunsigned int rawByteToInt(uint8_t raw){\n  return ((raw&gt;&gt;4)*10 + (raw &amp; 0x0F));\n}\n\n\/\/uncomment the following lines if you don't use an AVR MCU\n\/\/bool parity_even_bit(uint8_t val){\n\/\/  val ^= val &gt;&gt; 4;\n\/\/  val ^= val &gt;&gt; 2;\n\/\/  val ^= val &gt;&gt; 1;\n\/\/  val &amp;= 0x01;\n\/\/  return val;\n\/\/}<\/pre>\n<p>&nbsp;<\/p>\n<\/div>\n\n<h4 class=\"wp-block-heading\" id=\"ausgabe-von-dcf77-softrtc-ino\">Output of dcf77_softRTC.ino<\/h4>\n\n<p>The result looks like:<\/p>\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2021\/02\/output_dcf77_softRTC.png\"><img loading=\"lazy\" decoding=\"async\" width=\"889\" height=\"465\" src=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2021\/02\/output_dcf77_softRTC.png\" alt=\"Example sketch DCF77: Output of dcf77_softRTC.ino\" class=\"wp-image-11095\" srcset=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2021\/02\/output_dcf77_softRTC.png 889w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2021\/02\/output_dcf77_softRTC-300x157.png 300w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2021\/02\/output_dcf77_softRTC-768x402.png 768w\" sizes=\"auto, (max-width: 889px) 100vw, 889px\" \/><\/a><figcaption class=\"wp-element-caption\">Output of dcf77_softRTC.ino<\/figcaption><\/figure>\n\n<p>Ideally, the software clock is set to the DCF77 time after one to two minutes, as here. In case of poor reception, it may take longer.<\/p>\n\n<p>A version of the sketch with a leaner ISR can be found in Appendix 1.<\/p>\n\n<h3 class=\"wp-block-heading\" id=\"wenn-ihr-keine-interrupts-wollt\">If you don&#8217;t want interrupts&#8230;.<\/h3>\n\n<p>If you&#8217;re bothered by working with the interrupts, I have a version here without interrupts. Setting the clock is time-controlled. Since I had no desire to wait a long time, the clock is set every two minutes. Of course, this makes virtually no sense. However, you can easily change this to every few hours, for example.<\/p>\n<p>The disadvantage of this method is that you can&#8217;t do anything else during the setting procedure.<\/p>\n<p>The sketch is still quite communicative. You can cut it significantly if you want to use it or build on it.<\/p>\n\n<div class=\"scroll-paragraph-long\">\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-group=\"dcf77_softRTC_without_interrupt.ino\" data-enlighter-title=\"dcf77_softRTC_without_interrupt.ino\">#include \"RTClib.h\"  \n#include &lt;util\/parity.h&gt; \/\/comment out if you don't use an AVR MCU\nint dataPin = 7;\n\nRTC_Millis rtc;\n\nvoid setup () {\n  bool validTime = false;\n  Serial.begin(115200);\n\n#ifndef ESP8266\n  while (!Serial); \/\/ wait for serial port to connect. Needed for native USB\n#endif\n\n  pinMode(dataPin, INPUT); \n  \n  DateTime currentTime = DateTime(2000, 1, 1, 0, 0, 0); \/\/ Initial Date\n  \n  while(!validTime){\n    \n    if(getDcf77Time(currentTime)){\n      Serial.println(\"Date and Time updated!\");\n      validTime = true;\n    }\n    else{\n      Serial.println(\"Sorry, something went wrong!\");\n    }\n  }\n  rtc.adjust(currentTime);\n}\n\nbool getDcf77Time(DateTime &amp;dcf77Time){\n  unsigned long long dcf77Sequence = 0;\n  bool successfulUpdate = true;\n  \n  if(receiveSequence(dcf77Sequence)){\n    Serial.println(\"Sequence OK - received 59 bits\");\n    printSequence(dcf77Sequence);\n  }\n  else{\n    Serial.println(\"Sequence NOT OK - wrong nuber of bits\");\n    successfulUpdate = false;\n  }\n    \n  if(evaluateSequence(dcf77Sequence, dcf77Time)){\n    Serial.println(\"Valid Sequence!\");   \n  }\n  else{\n    Serial.println(\"Invalid Sequence!\");\n    successfulUpdate = false;\n  }\n\n  return successfulUpdate;\n}\n\nbool evaluateSequence(unsigned long long &amp;buf, DateTime &amp;dcf77Time){\n  bool parityOK = true;\n  uint8_t dcf77Year = (buf&gt;&gt;50) &amp; 0xFF;    \/\/ year = bit 50-57\n  uint8_t dcf77Month = (buf&gt;&gt;45) &amp; 0x1F;       \/\/ month = bit 45-49\n  uint8_t dcf77DayOfWeek = (buf&gt;&gt;42) &amp; 0x07;   \/\/ day of the week = bit 42-44\n  uint8_t dcf77DayOfMonth = (buf&gt;&gt;36) &amp; 0x3F;  \/\/ day of the month = bit 36-41\n  uint8_t dcf77Hour = (buf&gt;&gt;29) &amp; 0x3F;       \/\/ hour = bit 29-34\n  uint8_t dcf77Minute = (buf&gt;&gt;21) &amp; 0x7F;     \/\/ minute = 21-27 \n  bool parityBitMinute = (buf&gt;&gt;28) &amp; 1;\n  bool parityBitHour = (buf&gt;&gt;35) &amp; 1;\n  bool parityBitDate = (buf&gt;&gt;58) &amp; 1;\n\n  if((parity_even_bit(dcf77Minute)) != parityBitMinute){\n    parityOK = false;\n    Serial.println(\"Minutes not OK\"); \n  }\n\n  if((parity_even_bit(dcf77Hour)) != parityBitHour) {\n    parityOK = false; \n    Serial.println(\"Hours not OK\");\n  }\n\n  if(((parity_even_bit(dcf77DayOfMonth) + parity_even_bit(dcf77DayOfWeek) \n  + parity_even_bit(dcf77Month) + parity_even_bit(dcf77Year))%2) != parityBitDate)\n  {\n    parityOK = false;\n    Serial.println(\"Date not OK\");\n  }\n\n  if(parityOK==false) {\n    return parityOK;\n  }\n  \n  dcf77Time = DateTime(rawByteToInt(dcf77Year) + 2000, rawByteToInt(dcf77Month), \n              rawByteToInt(dcf77DayOfMonth), rawByteToInt(dcf77Hour), rawByteToInt(dcf77Minute), 0);\n\n  return parityOK;\n}\n\nunsigned int rawByteToInt(uint8_t raw){\n  return ((raw&gt;&gt;4)*10 + (raw &amp;0x0F));\n}\n\nbool receiveSequence(unsigned long long &amp;buf){\n  unsigned int counter = 0;\n  unsigned int lowCounter = 0;\n  unsigned int highCounter = 0; \n    \n  Serial.println(\"Waiting for sequence start...\");\n  waitForSequenceStart(); \n  Serial.println(\"HIGH \/ LOW\");\n  \n  while(lowCounter &lt; 150){\n    lowCounter = 0;\n    highCounter = 0;\n    \n    while(digitalRead(dataPin)) {\n      delay(10);\n      highCounter++;\n    }\n    if(highCounter &gt;= 15){\n      buf |= ((unsigned long long)1&lt;&lt;counter);\n    }\n         \n    while(!digitalRead(dataPin)) {\n      delay(10);\n      lowCounter++;\n    }\n      \n    Serial.print(counter);\n    Serial.print(\".  \");\n    Serial.print(highCounter);\n    Serial.print(\"  \/  \");\n    Serial.println(lowCounter);\n    \n    counter++; \n  }\n  if(counter==59){\n    return true;    \n  }\n  else{\n    return false;\n  }\n}\n\nvoid waitForSequenceStart() {\n  unsigned int lowCounter2 = 0;\n  \n  while(lowCounter2&lt;150){\n    lowCounter2 = 0;\n    while(digitalRead(dataPin)) {}\n    while(!digitalRead(dataPin)) {\n      delay(10);\n      lowCounter2++;\n    }\n  }  \n}\n\nvoid printSequence(unsigned long long &amp;buf){\n  unsigned long highBuf = (buf&gt;&gt;32) &amp; 0x7FFFFFF;\n  unsigned long lowBuf = (buf &amp; 0xFFFFFFFF);\n  Serial.print(\"Sequence, upper 4 bytes: \"); \n  Serial.println(highBuf, BIN);\n  Serial.print(\"Sequence, lower 4 bytes: \"); \n  Serial.println(lowBuf, BIN);  \n}\n\nvoid loop () {\n  DateTime now = rtc.now();\n  TimeSpan updatePeriod = TimeSpan(0,0,2,0);\n  static DateTime nextUpdate = now + updatePeriod;\n  \n  char buf1[] = \"Today is DDD, MMM DD YYYY\";\n  Serial.println(now.toString(buf1));\n  char buf2[] = \"Current time is hh:mm:ss\";\n  Serial.println(now.toString(buf2));\n  Serial.println();\n\n  if(nextUpdate &lt; now){\n    if(getDcf77Time(now)){\n      rtc.adjust(now);\n      nextUpdate = now + updatePeriod;\n    }\n  }\n  \n  delay(3000);\n}\n\n\/\/uncomment the following lines if you don't use an AVR MCU\n\/\/bool parity_even_bit(uint8_t val){\n\/\/  val ^= val &gt;&gt; 4;\n\/\/  val ^= val &gt;&gt; 2;\n\/\/  val ^= val &gt;&gt; 1;\n\/\/  val &amp;= 0x01;\n\/\/  return val;\n\/\/}<\/pre>\n<p>&nbsp;<\/p>\n<\/div>\n\n<h3 class=\"wp-block-heading\" id=\"ausgabe-von-dcf77-softrtc-without-interrupt-ino\">Output of dcf77_softRTC_without_interrupt.ino<\/h3>\n\n<p>Here&#8217;s what the sketch looks like in action:<\/p>\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2021\/02\/dcf77_softRTC_without_interrupt_1.png\"><img loading=\"lazy\" decoding=\"async\" width=\"716\" height=\"465\" src=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2021\/02\/dcf77_softRTC_without_interrupt_1.png\" alt=\"Output of dcf77_softRTC_without_interrupt.ino: first time setting\" class=\"wp-image-11100\" srcset=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2021\/02\/dcf77_softRTC_without_interrupt_1.png 716w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2021\/02\/dcf77_softRTC_without_interrupt_1-300x195.png 300w\" sizes=\"auto, (max-width: 716px) 100vw, 716px\" \/><\/a><figcaption class=\"wp-element-caption\">Output of dcf77_softRTC_without_interrupt.ino: first time setting<\/figcaption><\/figure>\n\n<p>In the upper screenshot you can see that the clock is set at 5:25 p.m. As specified in the sketch, the next setting is two minutes later:<\/p>\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2021\/02\/dcf77_softRTC_without_interrupt_2.png\"><img loading=\"lazy\" decoding=\"async\" width=\"716\" height=\"465\" src=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2021\/02\/dcf77_softRTC_without_interrupt_2.png\" alt=\"\" class=\"wp-image-11098\" srcset=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2021\/02\/dcf77_softRTC_without_interrupt_2.png 716w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2021\/02\/dcf77_softRTC_without_interrupt_2-300x195.png 300w\" sizes=\"auto, (max-width: 716px) 100vw, 716px\" \/><\/a><figcaption class=\"wp-element-caption\">Output of dcf77_softRTC_without_interrupt.ino: second time setting<\/figcaption><\/figure>\n\n<h2 class=\"wp-block-heading\" id=\"danksagung\">Acknowledgement<\/h2>\n\n<p>The basis of the post image, the watch, comes from <a href=\"https:\/\/pixabay.com\/de\/users\/openclipart-vectors-30363\/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=1300646\" target=\"_blank\" rel=\"noopener\">OpenClipart-Vectors<\/a>. I owe the radio symbol to <a href=\"https:\/\/pixabay.com\/de\/users\/clker-free-vector-images-3736\/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=31235\" target=\"_blank\" rel=\"noopener\">Clker-Free-Vector-Images.<\/a> Both are &#8211; as usual &#8211; from <a href=\"https:\/\/pixabay.com\/de\/\" target=\"_blank\" rel=\"noopener\">Pixabay<\/a>.<\/p>\n\n<p><\/p>\n\n<h2 class=\"wp-block-heading\">Appendix 1 &#8211; Time on a 4-digit display<\/h2>\n\n<p>And then I wrote a sketch that displays the time on a TM1637-based 4-digit display. I used the <a href=\"https:\/\/github.com\/avishorp\/TM1637\" target=\"_blank\" rel=\"noopener\">TM1637<\/a> library from <a href=\"https:\/\/github.com\/avishorp\" target=\"_blank\" rel=\"noopener\">Avishay<\/a>, which you can also install via the Arduino library manager. <\/p>\n<p>The watch can then look like this:<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><a href=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2024\/04\/4_digit_display_clock.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"1000\" height=\"407\" src=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2024\/04\/4_digit_display_clock.jpg\" alt=\"4-digit display as a clock\" class=\"wp-image-20836\" style=\"width:388px;height:auto\" srcset=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2024\/04\/4_digit_display_clock.jpg 1000w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2024\/04\/4_digit_display_clock-300x122.jpg 300w, https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2024\/04\/4_digit_display_clock-768x313.jpg 768w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><\/a><figcaption class=\"wp-element-caption\">4-digit display as a clock<\/figcaption><\/figure>\n<\/div>\n<p>The sketch has become quite extensive. Theoretically, you could omit the detour via the soft RTC and translate the sequence directly into the time. However, this has the disadvantage that an incorrect sequence would lead to an incorrect or outdated time. In my implementation, only the soft RTC is not readjusted in the event of an incorrect sequence. But for one or a few minutes, you should be able to live with the less accurate soft RTC.    <\/p>\n\n<div class=\"scroll-paragraph\">\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-group=\"dcf77_soft_rtc_4_digit_display.ino\" data-enlighter-title=\"dcf77_soft_rtc_4_digit_display.ino\">#include &lt;util\/parity.h&gt; \/\/comment out if you don't use an AVR MCU\n#include \"RTClib.h\"\n#include &lt;TM1637Display.h&gt;\n#define CLK 9 \/\/ Display pin CLK\n#define DIO 10 \/\/ Display pin DIO\n\nint interruptPin=2;\nvolatile unsigned long lastInt = 0;\nvolatile unsigned long long currentBuf = 0;\nvolatile unsigned long long nextBuf = 0;\nvolatile bool newMinute = false;\nvolatile bool timeValid = false;\nvolatile byte bufCounter;\n\nRTC_Millis rtc;\nTM1637Display display(CLK, DIO);\n\nvoid setup(){\n  rtc.adjust(DateTime(2000, 1, 1, 0, 0, 0));\n  display.setBrightness(0x0f);\n  pinMode(interruptPin, INPUT);\n  attachInterrupt(digitalPinToInterrupt(interruptPin), DCF77_ISR, CHANGE);\n}\n\nvoid loop(){\n  static DateTime now = rtc.now();\n  if(newMinute){\n    if(timeValid){\n      evaluateSequence();\n    }\n    else delay(2000); \/\/ if time not valid and soft rtc is slow \n    now = rtc.now();\n    int timeAsInt = now.minute() + now.hour() * 100;\n    display.showNumberDecEx(timeAsInt, 0b11100000, true);\n    \/\/display.showNumberDec(timeAsInt, true); \/\/ without \"__:__\"\n    newMinute = false;\n  }\n}\n\nvoid DCF77_ISR(){\n  unsigned int dur = 0;\n  dur = millis() - lastInt; \n  \n  if(digitalRead(interruptPin)){\n    if(dur&gt;1500){\n      if(bufCounter==59){\n        timeValid = true;\n        currentBuf = nextBuf;\n      }\n      else {\n        timeValid = false; \n      }\n      nextBuf = 0;\n      newMinute = true;\n      bufCounter = 0;\n    }\n  }\n  else{\n    if(dur&gt;150){\n      nextBuf |= ((unsigned long long)1&lt;&lt;bufCounter);\n    }\n    bufCounter++;\n  }\n  lastInt = millis();\n}\n\nvoid evaluateSequence(){\n  byte dcf77Year = (currentBuf&gt;&gt;50) &amp; 0xFF;    \/\/ year = bit 50-57\n  byte dcf77Month = (currentBuf&gt;&gt;45) &amp; 0x1F;       \/\/ month = bit 45-49\n  byte dcf77DayOfWeek = (currentBuf&gt;&gt;42) &amp; 0x07;   \/\/ day of the week = bit 42-44\n  byte dcf77DayOfMonth = (currentBuf&gt;&gt;36) &amp; 0x3F;  \/\/ day of the month = bit 36-41\n  byte dcf77Hour = (currentBuf&gt;&gt;29) &amp; 0x3F;       \/\/ hour = bit 29-34\n  byte dcf77Minute = (currentBuf&gt;&gt;21) &amp; 0x7F;     \/\/ minute = 21-27 \n  bool parityBitMinute = (currentBuf&gt;&gt;28) &amp; 1;\n  bool parityBitHour = (currentBuf&gt;&gt;35) &amp; 1;\n  bool parityBitDate = (currentBuf&gt;&gt;58) &amp; 1;\n\n  if((parity_even_bit(dcf77Minute)) == parityBitMinute){\n    if((parity_even_bit(dcf77Hour)) == parityBitHour){\n      if(((parity_even_bit(dcf77DayOfMonth) + parity_even_bit(dcf77DayOfWeek) \n           + parity_even_bit(dcf77Month) + parity_even_bit(dcf77Year))%2) == parityBitDate){\n        rtc.adjust(DateTime(rawByteToInt(dcf77Year) + 2000, rawByteToInt(dcf77Month), \n            rawByteToInt(dcf77DayOfMonth), rawByteToInt(dcf77Hour), rawByteToInt(dcf77Minute), 0));\n      }\n    }\n  }\n}\n\nunsigned int rawByteToInt(byte raw){\n  return ((raw&gt;&gt;4)*10 + (raw &amp; 0x0F));\n}\n\n\/\/uncomment the following lines if you don't use an AVR MCU\n\/\/bool parity_even_bit(byte val){\n\/\/  val ^= val &gt;&gt; 4;\n\/\/  val ^= val &gt;&gt; 2;\n\/\/  val ^= val &gt;&gt; 1;\n\/\/  val &amp;= 0x01;\n\/\/  return val;\n\/\/}<\/pre>\n<p>&nbsp;<\/p>\n<\/div>\n\n<h2 class=\"wp-block-heading\">Appendix 2 &#8211; Setting the DS3231 with the DCF77<\/h2>\n\n<p>You can simulate a DS3231 with a DCF77. The combination of these modules makes sense if you don&#8217;t have reliable reception with the DCF77. You can find the circuit and my sketch <a href=\"https:\/\/wolles-elektronikkiste.de\/en\/ds3231-real-time-clock#set_ds3231_with_dcf77\" target=\"_blank\" rel=\"noopener\">in this article<\/a>.  <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Here you will learn what the DCF77 radio clock signal is, how to receive it, how to evaluate it and how to use it optimally together with the library RTCLib.<\/p>\n","protected":false},"author":1,"featured_media":11072,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[565,1320],"tags":[2715,2716,1388,1393,1389,1394,1395,1373,1397,1391],"class_list":["post-11131","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-other-parts","category-wireless-en-2","tag-dcf-1060n-800-en","tag-dcf-3850n-800-en","tag-dcf77-en-2","tag-dcf77-receiver-module-2","tag-decoding","tag-parity","tag-parity-bit","tag-rtclib-en","tag-softrtc-en","tag-time-signal"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>DCF77 - Radio Controlled Clock &#8226; Wolles Elektronikkiste<\/title>\n<meta name=\"description\" content=\"Here you will learn what the DCF77 radio clock signal is, how to receive it, how to evaluate it and how to use it optimally together with the library RTCLib.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/wolles-elektronikkiste.de\/en\/dcf77-radio-controlled-clock\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"DCF77 - Radio Controlled Clock &#8226; Wolles Elektronikkiste\" \/>\n<meta property=\"og:description\" content=\"Here you will learn what the DCF77 radio clock signal is, how to receive it, how to evaluate it and how to use it optimally together with the library RTCLib.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/wolles-elektronikkiste.de\/en\/dcf77-radio-controlled-clock\" \/>\n<meta property=\"og:site_name\" content=\"Wolles Elektronikkiste\" \/>\n<meta property=\"article:published_time\" content=\"2021-02-20T15:45:57+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-06-13T13:38:50+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2021\/02\/clock_2.png\" \/>\n\t<meta property=\"og:image:width\" content=\"2454\" \/>\n\t<meta property=\"og:image:height\" content=\"2425\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Wolfgang Ewald\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Wolfgang Ewald\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"22 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\\\/dcf77-radio-controlled-clock#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\\\/dcf77-radio-controlled-clock\"},\"author\":{\"name\":\"Wolfgang Ewald\",\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en#\\\/schema\\\/person\\\/b774e4d64b4766889a2f7c6e5ec85b46\"},\"headline\":\"DCF77 &#8211; Radio Controlled Clock\",\"datePublished\":\"2021-02-20T15:45:57+00:00\",\"dateModified\":\"2025-06-13T13:38:50+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\\\/dcf77-radio-controlled-clock\"},\"wordCount\":2390,\"commentCount\":4,\"publisher\":{\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en#\\\/schema\\\/person\\\/b774e4d64b4766889a2f7c6e5ec85b46\"},\"image\":{\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\\\/dcf77-radio-controlled-clock#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/wp-content\\\/uploads\\\/2021\\\/02\\\/clock_2.png\",\"keywords\":[\"DCF-1060N-800\",\"DCF-3850N-800\",\"DCF77\",\"DCF77 Receiver Module\",\"decoding\",\"parity\",\"parity bit\",\"RTCLib\",\"softRTC\",\"time signal\"],\"articleSection\":[\"Other parts\",\"wireless\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\\\/dcf77-radio-controlled-clock#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\\\/dcf77-radio-controlled-clock\",\"url\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\\\/dcf77-radio-controlled-clock\",\"name\":\"DCF77 - Radio Controlled Clock &#8226; Wolles Elektronikkiste\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\\\/dcf77-radio-controlled-clock#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\\\/dcf77-radio-controlled-clock#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/wp-content\\\/uploads\\\/2021\\\/02\\\/clock_2.png\",\"datePublished\":\"2021-02-20T15:45:57+00:00\",\"dateModified\":\"2025-06-13T13:38:50+00:00\",\"description\":\"Here you will learn what the DCF77 radio clock signal is, how to receive it, how to evaluate it and how to use it optimally together with the library RTCLib.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\\\/dcf77-radio-controlled-clock#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\\\/dcf77-radio-controlled-clock\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\\\/dcf77-radio-controlled-clock#primaryimage\",\"url\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/wp-content\\\/uploads\\\/2021\\\/02\\\/clock_2.png\",\"contentUrl\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/wp-content\\\/uploads\\\/2021\\\/02\\\/clock_2.png\",\"width\":2454,\"height\":2425},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\\\/dcf77-radio-controlled-clock#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Startseite\",\"item\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"DCF77 &#8211; Radio Controlled Clock\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en#website\",\"url\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en\",\"name\":\"Wolles Elektronikkiste\",\"description\":\"Die wunderbare Welt der Elektronik\",\"publisher\":{\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en#\\\/schema\\\/person\\\/b774e4d64b4766889a2f7c6e5ec85b46\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/en#\\\/schema\\\/person\\\/b774e4d64b4766889a2f7c6e5ec85b46\",\"name\":\"Wolfgang Ewald\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/wp-content\\\/uploads\\\/2019\\\/03\\\/cropped-Logo-1.png\",\"url\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/wp-content\\\/uploads\\\/2019\\\/03\\\/cropped-Logo-1.png\",\"contentUrl\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/wp-content\\\/uploads\\\/2019\\\/03\\\/cropped-Logo-1.png\",\"width\":512,\"height\":512,\"caption\":\"Wolfgang Ewald\"},\"logo\":{\"@id\":\"https:\\\/\\\/wolles-elektronikkiste.de\\\/wp-content\\\/uploads\\\/2019\\\/03\\\/cropped-Logo-1.png\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"DCF77 - Radio Controlled Clock &#8226; Wolles Elektronikkiste","description":"Here you will learn what the DCF77 radio clock signal is, how to receive it, how to evaluate it and how to use it optimally together with the library RTCLib.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/wolles-elektronikkiste.de\/en\/dcf77-radio-controlled-clock","og_locale":"en_US","og_type":"article","og_title":"DCF77 - Radio Controlled Clock &#8226; Wolles Elektronikkiste","og_description":"Here you will learn what the DCF77 radio clock signal is, how to receive it, how to evaluate it and how to use it optimally together with the library RTCLib.","og_url":"https:\/\/wolles-elektronikkiste.de\/en\/dcf77-radio-controlled-clock","og_site_name":"Wolles Elektronikkiste","article_published_time":"2021-02-20T15:45:57+00:00","article_modified_time":"2025-06-13T13:38:50+00:00","og_image":[{"width":2454,"height":2425,"url":"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2021\/02\/clock_2.png","type":"image\/png"}],"author":"Wolfgang Ewald","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Wolfgang Ewald","Est. reading time":"22 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/wolles-elektronikkiste.de\/en\/dcf77-radio-controlled-clock#article","isPartOf":{"@id":"https:\/\/wolles-elektronikkiste.de\/en\/dcf77-radio-controlled-clock"},"author":{"name":"Wolfgang Ewald","@id":"https:\/\/wolles-elektronikkiste.de\/en#\/schema\/person\/b774e4d64b4766889a2f7c6e5ec85b46"},"headline":"DCF77 &#8211; Radio Controlled Clock","datePublished":"2021-02-20T15:45:57+00:00","dateModified":"2025-06-13T13:38:50+00:00","mainEntityOfPage":{"@id":"https:\/\/wolles-elektronikkiste.de\/en\/dcf77-radio-controlled-clock"},"wordCount":2390,"commentCount":4,"publisher":{"@id":"https:\/\/wolles-elektronikkiste.de\/en#\/schema\/person\/b774e4d64b4766889a2f7c6e5ec85b46"},"image":{"@id":"https:\/\/wolles-elektronikkiste.de\/en\/dcf77-radio-controlled-clock#primaryimage"},"thumbnailUrl":"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2021\/02\/clock_2.png","keywords":["DCF-1060N-800","DCF-3850N-800","DCF77","DCF77 Receiver Module","decoding","parity","parity bit","RTCLib","softRTC","time signal"],"articleSection":["Other parts","wireless"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/wolles-elektronikkiste.de\/en\/dcf77-radio-controlled-clock#respond"]}]},{"@type":"WebPage","@id":"https:\/\/wolles-elektronikkiste.de\/en\/dcf77-radio-controlled-clock","url":"https:\/\/wolles-elektronikkiste.de\/en\/dcf77-radio-controlled-clock","name":"DCF77 - Radio Controlled Clock &#8226; Wolles Elektronikkiste","isPartOf":{"@id":"https:\/\/wolles-elektronikkiste.de\/en#website"},"primaryImageOfPage":{"@id":"https:\/\/wolles-elektronikkiste.de\/en\/dcf77-radio-controlled-clock#primaryimage"},"image":{"@id":"https:\/\/wolles-elektronikkiste.de\/en\/dcf77-radio-controlled-clock#primaryimage"},"thumbnailUrl":"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2021\/02\/clock_2.png","datePublished":"2021-02-20T15:45:57+00:00","dateModified":"2025-06-13T13:38:50+00:00","description":"Here you will learn what the DCF77 radio clock signal is, how to receive it, how to evaluate it and how to use it optimally together with the library RTCLib.","breadcrumb":{"@id":"https:\/\/wolles-elektronikkiste.de\/en\/dcf77-radio-controlled-clock#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/wolles-elektronikkiste.de\/en\/dcf77-radio-controlled-clock"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/wolles-elektronikkiste.de\/en\/dcf77-radio-controlled-clock#primaryimage","url":"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2021\/02\/clock_2.png","contentUrl":"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2021\/02\/clock_2.png","width":2454,"height":2425},{"@type":"BreadcrumbList","@id":"https:\/\/wolles-elektronikkiste.de\/en\/dcf77-radio-controlled-clock#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Startseite","item":"https:\/\/wolles-elektronikkiste.de\/en"},{"@type":"ListItem","position":2,"name":"DCF77 &#8211; Radio Controlled Clock"}]},{"@type":"WebSite","@id":"https:\/\/wolles-elektronikkiste.de\/en#website","url":"https:\/\/wolles-elektronikkiste.de\/en","name":"Wolles Elektronikkiste","description":"Die wunderbare Welt der Elektronik","publisher":{"@id":"https:\/\/wolles-elektronikkiste.de\/en#\/schema\/person\/b774e4d64b4766889a2f7c6e5ec85b46"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/wolles-elektronikkiste.de\/en?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/wolles-elektronikkiste.de\/en#\/schema\/person\/b774e4d64b4766889a2f7c6e5ec85b46","name":"Wolfgang Ewald","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/03\/cropped-Logo-1.png","url":"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/03\/cropped-Logo-1.png","contentUrl":"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/03\/cropped-Logo-1.png","width":512,"height":512,"caption":"Wolfgang Ewald"},"logo":{"@id":"https:\/\/wolles-elektronikkiste.de\/wp-content\/uploads\/2019\/03\/cropped-Logo-1.png"}}]}},"_links":{"self":[{"href":"https:\/\/wolles-elektronikkiste.de\/en\/wp-json\/wp\/v2\/posts\/11131","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wolles-elektronikkiste.de\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wolles-elektronikkiste.de\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wolles-elektronikkiste.de\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wolles-elektronikkiste.de\/en\/wp-json\/wp\/v2\/comments?post=11131"}],"version-history":[{"count":14,"href":"https:\/\/wolles-elektronikkiste.de\/en\/wp-json\/wp\/v2\/posts\/11131\/revisions"}],"predecessor-version":[{"id":24108,"href":"https:\/\/wolles-elektronikkiste.de\/en\/wp-json\/wp\/v2\/posts\/11131\/revisions\/24108"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/wolles-elektronikkiste.de\/en\/wp-json\/wp\/v2\/media\/11072"}],"wp:attachment":[{"href":"https:\/\/wolles-elektronikkiste.de\/en\/wp-json\/wp\/v2\/media?parent=11131"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wolles-elektronikkiste.de\/en\/wp-json\/wp\/v2\/categories?post=11131"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wolles-elektronikkiste.de\/en\/wp-json\/wp\/v2\/tags?post=11131"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}