<div dir="ltr">Hello Doug,<div><br></div><div>I agree that a dedicated open-hardware time keeping appliance is the ideal goal.</div><div><br></div><div>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.</div>
<div><br></div><div>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.</div>
<div><br></div><div>Paul.</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Dec 13, 2013 at 2:43 PM, Doug <span dir="ltr"><<a href="mailto:dj0fb@frombob.to" target="_blank">dj0fb@frombob.to</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On 12/12/2013 07:02 PM, Adrian Gropper wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
How close could we get with just software on an Android phone? The phone<br>
would be disabled to whatever point it took to maintain a counter,<br>
charge the battery, occasionally listen for GPS or wifi. How stable<br>
could that be?<br>
<br>
Adrian<br>
<br>
</blockquote>
<br>
<br></div>
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.<br>

<br>
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.<br>
<br>
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.)<br>

<br>
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.<br>

<br>
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.<br>

<br>
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?<br>

<br>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
On Thursday, December 12, 2013, Doug wrote:<br>
<br>
    It seems that time is important.  So how do we know what time it<br>
    really is, without leaving a trace?<br>
<br>
    Many years ago I knew someone who did some experiments with time.<br>
      He wanted a really accurate timekeeper, but did not have a lot of<br>
    money to spend.  This was long before GPS existed, and before NTP<br>
    servers became easily accessible to nearly everyone.  You could tune<br>
    a radio to WWV, or call up the time lady at the phone company, but<br>
    that was about it.<br>
<br>
    So he built his own OCXO.  He built a little circuit board, with a<br>
    crystal and an oscillator circuit.  It also had another circuit,<br>
    electrically isolated from the first:  a heater circuit, consisting<br>
    of a transistor, and a temperature-sensing element, in a feedback<br>
    arrangement.  (I think this was right around the time when fairly<br>
    precise and inexpensive temperature-sensing ICs first became<br>
    available.)  He set this circuit to maintain the temperature on the<br>
    board at a temperature higher than any likely to be encountered in<br>
    his room, I think about 60C.<br>
<br>
    He had a small Thermos brand vacuum jug, the kind used to keep a<br>
    bowl's worth of soup warm.  Of course this has a double-wall glass<br>
    envelope, aluminized on the interior walls of its vacuum chamber,<br>
    and is an excellent thermal insulator.  He cut a small hole through<br>
    the screw-on cap and ran wires through it, and suspended his circuit<br>
    board in the middle of the jug.<br>
<br>
    Outside the jug he set up a power supply for the crystal circuit,<br>
    designed to be as stable as he could afford, and another power<br>
    supply for the heater circuit.  He powered it all up and waited for<br>
    hours for the temperature to equilibrate.  He then used this module<br>
    as a clock source for his other projects that needed really stable time.<br>
<br>
    (He had to wait for hours because he designed the heater circuit to<br>
    max out at a fairly low power level, knowing that very little power<br>
    would be needed to maintain 60C in that insulated jug.  He wanted to<br>
    keep overall power consumption as low as possible, because he wanted<br>
    to operate time bases over long periods of time and therefore needed<br>
    to run his clock source, and his counters, on trickle-charged<br>
    battery power, and didn't want to invest a lot in batteries.)<br>
<br>
    There were a number of problems he had to solve.  The insulating jug<br>
    was so good that he had to worry about the temperature overshooting<br>
    the set point, as the temp feedback circuit was not the only thing<br>
    in there that was dissipating power, and it itself dissipated power<br>
    even when the heater transistor had no current.  He had to choose<br>
    the right kind of crystal, as different kinds have different degrees<br>
    of stability.  He had to choose the right frequency range.  He baked<br>
    the crystal for a long time to age it.  He had to put small faraday<br>
    cages around both the crystal circuit and the heater circuit to keep<br>
    noise out of the oscillator.<br>
<br>
    IIRC he estimated a stability of something like one second per year,<br>
    at a very low cost (most of the parts coming out of his spare parts<br>
    box, or the kitchen).<br>
<br>
    Of course these techniques have been in use in commercially<br>
    available clock sources for decades, and I see you can now buy OCXO<br>
    modules for as low as $50 at places like Digikey.  But I am not<br>
    aware of any cheap mass-produced OCXO-based appliances suitable for<br>
    use in a personal NTP server you can keep in your home.<br>
<br>
    Imagine such a module, with a small low-power computer attached<br>
    (open hardware, perhaps an Arduino would be enough, or perhaps this<br>
    one?<br></div></div>
    <a href="http://www.kickstarter.com/__projects/214379695/micro-__python-python-for-__microcontrollers" target="_blank">http://www.kickstarter.com/__<u></u>projects/214379695/micro-__<u></u>python-python-for-__<u></u>microcontrollers</a><div class="im">
<br>
    <<a href="http://www.kickstarter.com/projects/214379695/micro-python-python-for-microcontrollers" target="_blank">http://www.kickstarter.com/<u></u>projects/214379695/micro-<u></u>python-python-for-<u></u>microcontrollers</a>><br>

    ), with a lithium battery so you can carry it outside, and with a<br>
    USB and/or ethernet connector.  You have to connect it to an<br>
    accurate clock occasionally, so it knows what time it is.  Then<br>
    after that, it just sits there and counts.  Connect it to your local<br>
    network, or plug it directly into your Freedombox, and there you are.<br>
<br>
    With this kind of frequency stability, you don't need to calibrate<br>
    it against external time bases very often.  Perhaps carry it outside<br>
    occasionally so it can see GPS signals, or carry it somewhere where<br>
    it can see someone else's wifi.  Perhaps just design it so that you<br>
    can sync it up by plugging it into a smartphone.  Or all of the above.<br>
<br>
    With the growing importance of accurate timekeeping, and of leaving<br>
    minimal traces behind while doing it, perhaps the time has come for<br>
    an open hardware project for such a timekeeper.  (Kickstarter, anyone?)<br>
<br>
    Seems to me such an appliance could be produced for less than what a<br>
    lot of us spend on a good gateway router.<br>
<br>
<br>
    Would something like that be accurate enough for our purposes?<br>
<br>
<br></div>
    ______________________________<u></u>___________________<br>
    Freedombox-discuss mailing list<br>
    <a href="mailto:Freedombox-discuss@lists.alioth.debian.org" target="_blank">Freedombox-discuss@lists.<u></u>alioth.debian.org</a><br>
    <a href="http://lists.alioth.debian." target="_blank">http://lists.alioth.debian.</a>__<u></u>org/cgi-bin/mailman/listinfo/_<u></u>_freedombox-discuss<div class="im"><br>
    <<a href="http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/freedombox-discuss" target="_blank">http://lists.alioth.debian.<u></u>org/cgi-bin/mailman/listinfo/<u></u>freedombox-discuss</a>><br>
<br>
<br>
<br>
--<br>
Adrian Gropper MD<br>
</div></blockquote><div class="HOEnZb"><div class="h5">
<br>
<br>
______________________________<u></u>_________________<br>
Freedombox-discuss mailing list<br>
<a href="mailto:Freedombox-discuss@lists.alioth.debian.org" target="_blank">Freedombox-discuss@lists.<u></u>alioth.debian.org</a><br>
<a href="http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/freedombox-discuss" target="_blank">http://lists.alioth.debian.<u></u>org/cgi-bin/mailman/listinfo/<u></u>freedombox-discuss</a><br>
</div></div></blockquote></div><br></div>