NTP Clock

NTP Clock (GPS Time Server)
By Steve Falco

I used a gumstix with a netCF and GPSstix to build an NTP stratum 1 timeserver. I have an LCD display, showing time of day, location, satellites in view, etc. Source code for this project is available in svn:

svn co http://svn.gumstix.com/gumstix-buildroot/branches/users/stevefalco/trunk gumstix-buildroot-falco

A number of mods were done to the GPSstix. I added a pulse-per-second interrupt and a GPS reset circuit. I also hacksawed the 60-pin connectors off a tweener so I could superglue the tweener to the GPSstix (and white-wire it to the uart).

I also bisected the netCF with a hacksaw, so I could bulkhead mount the ethernet connector part of the board (and yes, I am a little bit crazy...). Here is what ntpq shows - as you can see, the gumstix does really well in terms of accuracy; the jitter is an order of magnitude less than what I see from other servers:

foo$ ntpq -pn remote          refid      st t when poll reach   delay   offset  jitter ============================================================================== +67.128.71.75   192.5.41.41      2 u  720 1024  377   35.957    2.396   1.880 +132.236.56.250 192.5.41.209     2 u  712 1024  377   23.662    1.115   1.349 -128.2.129.21   128.252.19.1     2 u  721 1024  377   30.017    2.596   1.955 127.127.1.0    .LOCL. 10 l  24   64  377    0.000    0.000   0.001 *192.168.0.50   .GPS. 1 u 747 1024  377    1.851    0.918   0.162

Here are a few photos. First, the front of the unit (the active antenna is seen on top of the chassis). The large numbers were generated with the GIMP, and are nicely anti-aliased using the duty-cycle modulation function of the ARM LCD driver. The small font is taken from the X11 5x7 font set:



Here is the rear of the unit. The knob is for LCD contrast. I have the serial port and ethernet brought out, and I used a "table-top" power supply (removed from its case) for power. The display needs -15 volts. I also added an EL panel to backlight the display - it runs off 120 vac:



To add backlighting to an LCD display, I recommend the intructions here.

And here is the GPSstix with the modified tweener attached. You can also see that I relocated one of the bulk capacitors (C203) from the "component side" of the GPSstix to the "wire side". Another article, Audiostix2_modifications, shows moving that cap over a bit to prevent interference, but as long as I had it unsoldered, I just moved it to the other side of the board:



Here is an overall view of the interior of the unit. The red ribbon cable is home-made, using wire-wrap wire and superglue. The power supply puts out +5 volts; I added a series diode (1N4004) to drop the voltage to around +4.3, since the gumstix runs cooler. The gumstix subassembly is housed in a clear plexiglas box:



Here is a view of the ethernet jack. As mentioned above, I cut the netCF board in half so that I could mount the jack on the back panel:



Here is a high-resolution shot showing the GPS reset circuit and pulse-per-second circuit. The 10 ohm antenna power mod is as shown in Gpsstix_modifications, except that I used a non-surface-mount resistor. One warning though - don't try to clip the center pin of the SMA connector. It is hardened metal, and will damage your cutting pliers (ask me how I know):



The reset circuit is a bit tricky. I found that the GPS module often took a long time to acquire the satellites. The GPS module makes an initial thermal noise measurement, and the datasheet warns that if the GPS is powered up before the antenna is connected, that this measurement will be wrong, leading to a long acquisition time. Since I am using an active antenna, I suspect that it needs a little bit of time for the noise to settle down on power-up. So, I wanted to hold the GPS module in reset until the antenna had had enough time to stabilize. The problem is that the GPS module will not tolerate more than 1.95 volts on its reset pin. Since it has an internal pullup, I simply added a 2N3904 transistor to isolate the reset pin from the ARM processor's GPIO pin.



Parts list:

Gumstix connex 400xm     - motherboard netCF            - ethernet interface GPSstix          - GPS module / LCD interface Tweener          - serial interface

Jameco 221719CG         - PWR SPLY,TABLE,REG 25W,DIN-5 209358CG         - CASE,METAL,7.5"X9.8"X3.2"

Mouser 530-415-0074-012 - SMA bulkhead cable 538-73251-0450   - SMA connector

Digi-Key ED8450-ND        - CONN STRIP SOCKET 50POS .050 (for LCD ifc) ED8650-ND        - CONN HEADER RT ANG 50POS .050 (for LCD ifc) ANT-GPS-SE-SMA-ND - ANTENNA HI-PERF GPS W/SMA

All Electronics Corp.   LCD-92            - 256 X 64 GRAPHIC LCD MODULE

Cooltronix 5861989369	     - EL Neon Foil - DIY Kit - White (on ebay)