Same-day dispatch before 2 PM · Free delivery over ₹999 · GST invoices Get the appPrices incl. GST
Geekobot
Snap & SendNEWGeeko AIWhere's myOrder
Log in
Products
  • Projects
    • Component guidesHow parts work, with code you can run
    • Learning pathsFrom your first LED to your first robot
    • Workshops & eventsOnline sessions for makers and classes
    • ElectrolarkFree guided builds, simulator and certificates
    • Students & teachersStudent discount and classroom help
    • CommunityShare builds and ask other makers
    • CalculatorsOhm's law, LED resistor, 555 and 100+ more
    • Circuit builderWire parts and run the circuit, powered by Electrolark
    • Geeko AIAsk what to buy or how to wire it
    • Snap & SendPhotograph a part or list, we find it
    • Part finderAnswer a few questions, get the right part
    • Compatibility checkWill these two parts work together?
    • Compare partsSpecs side by side
    • Business & bulk ordersGST invoices, credit and volume prices
    • Request a quotationSend your list, get a quote
    • Classroom kitsPer-student kits and lab bundles
    • Gift cardsFor students, teams and events
  • Atal Tinkering Lab
BOM to cart
Geekobot

Components, kits and know-how for makers, students, engineers, labs and businesses across India.

Ask Geeko AIOrders, parts and projects, any timeEmail supportReply within 1 working dayGet the Geekobot appAdd it to your home screen, free

Follow us

Shop

  • Boards & SBCs
  • Sensors & Modules
  • IoT & Wireless
  • Drone & FPV
  • 3D Printing
  • Filaments & Resins
  • Motors & Drivers
  • Power & Batteries
  • Semiconductors
  • Passive
  • Displays & LEDs
  • Switches & Relays
  • Wires & Cables
  • Prototyping
  • Tools & Test
  • Robotics
  • STEM Kits
  • Atal Tinkering Lab
  • Mechanical Parts
  • Audio

Orders

  • Track your order
  • Help & support
  • Shipping and delivery
  • Refunds and cancellation
  • Contact us

Learn

  • Projects
  • Geeko AI project assistant
  • Learning paths
  • Guides
  • Calculators
  • Electrolark: free guided builds

Part tools

  • Part finder
  • Compare parts
  • Will it work with my board?

Institutions

  • Classroom kits
  • Atal Tinkering Lab
  • Students & teachers
  • Workshops & Events

Business

  • Business & education
  • Request a quotation
  • BOM bulk upload
  • Quick order by SKU

Company

  • About Geekobot
  • Community
  • Gift cards
  • Terms & conditions
  • Privacy policy
  • Product directory
  • Sitemap

© 2026 Geekobot, a trade name of OLatus Systems Private Limited. All rights reserved.

20, 1st Floor, Neeladri Complex, 10th Cross, Sampige Rd, 2nd Main, Malleshwaram, Bengaluru, Karnataka 560003 · GSTIN 29AACCO0462F1ZM

+91 91810 15607 · connect@geekobot.in · Monday to Saturday, 10 AM to 2 PM IST

UPI · CARDS · NETBANKING · GST INVOICES

ShopProjectsGeeko AIGuides
Compare 0 parts →
Log in

Shop by category

Shop all components
  • Boards & SBCs1,910 products
    • Alternative Single Board Computers
    • Arduino Ecosystem
    • FPGA & Logic Boards
    • Microcontroller & Wireless Boards
    View all
  • Sensors & Modules4,701 products
    • Biomedical & Heart Rate
    • Current, Voltage & Power
    • Force, Weight & Pressure
    • Gas, Weather & Environmental
    View all
  • IoT & Wireless2,314 products
    • RF Modules
    • RFID & NFC
    • Antennas & RF Accessories
    • Cameras & Smart Vision
    View all
  • Drone & FPV3,558 products
    • Flight Control & Navigation
    • FPV Video & Optics
    • Frames & Structural Parts
    • Motors & Propulsion
    View all
  • 3D Printing2,204 products
    • 3D Printers
    • 3D Scanners & Digitizers
    • Laser Engravers & Cutters
    • Material Management & Upgrades
    View all
  • Filaments & Resins1,472 products
    • Filaments
    • Photopolymer Resins
    View all
  • Motors & Drivers463 products
    • BLDC Motor Drivers
    • DC & Geared Motors
    • DC Motor Drivers
    • Linear Actuators & Solenoids
    View all
  • Power & Batteries557 products
    • Battery Holders & Connectors
    • Breadboard Power
    • Chargers & BMS
    • DC-DC Converters
    View all
  • Semiconductors295 products
    • Diodes & Rectifiers
    • Interface & RF Encoder ICs
    • Logic ICs (74xx)
    • Logic ICs (CD4000)
    View all
  • Passive67 products
    • Capacitors
    • Circuit Protection
    • Crystals & Oscillators
    • Inductors
    View all
  • Displays & LEDs572 products
    • 7-Segment & Dot Matrix
    • Addressable LEDs
    • Character LCDs
    • Graphic LCDs
    View all
  • Switches & Relays184 products
    • Keypads & Touch
    • Push Buttons & Tactile
    • Relay Modules
    • Relays
    View all
  • Wires & Cables233 products
    • Board-to-Wire Connectors
    • Crimp & Splice
    • Headers & Dupont
    • Heat Shrink & Sleeving
    View all
  • Prototyping101 products
    • Breadboards
    • Interface Modules
    • PCBs & Perfboards
    View all
  • Tools & Test717 products
    • Bench Power Supplies
    • Hand Tools
    • Measuring Tools
    • Meters & Testers
    View all
  • Robotics180 products
    • Humanoid & Legged Robots
    • Robot Chassis & Platforms
    • Robotic Arms & Grippers
    • Wheels & Casters
    View all
  • STEM Kits268 products
    • Arduino Learning Kits
    • Coding & IoT Kits
    • Early Coding (Ages 3-8)
    • Invention Kits
    View all
  • Atal Tinkering Lab196 products
    • Package 1: Electronics, Robotics, IoT and Sensors
    • Package 2: Rapid Prototyping Tools
    • Package 3: Mechanical, Electrical and Measurement Tools
    • Package 4: Power Supply, Accessories and Safety Equipment
    View all
  • Mechanical Parts212 products
    • Bearings
    • Brackets & Mounts
    • Couplers
    • Fasteners & Standoffs
    View all
  • Audio109 products
    • Amplifier Modules
    • Buzzers & Sirens
    • Speakers
    View all
  1. Home
  2. ›Guides
  3. ›Sensors
  4. ›NEO-M8N GPS Module

Component guide · Intermediate · 4 min read

NEO-M8N GPS Module

Pinout, Wiring and Code

By Geekobot Learning Team · Updated 29 Oct 2026

I'm using
Wiring, code and the Run it panels follow your board.
On this page
Short answerWhat the NEO-M8N GPS module isNEO-M8N GPS module pinoutWiring the NEO-M8N GPS moduleExample codeSetup and tuningWhat you needAlternatives and when to choose themCommon mistakesFAQsParts and next steps
Short answer

The NEO-M8N is a u-blox GNSS receiver that tracks GPS plus GLONASS, Galileo or BeiDou at once, so it gets a fix faster and holds it better than the older NEO-6M. It outputs NMEA sentences over UART at 9600 baud, can update up to 10 times a second, and many drone versions add a compass (HMC5883L or QMC5883L) on I2C in the same case.

Key specs at a glance

Receiver
u-blox M8, 72 channels
Systems
GPS + one of GLONASS, Galileo, BeiDou at a time
Accuracy
About 2.5 m CEP in open sky
Update rate
1 Hz default, up to 10 Hz
Interface
UART 9600 baud default (NMEA and UBX), some with I2C compass
Supply
3.3 to 5 V on most modules

Models in this guide

These are alternatives. Pick the one that fits your project; you only need one.

  • Option 1NEO-M8N GPS Module w/ SMA External Antenna₹1,159
  • Option 2u-blox NEO-M8N GPS Module w/ Ceramic Active Antenna₹739
  • Option 3NEO-M8N GPS Module with Compass for APM & Pixhawk₹2,449
  • Option 4ReadyToSky NEO-M8N GPS Module w/ Compass for APM/Pixhawk₹2,309
  • Option 5NEO-M8N GPS & Compass Module for DJI Naza M V1/V2 FC₹2,199
  • Option 6M5Stack COM.GPS (NEO-M8N) Module w/ External Antenna₹2,549
01

What the NEO-M8N GPS module is

Using two satellite systems roughly doubles the satellites in view, which helps under trees and between buildings. The first fix outdoors takes about 30 seconds cold, and a few seconds after that with the backup battery.

Drone versions are a round puck with a 6-pin GPS plug and a 4-pin compass plug for Pixhawk and similar flight controllers. Square boards with an SMA or ceramic antenna suit Arduino and ESP32 trackers.

02

NEO-M8N GPS module pinout

The pins on the NEO-M8N GPS module and what each one does.

PinFunction
VCCSupply, 3.3 to 5 V (check your module)
GNDGround
TXGPS transmit (NMEA), to the controller's RX
RXGPS receive, for configuration
SDA / SCLCompass on I2C (drone versions)
PPSOne pulse per second when fixed (some boards)
PinFunction
VCC
Supply, 3.3 to 5 V (check your module)
GND
Ground
TX
GPS transmit (NMEA), to the controller's RX
RX
GPS receive, for configuration
SDA / SCL
Compass on I2C (drone versions)
PPS
One pulse per second when fixed (some boards)
03

Wiring the NEO-M8N GPS module

The GPS TX is 3.3 V, which a 5 V Uno reads fine. Put the antenna face up with a clear view of the sky; it will not get a fix indoors away from windows.

NEO-M8N GPS module pinArduino UnoESP32
VCC5V3V3 or 5V (VIN)
GNDGNDGND
TXD4 (SoftwareSerial RX)GPIO 16 (RX2)
RXD3 through a divider (optional)GPIO 17 (TX2)
SDA / SCLA4 / A5 (compass)GPIO 21 / 22 (compass)
VCC
Arduino Uno:
5V
ESP32:
3V3 or 5V (VIN)
GND
Arduino Uno:
GND
ESP32:
GND
TX
Arduino Uno:
D4 (SoftwareSerial RX)
ESP32:
GPIO 16 (RX2)
RX
Arduino Uno:
D3 through a divider (optional)
ESP32:
GPIO 17 (TX2)
SDA / SCL
Arduino Uno:
A4 / A5 (compass)
ESP32:
GPIO 21 / 22 (compass)
04

Example code

Install TinyGPSPlus by Mikal Hart. Use u-center on a PC (through a USB to TTL adapter) to change the update rate or the satellite systems.

Print position with TinyGPSPlus (ESP32) · Arduino C++Verify & upload in Electrolark
#include <TinyGPSPlus.h>

TinyGPSPlus gps;

void setup() {
  Serial.begin(115200);
  Serial2.begin(9600, SERIAL_8N1, 16, 17);
}

void loop() {
  while (Serial2.available()) gps.encode(Serial2.read());
  static uint32_t last = 0;
  if (millis() - last > 1000) {
    last = millis();
    if (gps.location.isValid()) {
      Serial.printf("%.6f, %.6f  sats: %d  speed: %.1f km/h\n",
        gps.location.lat(), gps.location.lng(), gps.satellites.value(), gps.speed.kmph());
    } else {
      Serial.printf("Waiting for fix, sats: %d\n", gps.satellites.value());
    }
  }
}
05

Setup and tuning

First fix outside

take it outdoors for a few minutes the first time.

Antenna up

the ceramic patch must face the sky; metal above it blocks the signal.

Faster updates

set 5 or 10 Hz in u-center for drones and fast vehicles, and raise the baud rate to match.

Compass

mount it away from motors and power wires; calibrate it in the flight controller.

06

What you need

Shop this list10 of 11 found in our store · ₹12,066

  • NEO-M8N GPS Module w/ SMA External Antenna: the part this guide coversNEO-M8N GPS Module w/ SMA External Antenna₹1,159
  • u-blox NEO-M8N GPS Module w/ Ceramic Active Antenna: another version this guide coversu-blox NEO-M8N GPS Module w/ Ceramic Active Antenna₹739
  • NEO-M8N GPS Module with Compass for APM & Pixhawk: another version this guide coversNEO-M8N GPS Module with Compass for APM & Pixhawk₹2,449
  • ReadyToSky NEO-M8N GPS Module w/ Compass for APM/Pixhawk: another version this guide coversReadyToSky NEO-M8N GPS Module w/ Compass for APM/Pixhawk₹2,309
  • NEO-M8N GPS & Compass Module for DJI Naza M V1/V2 FC: another version this guide coversNEO-M8N GPS & Compass Module for DJI Naza M V1/V2 FC₹2,199
  • M5Stack COM.GPS (NEO-M8N) Module w/ External Antenna: another version this guide coversM5Stack COM.GPS (NEO-M8N) Module w/ External Antenna₹2,549
  • ESP32-WROOM-32 38-pin development board: for Wi-Fi logging and dashboardsESP32-WROOM-32 38-Pin Development Board₹389
  • Uno R3 development board: the controller used in the wiring tableFind this part
  • 0.96 inch OLED display 128x64: to show readings without a computer0.96" OLED Display 128x64₹139Closest match, check the specs
  • USB to TTL serial converter: to talk to the module from a PCUSB to TTL Serial Converter (CH340G / CP2102 / FT232RL / PL2303)₹85Closest match, check the specs
  • Dupont jumper wires: for the connectionsDupont Jumper Wires (40 pcs)₹49Closest match, check the specs
07

Alternatives and when to choose them

  • ✓NEO-6M GPS: GPS only, cheaper, slower to fix.
  • ✓Drone GPS, compass and RTK: flight controller GPS units and centimetre RTK.
  • ✓QMC5883L compass: the compass chip on many M8N pucks.
08

Common mistakes to avoid

  • !Testing indoors and waiting forever for a fix.
  • !Swapping TX and RX.
  • !Mounting the antenna upside down or under metal.
  • !Mounting the compass next to motor wires so the heading drifts.
09

Frequently asked questions

NEO-M8N or NEO-6M?

The NEO-M8N tracks two satellite systems, gets a fix faster and holds it better; choose it for drones and trackers.

Does it work with Arduino?

Yes, it sends standard NMEA at 9600 baud; TinyGPSPlus decodes it.

How accurate is it?

About 2 to 3 m in open sky. For centimetres you need RTK.

Why no fix?

It needs a clear sky view; indoors it usually cannot see enough satellites.

How do I read the compass?

Read the HMC5883L or QMC5883L on the SDA and SCL wires with its own library.

Parts for this guide

  • NEO-M8N GPS Module w/ SMA External Antenna
    ₹1,159View
  • u-blox NEO-M8N GPS Module w/ Ceramic Active Antenna
    ₹739View
  • NEO-M8N GPS Module with Compass for APM & Pixhawk
    ₹2,449View
  • ReadyToSky NEO-M8N GPS Module w/ Compass for APM/Pixhawk
    ₹2,309View
  • NEO-M8N GPS & Compass Module for DJI Naza M V1/V2 FC
    ₹2,199View
  • M5Stack COM.GPS (NEO-M8N) Module w/ External Antenna
    ₹2,549View
  • ESP32-WROOM-32 38-Pin Development Board
    ₹389View
  • Uno R3 Development Board (No Cable)
    ₹359View
  • 0.96" OLED Display 128x64
    ₹139View
  • USB to TTL Serial Converter (CH340G / CP2102 / FT232RL / PL2303)
    ₹85View
  • Dupont Jumper Wires (40 pcs)
    ₹49View
Shop GPS, Compass & RTK Navigation Modules

Projects that use it

Put this into practice: 8 step-by-step builds in our project library use parts from this guide.

Intermediate · 2 hoursGPS speedometer and clockView projectIntermediate · 2–3 hoursGPS route loggerView projectIntermediate · 2 hoursGPS geofence alarm for vehicles and cattleView project
Browse all 8 projects

Keep learning

How-toIntermediateNEO-6M GPS ModuleThe NEO-6M is a GPS receiver that outputs latitude, longitude, altitude, speed and time as NMEA text over a 9600 baud serial link.3 min read · IoT & WirelessHow-toIntermediateDrone GPS, Compass and RTK ModulesA GPS and compass module lets a drone hold position and return home.3 min read · Drones & FPVConcept explainerBeginnerUART and Serial CommunicationA UART sends data one bit at a time over one wire with no shared clock, so both ends must agree on the speed, called the baud rate (9600 and 115200 are common).4 min read · Electronics Fundamentals

Sources

  • u-blox NEO-M8 series data sheet
  • TinyGPSPlus library documentation (Mikal Hart)

Written by the Geekobot team from manufacturer datasheets. Always check the datasheet for the exact part and variant you buy.

On this page
Short answerWhat the NEO-M8N GPS module isNEO-M8N GPS module pinoutWiring the NEO-M8N GPS moduleExample codeSetup and tuningWhat you needAlternatives and when to choose themCommon mistakesFAQsParts and next steps
Need a hand?Ask Geeko AI which part fits your project, or talk to the Geekobot team.Ask Geeko AIHelp & support

Parts for this guide (Arduino Uno)7 items · ₹11,608

NEO-M8N GPS Module w/ SMA External Antenna · u-blox NEO-M8N GPS Module w/ Ceramic Active Antenna · NEO-M8N GPS Module with Compass for APM & Pixhawk · ReadyToSky NEO-M8N GPS Module w/ Compass for APM/Pixhawk · NEO-M8N GPS & Compass Module for DJI Naza M V1/V2 FC · M5Stack COM.GPS (NEO-M8N) Module w/ External Antenna · Uno R3 CH340G ATmega328p Compatible Development Board

Run itChange the inputs and watch the output

Speed comes from the Doppler shift, so it is good even at walking pace.

Serial monitor115200 baud
12.971642, 77.594563  sats: 11  speed: 0.0 km/h

A simulation of the sketch above, so you know what to expect. Real readings vary with your parts and wiring.

Ask the Community

Ask a question