[Freedombox-discuss] Time

Paul Gardner-Stephen paul at servalproject.org
Fri Dec 13 05:08:50 UTC 2013

Hello Doug,

I agree that a dedicated open-hardware time keeping appliance is the ideal

In the meantime, using mobile phones with only open-source software would
be possible for this particular use-case, because none of the tricky
closed-source drivers would be required.  The CPU can be throttled up and
down and the screen can be turned on and off to provide the low-power
heaters, and the CPU temperature sensor can be easily read, also.  GPS is
trickier, but isn't actually needed for the simpler use-case of just
maintaining as accurate time as possible.

In terms of a cheap, low-power open-hardware device that can maintain
reasonably accurate timing using GPS, an interesting approach would be to
just listen for any one GPS satellite, and detect the start of the 30sec TX
blocks, and re-synchronise to that.  The signal processing would likely be
much simpler than a full GPS decoder, and as a result power consumption
would also be lower, and a fully open design would be feasible.  The
down-side is that the timing pulses would only be accurate to ~50ms or so,
because of the difference in distance between satellite and receiver as the
satellites pass overhead.  However, that coarse-grained "absolute time"
could be complemented with more local methods to obtain fine-grained timing
around that.  Not claiming that it would necessarily be trivial, but it
might just be practical.


On Fri, Dec 13, 2013 at 2:43 PM, Doug <dj0fb at frombob.to> wrote:

> On 12/12/2013 07:02 PM, Adrian Gropper wrote:
>> How close could we get with just software on an Android phone? The phone
>> would be disabled to whatever point it took to maintain a counter,
>> charge the battery, occasionally listen for GPS or wifi. How stable
>> could that be?
>> Adrian
> To my mind, anything to do with Freedombox should be 100% open source
> software, and open hardware, as much as possible.  Smartphones don't belong
> anywhere near that sentence, except perhaps for things like Openmoko and
> its descendants, which are currently rare and fairly expensive.
> And there's the Unix philosophy:  Do one thing, and do it well.  An
> inexpensive little box that keeps accurate time well and does nothing else
> appeals to me.
> In an ideal world, perhaps in a few years we'll have entirely open
> Freedombox hardware that includes an OCXO module, so it can keep accurate
> time for long periods without asking anyone for help.  (Putting the crystal
> in a regulated oven increases its accuracy by one or two orders of
> magnitude, and so increases the time interval between needed updates by the
> same factor.)
> An excellent source of accurate time is the GPS system (and the other
> similar satellite systems coming along).  GPS cannot track who is listening
> to it, unless you're using assisted GPS.  But those signals don't pass well
> through structures.
> In a few years perhaps GPS receivers will be cheap enough so that one
> could be added to a timekeeper appliance without adding significantly to
> its cost.  Then you could unplug your appliance and take it outside
> periodically for an update.
> The key question is, how accurately do we need to know the time.  If a
> clock can keep time to an accuracy of one second per year, how often do we
> need to update it so that it is always close enough for these algorithms we
> want to use?
>  On Thursday, December 12, 2013, Doug wrote:
>>     It seems that time is important.  So how do we know what time it
>>     really is, without leaving a trace?
>>     Many years ago I knew someone who did some experiments with time.
>>       He wanted a really accurate timekeeper, but did not have a lot of
>>     money to spend.  This was long before GPS existed, and before NTP
>>     servers became easily accessible to nearly everyone.  You could tune
>>     a radio to WWV, or call up the time lady at the phone company, but
>>     that was about it.
>>     So he built his own OCXO.  He built a little circuit board, with a
>>     crystal and an oscillator circuit.  It also had another circuit,
>>     electrically isolated from the first:  a heater circuit, consisting
>>     of a transistor, and a temperature-sensing element, in a feedback
>>     arrangement.  (I think this was right around the time when fairly
>>     precise and inexpensive temperature-sensing ICs first became
>>     available.)  He set this circuit to maintain the temperature on the
>>     board at a temperature higher than any likely to be encountered in
>>     his room, I think about 60C.
>>     He had a small Thermos brand vacuum jug, the kind used to keep a
>>     bowl's worth of soup warm.  Of course this has a double-wall glass
>>     envelope, aluminized on the interior walls of its vacuum chamber,
>>     and is an excellent thermal insulator.  He cut a small hole through
>>     the screw-on cap and ran wires through it, and suspended his circuit
>>     board in the middle of the jug.
>>     Outside the jug he set up a power supply for the crystal circuit,
>>     designed to be as stable as he could afford, and another power
>>     supply for the heater circuit.  He powered it all up and waited for
>>     hours for the temperature to equilibrate.  He then used this module
>>     as a clock source for his other projects that needed really stable
>> time.
>>     (He had to wait for hours because he designed the heater circuit to
>>     max out at a fairly low power level, knowing that very little power
>>     would be needed to maintain 60C in that insulated jug.  He wanted to
>>     keep overall power consumption as low as possible, because he wanted
>>     to operate time bases over long periods of time and therefore needed
>>     to run his clock source, and his counters, on trickle-charged
>>     battery power, and didn't want to invest a lot in batteries.)
>>     There were a number of problems he had to solve.  The insulating jug
>>     was so good that he had to worry about the temperature overshooting
>>     the set point, as the temp feedback circuit was not the only thing
>>     in there that was dissipating power, and it itself dissipated power
>>     even when the heater transistor had no current.  He had to choose
>>     the right kind of crystal, as different kinds have different degrees
>>     of stability.  He had to choose the right frequency range.  He baked
>>     the crystal for a long time to age it.  He had to put small faraday
>>     cages around both the crystal circuit and the heater circuit to keep
>>     noise out of the oscillator.
>>     IIRC he estimated a stability of something like one second per year,
>>     at a very low cost (most of the parts coming out of his spare parts
>>     box, or the kitchen).
>>     Of course these techniques have been in use in commercially
>>     available clock sources for decades, and I see you can now buy OCXO
>>     modules for as low as $50 at places like Digikey.  But I am not
>>     aware of any cheap mass-produced OCXO-based appliances suitable for
>>     use in a personal NTP server you can keep in your home.
>>     Imagine such a module, with a small low-power computer attached
>>     (open hardware, perhaps an Arduino would be enough, or perhaps this
>>     one?
>>     http://www.kickstarter.com/__projects/214379695/micro-__
>> python-python-for-__microcontrollers
>>     <http://www.kickstarter.com/projects/214379695/micro-
>> python-python-for-microcontrollers>
>>     ), with a lithium battery so you can carry it outside, and with a
>>     USB and/or ethernet connector.  You have to connect it to an
>>     accurate clock occasionally, so it knows what time it is.  Then
>>     after that, it just sits there and counts.  Connect it to your local
>>     network, or plug it directly into your Freedombox, and there you are.
>>     With this kind of frequency stability, you don't need to calibrate
>>     it against external time bases very often.  Perhaps carry it outside
>>     occasionally so it can see GPS signals, or carry it somewhere where
>>     it can see someone else's wifi.  Perhaps just design it so that you
>>     can sync it up by plugging it into a smartphone.  Or all of the above.
>>     With the growing importance of accurate timekeeping, and of leaving
>>     minimal traces behind while doing it, perhaps the time has come for
>>     an open hardware project for such a timekeeper.  (Kickstarter,
>> anyone?)
>>     Seems to me such an appliance could be produced for less than what a
>>     lot of us spend on a good gateway router.
>>     Would something like that be accurate enough for our purposes?
>>     _________________________________________________
>>     Freedombox-discuss mailing list
>>     Freedombox-discuss at lists.alioth.debian.org
>>     http://lists.alioth.debian.__org/cgi-bin/mailman/listinfo/_
>> _freedombox-discuss
>>     <http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/
>> freedombox-discuss>
>> --
>> Adrian Gropper MD
> _______________________________________________
> Freedombox-discuss mailing list
> Freedombox-discuss at lists.alioth.debian.org
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/freedombox-discuss
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/freedombox-discuss/attachments/20131213/c7912f9a/attachment-0001.html>

More information about the Freedombox-discuss mailing list