uBlox Neo-M8N

PCB

My girlfriend and I are going on an eight day hiking trip, and I would like to not use my phone as a GPS device. My phone tends to not be very accurate in some situations, and I don't believe the antenna is very good either. So let's build a GPS that will give us degrees in decimal, and also in minutes. Also I want to be able to see how many satellites I have locked onto, as well as our altitude, and maybe also our direction of travel.

What do we need:

I've decided to make a PCB so I don't have to do point to point wiring, and it shouldn't be that expensive. If you look at the image above, you will see some things:

  • NEO-M8N
  • MPU6050
  • oLed SH1106
  • TP4056 (not yet labeled in the image, but just to the right of the Bat+ label [gnd,bat-,bat+,vcc])

Getting familiar with the modules:

Neo-M8N

The neo-m8n is a professional gps chip that can triangulate from multiple satellites. Most GPS's you find on the market only work with a chunk of satellites. The Neo-M8N can triangulate from US, Russian, Chinese, Indian, European, and Australian satellites. There is a new bit of information which I will post in this article at a later date, which is which antenna type you will need in order to exploit these multiple satellites for extreme accuracy. So far, from my understanding, you will need a 1.575 - 1.6Mhz antenna. Most antennas that I have seen shipped with a neo-m8n module come with only a 1.5Mhz antenna. So if you want your uBlox neo-m8n module to be worth what it actually costs, you will need to spend a little more to get all the features.

MPU6050

The mpu6050 is an accelerometer/gyroscope that can, very quickly, stream out tilt data. It can do a lot more, but I'm just going to use the tilting features for the purposes of menu selection, and there is a great library to accomplish this.

oLed SH1106

Next, we have an oLed display 128x64 pixels, and Adafruit has a library for the SSD1306 oLed. Unfortunately, Adafruit's library does NOT work with the SH1106, but this is OK. The Adafruit library is very well written, but since it wont work with the $3.36 oLed's we can buy off eBay (the SH1106) we are going to explore a different library called: u8glib. The u8glib library has everything we need an more for creating menu's refreshing the screen, and all you need to do to get your SH1106 to work with this library is to uncomment one instantiation line in the examples sketches for the Arduino. It's very easy, and I will go into more detail.

TP4056

The TP4056 is what we will use a a BMS (battery management system). This $1 part is used to charge a lithium ion battery, and for my project I'm going to use an 18650 Panasonic battery which costs around $8. The 18650 Panasonic batteries are 3400 mAh batteries, and you do not want to get cheap batteries from ebay. Don't do it, they are either fake, with a fake ampere hour label, or they are dangerous. Don't even run the risk of thinking you can get a great deal, just buy from a real manufacturer, or on Amazon (Panasonic 18650's are green). The TP4056 can charge the battery, and simultaneously run the rest of your circuitry. Also, don't bother buying the neo-m8n's on ebay either. I spent the extra dollar to make sure I got a real one, and the other parts I bought, I bought on ebay.

Cost so far:

  • $20.........NEO-M8N....................amazon
  • $5............MPU6050.....................ebay
  • $1.............TP4056.........................ebay
  • $3.50.......oLed SH1106...............ebay
  • $1.............Arduino Pro Mini.......ebay
  • $8............18650............................amazon
  • $8............better antenna...........amazon

I^2C

The i-squared-c (I^2C) devices are the acceleromter/gyroscope and the oLed. The Neo-M8N will connect to the Arduino throught the Tx/Rx pins on the arduino for transmit and receive. I^2C can connect to more than one device through the same pair of pins (A4, and A5 on the Arduino) which is SCL, and SDA. SCL is the clock, and SDA is data. Pretty simple, and the image above labels SDA and SCL. vcc obviously means positive voltage, and gnd means ground.

Current Notes (10APR2017):

I'm still working on the code with the libraries I mentioned. I'm going to try the TinyGPS++ library also with the neo-m8n to sift through the output data. This library is a little bit bloated and takes up about 29% of the Arduino's internal memore available. This might pose a problem, and I might need to use another method, such as modify neo-m8n to output in such a way that I can more easily sift through the available data. This is vague, but one way or another I should be able to get the appropriate software to all fit in the internal memory of the Arduino, once I have some time to test it (i hope i can use the TinyGPS++ library, since it's so easy to use).

I'll be back on the blog page to update progress, and make changes to the work needed/completed.