Reeve GpsNtp-Pi Operating instructions

GpsNtp-Pi
~
Installation
and
Operation Guide
See last page for copyright and document information

See last page for copyright and document information, File: Reeve_GpsNtp-Pi_Setup.doc, Page
GpsNtp-Pi ~ Installation and Operation Guide
Table of Contents
1 Introduction 1
2 Hardware Assembly 2
3 Operating System Installation 6
4 Install a Secure Shell Terminal Program 10
5 Basic RPi Setup 12
6 Install and Verify Pulse Per Second ~ PPS 15
7 Install GPS Daemon and Associated Tools 17
8 Enable PPS/ATOM Support in NTP Daemon 20
9 Leap Seconds 24
10 Final Adjustments and Checks 25
11 Provisioning NTP Server Pool 27
13 References, Web Links and Further Reading 28
Document Information 29

See last page for copyright and document info, File: Reeve_GpsNtp-Pi_Setup.doc, Page 1
GpsNtp-Pi Time Server Installation and Operation Guide
Whitham D. Reeve
1 Introduction
This document describes the installation and operation of the GpsNtp-Pi time server using the Raspberry Pi
computer platform, a GPS receiver and the Network Time Protocol (NTP). An accompanying document, GPS
Network Time Server on Raspberry Pi: GpsNtp-Pi {GpsNtp-Pi}, provides a general description. The system may
operate as a standalone time server or in conjunction with external time servers and is used to synchronize PC
real-time clocks to Coordinated Universal Time (figure 1).
AC Power
Adapter
Local Area
Network
Ethernet
Power
Internet
NTP Server using
Raspberry Pi
Model B+
Internet
Router
NTP
Client
5 V
Optional
WLAN
GNSS Receiver
PPSNMEA3.3 V
External
NTP
Servers
NTP
Client
NTP
Client
GNSS
Satellite
External
NTP
Servers
Figure 1 ~ Raspberry Pi time server block diagram. The Raspberry Pi platform with a GPS receiver on the left provides time
service to PCs both on the local area network and on a wide area network such as the internet. The system can be operated
with or without external time servers, but operation with external servers is recommended to improve system performance
and reliability. The only connections required between the RPi platform and the GPS receiver are power, ground, serial
transmit and receive and PPS.

See last page for copyright and document info, File: Reeve_GpsNtp-Pi_Setup.doc, Page 2
2 Hardware Assembly
This project was developed on an unmodified Raspberry Pi model B+. It most likely will work on the model B but
has not been tested. The RPi is operated “headless”; that is, it is used without a directly connected keyboard,
mouse or monitor. All provisioning is done from a PC running an SSH terminal program and connected to the
same LAN as the RPi. The hardware requirements and costs are shown in table 1.
Table 1 ~ Hardware Requirements and Costs
Description Adafruit HAB Supplies Notes
Base system Raspberry Pi B+, 35 USD Raspberry Pi B+, 35 USD Note 1
GPS receiver assembly Ultimate GPS Hat for Raspberry Pi
{GPSHat}, 45 USD
Raspberry Pi+ GPS Expansion
Board {GPSHAB}, 7 USD Note 1
Battery for GPS RAM CR122 , 2 USD CR2 32, 2 USD Note 3
Onboard antenna connector U.FL-M SMA-F
External active antenna Optional, 13 USD Required, 15 USD Note 4
Internal patch antenna Yes No
Flexible jumper cable Optional, 4 USD Not required Note 5
Soldering required Yes Yes Note 6
Mounting hardware required See hardware list See hardware list Note 2
RPi power supply 5 Vdc 5 W 5 Vdc 5 W Note 7
Table 1 notes:
1. Prices are as-of February 2 15 and do not include shipping. The HAB Supplies price includes an active antenna.
2. The Adafruit product does not include any hardware for rigidly mounting the GPS daughterboard to the RPi or for
mounting the RPi to a chassis. The HAB Supplies product includes only 2 of 4 spacers needed for the GPS board
and none for the chassis mounting. See Table 2..
3. Batteries are user supplied. The HAB Supplies GPS board is incorrectly marked CR2 23.
4. Each vendor has related antenna products that can be purchased with the receiver.
5. A flexible jumper is needed between the RPi board connector and an external antenna cable to reduce stress on
the connectors.
6. Soldering requirements are minor and described in more detail below.
7. The RPi uses a micro-USB connector for power but it cannot be powered from a PC USB port. Both GPS boards
require 3.3 Vdc, which is obtained from the RPi onboard power supply.
Table 2 ~ Hardware list
Item Qty Remarks
M2.5 x 11 mm stud spacer 4 Note 1
M2.5 x 6 mm stud spacer 4 Note 2
M2.5 hex nut 4
Flat washer, 2.5 mm 8
Lock washer, 2.5 mm 8
M2.5 x 4 mm flat head screw 4
Chassis, 1 x 7 x 1.6 mm 1 Aluminum
Rubber feet 4
Hardware List Table notes:
1. Qty can be reduced to 2 if the additional spacers exactly
match the length of the spacers supplied.
2. These spacers may be any convenient length to ensure
adequate spacing from the aluminum chassis.

See last page for copyright and document info, File: Reeve_GpsNtp-Pi_Setup.doc, Page 3
Preliminary assembly: Prior to attaching the GPS daughterboard to the RPi board:
Do not insert the battery until instructed
Adafruit GPS board: Solder the 2 x2 connector to the bottom of the PCB. Test fit the connector and
when soldering, make sure the connector is flush to the board
HAB Supplies GPS board: Plug the intermediate connector supplied with the board into the bottom of
the board; the connector is not soldered. It is necessary to remove a jumper so the battery may be used
to retain RAM data. The battery jumper is a blob of solder covering two small pads. It is circled in the
images below before (left) and after (right) removal with a soldering iron and solder wick. Note the
incorrect silkscreen text below the battery holder; it should read CR2 32
Final platform assembly: Attach the GPS daughterboard to the RPi using M2.5 hardware and 11 mm threaded
stud standoffs between the two boards. Use M2.5 hardware and 6 mm threaded stud standoffs to mount the
RPi board on an aluminum chassis. The assembly should be mounted in a metal enclosure as discussed later.
Battery: After board assembly, insert the battery into the holder on the GPS board. The battery is oriented with
the + terminal away from the board. Do not force the battery. It should easily snap or slide in.

See last page for copyright and document info, File: Reeve_GpsNtp-Pi_Setup.doc, Page 4
Antenna: An outdoor external antenna is recommended but initial setup and testing can be performed indoors.
For testing, the antenna should be placed on or near a window, preferably a south-facing window. If the Adafruit
Hat is used with its internal patch antenna, the RPi assembly should be placed near a window or on a windowsill.
The antenna must have a clear view of the sky. Generally, GPS performance is higher if it is installed to minimize
multipath interference caused by reflections from rooftops and walls. The internal patch antenna and external
antennas that may be purchased with the Adafruit and HAB Supplies GPS receivers are far from optimum for
timing applications because of their irregular gain patterns and nonexistent multipath suppression capabilities.
On the other hand, they are cheap and adequate for amateur radio astronomy applications.
The HAB Supplies antenna is shown in the image on
the left side and the optional Adafruit antenna is
shown right. Antenna dimensions are approximately
5 x 35 x 15 mm. Both antennas have a magnetic base
for mounting to a ferromagnetic surface but neither is
rated for outdoor service. Both are patch antennas
with small coaxial cables and SMA-M connectors.
Their manufacturers and specifications are not given
by the vendors.
If a different antenna is contemplated, the following guide may be used to select it:
Polarization: Right-hand circular
Mode: Active
Impedance: 5 ohm
Voltage: 3. to 3.6 Vdc (supplied by receiver)
Current: < 2 mA at 3.3 Vdc (the GTop receiver current limits the antenna bias-tee to 28 mA at 3.3 V)
Gain: 15 to 5 dBi
Noise figure: < 1.5 dB
Connecting an external antenna: If an external antenna is to be connected to the Adafruit GPS receiver board,
use a 15 ± mm long flexible jumper between the onboard U.FL-M connector and the SMA-M antenna cable
connector (a jumper is available from Adafruit). The flexible jumper is necessary so that no significant force is
placed on the onboard connector during operation. If the optional antenna from HAB Supplies is used with their
GPS board, there is no need for a flexible jumper (the supplied antenna has RG-174 coaxial cable, already quite
small and flexible).
Network: Connect a high-quality Cat5 network cable between the RPi LAN connector and a LAN switch or router.
The wired connection is used for provisioning. A WLAN connection can be installed later.
Power Supply: Before connecting a 5 V power supply, read this first: DO NOT attempt to power GpsNtp-Pi using
a USB port on a desktop or laptop PC or handheld device. Power measurements of GpsNtp-Pi on the RPi model
B+ showed < 1.5 W average dc load. However, when the RPi is booting and depending on connected peripherals,
the measured load current can be > 67 mA (3.4 W), too high for a PC USB port.

See last page for copyright and document info, File: Reeve_GpsNtp-Pi_Setup.doc, Page 5
The system should be powered by a well-regulated, low ripple, electrically quiet power source rated ≥ 1. A at
5. Vdc (≥ 5 W). Using a poor quality power supply will lead to unreliable operation so be sure it meets these
requirements. One of the most common problems users have with the RPi is inadequate power supply current.
To minimize electrical noise, it is recommended that ferrite beads be installed on the power cable (image
below).
AC wall power adapter rated 12 W at 5 Vdc with North American ac
input plug. One or more clamshell ferrite beads on the dc power lead
may help reduce radio frequency interference from the switch-mode
power supply. This image shows one bead on the right with three
windings of the power lead. The Raspberry Pi uses a micro-USB
connector for power. (Image © 2 14 W. Reeve)
Enclosure: If the GpsNtp-Pi is to be used in a sensitive RF environment, the circuit board assembly should be
installed in a metal enclosure. Some considerations are:
When inside an enclosure, the LED indicators on the RPi and GPS circuit boards will be hidden. One way
to handle this is to drill a small hole (~ 2 mm) in the enclosure above the GPS LEDs, so they will be visible
through the hole.
The 5 Vdc power input to the RPi is through a micro-USB connector, which will be inaccessible after the
boards are enclosed. Use a jumper from the RPi board to the rear panel where a power connector is
installed.
A small dc-dc converter may be installed in the enclosure to convert from, say, 12 Vdc input to 5 Vdc for
the RPi. This normally will require an input pi filter for the converter. As above, a jumper will be required
from the RPi board to the converter board. If a converter is used, it will be necessary to check its
specified maximum output filter capacitor size. The RPi board has a 22 μF power input filter capacitor,
so the converter will have to handle at least that much. In addition to the pi filter at the converter input,
MLCC capacitors rated 1 nF should be placed in parallel with the converter input and output.
The RPi circuit board will have to be positioned in the enclosure so the USB and Ethernet connectors are
accessible. A rectangular cutout in the front panel will allow the board to be installed flush with the
panel.
The antenna input on the GPS board will have to be extended to the front panel.
Below are pictures of the GpsNtp-Pi installed in a Box Enclosures B3-16 extruded aluminum enclosure and dc-
dc converter power supply. Enclosure dimensions are 16 long x 1 8 mm wide x 45 mm high. All holes in the
enclosure were cut using engineering drawings produced specifically for the enclosure. A 5 W dc-dc converter
was installed on a CPS-1 printed circuit board with filter components and PTC resettable fuse and polarity guard
diode. Power input at 12 Vdc is through a 2.1 x 5.5 mm coaxial dc power connector.

See last page for copyright and document info, File: Reeve_GpsNtp-Pi_Setup.doc, Page 6

See last page for copyright and document info, File: Reeve_GpsNtp-Pi_Setup.doc, Page 7
3 Operating System Installation
The system uses the Raspbian distribution, which is a version of Linux. It is necessary to download and install the
distribution image and install it on a memory card in a format that is compatible with the RPi. It is not possible to
simply copy the distribution image from a Windows PC to a memory card; instead, a special image writer
program is needed. Suitable programs are Win32 Disk Imager {WDImg} and HDD Raw Copy Utility {HDDRaw}.
This guide is based on Win32 Disk Imager. Download and install the program, and place a shortcut to the
program on the Desktop. Mark the shortcut to run as Administrator.
Now, download the Raspbian distribution from {Raspbian} and extract it to the Desktop. Write this image to a 4
GB or larger micro-SD memory card as follows:
Connect a card reader/writer suitable for a micro-SD memory card to the PC. Insert
the SD or micro-SD memory card into the card reader/writer. Some older micro-SD
cards and card reader/writers are incompatible, so it may be necessary to install the
micro-SD card in a full-size SD card carrier or adapter and insert the carrier into the
reader. Now, determine the memory card’s drive letter from My Computer or
Explorer. Open Win32 Disk Imager.
A drive letter is shown in the Device field in upper-right of Win32 Disk Imager. If you have more than one device
plugged into the PC, select the letter corresponding to your memory card (drive letter E: in example above).
Click the folder icon to right of the Image File input field. Windows Explorer will open (below). Navigate to the
location where the Raspbian image is located and select the file. In the example below, the image file is located
on the Desktop but it has not yet been selected. Click Open.

See last page for copyright and document info, File: Reeve_GpsNtp-Pi_Setup.doc, Page 8
At this time you will be returned to the Win32 Disk Imager user interface. Click the Write button. After a
moment the Progress bar will show the Write operation, which requires several minutes. Be patient.
When the Write process finishes, a Success window will pop up.
Eject the memory card by right-clicking the drive letter in My Computer or Explorer and selecting Eject. Remove
the memory card from the reader/writer.
Memory card installation: Insert the micro-SD memory card into the slot connector on the
bottom of the RPi board. The side of the memory card with the contacts (see right) should face
the board. The connector is push-to-insert/push-to-release and is self-latching. The card cannot be inserted the
wrong way. Gently push the card all the way in and release finger pressure; the card should remain in the holder
and not spring out. To release, push again and the card will spring out.
Table of contents
Popular Network Time Server manuals by other brands

Gorgy Timing
Gorgy Timing LEDI NETWORK iTS user guide

Mobatime
Mobatime DTS 4160.grandmaster Mounting and instruction manual

Meinberg
Meinberg LANTIME M300/GNS/RPS Technical reference

Mobatime
Mobatime DTS 4128.timeserver instruction manual

Meinberg
Meinberg IMS LANTIME M1000 manual

BRG Precision Products
BRG Precision Products NTP100B user manual

Krontek
Krontek KT2000 user guide

Meinberg
Meinberg LANTIME M300/TCR Technical reference

Mobatime
Mobatime NTS Mounting and instruction manual

Bodet Time
Bodet Time Sigma H Installation and start-up instructions

Bodet
Bodet NETSILON 7 AC quick start

Meinberg
Meinberg LANTIME M100 Connection and operating manual





