Component guide · Intermediate · 3 min read
Raspberry Pi GNSS HATs

Waveshare L76K GPS HAT, u-blox MAX-M8Q HAT and SparkFun GNSS Flex pHAT LG290P (RTK)
By Geekobot Learning Team · Updated 29 Oct 2026
On this page
A GNSS HAT gives a Raspberry Pi its position and very accurate time from GPS, GLONASS, BeiDou, Galileo and NavIC satellites. The L76K HAT is a simple, low-cost choice; the u-blox MAX-M8Q HAT is sensitive and well supported; the SparkFun LG290P pHAT is multi-band and can reach centimetre accuracy with RTK corrections. They talk to the Pi over UART.
Key specs at a glance
- Modules
- Quectel L76K, u-blox MAX-M8Q, Quectel LG290P
- Systems
- GPS, GLONASS, BeiDou, Galileo, QZSS (NavIC on LG290P)
- Accuracy
- About 2 m; 1 cm with RTK on LG290P
- Interface
- UART at 9600 or 115200 baud, PPS pin
- Antenna
- u.FL or SMA, active antenna recommended
- Backup
- Coin cell keeps the almanac for fast fixes
Models in this guide
These are alternatives. Pick the one that fits your project; you only need one.
Option 1Waveshare L76K GPS HAT for Raspberry Pi₹2,537
Option 2Waveshare u-blox GNSS HAT for Raspberry Pi₹3,400
Option 3SparkFun GNSS Flex pHAT – LG290P for Raspberry Pi₹18,599
What the Raspberry Pi GPS and GNSS HATs is
Raspberry Pi GNSS HATs add GPS or RTK receivers to a Pi for tracking, mapping, NTP time servers and robotics, using modules like the u-blox NEO-M8, ZED-F9P or Quectel L76.
The HATs send NMEA sentences on the Pi's UART. Disable the serial console in raspi-config, enable the serial port, then run gpsd to share the position with any program. The PPS pin lets chrony set the Pi's clock to within microseconds.
Indoors there is usually no fix; put the antenna by a window or outside.
Raspberry Pi GPS and GNSS HATs pinout
The pins on the Raspberry Pi GPS and GNSS HATs and what each one does.
| Pin | Function |
|---|---|
| TX / RX | GPIO14/15 UART |
| PPS | One pulse per second for precise time |
| Antenna | u.FL or SMA |
| Backup battery | Keeps time and satellite data |
- TX / RX
- GPIO14/15 UART
- PPS
- One pulse per second for precise time
- Antenna
- u.FL or SMA
- Backup battery
- Keeps time and satellite data
Wiring the Raspberry Pi GPS and GNSS HATs
The first fix can take a few minutes outdoors. A coin cell on the board makes later fixes take seconds.
| Raspberry Pi GPS and GNSS HATs pin | Connection | Note |
|---|---|---|
| UART | GPIO14 TX, GPIO15 RX | Serial console off, serial port on |
| PPS | GPIO18 on most boards | Check the wiki |
| Antenna | Active GNSS antenna | Clear sky view |
- UART
- Connection:
- GPIO14 TX, GPIO15 RX
- Note:
- Serial console off, serial port on
- PPS
- Connection:
- GPIO18 on most boards
- Note:
- Check the wiki
- Antenna
- Connection:
- Active GNSS antenna
- Note:
- Clear sky view
Example code
Run cgps -s for a quick check. For RTK on the LG290P feed RTCM corrections from an NTRIP caster with str2str or RTKLIB.
# sudo apt install gpsd gpsd-clients python3-gps
# sudo nano /etc/default/gpsd -> DEVICES="/dev/serial0"
import gps
s = gps.gps(mode=gps.WATCH_ENABLE)
while True:
r = s.next()
if r["class"] == "TPV" and getattr(r, "lat", None):
print(f"{r.lat:.6f}, {r.lon:.6f} alt {getattr(r, 'alt', 0):.1f} m")Setup and tuning
enable the UART in raspi-config and disable the serial console.
use gpsd and cgps to read position.
connect the PPS pin and use chrony for a precise time server.
use an active antenna with a sky view.
for ZED-F9P HATs, add NTRIP corrections using RTKLIB or str2str.
What you need
Shop this list6 of 7 found in our store · ₹36,596
Waveshare L76K GPS HAT for Raspberry Pi: the part this guide coversWaveshare L76K GPS HAT for Raspberry Pi₹2,537
Waveshare u-blox GNSS HAT for Raspberry Pi: another version this guide coversWaveshare u-blox GNSS HAT for Raspberry Pi₹3,400
SparkFun GNSS Flex pHAT – LG290P for Raspberry Pi: another version this guide coversSparkFun GNSS Flex pHAT – LG290P for Raspberry Pi₹18,599
Raspberry Pi 4 Model B (4 GB): the most common HAT hostRaspberry Pi 4 Model B with 4GB RAM₹11,461Closest match, check the specs
Raspberry Pi 5 (4 GB): runs the modem, bus or GNSS softwareRaspberry Pi 5 RTC Battery (Rechargeable, JST)₹149Closest match, check the specs
Waveshare GNSS active antenna: needs a clear view of the skyWaveshare GNSS Active Antenna₹450- GNSS and LTE combination antenna: one mount for both signalsFind this part
Alternatives and when to choose them
- NEO-7M and NEO-8M modules: for microcontrollers.
- RTK GNSS breakouts: centimetre accuracy.
- GPS antennas: better reception.
Common mistakes to avoid
- Leaving the serial console on.
- Testing indoors.
- No PPS for time servers.
- Passive antennas on long cables.
Frequently asked questions
How do I read GPS on a Raspberry Pi?
Enable the UART, install gpsd and view data with cgps.
Can a Pi be a GPS time server?
Yes, with PPS and chrony it gives microsecond-level time.
Why does gpsd show no fix?
The antenna lacks sky view or the serial console still uses the UART.
Can I get centimetre accuracy?
Yes, with an RTK HAT such as a ZED-F9P plus base station or NTRIP corrections.
Do I need an active antenna?
Yes, when the Pi is indoors or the antenna cable is long.
Parts for this guide
Keep learning
Sources
Written by the Geekobot team from manufacturer datasheets. Always check the datasheet for the exact part and variant you buy.


