FlexTrak

This is our new tracker board, replacing both PITS (Pi In The Sky) and HABDuino. It combines both of those boards into a single self-contained tracker board in Pi Zero format to fit on a Raspberry Pi Zero or other Pi board. It is supplied complete with Pi Zero W, SD card, battery holder, temperature probe and cables.

Because it is self-contained, then it will keep tracking even if the Pi is restarted or stopped. All tracker configuration is held within the tracker board so is maintained when batteries are disconnected. The tracker is configured from the Pi, and the firmware can be updated from the Pi.

The tracker can be used without a Raspberry Pi in order to save weight and increase run time on batteries. However the Pi adds several capabilities including photography, live image download and landing prediction.

These are the common features for use standalone or on a Pi:

  • On-board AVR microcontroller
  • LoRa transceiver
  • UBlox GPS receiver with antenna on-board
  • Battery power supply circuit
  • On-board and external temperature sensors
  • Settings such as frequency, payload callsign etc stored in flash memory
  • Flexible telemetry string typically includes callsign, GPS position and temperatures

When added to a Raspberry Pi, these features are also available:

  • SSDV (image transmission)
  • Configuration from text INI file on the Pi
  • Landing site prediction during descent
  • AVR programmable from Pi with no extra hardware
  • Pi is powered from the FlexTrak board

All supplied software – Arduino for the tracker and Python for the Pi – is open-source.

Installation

The tracker is supplied with a Pi Zero W and programmed 16GB micro SD card, so all you need to do is connect the tracker to the Pi, insert the SD card and connect the temperature probe to the tracker board.

Connecting To The Pi

The operating system is set up for LAN access, so you can connect a USB network adapter to the Pi Zero, connect power and the Pi will appear on your network. The Pi hostname is flextrak, the login name is pi and password is raspberry, and you can connect with any ssh client such as putty.

Or you can connect a keyboard to the Pi USB port and a monitor to the HDMI port and login from there.

Configuration

The tracker is configured on the Pi. Most of the configuration is then sent to the tracker board when the Pi tracker software starts, the exceptions being settings that only affect the Pi e.g. camera settings.

Configuration is held in the flextrak.ini file, which you can edit with any text editor e.g.

  • cd ~/flextrak
  • nano flextrak.ini

The file is in sections:

General Section

[General]
SerialDevice=/dev/ttyAMA0
PayloadID=PIAVR
FieldList=01234569ABCD

SerialDevice is the serial port that connects to the tracker. No need to change this!

PayloadID is the name that your tracker will appear as on the live map. It’s generally best to keep it short with a max of 6 characters, though it can be up to 32 characters.

FieldList is the list of fields (e.g. latitude, longitude) sent in the telemetry. Changing this is an advanced subject that will be covered in a separate document.

Landing Prediction

[Prediction]
Enabled=True
LandingAltitude=200
DefaultCDA=0.7

You can disable the landing prediction but we recommend it is left enabled. The prediction is calculated during the flight based on the current position, winds measured during ascent, and the measured performance of the parachute during descent.

GPS Setting

[GPS]
FlightModeAltitude=2000

This is the altitude at which the GPS will switch from pedestrian mode (for more accuracy on the ground) to flight mode (to work above 18km). This just needs to be set to an altitude in metres that is comfortably above your launch and expected landing sites.

LoRa Radio Settings

[LORA]
Frequency=434.225
Mode=1

The default frequency (in MHz) should be changed if you expect to be flying at the same time as another balloon using the same frequency, in which case you should it should be moved by at least 50kHz i.e. to 434.175MHz or lower, or 434.275MHz or higher.

Mode 1 is best if you are using the Pi to download camera images; if not then Mode 0 is a bit better for range.

Camera Settings

[Camera]
High=2000
Rotate=False
LowFullWidth=2592
LowFullHeight=1944
LowFullPeriod=0
HighFullWidth=2592
HighFullHeight=1944
HighFullPeriod=0
LowRadioWidth=320
LowRadioHeight=240
LowRadioPeriod=0
HighRadioWidth=640
HighRadioHeight=480
HighRadioPeriod=0

When the tracker is above High metres, then the High___ settings are used, otherwise the Low___ settings are used.

The __Full__ settings are for full-sized images that are not sent over the radio; the __Radio__ settings are for smaller images that are sent over radio. Do not be tempted to substantially increase the size of the latter images as radio bandwidth is limited and you will not get many images downloaded during the flight.

The ___Period settings set the number of settings between images; somewhere around 15-30 seconds is good, and setting zero disables photography.

SSDV Settings

[SSDV]
LowImageCount=4
HighImageCount=8

These set the number of image packets per telemetry packet. For lower altitudes it’s best to have more frequent telemetry updates (so a lower count) so you get a better final position as the flight comes in to land.

Software Update

You can update the Pi tracker software by logging in and typing the following commands:

  1. cd ~/flextrak
  2. git pull

Firmware Update

You can update the tracker firmware by logging in and typing the following commands:

  1. Make sure that the programming switch on the tracker board is set to “P” for program
  2. cd ~/flexavr
  3. git pull
  4. ./a

We recommend setting the switch back to “F” for Flight before you launch.

Manual SD Creation

If you want to program a new SD card from scratch, you can follow these steps:

  1. Burn SD from latest Raspberry Pi OS image (32-bit Lite)
  2. Create ssh file on SD in FAT partition
  3. Insert in Pi and connect to network
  4. Connect power allow to boot/reboot
  5. ping raspberrypi to check it’s on the LAN
  6. Connect to raspberrypi with putty
  7. sudo apt update
  8. sudo apt upgrade
  9. raspi-config
    1. Enable camera
    2. Enable serial port without login
    3. Set hostname
  10. sudo apt install git
  11. sudo apt install minicom
  12. sudo apt install wiringpi
  13. sudo apt install avrdude
  14. git clone https://github.com/daveake/flexavr.git
  15. git clone https://github.com/daveake/flextrak.git
  16. sudo apt install python3-picamera
  17. sudo apt install python3-serial
  18. sudo cp -f tracker.service /lib/systemd/system
  19. sudo systemctl enable tracker.service
  20. sudo systemctl start tracker.service