how to build an automatic radio alarm clock  - Page 1
Forum section: electronics / beginners

author: amateur_25
author_rank: Regular Contributor
timestamp: October 31, 2013, 08:02:56 pm
content: 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

author: AG6QR
author_rank: Frequent Contributor
timestamp: October 31, 2013, 08:27:57 pm
content: 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.

author: IanB
author_rank: Super Contributor
timestamp: October 31, 2013, 08:52:08 pm
content: 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.

author: amateur_25
author_rank: Regular Contributor
timestamp: October 31, 2013, 10:21:55 pm
content: 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.

author: madires
author_rank: Super Contributor
timestamp: October 31, 2013, 11:18:22 pm
content: So it could be MSF. Please seehttp://www.npl.co.uk/science-technology/time-frequency/products-and-services/time/msf-radio-time-signalfor the details.

author: AG6QR
author_rank: Frequent Contributor
timestamp: October 31, 2013, 11:46:49 pm
content: 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.

author: IanB
author_rank: Super Contributor
timestamp: November 01, 2013, 12:13:43 am
content: Quote from: AG6QR on October 31, 2013, 11:46:49 pmA 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.

author: Kohanbash
author_rank: Regular Contributor
timestamp: November 01, 2013, 01:59:50 pm
content: 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.

author: Noize
author_rank: Regular Contributor
timestamp: November 01, 2013, 02:07:16 pm
content: Here's good site to read up on radio time signal for the UK.http://www.creative-science.org.uk/MSF.html

author: Bored@Work
author_rank: Super Contributor
timestamp: November 01, 2013, 02:15:37 pm
content: Quote from: amateur_25 on October 31, 2013, 08:02:56 pmA common way to build your own is to use a pre-made receiver module like thishttp://earthshineelectronics.com/collections/frontpage/products/msf-wwvb-time-receiver-moduleThey 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.QuoteBut you do know that such things like switches and routers exist, and that the consumer versions are dirt-cheap?

author: grumpydoc
author_rank: Super Contributor
timestamp: November 01, 2013, 09:13:01 pm
content: 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 expensiveOf 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.

author: SeanB
author_rank: Super Contributor
timestamp: November 02, 2013, 05:56:03 pm
content: 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.

author: Mr Smiley
author_rank: Frequent Contributor
timestamp: November 02, 2013, 07:10:51 pm
content: 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.

author: con-f-use
author_rank: Unknown
timestamp: November 02, 2013, 07:20:55 pm
content: I have found the German DCF77 to be the best option for Europe. Never had a problem. GPS reception indoors can be somewhat problematic.

author: madires
author_rank: Super Contributor
timestamp: November 02, 2013, 09:09:20 pm
content: For a standard DCF77 module please searchwww.reichelt.defor "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.