[LinuxPPS] LinuxPPS for Raspberry Pi?
tlhackque
tlhackque at yahoo.com
Wed Feb 27 17:18:33 CET 2013
On 27-Feb-13 06:01, folkert wrote:
> Maybe you can draw schematics for connecting the garmin to the RPI?
> I can solder but I cannot figure out how to alter the voltage levels or
> inverting.
> thanks
>
>
Wow, the mailing list is slow - I posted a month ago! Thanks to the
several folks who replied to my query.
My status: I have my garmin 18x-lvc running on my RPi - it seems pretty
reasonable; I have about a month of uptime.
# ntpq -pn
remote refid st t when poll reach delay offset
jitter
==============================================================================
o127.127.20.0 .GPPS. 0 l 46 64 377 0.000 -0.015 0.013
The offset and jitter fluctuate (a few 10s of usec) over time.
It was a long saga - not quite finished.
Look at http://www.raspberrypi.org/phpBB3/viewtopic.php?f=41&t=1970 for
the history. Somewhere in there (currently 2nd to last page) you'll
find photos of what I ended up building. I had a small board with an
RS232 level shifter that I modified. But it's not the best choice; I
used what I had on-hand.
http://www.compsys1.com/workbench/On_top_of_the_Bench/Max233_Adapter/max233_adapter.html
has the website. I used their A232DBH3v, with some modifications.
Starting from scratch, consider *A232DBCT3V
<../../../workbench/BenchOrders/bench_orders.html#dbct3v> *as it already
has enough channels for the PPS data. You don't need the DB9 connector,
but it's handy for debugging. It's about $20 assembled - saves a lot of
effort. But you can build your own level converter using the maxim
parts for less $ but more time. These days, you need to be able to
handle SMT parts...
I used a female header to connect to the RPi GPIO connector - you can
connect directly to the pins, but a header is a lot more flexible. easy
to find at any electronics parts supplier. It's the standard 0.100 in
dual-row header.
The connections are pretty simple:
garmin data comes in as rs232, goes thru the MAX232 inverter and
comes out as 3.3V signal. Wire that to the RPi UART receive pin. data
from the RPI UART transmit pin goes to the MAX232 inverter and comes out
as 12V - goes to the garmin.
The PPS signal comes from garmin, send it thru the MAX232 and connect
the output to a GPIO input pin.
Be careful with voltages. The garmin runs on +5V; the RPi on +3.3V.
Also, the inversion means that the PPS signal is seen by the RPi as
FALLING edge. So configure PPS for that. Don't try to do this with
fudge - only one edge (rising as it leaves the GPS, falling after
inversion) is controlled. So you'll see bad jitter if you tell NTP to
look at the wrong edge.
If your antenna is outside, you might want to worry about surge
suppression - I didn't because it costs more than the RPi Garmin to do
right.
I posted my config files. NTP looks like this (just the GPS lines):
server 127.127.20.0 mode 1 prefer
fudge 127.127.20.0 time1 0.000 time2 0.643 refid GPPS flag1 1 flag2 0
flag4 1
The open item is that after rebuilding the RPi kernel, the kernel isn't
talking to the RPi firmware. See
http://www.raspberrypi.org/phpBB3/viewtopic.php?f=28&t=31680&p=273629#p273629
for that.
Someone else in the same thread used the adafruit ultimate GPS, which
looks interesting. Less expensive than the garmin, and no level
conversion needed. One caution: the adafruit board uses 3.3V, but has a
5V -> 3.3V LDO regulator. Their article recommends powering from 5V. I
don't - report is that the regulator introduces enough noise that the
jitter is greater. Haven't personally verified, but if I were starting
from scratch, I think I'd try one one of these. Maybe if I decide to
invest in another couple of reference clocks for redundancy. (1 = you
know the time; 2 = you've now clue; 3 = you can vote...)
Geoff - the precompiled kernel is fine for the adafruit, but due to the
PPS inversion, not for the garmin. I ended up getting the development
tools and cross-compiling a kernel on an x86 linux server - which
almost worked. Exception is the firmware issue.
The garmin has battery backup. The adafruit is supposed to accept a
lithium battery - with that you shouldn't need an RTC module. Why
didn't you go that way? Is the LCD display really helpful?
Thanks again. Hope this info is useful.
--
This communication may not represent my employer's views,
if any, on the matters discussed.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.linuxpps.org/pipermail/discussions/attachments/20130227/062f5848/attachment-0002.html>
More information about the discussions
mailing list