Hour,day ,month and year signal. - Page 1
Forum section: electronics / beginners

author: OC71
author_rank: Contributor
timestamp: April 03, 2016, 10:20:31 am
content: High all,Is there a signal available from somewhere that I can inputinto a microcontroller. It can be a serial string or 4 separate inputs forthe hour, day, month and year?I will use the uC to output high/low at specific times.

author: mikerj
author_rank: Super Contributor
timestamp: April 03, 2016, 10:38:22 am
content: You have the CHU time signal from Ottowa, but I don't know if there are any inexpensive receiver modules available for this so might be worth investigating.In the UK there are cheap modules that receive either the UK MSF signal or the German DCF77 signal are available, and clocks that integrate these are also cheap and easy to buy.

author: dfmischler
author_rank: Frequent Contributor
timestamp: April 03, 2016, 10:44:05 am
content: There are a lot of options. None of them are trivially easy, but there are shortcuts for some of them. You didn't say much about your target application and budget so it is hard to say which might be good or bad (or absurd because you want to use a tiny micro rather than an ARM running Linux).Receive a time code by radio and decode it (e.g.WWVBorCHU)Receive GPS and decode it. Lots of modules available for this, mainly giving one pulse per second and a serial time code stream.Connect to the Internet, perhaps wirelessly, and run the network time protocol.Decode cell phone transmissions from the nearest tower which include network time.

author: Ian.M
author_rank: Super Contributor
timestamp: April 03, 2016, 10:54:42 am
content: As long as you can get a good enough sky view for a GPS module to get a fix, you could use theNMEA0183 ZDA message, input via your MCU's UART module. GPS uses signals in the band 1.2 - 1.6 GHz which are blocked by significant thicknesses of soil, rock, masonry or damp wood etc., low-e glazing with a metal oxide film, and foil backed wall and loft insulation so indoor reception can be problematic. For a fixed installation, one can remote-mount the GPS module and even get ones with a weatherproof enclosure suitable for outdoor mounting to get a good signal.Otherwise, if you can tolerate some timing drift over an extended interval, use a RTC (real time clock) chip or module. Good quality ones in a 'shirtsleeve' temperature range environment can have drift as low as 5 minutes/year (10ppm)

author: OC71
author_rank: Contributor
timestamp: April 03, 2016, 12:34:25 pm
content: Thanks everyone, I will check out the suggestions.The uC will be used to control power to my hot water tank duringoff-peak periods.The programmable timer provided by the power company is notsmart enough to deal with statutory holidays.

author: Photon939
author_rank: Regular Contributor
timestamp: April 04, 2016, 03:02:59 pm
content: Have you looked at real time clock chips like the Dallas DS1307 or something more modern? They have a serial interface and take care of timekeeping with a regular 32.768khz watch crystal. The fancier ones are temperature compensated.

author: ade
author_rank: Unknown
timestamp: April 04, 2016, 03:33:23 pm
content: You'll want the better RTC module, DS3231. This RTC speaks I2C (there is also an SPI version) and has built-in calendaring functions so you can query the current date & time. It can also be programmed to interrupt once a second, once a minute, or on a specified date/time. There is built-in circuity to provide battery backup in case power is lost (highly recommended to implement).The RTC is somewhat pricey -- about $8 for the chip qty.1 from the usual distributors (DigiKey, etc).You can buy pre-build modules including battery backup from Adafruit ($14):https://www.adafruit.com/products/3013Or pick up Chinese eBay ones for around $2.

author: OC71
author_rank: Contributor
timestamp: April 05, 2016, 12:12:35 pm
content: Thanks Photon and ade ----- investigating.