10. Inputs¶
1. Group Assignment¶
Please refer to Carla Molin’s page for the group assignment.
2. Individual Assignment¶
For this week’s assignment, I decided to test out the BN880 GPS module I would be using for my final project.
BN880 - Dual Module
The BN880 is a dual GPS/Compass module. It possesses an embedded magnetometer whose I2C output data can be used to create a sfotware based compass. Furthermore, it provides its GPS coordinates through UART Communication. I have decided to use this dual module as it provides a complete and efficient solution to the tracking feature I am looking to develop. GPS readings could be used to geolocate my project’s base device, whereas the magnetometer’s data could be used to determine the orientation of the camera installed on the base device.
A. Board Design¶
I decided to use an ATTiny1614 controller as I have become familiar with its development workflow. The BN880 has 6 I/O ports:
- VCC
- GND
- SCL - Compass
- SDA - Compass
- RX - GPS
- TX - GPS
The I2C lines needed to be pulled up. I therefore added a pullup resistor to both the clock and data. Furthermore, the ATtiny 1614 has two dedicated sets of UART pins. I connected the first to the FTDI and the second to the GPS. The resulting board can be seen below.
B. Gathering Coordinates¶
To read data from the GPS sensor, I used the TinyGPS++ library’s ‘dedicated device’ example sketch. The TinyGPS++ library parses information provided by the GPS in NEMA sentences. It then stores these values and allows us to request specific ones such as the longitude, latitude and altitude. While this is all I would be using this library for, it can also allow us to determine the number of satelites circiling above the module, and provides functions around these features.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 |
|
Baud rate Issue
TLDR - GPS baud rate needs to be set to 9600, in my case.
I had a problem when first testing the code. The GPS baud rate was set to 4800 in the default example program. While the BN880 supports a baud rate of 4800, the program wasn’t able to read the data received from the GPS at that frequency. No serial events would occur after the initial board setup. I looked at the information provided by the seller who claimed the module’s default rate was of 38400 bps. Trying that value yielded the same result as for the previous one. I therefore decided all possible values, starting with 9600 which worked instantly. Beginner’s luck I guess.
The data I was now reading was indicating that the Coordinates sent by the GPS were invalid. This was because I was indoors and the module wasn’t able to communicate with nearby satelites. I moved to the roof of the lab’s building and waited for the GPS to obtain a fix, which took a coouple of minutes. It first detected the date, before recognising the GPS coordinates.
1 2 3 4 5 6 7 8 9 |
|
1 2 3 4 5 6 7 8 9 |
|
1 2 3 4 5 6 7 8 9 |
|
Data Transmited by GPS Module over Serial port
The location data provided was in the format Latitude, Longitude. I verified the given location was correct by entering the given coordinates gpscoordinates.net which gave me the following. Great Success !
Files¶
Week 10 Files
References¶
- Dead Reckoning - Time&Navi
- Inertial Navigation Guide by OXTS
- Inertial Navigation Systems - Wikipedia