Using TinyGPS++ with NEO-M9N

I have a proven sketch using a NEO-M6 clone and am wanting to upgrade the GPS module to SparkFun’s U-Blox NEO-M9N module for increased accuracy and acquisition speed. I know it will work with the SparkFun library but was wondering about using it with the existing TinyGPS++ library that I’ve already written code for. Besides the logic level shifting required for the 3.3V device, would it be a simple drop in replacement? Any benefits to writing the code to support the SparkFun library? I plan on using the hardware Serial-3 RX/TX pins for communication on an Arduino Mega 2560 Pro Mini instead of I2C. I’ve ordered the board but haven’t received it yet and am trying to plan it out when I do.

You should not need the Sparkfun library. TinyGPS++ will read the output of the GPS directly. Consider also neo-GPS.

There is no need for level conversion in the direction GPS-TX to Arduino-RX. If you want to use a 5V Arduino to send commands to the GPS unit, a 1K:2K voltage divider from Arduino-TX to GPS-RX is all you need.

Thanks for the replay. As stated earlier, I already have an application in place using the tinyGPS++ so that will be the starting point. I’ll look into the NEO-GPS . Thanks for the heads up.

As for the level shifting, I do understand that the divider would allow interface on the RX line but I am concerned with the TX lone voltage being a little out of spec. This will be used in a mission critical application so I would prefer using level shifters to guarantee logic levels being in spec. I already have a number of 4 and 8 channel shifters and plan to use them for both the GPS module and the 3.3V OLED display module I’m going to use.

Assuming no special configuration needed to interface with the RX/TX lines.

Resistors will probably work just fine, but if you need better control over the voltages, our [logic level converter board will work.](https://www.sparkfun.com/products/12009)

Tiny GPS++ is not compatible out of the box with the NEO-M9N. TinyGPS++ parses the NMEA data as if it was only a GPS receiver.

Since the NEO_M9N is a GNSS receiver it reads the NMEA sentences with $GNxxx instead of $GPxxx. When I looked into the TinyGPS++ library I find that it explicitly looks for sentences that start with $GP so no information is parsed even though the information in the sentences is the same. Seems like the SparkFun library looks at U-Blox UBX data instead of NMEA specific data. Probably wouldn’t work with non-U-blox receivers.

Someone please correct me if I’m wrong.

Correction, seems that TinyGPS++ does parse two GNSS messages, so it should work. The problem I had was I was looking for two specific messages, $GPGSA and $GPGGA for fix and sat count information. Those messages were never received so no update of the fix and qty data.

A little bit of a learning curve with the additional features of the NEO M9N I guess.:wink: