<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">On 27-Feb-13 06:01, folkert wrote:<br>
</div>
<blockquote
cite="mid:20130227110146.GZ14619@belle.intranet.vanheusden.com"
type="cite">
<pre wrap="">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
</pre>
</blockquote>
Wow, the mailing list is slow - I posted a month ago! Thanks to the
several folks who replied to my query.<br>
<br>
My status: I have my garmin 18x-lvc running on my RPi - it seems
pretty reasonable; I have about a month of uptime.<br>
<br>
# ntpq -pn<br>
remote refid st t when poll reach delay
offset jitter<br>
==============================================================================<br>
o127.127.20.0 .GPPS. 0 l 46 64 377 0.000
-0.015 0.013<br>
<br>
The offset and jitter fluctuate (a few 10s of usec) over time.<br>
<br>
It was a long saga - not quite finished.<br>
<br>
Look at
<a class="moz-txt-link-freetext" href="http://www.raspberrypi.org/phpBB3/viewtopic.php?f=41&t=1970">http://www.raspberrypi.org/phpBB3/viewtopic.php?f=41&t=1970</a> 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.
<a class="moz-txt-link-freetext" href="http://www.compsys1.com/workbench/On_top_of_the_Bench/Max233_Adapter/max233_adapter.html">http://www.compsys1.com/workbench/On_top_of_the_Bench/Max233_Adapter/max233_adapter.html</a>
has the website. I used their A232DBH3v, with some modifications.
Starting from scratch, consider <b><a
href="../../../workbench/BenchOrders/bench_orders.html#dbct3v">A232DBCT3V</a>
</b>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...<br>
<br>
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.<br>
<br>
The connections are pretty simple: <br>
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.<br>
<br>
The PPS signal comes from garmin, send it thru the MAX232 and
connect the output to a GPIO input pin.<br>
<br>
Be careful with voltages. The garmin runs on +5V; the RPi on
+3.3V. <br>
<br>
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.<br>
<br>
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.<br>
<br>
I posted my config files. NTP looks like this (just the GPS lines):<br>
<br>
server 127.127.20.0 mode 1 prefer<br>
fudge 127.127.20.0 time1 0.000 time2 0.643 refid GPPS flag1 1 flag2
0 flag4 1<br>
<br>
The open item is that after rebuilding the RPi kernel, the kernel
isn't talking to the RPi firmware. See
<a class="moz-txt-link-freetext" href="http://www.raspberrypi.org/phpBB3/viewtopic.php?f=28&t=31680&p=273629#p273629">http://www.raspberrypi.org/phpBB3/viewtopic.php?f=28&t=31680&p=273629#p273629</a>
for that.<br>
<br>
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...)<br>
<br>
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.<br>
<br>
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? <br>
<br>
Thanks again. Hope this info is useful.<br>
<br>
<pre class="moz-signature" cols="72">--
This communication may not represent my employer's views,
if any, on the matters discussed.
</pre>
</body>
</html>