Horus Binary Telemetry and FreeDV

Since our last post on Testing HAB Telemetry Protocols, Mark and I have been working steadily on making the Horus Binary protocol easier to use for High Altitude Balloon (HAB) telemetry.

The objectives for this work are:

  1. Test our 4FSK Binary open source balloon telemetry over the air on a real HAB mission.
  2. Develop a GUI version of the decoder to make it usable by a wider audience. Now anyone with a SSB radio (or SDR) and Windows machine can crowd source telemetry using the new protocol.
  3. Move the art of open source, high performance telemetry forward. We now have a C API suitable for integrating telemetry protocols into other projects, and a cross platform GUI for end users. In our use case, we are outperforming Lora by a factor of 10.
  4. It’s a cool AREG club project. Now we’ve moved it off the Linux command line, club members who prefer Windows and SSB radios can get involved, along with people who like Linux and SDRs.
  5. Show how we develop open source protocols, by blogging on our work, sharing our design and test techniques and most importantly the source code.

RS41 Transmitter

Mark has been collecting RS41 Radiosondes. Conveniently, our local Bureau of Meterology launches two every day. They can be tracked, and many of them eventually fall from the sky into the hands of eager South Australian Radio Amateurs. Batteries are even included in the deal.

Mark has built a nice system to help track and recover them. Turns out they are rather hackable so he reprogrammed one to be a Horus Binary transmitter using this source code:

FreeDV GUI changes

FreeDV GUI is a cross platform (Linux/OSX/Windows) GUI program for digital voice. It’s designed to demodulate modem signals from sound cards, and I’m its maintainer so we decided to press it into service as a HAB telemetry decoder.

I spent a few hours each day for a week refactoring the code to handle 48 kHz sample rate we use for the Horus API. This code needed some maintenance so it was a useful step for my digital voice work as well. I post experimental Windows versions here. Or you can just build it from the source code.

Here is a weak (-7db SNR) Horus Binary mode test signal. You may be able to hear some tinkling sounds buried in the noise – that’s the 4FSK:

You can download this weak test signal to test FreeDV GUI using the Tool-Start/Stop Play File from Radio menu option.

Now FreeDV GUI is not for everyone. The good news is you can use the Horus API to roll your own GUI front end if that’s the itch you’d like to scratch. I have limited time, and my main focus is Digital Voice over HF radio. So I would really appreciate other people from the HAB community stepping up to help with further HAB features. If you can’t code, please consider supporting this work via Pateron or PayPal.

Bench Testing MDS

On Sat 23 June Mark and I performed some Minimum Detectable signal (MDS) tests on the telemetry stack. We used a RS41 as the Tx (13 dBm output power), many dBs of attenuators, and careful experimental design to attenuate the signal down to very low levels.

This post also describes how we do MDS tests, and includes some video.

For these tests we used my FT817 SSB radio and a RTL-SDR, both with a LNA. There was up to 160dB of fixed and switched attenuators. The Tx was placed in a metal box, and we added 100dB of attenuation directly at the output. We then routed the signal to the Rx in another room using good quality coax (so it wouldn’t leak RF). A switched attenuator was placed in front of the Rx so we could adjust the attenuation in 1dB steps.

It’s important to make sure the Rx signal is coming from the desired path. You can test this using a spectrum analyser or in our case the calibrated SNR meter in FreeDV GUI. Insert more attenuation and note how far the signal level drops. If you insert 10dB more attenuation and it drops just 1dB, well you have some RF feeding through another path!

Our calculated MDS (50% packet loss) was:

  MDS = EbNo + 10log10(Rb) + NF - 174
      = 4.5  + 10log10(200) + 1 - 174
      = -145.45 dBm

Note the baud (symbol) rate is 100 symbols/s, but 4FSK sends 2 bits/symbol, so our bit rate is 200 bits/s. Our experiments on HAB protocols gave us the Eb/No figure. The Noise Figure (NF) of our preamp is an estimate from previous work and the pre-amp data sheet.

We obtained consistent results down to about -143dBm, but from there on it was difficult to get repeatable results. The signal is so weak, and the RF finds other paths. But hey – that lets us know we are close and we can conclude there are no obvious problems in the integrated system.

The comparable Lora mode 10 with a similar (1 second) packet duration has a MDS of -132dBm. Our mode requires at least 10dB less power, which gives it four times the range using the same transmit power (every 6dB doubles the line of sight range). Or we can transmit the same distance on 10% of the power of Lora. Our solution is based on good engineering, open source software, and commodity hardware rather than a chipset. The chipset form-factor has some advantages, and we hope to develop a similar form factor solution in the future. You can help if you like.

Test Flight

On Sunday 8 July the 4FSK Binary Horus system had a work out on a real Horus HAB flight. A lot of things can go wrong on a real flight but it worked well. Many people set up receive stations for the binary protocol, and crowd sourced the uploading of packets.

Callsign Packets Rx-ed % of Flight
VK5AKH 1511 82.4%
VK5APR 1541 84.0%
VK5FJGM 1234 67.3%
VK5FLJG 1577 86.0%
VK5FTAZ 832 45.4%
VK5IX 1491 81.3%
VK5KJP 1471 80.2%
VK5RR 288 15.7%
VK5ST 1663 90.7%
VK5TRM 1719 93.7%
VK5QI-9 (Mobile Station) 1560 85.1%
VK5WTF (Mobile Station) 1039 56.7%

Here is a plot of the telemetry collated by HabHub. Note on the far right hand side that the telemetry is still being received on the ground, as the recovery team tracked through the bush to collect the various payloads – fortunately Mark’s car was nearby so the signal was strong enough to be picked up even after landing.

Next Steps

The current system requires both FreeDV GUI and a Python script to to upload packets to HabHub. An obvious next step is to put some C++ code into FreeDV GUI to create a single application. Would anyone like to help us with this task?

I’d like to see more Open source telemetry, and encourage people to build their own protocols using open source components. We have demonstrated that we can outperform closed source systems like Lora. A great next step would be our own radio hardware, such as a simple FSK transmitter that can be easily integrated with a microcontroller.

Reading Further

FreeDV GUI for Windows with Horus Binary support.
Horus binary set up instructions with FreeDV.
AREG post on the flight.
RS41 source code to make it a Horus Binary telemetry transmitter.
Wenet – 115 kbit/s system for HD images that uses the same FSK modem.
All Your Modem are Belong To Us – the start of our open source modem development for HAB.
Binary Telemetry Protocol – first flight of a similar binary protocol in 2016, using 2FSK.
Testing HAB Telemetry Protocols – bench testing the 4FSK binary protocol against various RTTY demodulators.
High Speed Balloon Data Link – start of the Wenet work, and a nice example of MDS testing @ home.

9 thoughts on “Horus Binary Telemetry and FreeDV”

  1. What kind of TX would one use if no radio sondes are at hand? Is there any project going on in that direction? I have an RTL SDR but no way to transmit in a pocket formfactor :-) I guess thats where crappy closed lora is still ahead: the cheap chinese modules market… would be great to have a counterweight in te form of a nice open solution

    1. You need a FSK transmitter. There are quite a lot of $5 FSK modules on ebay, that can be keyed from a microcontroller or RPi. An analog FM Tx can be keyed using a 4 level DAC made from a few resistors and GPIO pins to generate 4FSK, or in some cases the PLL registers can be keyed in real time. The code for generating tx packets is in codec2-dev/horus_l2.c. A Si5351 would also work up to VHF.

      1. I’ve got a code example from an older flight available in this repo: https://github.com/darksidelemm/uAvaNutBinary/

        That payload is essentially a 3.3v Arduino-compatible (ATMega328P), running at 8 MHz. The radio module used was a Radiometrix MTX2, and the TXD line on that module (which is used to pull a crystal) is connected to an analog output on the AVR.

        Transmission of symbols is performed by setting the analog output to different levels which correspond to particular output tone shifts – these levels were determined by trial and error. The code for this is here: https://github.com/darksidelemm/uAvaNutBinary/blob/master/uAvaNutBinary/MFSK.ino#L24
        As David says, a resistor network could also do the job.

        The rest of the code to generate the packet and encode it is in the main file: https://github.com/darksidelemm/uAvaNutBinary/blob/master/uAvaNutBinary/uAvaNutBinary.ino#L169

        1. We have found that non-coherent FSK performance seems insensitive to the transmitter design, e.g. a FM tx being sorta pulled at about the right shift works just as well as a SDR based DSP modulator. This is convenient, PSK modems are much more fussy.

          1. Thanks a lot for the suggestions and hints.
            My bad, I got swept away a little bit too far. Was thinking about coherent stuff, rather than plain simple FM/FSK. Note to self: Xtal and Varicap 😉

            When im already dreaming up coherent FSK, what efforts would it take going coherent and would the benefits even be worth the extra mile?

  2. Interesting choice working this telemetry decoding into the FreeDV software. It seems including some fast telemetry ahead of digital voice QSOs could turn out to be a very handy feature in some distant future version. Very interesting work, David.

  3. Hi David :),

    “Or just build from the source code.”

    This is the first time I can remember following the directions and the code actually built and ran!!!

    I am MOST IMPRESSED. Lots of fun.

    I could even download the .wav files and ‘play’ them.

    WOW!!

    Are there more horus files. I could not display what else was in that directory.

    I have been playing with FT8. Gotta wonder if any magic tricks could be borrowed from that effort. Not sure it is a fair comparison, but I see -20 decodes with FT8.

    The weak horus test file decodes perfectly and I cannot hear the signal at all!

    Nice.

    If I can find the frequencies and times again, I will try to decode 700D and friends.

    warm regards,
    John

    1. Fine Business John, good to see you managed to compile the code and run it.

      The nide thing is that there are no magic tricks – just good engineering :-)

      So to get down to -20dB like FT-8 tweak the “Rb” parameter in the MDS equation above until you get MDS = -20. It’s about 12dB lower, each 3dB means halving the bit rate so 200/(2*2*2*2) = 200/16 so 12.5 bit/s.

  4. Hi David,

    Sounds like you are ahead of FT-8? Seems to me it was doing about 1 8 bit char per second. I agree with comment about nice to optionally begin with very low SNR mode so the ‘are you there at all’ question can be answered. It seems like that is what my cell phone does. I try to send a message or make a call and it says “I can’t do that for you.”. But it seems to know I am there but very weak.

    Also, I wonder if a very low SNR mode can share transmission bandwidth with a faster higher SNR mode in any meaningful way?

    Lots of fun :).

    warm regards,
    John

Comments are closed.