BN-880 GPS Module with Arduino

BN-880 GPS module with HMC5883L compass and cables

BN-880 GPS Module with Arduino

The BN-880 is a GPS module and a compass in one package, with an active antenna that pulls in satellites fast. Wire it to an Arduino over UART, parse the NMEA sentences it sends, and you have latitude, longitude, speed, and heading on the serial monitor in one evening. This guide wires it, reads position with the TinyGPS++ library, and covers the no-fix problems that stall most first builds.

The module in the store is the BN-880 GPS Module with HMC5883L Compass and Active Antenna for Pixhawk, Betaflight, Arduino, and Raspberry Pi ($43.99). It pairs GPS reception with an HMC5883L electronic compass in one module, and onboard flash saves your configuration so it does not need to be reset each time you power up. The chipset is 8th generation with 72 search channels, tracking GPS, GLONASS, Galileo, BeiDou, QZSS, and SBAS. Power supply is DC 2.8V to 6.0V, typically 3.3V or 5.0V, drawing 50 mA at 5V. Data output is TTL level by default, and the module outputs NMEA messages. The package includes the module, a 15 cm 6-pin 1.25 mm connector cable, and 6-pin Dupont cables.

Quick facts

Fact Value
Module BN-880, GPS plus HMC5883L compass, active antenna
Chipset 8th generation, 72 search channels
Constellations GPS, GLONASS, Galileo, BeiDou, QZSS, SBAS
Supply DC 2.8 to 6.0V, typical 3.3V or 5.0V, 50 mA at 5V
Output NMEA sentences, TTL level by default
Compass HMC5883L electronic compass, I2C
In the box Module, 15 cm 6-pin 1.25 mm cable, Dupont cables

Wiring

The BN-880 talks over UART. On a Nano, use SoftwareSerial on two digital pins so the hardware serial stays free for the USB monitor. On an ESP32 DevKit, use the second hardware UART, which is cleaner and faster. Cross the wires: module TX goes to the Arduino RX pin, module RX goes to the Arduino TX pin. The compass is a separate I2C device on the same module, wired to SDA and SCL when you want heading.

BN-880 pin Arduino Nano (SoftwareSerial) ESP32 DevKit (UART2)
VCC 5V 5V
GND GND GND
TX Digital pin 4 (RX) GPIO 16 (RX2)
RX Digital pin 3 (TX) GPIO 17 (TX2)
SDA (compass) A4 GPIO 21
SCL (compass) A5 GPIO 22

The board for this guide can be the Nano V3.0 Development Board, ATmega328P, CH340G, USB-C, Single ($8.49) or the ESP32 DevKit V1 Development Board, 30-Pin WROOM-32, WiFi + Bluetooth, Dual-Core ($13.99). The module default baud for NMEA output is 9600. Take the build outside or to a window before you judge it: a GPS module cannot see satellites through a roof, and an indoor test that never gets a fix proves nothing about the module.

Arduino code: read position with TinyGPS++

Install the TinyGPSPlus library from the Arduino Library Manager. The sketch below reads NMEA sentences on SoftwareSerial and prints latitude, longitude, satellite count, and speed once a fix is live.

#include <SoftwareSerial.h>
#include <TinyGPS++.h>

static const int RX_PIN = 4;
static const int TX_PIN = 3;
static const uint32_t GPS_BAUD = 9600;

TinyGPSPlus gps;
SoftwareSerial gpsSerial(RX_PIN, TX_PIN);

void setup() {
  Serial.begin(9600);
  gpsSerial.begin(GPS_BAUD);
  Serial.println("BN-880 starting, go outside for a fix");
}

void loop() {
  while (gpsSerial.available() > 0) {
    gps.encode(gpsSerial.read());
  }
  if (gps.location.isUpdated()) {
    Serial.print("Lat: ");
    Serial.print(gps.location.lat(), 6);
    Serial.print(" Lon: ");
    Serial.print(gps.location.lng(), 6);
    Serial.print(" Sats: ");
    Serial.print(gps.satellites.value());
    Serial.print(" Speed km/h: ");
    Serial.println(gps.speed.kmph());
  }
  if (millis() > 5000 && gps.charsProcessed() < 10) {
    Serial.println("No GPS data, check wiring");
    while (1);
  }
}

On an ESP32, replace SoftwareSerial with the second hardware UART: Serial2.begin(9600, SERIAL_8N1, 16, 17), and read from Serial2 instead of gpsSerial. The first fix outdoors usually lands in under a minute with a clear sky. The first fix after a long power-off, or in a new location, takes longer while the module downloads satellite data.

Reading the compass

The HMC5883L compass on the module talks over I2C at its own address, separate from the GPS UART. Read it with any HMC5883L library, calibrate it by rotating the module slowly in a flat circle once, and you have heading to pair with position. Keep the compass away from motors, magnets, and steel screws, because all of them bend the reading. If heading matters to your build, calibrate in the final mounting spot with the motors running, not on a bench far from the finished build.

BN-880 vs M10 Mini vs M9140

The M10 Mini FPV GPS Module, 18mm, 10Hz, for FPV Racing Drones and Fixed Wing ($28.99) is the small, fast option: a 10th-generation chip, 72 search channels, 10 Hz output, 5V, ceramic antenna, 18 by 18 by 8 mm at 7.2 g, and no compass built in. Pick it when weight and size matter and you do not need heading. The 9th Gen GNSS GPS Module with IST8310 Compass, 25Hz, for FPV Drones and Fixed Wing UAV ($21.99) is the fast-update option: a 9th-generation M9140 chipset with 92 channels, an IST8310 compass, a native 25 Hz update rate, and 1.5 m accuracy, with a blue LED that blinks at 1 Hz when a 3D fix is acquired.

The BN-880 is the Arduino bench pick: a bigger module with an active antenna, a compass, and TTL NMEA output that is easy to read on a Nano or ESP32. Pick the BN-880 for ground builds, trackers, and loggers. Pick the M10 Mini or M9140 for a flight controller, where size, weight, and update rate matter more. See the Best GPS and Telemetry Modules for ArduPilot guide for the flight-controller side of the choice.

Compatibility and limits

The BN-880 works with Arduino, ESP32, ESP8266, Raspberry Pi, Pixhawk, APM, and Betaflight. It needs a clear view of the sky for a fix, and it will not fix indoors, under a metal roof, or in a parking garage. Position accuracy in open air is in the meter range, which is right for tracking, logging, and navigation, and wrong for surveying or centimeter work. The module draws 50 mA at 5V while capturing, so budget it in a battery build. The compass is sensitive to nearby metal and magnets, so mount it away from motors and power wires.

Troubleshooting

If the sketch prints “No GPS data”, the wiring is wrong: TX from the module must go to the Arduino RX pin, and RX to TX. Swap them and try again. If data flows but no fix ever arrives, go outside. A window is sometimes enough, but a roof blocks the signal completely.

If a fix takes many minutes, the module may be doing a cold start after a long power-off or a move to a new area. Leave it powered outside with a clear sky and wait. If the fix drops every time you move indoors, that is normal: the module only holds a fix while it can see satellites.

If latitude and longitude look right but speed reads zero while you walk, the GPS is working and the speed is just low. Walk faster or check speed in a car. If the compass heading spins, calibrate it in place and keep it away from the motors.

Frequently asked questions

What baud rate does the BN-880 use?

9600 baud for NMEA output by default. Set the Arduino serial port to 9600 and the sentences will parse.

Why does the BN-880 never get a fix indoors?

GPS signals are weak and do not pass through roofs. The module needs a clear view of the sky. Test outside or at an open window.

Can I use the BN-880 with an ESP32?

Yes. Use the second hardware UART on GPIO 16 and 17 at 9600 baud. It is cleaner than SoftwareSerial and leaves the USB serial free.

Do I need the compass?

Only if you need heading. Position, speed, and course come from the GPS sentences alone. Add the HMC5883L over I2C when the build needs to know which way it faces while standing still.

How accurate is the BN-880 position?

Meter-level in open air, which is right for trackers, loggers, and rover builds. It is not a surveying or centimeter-level receiver.

BN-880 vs M10 Mini, which one for an Arduino tracker?

The BN-880. It has an active antenna, a compass, and easy TTL NMEA output for a bench build. The M10 Mini is the flight-controller pick, where size and 10 Hz output matter more.

Parts for this build

Shipped fast and securely from our secure facility in New York, providing fast, high quality USA shipping.

BN-880 GPS Module with HMC5883L Compass and Active Antenna for Pixhawk, Betaflight, Arduino, and Raspberry Pi ($43.99)

The GPS for this guide. 8th-generation chipset, 72 channels, six constellations, HMC5883L compass, active antenna, NMEA over TTL.

M10 Mini FPV GPS Module, 18mm, 10Hz, for FPV Racing Drones and Fixed Wing ($28.99)

The small fast alternative. 10th-generation chip, 10 Hz, 18 mm square, 7.2 g, no compass.

9th Gen GNSS GPS Module with IST8310 Compass, 25Hz, for FPV Drones and Fixed Wing UAV ($21.99)

The fast-update alternative. 25 Hz native, IST8310 compass, 1.5 m accuracy, fix LED.

0.96 Inch OLED Display Module, SSD1306, I2C, 128×64, for Arduino / ESP32 / ESP8266 ($7.49)

The display for a tracker build. Show latitude, longitude, and satellite count without a laptop.

Related guides