[Thumbgps-devel] Jitter and latency in a linux system might be a problem. Minimal BoM crosspost.

tz thomas at mich.com
Mon Mar 12 17:02:49 EDT 2012


On Mon, Mar 12, 2012 at 4:44 PM, Patrick Maupin <pmaupin at gmail.com> wrote:
> On Mon, Mar 12, 2012 at 2:09 PM, tz <thomas at mich.com> wrote:

> I thought sub-ms wasn't really necessary.  Sub-us would be useful in a
> testbench for characterizing devices to make sure they meet ms...

>> But to state the problem clearly, you want the clock to have 100nS
>> accuracy,
>
> Where was that listed as a requirement?  I think there's some
> misunderstanding here.

I would think so to, but I think ESRs original post or one of the
requirements comments said 100nS.

It would help if we knew how hard the number was.

>> Any SkyTraq GPS (I have the Venus 624 and 628, and their GLONASS/GPS
>> modules), the "$" character in the first sentence can be synced to the
>> UTC second and comes out at a fixed delay from the PPS edge, just over
>> 1mS to stop bit with no visible jitter so technically it would be as
>> accurate as the PPS itself, and the latency could be compensated for.
>
> That's useful.  With a testbench we can test this, and with a small
> CPLD in conjunction with such a module and a serial to USB converter,
> we might even be able to make this work over USB by wiggling CTS or
> DSR.  In other words, if we find a module without PPS, but *with*
> accurate first-character message timing, we can wiggle a modem control
> line when the first character starts to force an immediate USB
> interrupt response, rather than waiting on the entire message plus
> some extra latency, which is what the USB chip would normally do.

I've been using uS gettimeofday on Linux and with an oscilloscope
connected to the PPS and data lines.

> I think there are a lot of really good possibilities, but the first
> thing to do is a hardware-assisted testbench to take accurate
> measurements, so we know the source and size of all the latencies in
> the system.  I haven't heard back from esr about what he thinks of
> this approach, though, so I am reluctant to start work on anything
> until we have some consensus on the idea that we should grab several
> devices and USB modules and USB chips and see how well they really
> operate.

Garmin has the 18x-LVM (oem) which has a PPS and from what I recall (I
haven't hooked it up in a while and I don't know where it is) the NMEA
sentences didn't have a lot of jitter, but I'd need to put it back on
my scope.

The Sirf3 apparently doesn't work.  I've seen MTK and Ublox, but I
don't know about them.

> This is an interesting idea.  I had wondered about ethernet, but the
> idea of setting up anything NTPish on a tiny micro seemed daunting.  I
> like the idea of such a UDP request/response mechanism.

You don't need ntpd.  You simply need precise PPS since you can then
measure the actual crystal frequency, e.g. if it "10 MHz" ends up
being 10.123456 MHz, you can divide the counts into this to find the
time with high precision.  You can play some PLL games, but I was
close to syncing an SMPTE stream to PPS for my ION-GNSS entry last
october where the stream edges would be synced even though the micro
had a ceramic resonator.

>> The SkyTraq PPS is accurate to 60nS mainly due to the 16Mhz internal clock rate.
>
> Have you checked that over days?  I'm intrigued by the graph that I
> just saw of things going haywire.

The only problem I have seen was at 20Hz with AGPS on my motorcycle
under nonrepeatable conditions - sometimes it would not get a lock
though it had 10 satellites in view with strong signals, I had to
reset it.

If it loses lock, the PPS disappears, but I should probably try my 628
and glonass and leave both on over a weekend.

>> Even if you get a $30 GPS unit you would have to break it open and do
>> some soldering under a stereo microscope, assuming you can attach the
>> PPS to DCD or CTS or another pin easily.
>
> Absolutely.  But esr's stated end product (which I think should be
> possibly part of our range of solutions) is a tiny USB key. ...

I've seen this one with the same description from a few searches:

http://www.chinazrh.com/wholesale-gps-receiver-usb-dongle-for-computers-netbook-laptop-umpc-p-728.html



More information about the Thumbgps-devel mailing list