1154

Want to track your high altitude balloon / fleet using simple and easily available LoRa transceiver & Arduino software ? This is it.

HAB / Fleet tracking using LoRa and Google Map

[The green marker one is the start position, the balloon marker is the current position]
WhatisGPS?
Its a coordinate of the physical position of an object on the face of the earth. Normally four coordinates – Time, Latitude, Longitude, Altitude are sufficient to define the physical position of an object over time but the GPS satellites provides more data like date, speed, bearing of the object as well. Now combined with all these when you mix Google map with it ,it gives a complete picture of the location of the object in geographical sense. Only few countries have their own GPS satellites – US, China, Russia, European countries & India. However, we will be using only US GPS sat data through our common NMEA satellites GPS receivers.

HAB Tracking: This project was mainly intended to track high altitude balloon while in flight. The payload of the balloon has the GPS sender which continuously sends once per two seconds the GPS data - Latitude, Longitude, Altitude, Speed, Time and Balloon ID which is received by the hand held or the base station on line-of-sight. The base station or the hand held unit decrypt the data and then dumps it in a MySql database and at the same time place it on a Google map to get the continuous update of flight movement on Google Map. [Internet connection & GoogleMap ID is required for viewing it in Google Map ]

Vehicle / Fleet Tracking: The tracking of fleet (Say, more number of Balloons ) can be done very easily on this principle. Only while the balloon data can be received on line-of-sight the fleet data cannot, therefore a repeater unit is to be placed at line-of-sight on a hill top where from it will be relayed back to the base station or the hand held unit. The ID numbers will be used to track down a particular vehicle. [In case of a open-cast-mines where the vehicles move at sub-zero level the repeater unit can be removed by placing the base station at some high hill position]

Two way communication: The two way communication – Sending commands from base station to the balloon (in case one needs to abort the flight) is also possible.So is possible to send command from the base station to the moving fleet out in the middle.

Sender Unit: For sender unit we used LoRa 433 MHz 200 mW spread spectrum transceivers. Since the frequency band and the emission power is not in the normally free zone (2.4 GHZ zone) ,one may need to take license for use depending upon the country of usage. Other than the SS radio , we used GPS receiver, 3.7 volt 550 mWH Li-Ion battery, Arduino MCU, Relay and a few discrete components.

Receiverunit:The base station or the hand held units is made of LoRa 433 MHz, 200 mW spread spectrum transceivers. Since the frequency band and the emission power is not in the normally free zone (2.4 GHZ zone) ,one may need to take license for use depending upon the country of usage. Other than the SS radio , we used 3.7 volt 550 mWH Li-Ion battery, Arduino MCU and a few discrete components.

Repeaterunit:This is nothing but a receiver unit with an additional SS transceiver fitted, which repeats the data for the ground station. Two radios can be connected on SPI bus or one SPI and one UART bus.
VariousSStransceivermodule:
SPI UARTUSB

Installation:Each unit has a 6 Dbi rubber antenna which is to be in line-of-sight of the other unit. For the HAB it must be on the bottom of the pay load while for the vehicle or fleet it must be on the top of the super structure. This is just to make the line-of-sight possible.

Senderunit Schematic:

Only three things are required – GPS receiver, Spread Spectrum transceiver ,Arduino MCU & 3.7 volt Li-Ion cell. The DS18B20 temperature sensor is optional in the schematic. The Abort ckt. relay is connected to the A5 pin to receive any abort command from the receiver unit which on receipt ,issue the abort command through that relay. Abort command is issued from the receiver unit. [The abort circuit could be - separation unit between balloon and the parachute, vehicle starter unit etc]. An additional Li-ion cell is used to provide 6V volt supply for the relay operation.

Receiverunit:
The receiver unit consists of an Arduino , LoRa 433 MHz 200 mW transceiver and a computer with Internet connection. The Arduino on receipt of data from the sender unit, prints on the Serial terminal. To send abort command one has to connect A0 with +5V so that the analogRead(A0) = 1023 satisfies. This can be achieved by using a small pot such that on extreme position it will connect the A0 with the +5V terminal.

Now we will issue one shell command which resides in /etc/rc.local file such that every time the computer starts, this shell program fires up.

The shell program in turn runs a PHP program – gpsrfm98_ver2.php. This program listens to the serial terminal, collects data and stores in a MySql database. The last data is used to draw the position on the GPS map. [ Before reaching this stage, please create a MySql database with name gps and password 'gps123' and create the table 'markers' in it with the following fields - ]
floater-table:
ReceiverSchematic:
GoogleMaptracker:Google map has beautiful API which can be used to create one's own map. But to use customized Google map one has to create a Google ID from this site.https://developers.google.com/maps/documentation/javascript/examples/
Once that is done one can proceed with Google map programming. The refresh when done with meta tag found to have very jarring effect on the final map output. Therefore, the refresh of the map is achieved by javascript.

Flowchartofthesequenceofprograms:
gps.sh:This is the shell script which loads the gpsrfm98_ver2.php when the computer starts. This program to be run first. To ensure that it is running everytime the computer starts, the following line is added the /etc/rc.local file ...

gpsrfm98_ver2.php: It listens to the serial port /dev/ttyUSB0, /dev/ttyUSB1 , (you can add more) and whichever is on, it collects the GPS data coming from the receiver Arduino and then do processing and then dumps it in the gps.markers table. The last data is used to create position on the Google map.

index.php:This php program is normally kept in the Web Server Document root directory so that the client or the hand held devices can directly access it over Internet. This file first initiate the Google map by providing the Google api key (You have to create your own Google api key from the site https://developers.google.com/maps/documentation/javascript/examples/ ). Next this program opens the gps.txt file and reads the current data. Then using javascript it draws the Google map. Inside javascript, the variables are supplied using PHP scripts. The map has onboard two markers – the start position and the current position.

index.html:This file is the final loader file which loads the index.php with a refresh rate of 10 seconds using javascript. This file is also to be kept in the Web Server Document root directory so that the client or the hand held devices can directly access it over Internet.

PhpSerial.php:Is an associated file for reading serial data by PHP in gpsrfm98_ver2.php

Finalroundup:Finally when everything is OK, just open up the index.html file in any browser and the live data will be ticking in the Google map. Two types of map can be set to use – ROADMAP & HYBRID. This choice is available in the index1.php file.


My Prototype: The Sender

[TheunitusesoneLi-ioncellof3.7volt]

The stand alone Receiver:

Aftermath:
Shortly we are going to deploy LoRa for some more areas where remote telemetry through heavily interfering atmosphere is a challenge like bringing remote cooling tower individual cell temperature data to the control room, remote ash slurry line temperatures etc. We will place the receiver at the height of boiler where from it will be in LOS for all the respective senders.

bye bye,
S. Bera / Vindhyanagar

[One may need to take license depending upon the country of use and emission power used ]