For a More Portable RTL2832 USB Dongle

system.png

I’m super interested in the rtl-sdr project because, as a coincidence, a large portion of the the rtl-sdr project community seems to be attracted to it’s use as an aviation communications interface (see the plentiful aircraft transponder-decoding examples). A coincidence only to my personal affinities: as a pilot, avionics engineer and possessing an unreasonable passion for aviation, these applications caught my eye. Practically, of course, the correlation between the promises of SDR and aviation use-cases makes a lot of sense: aircraft operations generally rely on several RF communication modulation schemes, mostly within a spectrum accessible by inexpensive SDR hardware. Conveniently, most of these signals are within the physical capabilities of the rtl-sdr project hardware, such as: ILS localizer and glideslope, VOR/DME navigation aids, ACARS messaging, VHF Voice Communications, UAT Data for TIS-B/FIS-B/ADS-B, Mode-S/ATCRBS transponders, and ELTs, to name a few.

In fact, there are some really cool projects out there to capture live traffic information and relay this data to popular iPad aviation applications, such as the Stratux project (an uncertified DIY, and significantly lower-cost, Stratus alternative). However, battery endurance seems to be a significant problem, as charging from an airplane is not always available or of sufficient power.

It’s probably obvious why these setups take so much power to operate. While the radio hardware alone is consuming about 1.5W, to leverage the COTS dongle and the FOSS rtl-sdr effort, it is assumed the user runs some form of high-level OS and therefore, a richly featured application-level processor.

Because much of my experience is in development of MCU and DSP-based systems (ie Cortex-M series cores), the challenge of getting this setup running on reduced hardware resources is too good to pass up. In addition, if someone wanted to slim down their product design in terms of power, size, cost and complexity, an MCU host approach may benefit them. These are very practical concerns to battery operated devices, such as something that may be used as a portable radio receiver. Of course, if I was an RF engineer, I could design a totally new front-end with appropriate VCOs/Mixers/ADCs, avoiding the problem of DVB-T integration altogether, but no, I’m not an RF engineer- I can’t even play one on TV.

Challenge Accepted #

So this marks the beginning of a project to leverage the rtl-sdr effort, but execute on a Cortex-M3/4F/7 processor, rather than a PC or RPi. Unfortunately, the library and examples, as-is, are just not made for this application (or for reading/maintaining/modifying, it seems…). The library currently requires high-level operating system resources, such as: heavy utilization of pthread, libusb and dynamic memory allocation. Basically, most of the rtl-sdr project code, although brilliant, is not written with the resource constraints of deeply embedded real-time systems in mind. So, there is going to be some serious work in understanding and then porting the basic features- much more in actually proving the real-time data capture, demodulation and output tasks are possible on the small-but-mighty CortexM-based STM32 device!


What’s up for grabs? #

Running the RTL dongle off a MCU/DSP host should yield some size, power, cost and complexity advantages over the currently predominant RPi platform. Although, from a principles viewpoint, my justification for the project is simply to utilize the minimum hardware necessary for the task. So what exactly is the advantage of this approach?

Platform Power Volume Cost SW Complexity PCB Complexity Parts Count
i.MX6 3W $20 High High 3 (PMIC/DDR/PROC)
STM32 0.2W $7 Low Low 1 (MCU)

Keep in mind, of course, that the SDR Dongle itself consumes about 1.5W and will cost between $5-$7. That being said, I feel that this is proportionally small enough such that the potential power/money savings of an MCU are well worth the effort.

Up Next #

I need to read some books, like, a lot of them. First, I’ve realized that the whole concept of SDR is super complex. I’ve pulled out my old DSP texts and also started up the youtube to feast on some knowledge. Getting to the bottom of this problem will require that I know what I’m looking at when mucking around in this legacy rtl-sdr code. Stay tuned, I’ll write back when there is some cool hardware or example to play with!

2016-09-08 17.50.01.png


PS: some resources I’ve used for acclimating to the topic:

  1. The book RF and Digital Signal Processing for Software Defined Radio is currently a bit too advanced for me. Maybe I’ll come around
  2. Great first intro to the mathematical concepts of SDR
  3. Understand IQ data
  4. Take a short refresher in DSP
  5. Great reference for various digital signal types
 
36
Kudos
 
36
Kudos

Now read this

RTL2832U and rtl-sdr on an STM32 microcontroller, Part 1

This is a series dedicated to describing the development of software-defined-radio applications on a microcontroller, utilizing the ubiquitous RTL2832-based DVB-T dongle and librtlsdr. See justification and all of the source code for... Continue →