


What is the "LoRa" device?
· LoRa is (Long Range) radiofrequency communication using license-free sub Gigahertz bands.
· Transmits small packages of data with low bandwidth to minimize power consumption.
· Low power consumption allows device lifetimes up to 5 years between battery replacement.
· Used in a wide variety of Internet of Things (IoT) applications.



The SODAQ One Design
· Operating voltage : 3.3 V
· Range with current antenna : ≈ 1km
· Operational current draw : < 50 μ A
· GPS precision : 8 m
· Up time : ≈ 20000 h per charge
· Has connections for solar charging
How it all works
GPS Data is collected by SODAQ One and
encoded with speed, battery level,
temperature and
satellite count.
Encoded information is transmitted via LoRa RF to the
TEKTELIC gateway.

The gateway transmits
data to the TTN servers over 3G networks, where it is decoded for use.
Data is retrieved from servers by the user
interface websites and displayed for the user.


The User Interface
When the user opens the interface, they are greeted with a google map depicting the last location their bike tracker was able to successfully send data. The map determines which location to show by opening a text file and viewing the latitude and longitude values which are stored at the top of the text file. These values are then loaded into the javascript (on the home page) via php. The values are then passed as parameters through a javascript function provided by google, which translates the values (coordinates) into a location on the map.
The “Update Location” button on the bottom left corner of the screen refreshes the page. If new data has been received, then the location marker will be moved to said location
The text file that the home page uses to extract data is called “data_store.txt”. It contains the node’s coordinate, speed, time of reception, and date of reception history. To view this history, the user can click on the “data” tab. The data tab will take them to the data page called “data.php”. The data page displays all of the data saved in the data_store.txt.
Data is received at URL “receiver.php”. This receives an http POST request from the TTN network. The POST request sends data via JSON format, therefore the receiver.php must convert the JSON into PHP format. The receiver then checks if the data is valid (i.e. is in the correct format and contains data). If the data is valid then it searches for the data it needs (latitude, longitude, sped, etc), adds the values to a string, and places the string at the top of the data_store.txt file. Receiver.php is at the back end of website, it is not meant to be viewed by the user, and assumes that it will only be accessed by y the TTN’s POST command. Therefore, if the user (or another person) accesses the URL, the website will show message “invalid data received”.



Carson's Container Design


As a future prototype and packaging, our team member Carson was able to create an encasing for the components in AutoCad software. Once designed, the creation was 3D printed using durable material.
References
[1]Kiefer and F. Behrendt, “Smart e-bike monitoring system: real-time open source and open hardware GPS assistance and sensor data for electrically-assisted bicycles,” IET Intelligent Transport Systems, vol. 10, no. 2, pp. 79–88, 2016.
[2]“Adding a Google Map with a Marker to Your Website,” Google, 28-Feb-2018. [Online]. Available: https://developers.google.com/maps/documentation/javascript/adding-a-google-map. [Accessed: 21-Jun-2019].
[3]T. T. Network, “How to: HTTP Integration,” YouTube, 22-Mar-2017. [Online]. Available: https://www.youtube.com/watch?v=Uebcq7xmI1M. [Accessed: 21-Jun-2019].
[4]J. van Loenen, GPS. [Online]. Available: https://learn.sodaq.com/Boards/One/Examples/gps/. [Accessed: 05-Aug-2019].
[5]D. Namiot and M. Sneps-Sneppe, “On Bikes in Smart Cities,” Automatic Control and Computer Sciences, vol. 53, no. 1, pp. 63–71, Jan. 2019.
[6]“The Things Network,” The Things Network. [Online]. Available: https://www.thethingsnetwork.org/. [Accessed: 21-Jun-2019].
[7]C. Schmitt, J. Meier, M. Diez, and B. Stiller, “OTIoT – A Browser-based Object Tracking Solution for the Internet of Things,” OTIoT - A browser-based object tracking solution for the Internet of Things - IEEE Conference Publication. [Online]. Available: https://ieeexplore.ieee.org/document/8355157. [Accessed: 21-Jun-2019].
[8]"HTTP", The Things Network, 2019. [Online]. Available: https://www.thethingsnetwork.org/docs/applications/http/. [Accessed: 02- Aug- 2019].
[9]C.S. Bontu, et.al., ``Wireless Wide-Area Networks for Internet of Things", IEEE Vehicular Technology Magazine, vol. 9, no. 1, pp. 54 - 63, 2014.
[10]A. Rico-Alvarino, et.al., ``An Overview of 3GPP Enhancements on Machine to Machine Communications", IEEE Communications Magazine, vol. 54, no. 6, pp. 14 - 21, 2016.
[11]Mobilefish.com, LoRa/LoRaWAN tutorial 22: OTAA and Uplink Demonstration With The Things Network, 24-Oct-2018. [Online]. Available: https://www.youtube.com/watch?v=d8q-hZLIf6I. [Accessed: 05-Aug-2019].
[12]"SODAQ One, reading the battery voltage," SODAQ, [Online]. Available: https://support.sodaq.com/Boards/One/. [Accessed July 2019].
[13]"2G One," SODAQ, [Online]. Available: https://support.sodaq.com/Boards/2G_One/. [Accessed July 2019].