Reliable Current Time in Buildings

Hello folks,

I´m Building a datalogger, which writes its measurements to SD-Card. The current time is needed to identify the order of the logs and to backtrack the log to the day and hour of creation.
Accuracy is not that important, when it´s reproducable. E.g. idc if my "clock" runs some minutes late as long as it is doing it always. Every 5 minutes a log is written to sd-card, so this determines the reproducability-needs.
Further requirements are positional independance and small footprint.

I have found multiple Solutions to this problem but im unsure which one to choose.

  • DCF77 or other time signal senders: position of ferrite antenna determines signal strength -> Other antenna(no space for that), second DCF77-receiver(90° to first one) or servo to turn the antenna(in that case it would be mounted outside of the case looking like a little Radio telescope; funny, but error-prone)
  • GPS: You would only need 1 satelite-connection, but IDK if that works in a building.
  • GSM: Nitz: you need a sim-card and nitz-coverage is not guaranteed
  • RTC: User would have to type in current time. Thats not very appealing. But as a last resort or in conjunction with another sensor, i would choose it. (Reproducabilty can be a problem after some months/years and i can´t take care of summer/winter time because i don´t know the date)
  • NTP: There is no reliable Wifi-Connection.
  • used "High Precision Rubidium Atomic Clock": too expensive ~ 200 bucks and too big

To my questions:

  • How are the chances GPS would work in a building and/or shipping container? (I don´t mean positioning, just time information)
  • If it would probably work, how long would it take approximately?
  • Are there any unlisted options of gathering the current time?
  • Any general and/or to-this-question-specific Pros and Cons of the available options?

P.S.:
Right now I would choose a rtc in conjunction with dcf77-receiver, that syncs the rtc if it works. And when time isn´t reasonable, user will be prompted to enter current time. (In my case unreasonable would be between 18:00 and 8:00 o'clock.)
But i would rather use a GPS module if possible as the user has to know less about operation/maintenance.

Edit 1:
During further research i also came across Radio Data System (RDS), but RTC and GPS are already bought and RTC is even soldered.
GPS works in my building when placing the antenna about a meter from the window. I´m going to update my post, when I make further progress.

Btw my Location is Bavaria/Germany.

Building vary a great deal of course.

Could you describe the building where this data logger is going to work, size, number of floors, construction type etc..........

I would think easiest for the user is to use GPS or DCF77 to set a RTC. Have a startup procedure that lets the user know when the clock has been set. If they have to take it outside initially, so be it. After that, if you happen to get external time, use it, otherwise rely on the RTC.

Generally, GPS won't work in a building unless it's close to a window. I'd expect a shipping container to be worse.

GPS will not work under a metal roof. You need an external antenna and a cable extension. I only use NEO-7 GPS modules because they have two mounting holes and a provision to mount an SMA connector.

Setting the RTC is a one off, shouldn't be too much to ask for from a user. If you can ship with battery in place, you can even do that as you're programming the device in the factory.

srnet:
Could you describe the building where this data logger is going to work, size, number of floors, construction type etc..........

It´s a two floor building out of reinforced concrete with a good amount of windows (2 of 4 sides are mostly windows). Distance to a window is between 1 and 5 meter and it´s located in the lower floor.
But as they other answers suggest, the chances are not that good but it could work.
So im going to order a gps module and try it.

wvmarle:
Setting the RTC is a one off, shouldn't be too much to ask for from a user. If you can ship with battery in place, you can even do that as you're programming the device in the factory.

You´re right, but it is technically a requirement for this project (boss wants it that way).
But since there will be only 1 device and it is only used in-house, it wouldn´t be dramatic.

That´s no option. The device should be easily moveable. But i´ll remember that for the future.

wildbill:
I'd expect a shipping container to be worse.

I´m excited to find out.

deeperrr:
But as they other answers suggest, the chances are not that good but it could work.
So im going to order a gps module and try it.

By all means try it.

Do appreciate that since the GPS satellites are constantly moving, so favourable positioning of the satellites could mean it works sometimes, but its unlikly to work all the time.

Sometimes GPS in combination with an RTC should do quite well. The device is mobile - bring it to the window if you want to set (or sync) the time.

A local GPS module requires whole-sky access to be reliable, a re-inforced concrete building is hopeless for this as the floors are full of metal re-bar. If you can have a remote GPS antenna/module mounted on the roof, then it should work nicely. GPS in a window is usually unreliable.

For a time signal one satellite should be enough.
For location, a window is indeed not ideal.

How about this:

Put the GPS antenna outside the bldg. The GPS is inside the bldg, connected to a Bluetooth module. The Bluetooth relays the GPS output without any programming effort. Its range is 10 metre.

The Bluetooth transmission can be be received by any computing device that is Bluetooth equipped -- PC, laptop, Arduino, phone.

Or:

The GPS/antenna/Bluetooth package positioned outside the bldg alongside a window. The BT transmission will pass thru the window.

The GPS/Bluetooth package only needs a power supply. No microprocessor such as an Arduino required.

John.

Perhaps others can comment on the feasibility of this notion:

The GPS module's output on its TX pin is a simple serial stream of data.

How far can that data stream be carried by wire? How far could the data stream be carried inside the bldg? Would it need boosting in some way?

There are devices that allow networking via a bldg's mains wiring. Could that be useful?

John.

Is location known?
I've been running DCF77, MSF, and GPS from southern England for some time.

For DCF77, I use Udo Kleins' Blinkenlight libraries and the same modified by Brett Oliver.

For reliability, cheap MSF clocks keep remarkably good time and three of them are second perfect.

When DCF77 is getting a good signal, Udo Kleins Superfilter works well and I use that to re-transmit around the house with XBees.

But as right now, the signal is broken up by weather and it struggles to output anything usable.

I have tried using the alarm output from the cheap clocks and transmit a synchronizing pulse at, say, midnight to correct remote RTCs.

For long term reliability, though, GPS has been the best.

Reception is unaffected by even the worst weather conditions.

I got over the inside building problem by parking the GPS (bog standard UBlox Neo6 module) module on the garage roof to get the best sky view.

The GPS module feeds serial into an XBee Series 1 module running in transparent mode.
This transmits to another XBee Series 1 inside the house, also in transparent mode, thus acting like a virtual wire. By using Xbees, you can move the receiver around for best reception without the burden of cables.

The receiver XBee feeds the Arduino Uno with any of the GPS libraries.
You could possibly daisy chain Xbees to increase the coverage.

The new XBee Series 3 modules can be loaded with firmware to accommodate the legacy Series 1 features.

Another advantage of the micro module format XBee is the Pro version has double the standard transmitter power at very little extra cost.

I got Series 3 Xbees from Digikey at about £14.