Pages: 1 [2]   Go Down
Author Topic: DCF77 library for Arduino - synchronize with atomic clock  (Read 16723 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 36
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

A little later than expected, the library now supports inverted pulses as input.

The constructor now has an optional parameter OnRisingFlank:
Code:
DCF77(DCF77Pin, DCFinterrupt, OnRisingFlank)
If OnRisingFlank set to false, the algorithm will trigger on falling edge.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi!

I wired a cheap DCF77 receiver from Pollin to an Arduino Uno: http://www.pollin.de/shop/dt/NTQ5OTgxOTk-/

It works out of the box. No extra components were necessary.

Then I ran the examples bundled with the DCF77 library. It turns out that SyncProvider is one minute ahead at the first sync. InternalClockSync works as expected.

Please find the output of InternalClockSync at http://pastebin.com/ZbtzWtqZ

The output of SyncProvider is here: http://pastebin.com/5DSfAkjZ
In line 4 of the output of SyncProvider it’s 12:01:00 actually. After the next sync the time is corrected (line 126).

Another output is here: http://pastebin.com/SWJBXFSy

I enabled VERBOSE_DEBUG and recorded a video of the output:
http://dl.dropbox.com/u/87685034/SyncProvider_3_converted.avi

I tried both examples a couple of times. The DCF77 signal is quite clear.

Any idea what’s going wrong?

Best regards
Franz
« Last Edit: November 01, 2012, 12:49:46 am by franzs » Logged

0
Offline Offline
Faraday Member
**
Karma: 24
Posts: 3487
20 LEDs are enough
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I implemented a DCF77 clock with an additional exponential filter in order to improve noise tolerance. You can find the experiment here: http://blog.blinkenlight.net/binary-clock/. This is actually part of a larger project where I intend to push the noise tolerance quite a lot further: http://blog.blinkenlight.net/2012/12/01/dcf77-project/.
Logged

Check out my experiments http://blog.blinkenlight.net

Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I am trying this module to get to work. According the example DCFSignal, the module seems to work, but the pulses seem to be to short so that the library cant interpret it (see attached screenshot). Does anyone have a clue how to fix that issue?


* dcf77signal.jpg (490.93 KB, 1225x757 - viewed 88 times.)
Logged

0
Offline Offline
Faraday Member
**
Karma: 24
Posts: 3487
20 LEDs are enough
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

How did you connect this module to your Arduino? This is a 3.3V module with ***very*** limited driving capability. In doubt I would say you are overloading the module.
Logged

Check out my experiments http://blog.blinkenlight.net

Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I connected the GND and the Vcc of the module with GND and the 5V-pin of the arduino. I tried connecting the signal pin with D2 of the arduino with and without a 10k pull up resistor. With the resistor, the signal on D2 stays at hi. Without the resistor the signal shows the behaviour seen in my attachment. The modules datasheet clearly states a supply voltage range from 1.2 V to 5 V, so there should be no overloading. The datasheet also states a maximum ripple of 10 mVeff. Maybe thats the problem. Does anyone know the ripple of the 5V supply voltage while arduino is connected to my PCs USB-port?
Logged

0
Offline Offline
Faraday Member
**
Karma: 24
Posts: 3487
20 LEDs are enough
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

The datasheet says maximum current 5uA. With a 10k pullup you draw 500uA. You are overloading it. You should try a 1M resistor.
Logged

Check out my experiments http://blog.blinkenlight.net

Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Actually the datasheets states an output current > 5µA, but i will try a 1M resistor. Maybe it works. It won't hurt anyway smiley-grin
Logged

0
Offline Offline
Faraday Member
**
Karma: 24
Posts: 3487
20 LEDs are enough
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes, but it also says current consumption <100uA. Obviously the >5uA gives you a hint about the capabilities of the module. If it could drive 500uA they would have written it. This kind of module is designed to go into a clock --> low current consumption is a design goal, extended driving capability is not. --> I would be very suprised if it would be able to drive 500uA. This is the reason why I bought one with additional driver transistors.
Logged

Check out my experiments http://blog.blinkenlight.net

Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The 1M resistor does part of the trick. The signal doesn't stay at high with the 1M resistor connected, but it shows the same signal sequence as without any resistor, so the signal peaks are still much shorter than stated in the spec smiley-sad
Logged

0
Offline Offline
Faraday Member
**
Karma: 24
Posts: 3487
20 LEDs are enough
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Maybe you already killed the module. I am using this one: http://www.voelkner.de/products/162756/Dcf-Empfaengerplatine.html
Logged

Check out my experiments http://blog.blinkenlight.net

Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Seems to be the same as this one. Maybe i drop by at the big blue C tomorrow to get it.
Logged

0
Offline Offline
Faraday Member
**
Karma: 24
Posts: 3487
20 LEDs are enough
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Conrad and Völkner are different brands of the same company. They just address different market segments. See here: http://de.wikipedia.org/wiki/Conrad_Electronic
Logged

Check out my experiments http://blog.blinkenlight.net

Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Didn't know that. Anyway the price is the same.
Logged

0
Offline Offline
Newbie
*
Karma: 1
Posts: 41
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

A little later than expected, the library now supports inverted pulses as input.

The constructor now has an optional parameter OnRisingFlank:
Code:
DCF77(DCF77Pin, DCFinterrupt, OnRisingFlank)
If OnRisingFlank set to false, the algorithm will trigger on falling edge.

Hello,

I think I have the same problem with the inverted signal, thank you for your hint.

But I don't know where in the code I put "false" in and which Version of the code did you use?

Thank you for help.

Kind Regards
Enam
« Last Edit: September 18, 2013, 05:39:21 am by Enam » Logged

Pages: 1 [2]   Go Up
Jump to: