Author Topic: Hour,day ,month and year signal.  (Read 1888 times)

0 Members and 1 Guest are viewing this topic.

Offline OC71Topic starter

  • Contributor
  • Posts: 20
  • Country: ca
Hour,day ,month and year signal.
« on: April 03, 2016, 10:20:31 am »
High all,
 Is there a signal available from somewhere that I can input
into a microcontroller. It can be a serial string or 4 separate inputs for
the hour, day, month and year?
I will use the uC to output high/low at specific times.
 

Offline mikerj

  • Super Contributor
  • ***
  • Posts: 3240
  • Country: gb
Re: Hour,day ,month and year signal.
« Reply #1 on: April 03, 2016, 10:38:22 am »
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.
 

Offline dfmischler

  • Frequent Contributor
  • **
  • Posts: 548
  • Country: us
Re: Hour,day ,month and year signal.
« Reply #2 on: April 03, 2016, 10:44:05 am »
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. WWVB or CHU)

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.
« Last Edit: April 03, 2016, 10:58:55 am by dfmischler »
 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 12860
Re: Hour,day ,month and year signal.
« Reply #3 on: April 03, 2016, 10:54:42 am »
As long as you can get a good enough sky view for a GPS module to get a fix, you could use the NMEA0183 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)
« Last Edit: April 03, 2016, 11:05:01 am by Ian.M »
 

Offline OC71Topic starter

  • Contributor
  • Posts: 20
  • Country: ca
Re: Hour,day ,month and year signal.
« Reply #4 on: April 03, 2016, 12:34:25 pm »
Thanks everyone, I will check out the suggestions.
 The uC will be used to control power to my hot water tank during
off-peak periods.
 The programmable timer provided by the power company is not
smart enough to deal with statutory holidays.
 

Offline Photon939

  • Regular Contributor
  • *
  • Posts: 111
  • Country: us
Re: Hour,day ,month and year signal.
« Reply #5 on: April 04, 2016, 03:02:59 pm »
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.
 

Offline ade

  • Supporter
  • ****
  • Posts: 231
  • Country: ca
Re: Hour,day ,month and year signal.
« Reply #6 on: April 04, 2016, 03:33:23 pm »
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/3013

Or pick up Chinese eBay ones for around $2.
 

Offline OC71Topic starter

  • Contributor
  • Posts: 20
  • Country: ca
Re: Hour,day ,month and year signal.
« Reply #7 on: April 05, 2016, 12:12:35 pm »
Thanks Photon and ade ----- investigating.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf