L1 GNSS HAT
A professional-grade GNSS HAT for Raspberry Pi based on the u-blox NEO-M9N module. It provides reliable, standard-precision positioning with concurrent reception of up to four satellite constellations.

| GNSS Module | NEO-M9N |
| Frequency Band | L1 |
| Constellations | GPS + QZSS, Galileo, GLONASS, BeiDou (4 concurrent) |
| Position Accuracy | ~2.0 m CEP |
| Max Update Rate | 25 Hz |
| Geofencing | Up to 4 circular zones + PIO relay output |
| Hot Start | ~2 s TTFF via onboard supercapacitor backup |
| Timepulse (PPS) | Configurable pulse on GPIO 5 |
| Jamming / Spoofing Detection | Yes |
| Dimensions | Raspberry Pi HAT form factor |
The USB-C port provides direct serial access to the gnss module, bypassing the Raspberry Pi entirely. When connected via USB cable, the module appears as a CDC-ACM serial device (/dev/ttyACM0).
Use cases:
- u-center — connect from a PC to use u-blox’s configuration and evaluation tool for inspecting, configuring, and debugging the receiver if requried
- Firmware updates — flash new firmware onto gnss module via USB
- Direct gpsd access — feed NMEA data to gpsd without the library’s SPI bridge
- Any serial terminal — any tool that accepts serial input can connect directly
The onboard supercapacitor provides backup power to the modules’s battery-backed domain (RTC, ephemeris, almanac, and last-known position) when the Raspberry Pi is powered off.
- Hot start retention: up to 4 hours after power loss
- Hot start TTFF: ~2 seconds (vs. 30–60 seconds for a cold start)
- How it works: The supercapacitor charges while the HAT is powered. On power loss, it sustains the backup domain so the receiver remembers satellite data and can reacquire a fix almost instantly when power returns.
NoteTo take advantage of hot start, usesoftResetUbloxSom_HotStart()instead ofhardResetUbloxSom_ColdStart()while doing a software reset. A cold start clears all stored satellite data regardless of supercapacitor state.
The board has several status LEDs located near the USB-C connector:
| LED | Color | Function |
|---|---|---|
| PWR | Green | Power indicator — lit when the HAT is receiving power from the Raspberry Pi |
| USB ON | Green | USB connection indicator — lit when the HAT is connected by usb cable |
| TIME PULSE | Ice Blue | Timepulse — blinks at 1 Hz (default) when the receiver has a valid GNSS fix |
| GEOFENCE | Ice blue | Geofence status — driven by PIO pin 6, lights up based on geofence state, actual logic depends on configuration |
The TIME PULSE LED provides an immediate visual confirmation that the receiver has acquired a fix. If the PPS LED is not blinking, the receiver does not yet have a position solution.
The HAT connects to the Raspberry Pi via the standard 40-pin GPIO header. Key pin assignments:
| GPIO Pin | Function | Description |
|---|---|---|
| GPIO 5 | Timepulse (PPS) | 1 PPS output from the module — usable as interrupt or PPS source for time servers |
| GPIO 17 | TxReady | SPI data-ready interrupt — signals when the receiver has data to transmit |
| SPI0 | Data bus | SPI communication with the module (CE0, MOSI, MISO, SCLK) |
| EEPROM | Data bus | I2C communication with the HAT’s eeprom (SDA, SCL) |
NoteGPIO 5 Conflict — Kernel PPS (/dev/pps0) and the library’senableTimepulse()/timepulse()both use GPIO 5. They cannot run at the same time. Choose one or the other.
A screw terminal on the board edge provides a relay output. This output is driven by the module’s hardware geofencing engine.
Recommened operating conditions of the onboard relay:
- Maximum voltage on both pins <= 48V
- Maximum current <= 325mA
- Maximum resistance between the terminals in ON-state ~2ohm