Giter VIP home page Giter VIP logo

tbtracker-rx's Introduction

TBTracker-RX

A cheap, mobile LoRa High Altitude Balloon receiver for Arduino based on esp32 and sx1278 with support for GPS, a web interface and an OLED display. As of v0.0.9 it supports ssdv.

TBTracker-RX is a sketch for receiving LoRa transmissions from high altitude balloons. It will receive, decode and upload those transmissions. It is designed to upload telemetry data in the correct format to https://amateur.sondehub.org

Notes about v0.0.12 (latest release)

  • Fixed a bug that caused your position wrongly uploaded to Sondehub
  • Added a button to the webinterface for (re)uploading your position manually to improve chasing a balloon.

Hardware needed

The sketch is designed to compile in the Arduino IDE and work with a TTGO T-Beam board but it will also work with seperate hardware modules.

You will need at least:

  • esp32 based board (T-Beam recommended, but it should work with most esp32 based board)
  • LoRa radio module (SX127x or RFM9x module)

Optional components:

  • GPS module (Ublox, ATGM or any compatible module)
  • SSD1306 LCD display (or compatible)

Libraries needed

The sketch uses several libraries. Some will probably already be installed in your Arduino IDE but if not, follow the directions below:

  • ArduinoJson library (install from the library manager)
  • Adafruit_SSD1306 library (install from the library manager)
  • Adafruit_GFX library (install from the library manager)
  • Adafruit_BusIO library (install from the library manager)
  • Radiolib library (install from the library manager)
  • TinyGPSPlus library ((install from the library manager)
  • XPowersLib (needed as of release V0.0.11. Install from the library manager)
  • ESPAsyncWebServer library (download: https://github.com/me-no-dev/ESPAsyncWebServer/archive/master.zip )
  • AsyncTCP library (download: https://github.com/me-no-dev/AsyncTCP/archive/master.zip )

Install the last two libraries from the IDE menu: Sketch -> Include Library -> Add .ZIP library

settings.h

You will need to change the values in settings.h before you can use the sketch. Some important settings:

  • DEVFLAG: Set this to true if you want to test uploading to Sondehub but don't want to store the data in the Sondehub database. The telemetry will not appear on the map. You can still check the Serial Monitor to check the upload status of your data. Recommended for testing.
  • WiFi settings: You can add up to three wifi networks to the sketch. The software will automatically select the strongest network. Good choices are probalby your home network and the hotspot network from you mobile device.
  • CALLSIGN: Change your callsign. It will be shown on sondehub
  • UPL_LAT,UPL_LON,UPL_ALT: change these to your current location. It will be used when the software cannot get a valid GPS position
  • UPLOAD_YOUR_POSITION: if set to true, the software will upload your position periodically to Sondehub, so it will be show on the map.
  • UPLOAD_PAYLOAD_PACKET: if set to true, the software will upload received telemetry to sondehub
  • LORA SETTINGS: Change the frequency and LoRa mode (currently I only tested mode 2)

Compile and run

Before you hit the compile button, be sure to select an ESP32 board in the Arduino IDE. Otherwise you will get compile errors! << https://docs.espressif.com/projects/arduino-esp32/en/latest/installing.html#installing-using-arduino-ide <<

Compile, upload and run the sketch. Use the Serial Monitor to monitor the software. It will try to connect to one of your specified WiFi networks and show the IP-number it got from DHCP. The IP-number will also show on the OLED display (if you have one of those installed on your board).

Using the web interface

Just enter the ip-number in a browser and the web interface will show. From the web interface you can change the RX frequency and toggle the option to upload telemetry to Sondehub. The main webpage will autoload every 20 seconds and will show you which direction you need to go if you want to chase your balloon.

Versions

v0.0.12

  • 14-MAY-2024: Solved a bug in uploading your position to sondehub every 30 minutes
  • 15-MAY-2024: Added a button in the webinterface to manually upload your position to sondehub

v0.0.11

  • 28-JUN-2023: Added GPS debugging option in settings file
  • 28-JUN-2023: Solved: Packet is uploaded with the wrong LoRa mode text.
  • 29-JUN-2023: Compatibility with Radiolib 6.0.1 checked
  • 28-JUL-2023: Added support for the APX power management chip which is found in the v1.1 and v1.2 T-BEAMs

v0.0.10:

  • 22-MAY-2023: Architecture changes to minimise the time taken to get the radio listening for the next packet
  • 22-MAY-2023: Updated for RadioLib 6.0.0 - https://github.com/jgromes/RadioLib/releases/tag/6.0.0
  • 24-MAY-2023: Re-enabled OLED Flash and Flash Pin on Packet Receive

v0.0.9:

  • 03-MAR-2023: Serial port baudrate to 115200
  • 15-MAR-2023: Added support for SSDV
  • 20-MAR-2023: changed uploading part of the code. uploading will now take place from a queue and in a seperate thread
  • 07-APR-2023: disabled temporary OLED flashing, time since last packet on the OLED display and flashing a pin when a new packets is reveived

v0.0.8:

  • 23-FEB-2023: Added support for different visual modes for the OLED (default, all, chase)
  • 24-FEB-2023: Added support for a "FLASH PIN" which will set HIGH for 300ms when a packet is received (new entry in settings file!)

Many thanks to Star Holden, Luc Bodson and Eelco de Graaff for testing and suggesting improvements

  • Example of the three OLED modes

IMG-6557 IMG-6559 IMG-6555

v0.0.7:

  • 03-FEB-2023: The link to Sondehub in the web interface now opens in a new window
  • 03-FEB-2023: Software now works also without WiFi (data on Serial output or OLED display)

v0.0.6

  • 29-JAN-2023: Added a parser for the APRS packets to display on the Serial interface, webinterface and SSD1306 display

v0.0.5

  • 21-JAN-2023: Print length of received packet in the Serial monitor
  • 21-JAN-2023: Check if the received packet is indeed a HAB telemetry packet
  • 21-JAN-2023: Removed the RAW telemetry string from the Serial monitor to avoid double info and unreadable characters
  • 21-JAN-2023: Added support for LoRa-APRS packets
  • 21-JAN-2023: Added a packet Log trail in the web interface

v0.0.4:

  • 14-JAN-2023: Added support for LoRa Mode 5 (Explicit mode, Error coding 4:8, Bandwidth 41.7kHz, SF 11, Low data rate optimize off)
  • 14-JAN-2023: Added support for LoRa Mode 3 (Explicit mode, Error coding 4:6, Bandwidth 250kHz, SF 7, Low data rate optimize off)
  • 20-JAN-2023: Added support for LoRa Mode 0 (Explicit mode, Error coding 4:8, Bandwidth 20.8kHz, SF 11, Low data rate optimize on)
  • 20-JAN-2023: Added support for LoRa Mode 1 (Implicit mode, Error coding 4:5, Bandwidth 20.8kHz, SF 6, Low data rate optimize off)
  • 20-JAN-2023: Added support for showing and changing the LoRa Mode in the webinterface
  • 20-JAN-2023: Solved several bugs
  • 20-JAN-2023: Added autotune to the radio (based on the frquency error calculated by the radio)

v0.0.3:

  • 06-JAN-2023: Added SNR, RSSI to the web interface
  • 06-JAN-2023: Added time since latest packet to the web interface
  • 06-JAN-2023: Made the Google Maps links open in a new window
  • 06-JAN-2023: Solved several reported bugs / unexpected behaviour
  • 07-JAN-2023: Changed some UI language. (I apologize, English is not my native language)

v0.0.2:

  • 23-DEC-2022: Added upload result to the web interface
  • 23-DEC-2022: "comment" string is now disabled by default
  • 23-DEC-2022: Try to determine if the packet received is an actual HAB packet or an invalid or unknown packet
  • 23-DEC-2022: Changed the wording of "Test mode" in the webinterface

v0.0.1:

  • 19-DEC-2022: Changed to x.y.z version numbering
  • 19-DEC-2022: Moved version number to TBTracker-rx.ino from settings.h
  • 19-DEC-2022: The OLED display will now show frequency updates
  • 19-DEC-2022: Added a way to change the DEVFLAG in the webinterface

v0.1รŸ:

  • 18-DEC-2022: Initial version, released in the Facebook HAB-NL group

Work in progress

This software is a work in progress. I made it to track my own balloons. Use it at your own risk, there are no guarantees. Let me know if you find it useful or not and as always don't forget to have fun.

Roel.

TBTracker-RX-001 TBTracker-RX-002 TBTracker-RX-003 tb-tracker_v003

tbtracker-rx's People

Contributors

kevwal avatar roelkroes avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

tbtracker-rx's Issues

SSDV Testing

Im currently testing the latest release! Could you add more documentation on how to use SSDV, do you have a SSDV sketch for a tracker? I guess your using a PTC06 jpeg camera?

No time for flashPin() in v0.0.9

Hi Roel

Just a thought, how about seperating out flashPin to FlashPinOn and flashPinOff and then call flashPin() here:

packetCounter++;

if (validPacket)
{
  flashPinOn()
  packetCounter++;   
  getMetafromRaw((char *) buf);
  parseRawData((char *) buf);
  flashPinOff()
}

I havent had the time to time that code, but if it really doesn't take long enough to see the flash, then you could of course just toggle the LED for each packet:

void flashPinToggle()
{
    digitalWrite(FLASH_PIN, !digitalRead(FLASH_PIN)); 
}

That code can be optimised massivley if needed, but at the cost of compatibility.

Just a thought :)

Cheers
Kev

Skipping packets if not enough time between packets to process them - v0.0.9

Hi Roel

We have been discussing the skipping packets issue in v0.0.9 and 1) the need to do everything possible to get to receiveLora() as soon as possible after the flag is put up and then 2) when in receiveLora() do the minimum possible before calling radio.startReceive again, just save the data, correct the frequency and back to radio.startReceive.

As you know I did a rough and ready test and got it working, enabling the gap between packets to be just a few mS, but I need to do the work properly as lots is broken from my hacking around right now.

I have started work on doing it properly and will submit a pull request and link to this issue when I have something ready for wider testing :)

Cheers
Kev

GPS update to Sondehub

Hello,
thank you for this great sketch :)

I have just got this running on my Lilygo Tbeam V1.2
I have set my default GPS lat & Lon with alt.

My GPS pins on the board are stated as 34 and 12 which appears correct in settings.h
The GPS has lock and flashes the RED LED under the Chip.

I show up on Sondehub at my default gps coordinates, but does not update as i move along...
any suggestions?

on the oled, it says chase: and no parameter am I missing a way to enable chase maybe?

Thanking you,
Gavin

Oled display additions

Hi Roel

Firstly thankyou for sharing your work. Im using both a modified version of your tracker (a mix of your latest tracker code and code from a few years ago that you had power pins. I use the power pin to shutdown the gps after a fix) and your new Tracker RX.

I have added code to the telemetry screen which allows more to be viewed.
Ive also increased the time PACKET RX stays on screen to 1 second.
It would also be good to add "seconds since last packet" to the telemetry screen.

I would like to beta test / contribute to this code. [email protected]

Star

Request for feature regarding WiFi

Issue: when you have an environment with Wifo Mesh network, the device will lock on the wifi network, but it seems it uses somewhere the mac adress of the access point and not only the wifi ssid. This causes a disconnect from the network during transport in the house. The only resolution is reset, then the system is reconnected but manual settings are lost.

It has no prio at al, but practical to know about.

Happy 2024

Scanner feature

Hi Roel, thanks for that great Software!!!
I've just running 2 TBeams here 24/7.
As the Frequencies are not standarized, the idea, is to implement a scanner function.
Means for a stationary RX to have a switch at the web interface, where can set it on and put a list of freqencies to scan.
If scanner mode is enbabled, the the RX looks 2/3 Min. at the freqency, if no vaild signal, then step to the next one and so forth.
If a valid paylod is found, scanner stops until they lost the signal, wait a while appr. 10min, and scanner starts again...

I guess that helps a lot to catch the ballons:-)

What do you think?

Greetings Joachim

battery ttgo status

zou ik handig vinden dat ik in het veld niet uit val en tijdig een powerbank kan aansluiten.
accu spanning van de TTgo.

I would find it useful that I do not fall out in the field and that I can connect a power bank in time.
battery voltage of the TTgo status

LoRa parameter programmable?

Great work, Roel!
For me, it would be nice to set different LoRa parameters via HTTP-interface. E.g. spreading factor, bandwidth and so on. Could this be a feature for a next release?

Frequency is changed

Try via webinterface to change the frequency to 434.700 but ttgo displays still the 434.126 mhz.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.