

The XM125 is a GPS module from Sparkfun designed to provide accurate and reliable positioning data. With its compact design and low power consumption, the XM125 is ideal for applications where space and energy efficiency are critical. This module is widely used in robotics, drones, vehicle tracking, and other GPS-based systems. Its ease of integration and robust performance make it a popular choice for both hobbyists and professionals.








Below are the key technical details of the XM125 GPS module:
The XM125 module has a total of 6 pins. The table below describes each pin and its function:
| Pin | Name | Description |
|---|---|---|
| 1 | VCC | Power supply input (3.3V to 5.5V). |
| 2 | GND | Ground connection. |
| 3 | TX | UART Transmit pin. Sends GPS data to the host microcontroller or device. |
| 4 | RX | UART Receive pin. Receives configuration commands from the host device. |
| 5 | PPS | Pulse Per Second output. Provides a precise timing pulse for synchronization. |
| 6 | EN | Enable pin. Pull high to enable the module; pull low to disable it. |
Below is an example of how to connect the XM125 to an Arduino UNO and read GPS data:
#include <SoftwareSerial.h>
// Define RX and TX pins for SoftwareSerial
SoftwareSerial gpsSerial(4, 3); // RX = Pin 4, TX = Pin 3
void setup() {
Serial.begin(9600); // Initialize Serial Monitor
gpsSerial.begin(9600); // Initialize GPS module communication
Serial.println("XM125 GPS Module Test");
}
void loop() {
// Check if data is available from the GPS module
while (gpsSerial.available()) {
char c = gpsSerial.read(); // Read one character from GPS module
Serial.print(c); // Print the character to the Serial Monitor
// Note: GPS data is sent in NMEA sentences. You can parse these
// sentences to extract specific information like latitude, longitude,
// and time.
}
}
No GPS Data Received
Weak or No GPS Signal
Module Not Powering On
Data Corruption
Q: Can I use the XM125 with a 3.3V microcontroller?
Q: How do I parse NMEA sentences?
Q: What is the purpose of the PPS pin?
Q: Can I change the update rate of the XM125?
This concludes the documentation for the XM125 Sparkfun GPS module.