DCF77 radio clock receiver for Ice Tube and Monochron
Moderators: adafruit_support_bill, adafruit

DCF77 radio clock receiver for Ice Tube and Monochron

by bastard on Thu Sep 09, 2010 7:57 am

Hi all,

I would like to discuss the following idea with you:

I would like to connect a DCF77 radio clock signal receiver to my Ice Tube / Monochron Clocks (I own two of both and two Bulbdial Clocks too). Unfortunately there are not much free pins left to connect a DCF77 receiver.

For Ice Tube Clock the pins PD0, PD1, PB4, PC1 and PC2 are free to use.
For Monochron the pins PD0, PD1, BP4 and PB5 are free to use.

Usually a DCF77 receiver delivers a signal which is 0.1s long for a binary 0 or 0.2s long for a binary 1. More details are all over the Internet if you wish to learn more. Now to my questions:

Which of the above pins are able to read such signals for storing the binary into values? I think none, right?

If I'm right, there comes another idea. I could connect the receiver to another microcontroller - maybe an ATTiny would be fine - and do all the reading, converting and storing there. The connection to the clocks could use the RXD/TXD (PD0/PD1) and the communication could be in a unix-timestamp-format or similar.

Which ATTiny would be o.k. for that task?

Any further thoughts?

Bye

Stefan
bastard
 
Posts: 54
Joined: Tue Aug 25, 2009 7:10 am
Location: Germany, Bavaria

Re: DCF77 radio clock receiver for Ice Tube and Monochron

by PurpleTentacle on Tue Oct 05, 2010 3:52 pm

Hi Stefan,

I am also working on connecting a DCF77 receiver to my monochron. I would prefer not to add an extra microcontroller (ATTiny-idea) to the clock.

The pins PB4 and PB5 are not free. They are connected to the display. The RXD (PD0) and TXD (PD1) pins can be very useful for sending/receiving debug messages to/from a PC. I would not use them for anything else, if possible. The Pin PC1 is free and can be used to connect the receiver. It is not an interrupt-pin so you have to poll.

Have you thougt of which timer you want to use? As all three timers are in use, i think i will do the polling in the interrupt function of timer 0, which is called once every millisecond.

If you still plan to use a second microcontroller, you should pick one with SPI. This makes serial communication to the main microcontroller a lot easier. In my opinion, ISP is also a must-have. Maybe you can use something like an ATTiny48. If you are searching for examples how to evaluate the serial data
on the main microcontroller, you can take a look at the code of the GPS-mod.

Fabian
PurpleTentacle
 
Posts: 2
Joined: Tue Oct 05, 2010 3:46 pm

Re: DCF77 radio clock receiver for Ice Tube and Monochron

by dataman on Wed Oct 06, 2010 4:35 pm

Latest version of MultiChron has GPS baked in.
I know, I wrote it!

Pretty much just hook up rx.
You should be able to modify that pretty easily.

And small correction, Yes Rx and TX are wired,
But only TX is really needed to output messages.
When debugging is disabled, there's no output on TX.
You could repurpose both.

If you still need a coprocessor...
Have you seen the Teensy?
It's an incredible little devide, and cheap.
Dataman
Charley Jones, crjones.com
Founder and President:
Sql Server Society of Las Vegas, SSSolv.com
XNA User Group, LVXug.Com
Las Vegas Make, LVMake.Com
Developer of the IntruderChron, MultiChron, & GOL 1.4 Mod, Crjones.Com/AdaMods
User avatar
dataman
 
Posts: 98
Joined: Wed May 20, 2009 7:03 pm

Re: DCF77 radio clock receiver for Ice Tube and Monochron

by bastard on Fri Oct 08, 2010 6:33 am

Hi Fabian,

PurpleTentacle wrote:I am also working on connecting a DCF77 receiver to my monochron. I would prefer not to add an extra microcontroller (ATTiny-idea) to the clock.


nice to hear, I'm not alone! Thanks for your thoughts. Here are mine:

PurpleTentacle wrote:The pins PB4 and PB5 are not free. They are connected to the display.


I do not agree. Take a look at the schematics. Pin PB4 is MISO, PB5 is SCK. They are only used during reprogramming the chip.

PurpleTentacle wrote:The RXD (PD0) and TXD (PD1) pins can be very useful for sending/receiving debug messages to/from a PC. I would not use them for anything else, if possible.


O.k.

PurpleTentacle wrote:The Pin PC1 is free and can be used to connect the receiver. It is not an interrupt-pin so you have to poll.


That's a problem - hopefully only in my mind. I have by now no idea how to poll that pin often enough to distinguish a binary 0 to a binary 1. Do you have an idea?

PurpleTentacle wrote:Have you thougt of which timer you want to use? As all three timers are in use, i think i will do the polling in the interrupt function of timer 0, which is called once every millisecond.


No, I havn't, because I never thought about polling that pin. But maybe there is a possibility to do it, I'll be fine with that.

PurpleTentacle wrote:If you still plan to use a second microcontroller, you should pick one with SPI. This makes serial communication to the main microcontroller a lot easier. In my opinion, ISP is also a must-have. Maybe you can use something like an ATTiny48. If you are searching for examples how to evaluate the serial data
on the main microcontroller, you can take a look at the code of the GPS-mod.


My plans so far are to use this receiver module - I have one already with this clock and it works fine. There is enough room inside the case to have a controller inside.

Stefan
bastard
 
Posts: 54
Joined: Tue Aug 25, 2009 7:10 am
Location: Germany, Bavaria

Re: DCF77 radio clock receiver for Ice Tube and Monochron

by PurpleTentacle on Sun Oct 24, 2010 4:48 pm

Hi all,

I've now connected a DCF77 receiver to pin PC1 of my monochron and it works fine! I made a fork of the MultiChron project on github to add the DCF support to the firmware. The sources can be found under:

http://github.com/PurpleTentacle/monochron

The hardware modifications are described in a howto document:

http://github.com/PurpleTentacle/monochron/raw/MultiChronDCF77/pdf/HowtoDCF77.pdf

@Stefan: It may be possible to connect your external DCF receiver to the clock in the same way, but you will probably have to modify the case to get it wired.

Fabian
PurpleTentacle
 
Posts: 2
Joined: Tue Oct 05, 2010 3:46 pm

Re: DCF77 radio clock receiver for Ice Tube and Monochron

by bastard on Thu Oct 28, 2010 2:17 pm

Hi Fabian,

PurpleTentacle wrote:I've now connected a DCF77 receiver to pin PC1 of my monochron and it works fine!


Great news! I can't wait until weekend to hack my monochron too. I'll post pics when done. If we ever meet in Germany, I'll spend you a beer!

PurpleTentacle wrote:@Stefan: It may be possible to connect your external DCF receiver to the clock in the same way, but you will probably have to modify the case to get it wired.


Yes, but putting it inside the case is more beautiful.

Thanks again!

Stefan
bastard
 
Posts: 54
Joined: Tue Aug 25, 2009 7:10 am
Location: Germany, Bavaria

Re: DCF77 radio clock receiver for Ice Tube and Monochron

by bastard on Sat Oct 30, 2010 4:18 pm

Hi all,

finished.

monochron dcf77 028 (Large).jpg
monochron dcf77 028 (Large).jpg (126.66 KiB) Viewed 4961 times


More pictures and the hole story (no radio signal while antenna inside the case ...) goes here. Enjoy!

Stefan
bastard
 
Posts: 54
Joined: Tue Aug 25, 2009 7:10 am
Location: Germany, Bavaria

Re: DCF77 radio clock receiver for Ice Tube and Monochron

by rickrump on Fri Dec 31, 2010 5:55 pm

Using Adafruit's "Basic GPS Module" PMB-648 with Monochron. Have attached +5, gnd to 7805 pads, Tx (yellow wire) to Pin 2 of uP, tied Rx to +5V. Getting NOLOCK and data stream "xxxxxxf>xxxxxxxx" (see photo). Have GPS located in same location (in basement south window) where my iPhone and my AT&T MicroCell both can "see" GPS satelittes and get a fix. Red LED on GPS module is solid.

So what am I doing wrong?

Thanks for any ideas.

Rick
GPS Setup Screen.JPG
GPS Setup Screen.JPG (117.12 KiB) Viewed 4590 times
rickrump
 
Posts: 46
Joined: Sat Jan 16, 2010 1:54 pm

Re: DCF77 radio clock receiver for Ice Tube and Monochron

by rickrump on Fri Dec 31, 2010 7:19 pm

Just curious how we know what the data rate coming out of the GPS module is? Does the GPS data standard set that? Only mention that because the data stream looks like it might be a data rate mismatch in the UART.

Rick
rickrump
 
Posts: 46
Joined: Sat Jan 16, 2010 1:54 pm

Re: DCF77 radio clock receiver for Ice Tube and Monochron

by adafruit on Sun Jan 02, 2011 1:51 pm

all GPS units use 4800 baud, but there are a few different wires, make sure you have the TTL 4800 baud TX wire
User avatar
adafruit
 
Posts: 11711
Joined: Thu Apr 06, 2006 4:21 pm
Location: nyc

Re: DCF77 radio clock receiver for Ice Tube and Monochron

by rickrump on Sun Jan 02, 2011 5:11 pm

Using Pin 1 (yellow) from GPS marked TxD. The RS232 TX is just marked Tx.

I attached the Bus Pirate to that wire and saw the expected NMEA sentence streams from it (at 4800 baud.) It's almost like the TX port on the 328 isn't getting set to the right data rate, but I looked at the code and see that it is set to 4800 bps.

The Monochron clock works in all other ways. I will try reloading the firmware, but according to the "About" screen, I have the latest loaded from GitHub. (1.1b)

Any other suggestions?

Rick
rickrump
 
Posts: 46
Joined: Sat Jan 16, 2010 1:54 pm

Re: DCF77 radio clock receiver for Ice Tube and Monochron

by adafruit on Sun Jan 02, 2011 6:00 pm

you want to connect to the microcontroller RX
User avatar
adafruit
 
Posts: 11711
Joined: Thu Apr 06, 2006 4:21 pm
Location: nyc

Re: DCF77 radio clock receiver for Ice Tube and Monochron

by rickrump on Sun Jan 02, 2011 6:23 pm

Yup, got that. Pin 2 on the 328. When it is NOT attached, I see NO data on the GPS setup screen. When it IS connected, I see the garbled data in my picture.

Rick
rickrump
 
Posts: 46
Joined: Sat Jan 16, 2010 1:54 pm

Re: DCF77 radio clock receiver for Ice Tube and Monochron

by adafruit on Sun Jan 02, 2011 6:55 pm

sorry, we didnt write the GPS mod but you're also posting in a completely different thread.
User avatar
adafruit
 
Posts: 11711
Joined: Thu Apr 06, 2006 4:21 pm
Location: nyc