Project 1: GPS-based NTP server
Source: Microsecond accurate NTP with a Raspberry Pi and PPS GPS
Info
This page describes setting up a GPS module with a Pi. The GPS module needs to have a 3-5V input, with serial AND PPS outputs (5 pins minimum). Example: Adafruit Ultimate GPS Breakout.
Setup:
- Install packages:
sudo apt install pps-tools gpsd gpsd-clients gpsd-tools chrony
- Add these lines to the end of
/boot/config.txt
# the next 3 lines are for GPS PPS signals dtoverlay=pps-gpio,gpiopin=18 enable_uart=1 init_uart_baud=9600
- Add this text to the end of
/etc/modules
:pps-gpio
These programs and config changes enable PPS time sync inputs on GPIO pin 18 (real Pin 12), and initializes the serial COM port with a baud rate of 9600.
Wire up the GPS module:
Pinout:
- GPS PPS to RPi pin 12 (GPIO 18)
- GPS VIN to RPi pin 2 or 4
- GPS GND to RPi pin 6
- GPS RX to RPi pin 8
- GPS TX to RPi pin 10
Picture reference (note that all the Pi pins are seqential):
Check GPS functionality
TBD