Author Topic: how to build an automatic radio alarm clock  (Read 5406 times)

0 Members and 1 Guest are viewing this topic.

Offline amateur_25Topic starter

  • Regular Contributor
  • *
  • Posts: 106
how to build an automatic radio alarm clock
« on: October 31, 2013, 08:02:56 pm »
I have a clock that automatically sets the time automatically. Am not too sure how this works but how feasible is it for me to build one myself? Is just a one chip solution? I would like it to have an alarm feature as well. I do have access to an ethermet chip but I'd rather not go down that route because I only have one ethernet socket in my room
 

Offline AG6QR

  • Frequent Contributor
  • **
  • Posts: 857
  • Country: us
    • AG6QR Blog
Re: how to build an automatic radio alarm clock
« Reply #1 on: October 31, 2013, 08:27:57 pm »
You don't say where you're located.  There are several stations that broadcast time, but most reliably cover only a portion of the globe, so you've got to select the right one.  In and near North America, it's common to use WWVB for this purpose.  There are stations which are similar in concept, but different in frequency and protocol details, in Europe and Japan.  Google "wwvb dcf77 msf jjy" for more info.  Worldwide, it's possible to use GPS, but the antenna requirements and receiver design are very different.  In some places, signals from cell phone towers may be used.
 

Offline IanB

  • Super Contributor
  • ***
  • Posts: 11891
  • Country: us
Re: how to build an automatic radio alarm clock
« Reply #2 on: October 31, 2013, 08:52:08 pm »
Many people seem to use GPS these days for homebrew solutions. Check out places like Adafruit or Sparkfun for GPS time modules you can interface to.
 

Offline amateur_25Topic starter

  • Regular Contributor
  • *
  • Posts: 106
Re: how to build an automatic radio alarm clock
« Reply #3 on: October 31, 2013, 10:21:55 pm »
Sorry I didn't realise it made such a big differance. I live the uk Manchester. Cell Phone reception in our house is passable. However like I said the clock we have in the living room works just fine.
 

Offline madires

  • Super Contributor
  • ***
  • Posts: 7765
  • Country: de
  • A qualified hobbyist ;)
 

Offline AG6QR

  • Frequent Contributor
  • **
  • Posts: 857
  • Country: us
    • AG6QR Blog
Re: how to build an automatic radio alarm clock
« Reply #5 on: October 31, 2013, 11:46:49 pm »
I don't know how much you're wanting to build and design yourself, or how much you want to buy.  But I'll offer an idea which worked very well for me, when I wanted to build a tiny home automation controller that would keep accurate time perpetually without manual resets.

I took a commercially available alarm clock that set itself from our country's radio time service (a WWVB receiving clock made by Oregon Scientific, not that this detail matters) and set it to sound its alarm at a specific time each day.  I wrote my home automation software to run on a PIC16F628 microprocessor.  These days many hackers would use an arduino of some flavor instead, but it doesn't matter.  I altered the clock so that instead of having the alarm signal go to the piezo buzzer, it went to an earphone jack.  I took that signal and fed it, via an inverting one transistor amplifier (level converter) to an interrupt pin on the microprocessor.  The microprocessor was programmed so that, when it got an interrupt on that pin, it would set its internal clock, and then disable that pin's interrupts for a few minutes.

I implemented a real time clock on the microprocessor, with a timer-based interrupt that was driven by the same crystal oscillator that ran the microprocessor.   This was more than adequate to keep accurate time for several days.  My requirements for precision were modest, but my goal was simply to eliminate the sort of long term drift that would require me to manually set the clock.  So the commercial clock took care of receiving the radio signal and "poking" my microprocessor at the same time each day, thus keeping my microprocessor's internal clock perpetually accurate to within a second or so.  This worked for many years until I finally ported my home automation software to run on an internet-connected beagleboard running NTP.  It even automatically handled the daylight saving time adjustments in spring and fall.

There are wristwatches available that can handle the receiving details for you.  Hack in to one, supply it with power, tap into its alarm output, and you could fit it inside of your own custom made clock.

There are many other options for receiving the time, as well.  Many are more elegant.  But few are as simple to implement for a one-off hacker's project.
 

Offline IanB

  • Super Contributor
  • ***
  • Posts: 11891
  • Country: us
Re: how to build an automatic radio alarm clock
« Reply #6 on: November 01, 2013, 12:13:43 am »
I took a commercially available alarm clock that set itself from our country's radio time service...

A word of warning about relying on this. I have a clock that automatically sets itself each night from the Colorado time signal, but in recent months I have increasingly found it has reset itself to the wrong time in the morning. I'm not sure why as I thought the time signal had a checksum in it, but anyway, do not treat such solutions as 100% trustworthy. If you set up such a system it would be a good idea to include a gross error detection check.
 

Offline Kohanbash

  • Regular Contributor
  • *
  • Posts: 175
  • Country: us
    • Robots for Roboticists
Re: how to build an automatic radio alarm clock
« Reply #7 on: November 01, 2013, 01:59:50 pm »
I also use the Colorado time signal.

I am pretty sure that there is no checksum/error-detection in the older AM signal. The newer (last year or two) alternate PM signal has some *very* basic error detection.

You can do some basic sanity checking to make sure the data seems good before updating your time with it.

Usually when I see the wrong time I blame the batteries in the clock. If it is just a difference in hour you can check that the timezone/DST is configured properly.
Robots for Roboticists Blog - http://robotsforroboticists.com/
 

Offline Noize

  • Regular Contributor
  • *
  • Posts: 183
  • Country: gb
Re: how to build an automatic radio alarm clock
« Reply #8 on: November 01, 2013, 02:07:16 pm »
Here's good site to read up on radio time signal for the UK.
http://www.creative-science.org.uk/MSF.html
 

Offline Bored@Work

  • Super Contributor
  • ***
  • Posts: 3932
  • Country: 00
Re: how to build an automatic radio alarm clock
« Reply #9 on: November 01, 2013, 02:15:37 pm »
I have a clock that automatically sets the time automatically. Am not too sure how this works but how feasible is it for me to build one myself?

A common way to build your own is to use a pre-made receiver module like this http://earthshineelectronics.com/collections/frontpage/products/msf-wwvb-time-receiver-module They are relatively cheap and typically just work. I have even found such modules in cheap supermarket "radio clocks", so you can maybe get one by checking out  broken clocks.

You connect these modules to a microcontroller and then comes the hard or easy work:

Hard work: You write the decoder yourself.
Easy work: You google for some decoder software and use that.

Then you add whatever fancy feature you like by writing the code for it.

Quote
I'd rather not go down that route because I only have one ethernet socket in my room

But you do know that such things like switches and routers exist, and that the consumer versions are dirt-cheap?
I delete PMs unread. If you have something to say, say it in public.
For all else: Profile->[Modify Profile]Buddies/Ignore List->Edit Ignore List
 

Offline grumpydoc

  • Super Contributor
  • ***
  • Posts: 2905
  • Country: gb
Re: how to build an automatic radio alarm clock
« Reply #10 on: November 01, 2013, 09:13:01 pm »
b@w basically beat me to what I was going to say - you can get small radio modules for either the MSF "rugby" signal (now located at Anthorn, Cumbria) or the German DCF77 signal - the modules cost about a tenner and can easily be found on the 'net. GPS modules for Arduino's are typically three to four times as expensive

Of course all that gets you is the raw data stream which needs decoding so you need to hook it up to a micro of some sort and display to make a useful clock. Oh and some way of making noise if you want an alarm clock.

A fun project though.

Or just buy one - you can get a wall clock which uses the MSF signal from Argos for £12.99 and Amazon stock a bedside alarm for a quid less.

If I want to know what time it is I have a DCF77 wall clock in the office (which frequently goes mad and shows a random hour), DCF77 driven watch, MSF driven kitchen clock, NTP to all the computers and a GPSDO which also provides a time output on it's serial port.
 

Offline SeanB

  • Super Contributor
  • ***
  • Posts: 16284
  • Country: za
Re: how to build an automatic radio alarm clock
« Reply #11 on: November 02, 2013, 05:56:03 pm »
I use a $10 GPS bluetooth module, with built in lithium battery, and removed battery and used the RS232 data it sends on the USB pins ( had to make an adaptor with a old USB-TTL converter in line to get it to USB data) and simply use the virtual com port to get the data ( at 38400baud) and then just parse it to get the UTC time from the raw data. Not used by any applications, I just look at the raw NMEA data and parse it myself to get info I want.
 

Offline Mr Smiley

  • Frequent Contributor
  • **
  • Posts: 324
  • Country: gb
Re: how to build an automatic radio alarm clock
« Reply #12 on: November 02, 2013, 07:10:51 pm »
Hi,

The UK MSF and German DCF77 clock modules receive a 60Khz(UK) or 77.5Khz(German) AM signal. These AM carrier frequency’s can also be used as frequency standards as they are derived from atomic clocks.

The clocks that have these modules in don't read the time from the signals all the time; what they do do, is have a RTC running from a 32.758Khz crystal, and every hour they sync the RTC time with the time received from the module, normally ten to the hour and indicate an accurate 'sync' by showing a symbol on the display. A failed 'sync' is indicated by a missing symbol.

Depending on which receiver you use, you will find the aerial is directional, ( Can't remember off hand (gettin old)) If the msf aerial has to be in the north/south plane, then you will find the DCF77 has to be in the east/west plane. You'll find they sync on one wall but not the wall at right angles next to it.

Also, with the MSF signal the 5 seconds to the minute has a unique none repeatable code that precedes the zero second marker that you look for when starting to decode the time code.

When you first power them on they automatically start looking for the time code and when read. update the RTC.

There pretty easy to decode, and if you do your own you can display other info in the transmitted data that many other clocks don't bother with.

 :)

« Last Edit: November 03, 2013, 12:53:00 am by Mr Smiley »
There is enough on this planet to sustain mans needs. There will never be enough on this planet to sustain mans greed.
 

Offline con-f-use

  • Supporter
  • ****
  • Posts: 807
  • Country: at
Re: how to build an automatic radio alarm clock
« Reply #13 on: November 02, 2013, 07:20:55 pm »
I have found the German DCF77 to be the best option for Europe. Never had a problem. GPS reception indoors can be somewhat problematic.

« Last Edit: November 02, 2013, 07:27:16 pm by con-f-use »
 

Offline madires

  • Super Contributor
  • ***
  • Posts: 7765
  • Country: de
  • A qualified hobbyist ;)
Re: how to build an automatic radio alarm clock
« Reply #14 on: November 02, 2013, 09:09:20 pm »
For a standard DCF77 module please search www.reichelt.de for "DCF77 MODUL" (€14). That kind of module is used in most alarm clocks and weather stations. It outputs pulses (short and long) which need to be decoded by a MCU.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf