Skip to content
dave griffiths edited this page Jul 21, 2020 · 12 revisions

Global Positioning System (GPS) data is a vital component of the data collected with the sonic kayak. Latitudes and longitudes allow us to position data captured with the other sensors in space.

We are currently using two types of GPS system for the sonic kayaks.

Simple USB GPS

Ingredients

  • GlobalSat BU-353S4 based USB GPS [£39.99]

Instructions

Plug in to one of the USB ports on the Pi - that's it. Simple to install, this GPS has proved reliable for the Kayaks and Sonic Bikes project beforehand. However, it only uses US satellites which limits its precision.

High quality GPS

Ingredients

Instructions

This GPS is designed for use with Pixhawk autopilots - with Hirose connectors. The feature which is most useful is that it is possible to switch on access to different countries GPS systems, meaning we can combine data from more satellites to obtain more accurate fixes (see below).

Modifying connectors

The GPS is connected to the RPi through a Serial UART connection. This means that the connectors need to be changed to 'servo' style pins so that they can be attached to the pins on the RPi.

To do this, the existing connector was snipped off, the wires stripped back and crimped with new connectors. Once all 4 connectors have been crimped, they can be pushed into a plastic 4x1 plug [red/black/yellow green] to plug into pins 4,6,8 & 10. These are 5V power, ground, UART Tx and UART Rx. Alternatively, cables can be soldered to header pins (we found that due to the thin wires, crimping sometimes didn't hold in place). Note that the GPS Rx goes to RPi Tx and vice versa.

Software

Changes to the GNSS Receiver

Newer models of GNSS receiver such as the UBLOX NEO-M8N have the capability to receive positional information from more than one constellation of satellites. This increases the potential positional accuracy as more satellites can be utilised to resolve the position of the receiver. By default, this model is configured to work with GPS and GLONASS. However, it can also be modified to work with Galileo satellites.

  1. The u-center software only runs on Windows operating systems and is the only possible way of configuring ublox GNSS receivers. Therefore one must find a way to connect the serial cables to the USB port on a laptop or PC running the software.
  2. This can be done with a USB to serial cables such as the FTDI TTL-234X-5V-WE, which has a USB 2.0 connector at one end, and 6 bare cables at the other. Four of these cables match the cables found on the ublox reciever and should be connected as follows: PWR->PWR GND->GND RX->TX TX->RX. Header pins can be crimped onto these cables or soldered as preferred.
  3. Once the receiver is connected to the USB cable, open the u-center software.
  4. Set the connection to the correct COM port (pointing to the USB device) and set the baud rate to 9600. Now click connect.
  5. Ideally be outside whilst doing this or have the receiver near a window so that some satellites can be seen.
  6. Use View -> Text Console to see the incoming NMEA data from the receiver. If messages are incoming then this is confirmation that the wiring PWR/GND/Rx wiring is good.
  7. Next, open the View -> Messages window. This allows the user to send commands to the Receiver. Lots of configuration can be performed within these menus. To test that the Tx wiring is correct, navigate to UBX-MON-VER and click 'Poll' to obtain this information. If the fields populate with the firmware version (i.e. 3.01) then the wiring is correct and you are able to send information to the receiver.
  8. To enable Galileo satellites, remain in the Messages window and navigate to UBX-CFG-GNSS and tick the 'Enable' box for Galielo. Click the 'Send' button to action this change.
  9. Next, navigate to UBX-CFG-NMEA and change the NMEA Mode to '4.1'. Again click the 'Send' button to action this.
  10. Close the Messages window. You may be asked if you wish to save changes, say 'Yes' and on the following screen, ensure that 'Save current configuration' is selected and click 'Send'.
  11. Leaving the reciever by a window or outside for a period of time (30mins-2hours?) should eventually result in the location of Galielo satellites.
  12. Use the skyview plot on the main screen of u-centre to see which satellites are visible, and Galielo platforms will be labelled with a European flag.

Changes to the RPi Operating System

Some changes need to be made on the RPi in order to allow UART Serial connections.

  1. Run sudo raspi-config to enter configurations settings for the RPi.
  2. In 'Interfacing Options', select 'Serial' and say 'No' to shell connections and 'Yes' to hardware connections.
  3. Reboot the RPi.
  4. Plug in the connectors as described above.
  5. Use cat /dev/ttyS0 to look at incoming data stream in NMEA mode.
  6. Optionally run stty -F /dev/ttyS0 -echo to disable mangled strings incoming (although this isn't required for the GPS python scripts to work.

Notes for BU-353S4 USB GPS Module

Switching to NMEA mode

The GPS device appears to begin producing data in SiRF binary mode. This is non-interpretable on the Raspberry Pi 2 linux operating system, so a switch to National Marine Electronics Association (NMEA) mode is required. NMEA is a standard data format for GPS devices, and provides an easily interpretable set of codes containing positional information and metadata.

Additional Information

Links to drivers, software and user manuals for the BU-353S4 can be found here. The link also includes a download link for 'GPS Information', a Windows program that allows you to view the output from the GPS and see satellite positions and locks when the GPS is plugged in.

Issues

GPS is not getting any lock

Try performing a 'cold start' on the device. This can be issued through the free GPSInfo software for Windows, downloadable from the usglobalsat website.


Useful info

http://usglobalsat.com/store/gpsfacts/bu353s4_gps_facts.html

https://medium.com/@DefCon_007/using-a-gps-module-neo-7m-with-raspberry-pi-3-45100bc0bb41

https://wiki.dragino.com/index.php?title=Getting_GPS_to_work_on_Raspberry_Pi_3_Model_B

https://freematics.com/forum/viewtopic.php?t=1759

https://www.rocketryforum.com/threads/enabling-galileo-gps-on-u-blox-m8n.148088/