I connected a budget GPS module to my Arduino Mega to find out whether a cheap sensor can actually lock onto satellites. The short answer: it depends heavily on where you test it.
Wiring the GPS module to Arduino Mega
The GPS module needed soldering before I could connect the wires. The connections are straightforward:
- VCC → 5V
- GND → GND
- TX → RX1 (pin 19)
- RX → TX1 (pin 18)
Reading raw NMEA data
Upload this basic sketch and open the Serial Monitor at 9600 baud. The output looks like gibberish at first — that is actually NMEA data, a standard format that encodes position, time, and satellite info.
void setup() {
Serial.begin(9600);
Serial1.begin(9600);
}
void loop() {
while (Serial1.available()) {
Serial.write(Serial1.read());
}
}
Parsing coordinates with TinyGPS++
Install the TinyGPS++ library via the Arduino Library Manager, then upload this sketch. It translates the raw NMEA stream into readable coordinates:
#include <TinyGPS++.h>
TinyGPSPlus gps;
void setup() {
Serial.begin(9600);
Serial1.begin(9600);
}
void loop() {
while (Serial1.available()) {
gps.encode(Serial1.read());
}
if (gps.location.isUpdated()) {
Serial.print("Satellites: ");
Serial.println(gps.satellites.value());
Serial.print("Latitude: ");
Serial.println(gps.location.lat(), 6);
Serial.print("Longitude: ");
Serial.println(gps.location.lng(), 6);
Serial.print("Altitude: ");
Serial.println(gps.altitude.meters());
}
}
Signal testing: indoors, window, and outside
I tested the module in three environments:
- Indoors: No satellites detected. Walls block the signal completely.
- Through a window: After waiting a couple of minutes, the module picked up 3 satellites and returned coordinates — but the altitude was wrong and the location pointed to France (I am not in France).
- Outside in an open field: I waited 10 minutes per attempt, moved away from concrete to a grass area with no buildings within 50 metres — still no satellite lock.
Conclusion
A cheap GPS module has real limitations. It cannot get a signal indoors and struggled significantly even outside. Building a larger antenna might help improve reception. If you have experience improving GPS signal quality with cheap modules, leave a comment — I would love to revisit this in a future video.