MicroST
Created April 29, 2017 © GPL3+

BF_DCF77 interface

How decode the DCF77 signal without a dedicated reciever

IntermediateProtip241
BF_DCF77  interface

Things used in this project

Story

Read more

Schematics

BF_ DCF77 schematic

This circuiti recovers the envelope of tbe BF signal coming from the output of the radio /PC and digitalizes it.

bf_dcf77_coll_to05oP8xGv.jpg

How to connect the Arduino ( MEGA 2560) to the BF_DCF77

Code

Arduino code (use reference library) to decode dcf 77 signal coming from BF_ DCFF7 interface

Arduino
Please compile and load in your arduino
#include <Time.h>
#include <TimeLib.h>


#include "DCF77.h"
#include "Time.h"


#define DCF_PIN 2           // Connection pin to DCF 77 device
#define DCF_INTERRUPT 0    // Interrupt number associated with pin

time_t time;
DCF77 DCF = DCF77(DCF_PIN, DCF_INTERRUPT);

void setup() {
  Serial.begin(9600);
  DCF.Start();
  Serial.println("Waiting for DCF77 time ... ");
  Serial.println("It will take at least 2 minutes until a first update can be processed.");
}

void loop() {
  delay(1000);
  time_t DCFtime = DCF.getTime(); // Check if new DCF77 time is available
  if (DCFtime != 0)
  {
    Serial.println("Time is updated");
    setTime(DCFtime);
    Serial.println (DCFtime);
  }
  digitalClockDisplay();
}

void digitalClockDisplay() {
  // digital clock display of the time
  Serial.print(hour());
  printDigits(minute());
  printDigits(second());
  Serial.print(" ");
  Serial.print(day());
  Serial.print(" ");
  Serial.print(month());
  Serial.print(" ");
  Serial.print(year());
  Serial.println();
}

void printDigits(int digits) {
  // utility function for digital clock display: prints preceding colon and leading 0
  Serial.print(":");
  if (digits < 10)
    Serial.print('0');
  Serial.print(digits);
}

Credits

MicroST
12 projects • 20 followers
Electronic is my life passion...
Contact

Comments

Please log in or sign up to comment.