Skip to content

Conversation

@MaxineMuster
Copy link
Contributor

@MaxineMuster MaxineMuster commented Dec 19, 2025

Quite common in Germany are Radio Controlled Clocks, using the DCF77 broadcasted time signal as time source.
Bildschirmfoto vom 2025-12-19 19-07-30
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
Bildschirmfoto vom 2025-12-19 19-25-45

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:

Bildschirmfoto vom 2025-12-19 18-09-33

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:

IMG_20251219_182545202~2

MaxineMuster and others added 6 commits December 19, 2025 18:36
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant