Driver for DCF77 radio controlled clock#1911
Merged
openshwprojects merged 9 commits intoopenshwprojects:mainfrom Mar 20, 2026
Merged
Driver for DCF77 radio controlled clock#1911openshwprojects merged 9 commits intoopenshwprojects:mainfrom
openshwprojects merged 9 commits intoopenshwprojects:mainfrom
Conversation
Added missing "CHANGE" interrupt (rising and falling) for LN882H, W600/W800 and ESP (not yet tested)
Moved code from ISR to QuickTick funktion (else LN882H would crash)
Tested to work with
W800 ("CHANGE")
BL602 ("RISING" and "FALLING")
LN882H (both "CHANGE" and "RISING"/"FALLING" tested)
for testing at least compilation, added "#define ENABLE_DRIVER_DCF77 1" for more platforms ...
…ne in QuickTick function No need for Rising/falling edge definition, driver ony searches for "bit" gaps (100 or 200 ms) and ignore the "in between" gap to the next bit. Therefore no need to know, if rising or falling edge starts the bit.
Contributor
Author
openshwprojects
approved these changes
Mar 20, 2026
|
🎉 This PR is included in version 1.18.278 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Quite common in Germany are Radio Controlled Clocks, using the DCF77 broadcasted time signal as time source.

Since we now have a flexible clock, we can use this as clock source, too.
Starting with "startdriver DCF77"

optional arguments are
"fall" per default, a rising edge will mark the "bits", if you need a falling edge (e.g. if using a opto-isolator), use this argument
"httpstat" add some details from driver on main page
Arguments to "tune" reception (usually "0" is 100ms, "1" is 200 ms - you can change the "breaking" point with the below values (actual code uses 180 as default for both values)
"end0=X" set max duration of 0 bit to X ms
"start1=X" set min duration of 1 bit to X ms
This is some debug output:
It might also be used with an opto-isolator for devices with main on the IO pins:
This is my test with a BK7231N switch (powered by a PoE power supply with 48V) and the receiver input on the "switch" (since opto coupler inverts the signal, I used it with "fall" argument). I'm using a common PC-817 and a 220 ohm resistor for 3.3V for DCF77 device: