How-to · Intermediate · 3 min read
NEO-6M GPS Module
Wiring, NMEA Data and Getting a Fix
By Geekobot Learning Team · Updated 24 Oct 2026
On this page
The NEO-6M is a GPS receiver that outputs latitude, longitude, altitude, speed and time as NMEA text over a 9600 baud serial link. Wire its TX to a serial RX pin, power it from 3.3 to 5 V, give it a clear view of the sky, and parse the data with TinyGPS++. The first fix can take a minute or more; later fixes are faster thanks to the backup battery.
Key specs at a glance
- Receiver
- u-blox NEO-6M, GPS only (M8N adds GLONASS and others)
- Supply
- 3.3 to 5 V on the module, about 45 mA
- Logic
- 3.3 V UART; TX is safe into 5 V inputs, RX needs a divider from 5 V
- Default output
- NMEA at 9600 baud, 1 Hz
- Accuracy
- About 2.5 m horizontal with a good sky view
- Time to first fix
- Cold about 30 to 60 s outdoors; warm a few seconds
- Antenna
- Ceramic patch on a cable; must face the sky
Wiring the NEO-6M
| GPS pin | Arduino Uno | ESP32 |
|---|---|---|
| VCC | 5V | 3.3V or 5V |
| GND | GND | GND |
| TX | D4 (SoftwareSerial RX) | GPIO 16 (Serial2 RX) |
| RX | D3 via divider (only needed to configure) | GPIO 17 (Serial2 TX) |
- VCC
- Arduino Uno:
- 5V
- ESP32:
- 3.3V or 5V
- GND
- Arduino Uno:
- GND
- ESP32:
- GND
- TX
- Arduino Uno:
- D4 (SoftwareSerial RX)
- ESP32:
- GPIO 16 (Serial2 RX)
- RX
- Arduino Uno:
- D3 via divider (only needed to configure)
- ESP32:
- GPIO 17 (Serial2 TX)
Read position with TinyGPS++
Install TinyGPSPlus from the Library Manager.
#include <TinyGPSPlus.h>
#include <SoftwareSerial.h>
TinyGPSPlus gps;
SoftwareSerial ss(4, 3); // RX, TX (ESP32: use Serial2.begin(9600, SERIAL_8N1, 16, 17))
void setup() {
Serial.begin(115200);
ss.begin(9600);
}
void loop() {
while (ss.available()) gps.encode(ss.read());
if (gps.location.isUpdated()) {
Serial.print("Lat: "); Serial.print(gps.location.lat(), 6);
Serial.print(" Lng: "); Serial.print(gps.location.lng(), 6);
Serial.print(" Sats: "); Serial.print(gps.satellites.value());
Serial.print(" km/h: "); Serial.println(gps.speed.kmph());
}
}Getting a fix faster
- Go outdoors with the antenna flat and facing up. Indoors near a window may work after several minutes; deep indoors it will not.
- The blue LED blinks once a fix is obtained. Before that, the module still outputs NMEA sentences with empty fields.
- Keep the backup battery (the small cell on the module) charged by leaving the module powered for a while; it stores satellite data so the next start takes seconds.
- Keep the antenna away from Wi-Fi modules, switching regulators and metal.
What the NMEA sentences mean
| Sentence | Contains |
|---|---|
| $GPGGA | Time, position, fix quality, satellites, altitude |
| $GPRMC | Time, date, position, speed, course, fix valid flag |
| $GPGSV | Satellites in view and their signal strength |
| $GPVTG | Course and speed over ground |
- $GPGGA
- Time, position, fix quality, satellites, altitude
- $GPRMC
- Time, date, position, speed, course, fix valid flag
- $GPGSV
- Satellites in view and their signal strength
- $GPVTG
- Course and speed over ground
NEO-6M vs NEO-7M vs NEO-M8N vs M10
| Module | Systems | Update rate | Choose it for |
|---|---|---|---|
| NEO-6M | GPS | Up to 5 Hz | Cheapest, loggers, trackers |
| NEO-7M | GPS + GLONASS | Up to 10 Hz | Slightly better fix |
| NEO-M8N | GPS + GLONASS + Galileo + BeiDou | Up to 10 Hz | Drones, faster and more reliable fixes |
| M10 (e.g. BN-220/BE-280 class) | Multi-constellation, low power | Up to 25 Hz | Modern drones and battery trackers |
- NEO-6M
- Systems:
- GPS
- Update rate:
- Up to 5 Hz
- Choose it for:
- Cheapest, loggers, trackers
- NEO-7M
- Systems:
- GPS + GLONASS
- Update rate:
- Up to 10 Hz
- Choose it for:
- Slightly better fix
- NEO-M8N
- Systems:
- GPS + GLONASS + Galileo + BeiDou
- Update rate:
- Up to 10 Hz
- Choose it for:
- Drones, faster and more reliable fixes
- M10 (e.g. BN-220/BE-280 class)
- Systems:
- Multi-constellation, low power
- Update rate:
- Up to 25 Hz
- Choose it for:
- Modern drones and battery trackers
Common mistakes to avoid
- Testing indoors and concluding the module is broken.
- Connecting a 5 V TX pin to the module's RX without a divider.
- Mounting the antenna upside down or under a metal lid.
- Using the Arduino's only hardware serial and then being unable to upload.
- Expecting sub-metre accuracy; consumer GPS is about 2 to 5 m.
Frequently asked questions
Why is my NEO-6M not getting a fix?
Usually it is indoors or has a poor sky view. Take it outside, wait a minute or two, and check that the antenna faces up. The LED only blinks once a fix is found.
What baud rate does the NEO-6M use?
9600 baud by default. You can change it with u-center software or UBX commands.
Does the NEO-6M work at 3.3 V?
Yes. The module's onboard regulator accepts 3.3 to 5 V, and its serial pins are 3.3 V logic.
How accurate is the NEO-6M?
About 2.5 m horizontal under open sky. Accuracy worsens near buildings and trees. Altitude is less accurate than position.
Can I use the NEO-6M with ESP32?
Yes, on a hardware serial port (Serial2 on GPIO 16 and 17). The ESP32 can then upload positions over Wi-Fi for a live tracker.
Parts for this guide
Terms in this guide
Projects that use it
Put this into practice: 8 step-by-step builds in our project library use parts from this guide.
Keep learning
Sources
- NEO-6 series datasheet and receiver description (u-blox)
- NMEA 0183 sentence reference
- TinyGPS++ library documentation
Written by the Geekobot team from manufacturer datasheets. Always check the datasheet for the exact part and variant you buy.


