Desperately trying to get a signal from DCF77 module

Hello,

I’m desperately trying to get a signal from a DCF77 module (http://www.reichelt.de/Bausaetze/DCF77-MODUL/3//index.html?ACTION=3&GROUPID=5727&ARTICLE=57772&OFFSET=16&WKID=0&). I think it’s wired up correctly, with +Vcc, GND and Signal to pin 2 on an Arduino Uno.

When I use the most basic example from the DCF77 library package (eg, DCFPulseLength) I can see that the internal LED on pin 13 blinks in 1 sec steps, and I believe I can see that the on and off periods are different as they should be. I can also attach an external LED to, say, pin 7 and let it blink the same way. However, as soon as I switch on the serial monitor the blinking stops and no output is produced. Why is that? As soon as I close the serial monitor the LED starts blinking again.

Other examples from the library package don’t work, no matter what I do. However, in these very basic sketch there is nothing involved from the DCF77 library.

Is there something about the Arduino serial monitor which interferes with what I’m doing?

Best regards,

Enno

This is the ultimate DCF77 project - http://blog.blinkenlight.net/2012/12/01/dcf77-project/ -

read and shiver learn

Thanks for your reply - but that’s not my problem: the DCF77 module seems to be getting a good signal and can make an LED blink happily. But as soon as I start the serial monitor the chip seems to stop talking to the DCF77 module.

Enno

But as soon as I start the serial monitor the chip seems to stop talking to the DCF77 module.

What chip stops talking to the DCF77 module?

Where IS your code?

Apologies for the confusion - I meant to say that the LED on pin 13 stops blinking as soon as I start the serial monitor, and continues blinking when I close it. However, no messages appear on the serial monitor while it is up. The link speed is set to 9600 baud.

Code is the following unmodified example sketch "DCFPulseLength", which is as part of the DCF77 library from http://thijs.elenbaas.net/downloads/?did=1:

/*
 * DCFPulseLength.ino - DCF77 debug Example
 * Thijs Elenbaas, 2012
 * This example code is in the public domain.

  This simple example shows the pulse-to-pulse time and pulse lengths
  coming from the DCF decoder.
  
  Notice that will the DCF specification says that pulses should be either
  100 or 200 ms, we notice longer pulse lengths. This is likely due to to
  the hardware of the decoder. For optimal distinction between long and 
  short pulses in the DCF library, set the parameter 
  #define DCFSplitTime in DCF77.h to (Tlongpulse+Tlongpulse)/2       
*/

#define BLINKPIN 13
#define DCF77PIN 2

int flankUp = 0;
int flankDown = 0;
int PreviousflankUp;
bool Up = false;

void setup() {
  Serial.begin(9600);
  pinMode(DCF77PIN, INPUT);
  pinMode(BLINKPIN, OUTPUT);
}

void loop() {
  int sensorValue = digitalRead(DCF77PIN);
    if (sensorValue) {
      if (!Up) {
        flankUp=millis();
        Up = true;
        digitalWrite(BLINKPIN, HIGH);
      }
    } else {
      if (Up) {
        flankDown=millis();
        Serial.print("Cycle: ");
        Serial.print(flankUp-PreviousflankUp);
        Serial.print(" Pulse :");
        Serial.println(flankDown - flankUp);
        PreviousflankUp = flankUp;
        Up = false;
        digitalWrite(BLINKPIN, LOW);
      }              
    }
  
}

I was hesitant to post it here initially, my bad!

Enno

    if (sensorValue) {

sensorValue is not a boolean. Do not use it like one.

Have you seen this? http://thijs.elenbaas.net/2012/04/arduino-dcf77-radio-clock-receiver-hardware-2/

I now have a similar module like the one you mentioned (http://thijs.elenbaas.net/2012/04/arduino-dcf77-radio-clock-receiver-hardware-2/), with an open collector output using a pull-up resistor. Thinks are working now, I can sync the Arduino's time and it doesn't stop working when I switch on the serial monitor.

Anyway, thanks for your replies, that is much appreciated.

Enno