Creating a TTN Mapper GPS node with the Things Uno

Recently I went on a DofE expedition in the Brecon Beacons. I wanted to try mapping any LoRaWAN coverage while I was there using TTN Mapper, but we weren’t allowed our phones so I couldn’t use the app.

However, TTN Mapper also allows you to use nodes that broadcast their GPS coordinates, thus removing the need for a phone, so I decided to try combining the school’s Things Uno from the DVLA competition and a NEO-6M GPS module which I wasn’t currently using. The data is forwarded to TTN Mapper via an integration in the TTN console.

I did most of the work on the node the day before the expedition because I’d been revising for my end of year exams, yet somehow managed to get it working in time. It ended up as a plastic box containing the Things Uno and the NEO-6M along with a USB battery pack:

The Things Uno and the NEO-6M in the box

The code I wrote can be found here. I used the TinyGPS++ library and SoftwareSerial to interface with the NEO-6M. I got stuck for quite a while because it turns out that the Arduino Leonardo (which the Things Uno is based on, despite its name) can only use SoftwareSerial on certain pins, and I was trying to use pins 2 and 3 which didn’t work. Lesson learned!

I also had time to try and reduce the power consumption. I used the LowPower library to put the Arduino into idle mode, turned off the built in LoRa radio module and also sent commands to turn off the NEO-6M between transmissions. I checked with a multimeter and the NEO-6M still consumed around 11mA when turned off, which is a lot but still better than the ~50mA it used when turned on.

Unfortunately there wasn’t any coverage in the area we were walking – I wasn’t really expecting anything since the nearest gateway was 15km away on the other side of a mountain. However, I still had fun making the node and learned some GPS concepts such as HDOP which will be useful for my computer science NEA.

Leave a comment

Design a site like this with WordPress.com
Get started