LoRa Tracker for TTN mapper (update!)

New: datarate selection

As I was looking at the TTNmapper.org with my results and others, I saw that some measurements where done with other data rate. This enhance the reach of the LoRa Signal (or possibility it will be received). It was nice to have that implemented in my tracker, so I could test with different data rates. In general you can choose data rate 0-6 with the new updated tracker. I also got a better enclosure.

DataRate Table EU868
0 LoRa: SF12 / 125 kHz 250
1 LoRa: SF11 / 125 kHz 440
2 LoRa: SF10 / 125 kHz 980
3 LoRa: SF9  / 125 kHz 1760
4 LoRa: SF8  / 125 kHz 3125
5 LoRa: SF7  / 125 kHz 5470
6 LoRa: SF7  / 250 kHz 11000
7 FSK: 50 kbps         50000
8..15 RFU

Minor Updates

The software got some updates to use the data rate thumbwheel. It now joins without a lock of a GPS signal. The LED turns on for the whole cycle of sending, waiting for response till sleeping.

Original project

In TTNv2 I used my mobile phone and a LoRa Node to check the reception and range of my gateway. In TTNv3 (The Stack) this is also available for Android phones not for my iPhone yet. So I took an effort to make a LoRa Tracker with GPS module. The results of this journey are here available.

I used the earlier project: a LoRa Node with button and added a GPS module (GY-NEO6MV2). It took a little while to get the timing, serial communication right.

Here is the physical result of the GPS Extension. The GPS module is not integrated in a new enclosure yet.

And the results of the measurements with SF7 and 125kHz (DR3)

Code and script for TTNStack

The code is available at: https://gitlab.com/iot-lab-org/minipill_lora_lmic_low_power_node_button_wakeup_gps

To get the connection to TTN mapper https://ttnmapper.org (Great project!) you have to follow the documentation. On one point you have to add a payload formatter. I added this on the End device. You can use this script to decode the information send to TTNv3 Stack.

The javascript code for the formatter:

function decodeUplink(input) {
var decoded = {};

decoded.lat = (input.bytes[2]<<24) +
(input.bytes[3]<< 16) +
(input.bytes[4]<<8) +
(input.bytes[5]);
decoded.lat = decoded.lat / 1000000;


decoded.lon = (input.bytes[6]<<24) +
(input.bytes[7]<< 16) +
(input.bytes[8]<<8) +
(input.bytes[9]);
decoded.lon = decoded.lon / 1000000;


decoded.alt = (input.bytes[10]<<8) +
(input.bytes[11]);
decoded.alt = decoded.alt/100;


decoded.hdop = (input.bytes[12]<<8) +
(input.bytes[13]);
decoded.hdop = decoded.hdop/100;

// number of sattelites used as accuracy.
decoded.sats = (input.bytes[14]);


return {
data: decoded
};
}

While other trackers have reached my Antenna (8dB) and Gateway (iC880A-SPI with Orange Pi) from almost 14 km.

Almost 14 km reach with DR SF11

The next idea is to develop a tracker where you can manually change the DR and power settings.

Leave a Reply

Your email address will not be published. Required fields are marked *