Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Retrieving the time

Status
Not open for further replies.

Hippogriff

Member
Hi - long time since I've been here...

I've got an idea for a one-off project I'd like to do. I would like my circuit to be able to retrieve the time of day... day of week, month of year, year is not important to me - I just want to know if, say, it is after six (18:00) before midnight (00:00). Because I'm only making one of this thing, that means I'm not too concerned about whether the solution costs a fair amount... but I'm looking for something relatively easy and simple (aren't we all?).

I'll want to be able to read the value into a PIC where my program logic will be. I'd like the circuit's ability to get the time of day to survive power cycles, so I guess I'm looking for something connected wirelessly - either to the Internet and some kind of time server or via radio and some atomic clock? I'm just musing here... I'm in the UK so I'm not sure what's available to me.

Is there such a component or board that will allow a circuit to 'remotely' get time information and which can then be retrieved by a PIC?

I'm sure someone out there must have needed to do this before.

P.S. - basically, the reason for after 18:00 and before 00:00 is that I only want the circuit to do it stuff at night (or when it's dark), but I don't want it working all through the night, so I figured an LDR is not appropriate. Also, keeping some kind of time counter within the PIC ain't gonna work as the circuit might get powered off and it'd need resetting, obviously. Any assistance / pointers greatly appreciated.
 
I'd like the circuit's ability to get the time of day to survive power cycles, so I guess I'm looking for something connected wirelessly - either to the Internet and some kind of time server or via radio and some atomic clock? I'm just musing here... I'm in the UK so I'm not sure what's available to me.
You seem to have MSF available: https://www.npl.co.uk/science-techn...ducts-and-services/time/msf-radio-time-signal
P.S. - basically, the reason for after 18:00 and before 00:00 is that I only want the circuit to do it stuff at night (or when it's dark), but I don't want it working all through the night, so I figured an LDR is not appropriate. Also, keeping some kind of time counter within the PIC ain't gonna work as the circuit might get powered off and it'd need resetting, obviously. Any assistance / pointers greatly appreciated.
If an LDR detects the onset of darkness, then why don't you just use that to turn your lights on and wait until six hours have passed before turning your lights off.
 
Thank you for this... I like the lateral thinking. However, obviously the onset of darkness is not constant, but I would like the end time to be constant. This is one reason why I've been thinking about something that can provide me with the time of day. I do actually like the idea of the start period tying in with ambient light levels, so that aspect not being constant would be kinda cool and may well be something I implement.
 
An MSF timecode receiver is available here: **broken link removed**
Alternately, you can use a GPS module for the time. An RTC module could also do the job, albeit with some drift.
 
Ordered. Seemed to be cheapest, for me, directly from their website, as opposed to their eBay UK listing. £10 to give it a go...
 
How about a GPS receiver?
 
Internet has lots of time servers accessible through NTP protocol from inside PC (if connected to the Internet of course), so you don't need an external device to always have correct time.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top