A Relatively Low Cost GPS Based Stratum-0 Time Source for an Amateur Radio Station or FAROS Beacon Monitoring Station

 

This project started off as most Amateur Radio projects, rummaging through a box of old “toys”.  I ran across an old Garmin GPS-18 USB GPS receiver and wondered if I could use it to create an accurate time source for the FAROS 1.3 Beacon Monitoring Program.

Living here is South Africa, Internet Time Sources tend to be somewhat inaccurate.  During bad weather many local time sources tend to be inaccessible.  Internet time sources from Europe and the United States always have long delays many times exceeding 500ms which make their accuracy very questionable.  While FAROS will indicate that a beacon signal can be heard with time accuracy off over 100ms, it can’t accurately determine long path or short path propagation unless time accuracy is better than 10ms.

Initially, I found software on the Web that got my GPS-18 USB working.  The best I was able to get out of the GPS-18 USB was in the range of 100ms accuracy, but the goal was sub 10ms accuracy over a typical Home LAN.  While internally software may be able to set a computer’s clock to 1ms accuracy, you also need to work with LAN delays for the FAROS application.  Thus, I saw 10ms accuracy as a realistic goal based on initial observations and testing.  In rethinking things, I also wanted to put together a system that could be duplicated by other Amateurs for under $500 maximum.  I decided on a Windows vs. Linux system to keep things simple.

(I also tried using an old etrex handheld GPS with its serial programming cable.  It only provided time with an accuracy of maybe 250ms because it was limited to 4800 baud and could not sent the NMEA messages in under 1 second.  A PPS output GPS is really the only way to go for an accurate clock!)


BASIC HARDWARE

For an accurate GPS time system, you MUST use a GPS with a PPS output.  Again, Garmin to the rescue with the GPS 18x LVC,5m at $79.99 USD. This is a OEM product.

https://buy.garmin.com/shop/shop.do?cID=158&pID=27594

Next you need a computer.  Many amateurs have old computers of the 2000 to 2002 vintage laying around.  If not, you can pick up such a computer at swap shops for under $100 or purchase one online for under $200 with an old monitor.  The computer should be a dedicated piece of hardware for this project.  An old computer with a 600 MHz processor, 256 meg RAM, 4 gig of Hard Disk, a standard built in RS-232 SERIAL port (COM 1), and a USB port is just fine.  More on the USB port later.

 

SOFTWARE

 

Operating System

The operating system must be Win2000 or WinXP due to my software choices.

 

GPS Time Software

I settled on TAC32 as the GPS Software.  It will work with basic GPS units without PPS for testing with typical GPS units.  It appears to give a reliable clock with a 100ms accuracy range on good basic GPS units with outputs of 19.2K or better and also works with PPS units like the GPS 18x LVC for accuracies in 20ms range or better across a Home LAN.  TAC32 is available from CNS for $89.00 and can be downloaded as trial software.

http://www.cnssys.com/cnssys.php

 

 

NTP Software

Next you will need some NTP Server software to make the time information available on the LAN in a standard format.  FAROS 1.3 looks for time information in the RFC-2030 (SNTP) format.  There are a number of products out there to turn your PC into a NTP Time Server, but Absolute Time Server was one of the easiest to set up so that is my recommendation for the project.  A licensed version is available for $35 from ADJUSTTIME, but there is also a trial version available.

http://www.adjusttime.com/

In my final installation, I used NTP Time Server Monitor by Meinburg and the NTP Time Server service.  You can find the software at:

http://www.meinberg.de/english/sw/ntp.htm

Setup is significantly more complicated.  It appears to be a better way to go if you really need very accurate time.  In my testing, it served the most accurate time to the Network and the FAROS 1.3 application.  (Mileage may vary.)

There are also versions of Windows version NTP Time Server that will read the Data directly from the GPS 18x.  They seemed complicated to set up, were limited to only 4800 baud, and told you very little about what the GPS was doing.  This is a Windows compile of the Linux software, so if you wish to go this route, you may as well just put together a Linux system.

Other NTP server software may be substituted, but my test indicated that all NTP server software is not the same.  This area seems to be a weak link.

 

GPS Setup Software

To setup the Garmin 18x LVC you will need a download from Garmin – SNSRXCFG_200.exe (SNSRXCFG Ver. 2.00)

https://buy.garmin.com/shop/store/downloadsUpdates.jsp?product=010-00321-31&cID=158&pID=27594


Building the GPS UNIT

In regards to the Garmin GPS 18x LVC for this project, some assembly was required.  First, a GPS needs to be outside and the GPS 18x LVC doesn’t strike me as a long term outdoor unit.  A clear view of the sky is best, so that means mounting it at or above the roof line.  Since the GPS 18x LVC only comes with a 5 meter cable, you will most likely need to lengthen it.  I added 20 feet to mine.  I know a 50ft cable will work at 19.2K baud.  From past experience with RS-232 devices, this is probably the maximum distance you can go and still get reliable 19.2K baud communications.  Note that the GPS 18x LVC will use a 5vdc supply. 

THE GARMIN GPS 18x LVC IS NOT A 12VDC GPS!

I started out building a power supply for the Garmin, but I recommend using the USB port to power the GPS 18x.  USB ports are current limited to 500ma and perfect for the GPS 18x LVC power source.  The DCD line on the RS-232 connection will connect to the PPS output of the Garmin and the rest of the connections are standard RS-232 stuff.  I made all the connections in a small plastic project box as per the schematic below.

The schematic is for the direct connection of the GPS 18x.  You will need to make the appropriate wiring changes if you add an extension cable.  I suggest using 6 conductor stranded instrument cable for extensions.  Don’t use Cat-5 cable as the solid conductors are more likely to break outdoors swaying in the wind.

Because of the really bad sun in Pretoria, I put the Garmin in a small plastic box.  I glued a plumbing fitting to the bottom of the box for a mount and put it up on an antenna pole that already held some small satellite antennas.

Connection of the Garmin is to the RS-232 port (COM 1 preferred) for data and to any available USB port for power.  Just for the fun of it, I added a Power LED and a LED to indicate PPS.  I thought they would be good trouble shooting aids, but aren’t really needed.

 

GPS-Schematic

Pick a good location with a clear view of the horizon to mount the GPS.  Here’s some pictures and details of my GPS installation.

DSC00962

 

The plastic box is nothing special, just a project box I had laying around.

 

DSC00963

 

A plumbing fitting was glued with RTV to the bottom and a cable fitting was drilled and mounted.  A flat 1/2” flanged would also work well, but might require a slightly larger box to get the cable fitting mounted.

 

DSC00964

 

I cut down a cap from an old spray paint can to make a raised mount for GPS.  It was secured with RTV.

 

 

DSC00965

The GPS was then secured to its mount with a drop of RTV (Great stuff) and the 15 foot cable routed through the fitting.

 

DSC00966

Here’s the final assembled module ready for mounting.

 

DSC00971

 

Here’s the completed installation with the GPS mounted on a pole between the other Satellite antennas.

 

DSC00968

 

Here’s a shot of the splice to the extension cable.  I used a small plastic box to solder and shrink tube the connections – old school.  The box cover was also sealed with RTV as it was outside.

DSC00973

 

The connections inside the shack for the RS-232 and USB cables were also made in a small project box, soldered and shrink tubed.  The two indicator LEDs were added; the LEDs and 1K resistors were held in place with RTV.

 

DSC00977

 

The completed connection box.  The Green LED is Power and the Yellow LED is a PPS indicator.

 

Software Installation

I’m going to assume a basic PC with Win2000 or WinXP installed.  I would recommend only going to Service Pack 2 on a WinXP machine.  I found that some of the junk added with Service Pack 3 can really slow a PC down.  The Network settings should be for a Static IP address; something like 192.168.1.100 is typical.

Configuration Changes for Windows

From the Start Button, Go to Settings, Control Panel.

Select Administrative Tools.

Select Services

Find Windows Time and Disable it

(If you’re also a computer geek, you may want to disable some Microsoft’s junk services: Automatic Updates, Error Reporting Service, Help and Support, Remote Desktop Help Session Manager, Remote Registry, Security Center, Task Scheduler, and Telnet.)

GPS Setup

Run SNSRXCFG that was downloaded from Garmin. (If you get the Publisher could not be verified warning, just ignore it and click Run.)

GPS-set-1.bmp

Select the GPS 18x PC/LVC button and hit OK.  Right out the box the settings for the GPS should be 4800 baud.  Work through the menus and connect to the GPS.  Configure the GPS as per the screen below.  Make sure only the 4 NMEA sentences are selected.  If you are going to try and run an extension cable more than 50 feet, you may need to lower the baud rate.  Don’t set the baud rate below 4800 baud or the data will not be transferred from the GPS to the computer in under a second – this would cause problems.  PPS length should be between 100 and 200ms, the TAC32 software seems to work well with these values.  I liked the 200ms setting as it makes an easy to see blink on the LED.  The PPS mode must be 1 Hz.

 

GPS-set-2.bmp

(Sometimes Windows will see the GPS as a Mouse.  If it does, just let Windows do its thing then go into the device manager and disable the “new” mouse driver.  You can consult the Microsoft Web site for more in depth info on this “Bug” in Windows – Knowledge Base Article 131976.)

Once all the settings are complete, load them back to the GPS.  You may have to power down the GPS to get it to restart at a 19.2K baud rate.  In any event, disconnect and reconnect to the GPS and make sure the proper baud rate is set on power up.

Complete the Software Installation

The rest of the installation is straight forward. Install TAC32 and Absolute Time Server just like any other Windows program.

full screen

The TAC32 screen provides a lot of information about the GPS constellation.  It also charts the visible RF horizon that the GPS can see.  The help screen are a bit technical, but adequate.

TAC32-1

If the Garmin GPS 18x LVC is installed on ComPort 1 at 19.2K baud as suggested, the Serial port configuration should be as above.

Change ComPorts as needed or the Baud rates if you use a longer extension cable.  Some indications from the Web indicated that a 100 foot extension could be used.  I have not verified this and would suspect that you would need to lower the baud rate to 4800 baud with this much cable.

TAC32-2

The PC Set Clock screen should have the above settings.

The TAC32 Help Screens explain the program in enough detail that  you should be able to work with the program to get the best performance and most accurate time possible from the GPS.  Pay attention to the section on location.  Let the GPS and TAC32 run for about an hour then use the average value to set location.  After another 24hrs adjust the location again and you should now have a very accurate location that can be used for accurate time generation.

 

Install the NTP Time Server Software and setup to serve RFC-2030 (SNTP) format time if using FAROS.  You want to disable any clock setting features in the NTP Timer Server software or set them to something like once a day.  You want TAC32 to do all your clock setting duties.  Settings for Absolute Time Server used with FAROS are below.

 

ATS-1

The Absolute Time Server can have both the RFC-868 and RFC-2030 settings selected.  The FAROS program only needs RFC-2030.  In most cases the Server Stratum value can be any value from 1 to 15.

ATS-2

Set the Client for Internet Adjust every 24 hours.

 

This should get you up and operating with a system that can provide an accurate time to within +-20ms of a real Atomic Clock.  In any case, this time will be more accurate than your Internet time and vastly more accurate than any PC clock.

 

Final Notes

If money is no object, you can go with the TAC32 Plus software and it’s built in NTP Server.  It didn’t appear to provide any greater accuracy, but simplifies the software installation.  At a cost of $250 US vs. $89 US, I didn’t see TAC32 plus as cost effective to the project and it would have blown the $500 budget I originally felt was the limit of indulgence for most Amateur Radio Operators.

I also ran across a discount version of TAC32 for TAPR members at only $55 US.

http://www.tapr.org/gps_tac32.html

I had problems with new serial port hardware (PCI cards) getting an accurate PPS pulse.  This is why I’m suggesting an older PC with a “real” RS-232 port for this project.  Also, the use of other programs on the Stratum-0 Time PC, especially ones that access your LAN or the Internet, will affect the accuracy of the NTP Time served to the LAN by the PC.  This system works best with the PC only supporting this application.

Once everything was finalized in the TAC32 / NTP Time Server configuration, I was able to get under +-5ms accuracy at the FAROS 1.3 application.  This was due mostly to the FAROS application averaging the time supplied by the Stratum-0 PC and being able to add offsets as needed in FAROS.  Raw time is within a +-20ms window when compared to the average of multiple Stratum-1 Internet Time Servers and was significantly more accurate, long term, than any single Internet Time Server I was able to find. 

Before I started this project, I thought Internet Time Servers were accurate – they are anything but due to the nature of the Internet.  I was finding that individual Stratum-1 servers would supply time that was over 500ms off at times, especially during periods of high Internet use by my children on the Internet and my wife on the IP phone.  US Servers tended to be the most inaccurate during the business week.  Local servers would go “on safari” during thunder storms.  The Stratum-0 PC appears rock solid (+-20ms) all the time, but needs 12 to 24 hrs to really settle in after initial setup.  Once setup, it appears to recover from a reboot in less than an hour.

STRATUM0-A

Snapshot of the Stratum-0 Server, Local(0) GPS, and multiple other time servers on the Internet.  Note that the South African server, time.1over0.co.za, is over 400ms off with a delay over 1 second probably due to high usage.

 

UPDATE: (24 JAN 2010)

I ended up purchasing TAC-32 from TAPR.  Because of the numerous power outages I experience during the rainy season in Pretoria, I installed Faros 1.3 on an old Mini-ATX PC with a 733MHz processor.  The PC was modified with a Mini-Box 12vdc power supply and runs directly off the Station’s backup battery system.  The PC also uses CF Solid State Drives and this keeps power consumption under 30 watts.  On the Faros PC I am using Win98 as it has much lower overhead than WinXP.  I built a PC like this for the Stratum-0 Time Clock Project, but I’m using Win2000 as it too has lower overhead than WinXP.  The Time Server Monitor by Meinburg and the NTP Time Server Service requires at least Win2000.  Since I also use a Yasue FT-817ND radio that was designed for battery operation, my NCDXF Beacon Monitoring System can now operate completely off the grid and without infrastructure support.  (With the low power consumption of the PCs, you could actually operate off solar power - HUMMM.)  The Monitoring Station runs using only the time sync information from the Stratum-0 Time Clock Project PC.  Because of the averaging used by the Faros software, all indications are that the Software Time Clock used by Faros is accurate to within +- 5ms of the NCDXF Beacons which are synced to GPS PPS pulses.  The Mini-ATX PC (2002 vintage) has an internal clock that was significantly less accurate than the clock in the original testing PC with WinXP (2006 vintage).  This causes the TAC-32 software to adjust the clock more often.  The Faros software sees a sawtooth time generated over about a 90 second period.  It seems that the Faros software is able to derive a slightly more accurate Software Clock from this data.  The newer, more accurate PC clock of the test PC took over 15 minutes to be reset.  This caused the Faros Software Clock to drift a little more between resets of the Time Server Clock with its accuracy being in the +-10ms range.

 

Disclaimer

As with all Amateur Radio Projects – Your Mileage May Vary.  No guarantees to the accuracy of this system or application of this data and it’s applicability to use should be assumed.  Proceed at your own risk!

 

Written By: Mark W. Lukinovich (20 Dec 2009)

This document is provided for general use and non-profit reproduction to the Amateur Radio Community.  Thanks to the hundreds of Web sites I visited as research for this project which are simply too many to list, or even remember.