Episode 9 – GPS Satellite Tracker

Estimated read time 4 min read

This article is also now available as a full video, click the link below to open the video in a new tab:

For today’s presentation we’ll be taking you through an electronics lab demo. If you’re interested in learning electronics there is enough detail in the video for you to follow along. Otherwise this is a nice demo of an end to end build of a GPS Satellite tracker system.

The circuit has three main components, an Arduino Uno microcontroller, a circuit board and ceramic antenna for GPS, and a small LCD screen for the output. The completed project lists all GPS satellites in range and displays the details on the LCD screen.

GPS systems can be found in most smart phones as well as drones and many vehicles.

GPS signals includes the following pieces of information:

PRN – Pseudo-Random Noise – Unique Identifier
Time
SNR – Signal To Noise Ratio
Location Info – Elevation, Azimuth

GPS Frequencies:
L1 – 1575.42 MHz
L2 – 1227.60 MHz
L5 – 1176.45 MHz

Here is the parts list for the project: (This would total around $50 for all parts at the time of this article)

Small Breadboard
Jumper Cables
AITRIP 2PCS GY-NEO6MV2 NEO-6M GPS Flight Controller Module 3V-5V with Super Strong Ceramic Antenna EEPROM APM 2.5 for for Arduino IOT Pi GPIO Flight Control
Arduino Uno
3pcs I2C IIC 1602 LCD Display Module 16×02 LCD Screen Module for Arduino Raspberry Pi

1K ohm Resistor

Here are the connections:

GPS GND pin → Common Ground
GPS VCC pin → Common Power (5 V)
GPS RX pin →1K Resistor → Arduino Uno D3 pin
GPS TX pin → Arduino Uno D4 pin
Arduino Uno 5V pin → Common Power
Arduino Uno Ground pin → Common Ground
LCD GND pin → Common Ground
LCD VCC pin → Common Power (5V)
LCD SDA pin → Arduino Uno A4 pin
LCD SCL pin → Arduino Uno A5 pin

//MIT License

//Copyright (c) 2025 TargetedTechTalk.com
//
//Permission is hereby granted, free of charge, to any person obtaining a copy
//of this software and associated documentation files (the "Software"), to deal
//in the Software without restriction, including without limitation the rights
//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
//copies of the Software, and to permit persons to whom the Software is
//furnished to do so, subject to the following conditions:
//
//The above copyright notice and this permission notice shall be included in all
//copies or substantial portions of the Software.
//
//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
//SOFTWARE.
#include <SoftwareSerial.h>
#include <Wire.h>
#include <LiquidCrystal_I2C.h>

SoftwareSerial gpsSerial(4, 3); // RX, TX
LiquidCrystal_I2C lcd(0x27, 16, 2);

void setup() {
  lcd.init();          // Initialize the LCD
  lcd.backlight();     // Turn on backlight
  Serial.begin(115200);
  gpsSerial.begin(9600);
  Serial.println("Reading NMEA data for satellite info...");
}

bool firstTime = true;
void loop() {
  if (gpsSerial.available()) {
    String line = gpsSerial.readStringUntil('\n');

    if (line.startsWith("$GPGSV") || line.startsWith("$GLGSV")) {
      //Serial.println(line);
      parseGSV(line);
    }
  }
}

void parseGSV(String nmea) {
  // Example: $GPGSV,3,1,12,02,17,300,18,04,77,043,42,...
  //          ^  total sentences, sentence#, total satellites
  int fields[20];
  int commaIndex = 0;
  int lastIndex = 0;
  int fieldCount = 0;

  while ((commaIndex = nmea.indexOf(',', lastIndex)) != -1 && fieldCount < 20) {
    fields[fieldCount++] = commaIndex;
    lastIndex = commaIndex + 1;
  }

  int totalSats = nmea.substring(fields[2] + 1, fields[3]).toInt();
  Serial.print("Satellites in view: ");
  Serial.println(totalSats);
  lcd.setCursor(0,0);
  lcd.print("Satellites: ");
  lcd.print(totalSats);

  // Each satellite block = 4 fields: PRN, Elev, Azimuth, SNR
  for (int i = 3; i + 4 < fieldCount; i += 4) {
    String prn  = nmea.substring(fields[i] + 1, fields[i + 1]);
    String elev = nmea.substring(fields[i + 1] + 1, fields[i + 2]);
    String az   = nmea.substring(fields[i + 2] + 1, fields[i + 3]);
    String snr  = nmea.substring(fields[i + 3] + 1, fields[i + 4]);

    if (prn.length() > 0) {
      Serial.print("PRN: "); Serial.print(prn);
      Serial.print(" | Elev: "); //Serial.print(elev);
      Serial.print("° | Az: "); //Serial.print(az);
      Serial.print("° | SNR: "); Serial.println(snr);
      lcd.setCursor(0,1);
      lcd.print("PRN: " + prn);
      lcd.print(" SNR: " + snr + " ");
      delay(500);
    }
  }
}

targetedtechtalk@protonmail.com

You May Also Like

More From Author