Of course, Debian cannot get GPS messages from the sky without a GPS module. Since we want to discipline the NTP/kernel accurately, we need a GPS module with a PPS (pulse per second) output. USB modules should be avoided because of delays that can be caused by the TTL-USB chip, and most of them can't handle PPS anyways.
I decided to buy a module from Amazon, it has a PPS output and a TTL interface making it more reliable than USB. The GPS chip is a NEO-6M which will do the trick for now. A proper chip for time reference should be the NEO-6T but more on that latter.
NEO-6M GPS module on Amazon
On an RPi the PPS output could be wired to a GPIO, but since we have a "real" motherboard we have 2 options:
Parallel port: PPS output is wired to the ACK pin of the port, but we either need a serial port or serial-to-USB to get the actual GPS time from the NMEA messages.
Serial port: PPS output is wired to the DCD pin of the port, TX and RX can be used to get the actual GPS time messages from NMEA.
Option 2 is great, and since there is a second serial port on the motherboard we can use it! But there is a catch: the port itself expects RS232 signals, and they are incompatible with the module TTL output. A simple MAX3232 with a few capacitors can be used as an interface between the two, and I went with a pre-made module from Amazon, again.
MAX3232 RS232-TTL interface module on Amazon
Here are some pictures of the wiring:
MAX3232 module soldered on header pins. This module actually uses the two sides of the PCB, each side corresponds to one channel on the MAX3232 chip. It can be interfaced with two serial ports, one on each side of the PCB. Neat! Circuit board with MAX3232 module on headers (removable), the power coming from the 2nd SATA power cable, a jumper allowing me to switch power to the GPS from 5v to 3.3v. Vcc and Gnd are inverted between the MAX3232 and GPS. An old "CD-ROM audio" cable was used from the board to the serial port, the shielding is connected grounded at the port and here at the board. The PPS LED on the GPS module was replaced by a header but that's optional. Wiring at the serial port. Pins 2/4/6/7/8 are not used. Pins used are: 1 = PPS, 3 = RX, 5 = TX, 9 = GND. Full pinout available on this website, second diagram. The PPS LED moved to the front where it can be seen. Side view of the PCB. The hard drive is now bolted to a plexiglass plate, itself bolted to the frame. The GPS antenna is extended to the back. Top view, the GPS antenna extension is clearly visible. A 6.5 mm drill bit was used to drill a hole for the SMA connector. Full top view of the Meru NTP Server! The antenna is in the case for the picture only, it will be installed outdoors when the project is complete. There is still plenty of room for future upgrades :)
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.