Building A Software Defined Radio With A Teensy

[Rich, VE3MKC] has been wanting to get into Software Defined Radio for a while now, but didn’t want to go the usual PC route. He initially thought the Raspberry Pi would be the best platform for a small, embedded device that could manipulate audio, but after discovering the ARM-powered Teensy 3.0, had an entirely different project in mind.

[Rich] is using a SoftRock SDR to take RF from an antenna and downconvert it into the audio range. Doing DSP for SDR is fairly computationally intensive, but he found a Teensy 3.0 with the audio adapter board was more than up to the task.

So far, [Rich] is running the audio from the SoftRock to the Teensy where the audio is digitized and multiplied with a VFO, sent through a filter and then sent to the output of the headphone jack to a speaker. The volume pot on the audio adapter board is used to tune the VFO, something [Rich] be replacing with a proper encoder sometime in the future.

In the videos below, you can see [Rich] listening in on a contest with a tiny TFT display showing everybody on the air. It’s a very cool build, and even though it’s still very early in development, there’s still a whole lot of CPU cycles for the Teensy to do some very cool stuff.

21 thoughts on “Building A Software Defined Radio With A Teensy

  1. I really wish I could wrap my head around dsp coding… it feels like it’s just out of reach to me. This is the kind of project that reminds me of that. But, in the meantime, it will be fascinating to follow its progress. Amazing what can be done with micros these days!

    1. Rob, would you believe I’ve been working on a library to make audio DSP projects as easy as using Arduino? (full disclosure: I’m the creator of Teensy). It’s still at a fairly early stage of development, but starting to become usable.

      http://www.pjrc.com/teensy/td_libs_Audio.html

      The basic idea is you can make a DSP system by just creating objects in your Arduino sketch. You also create connection objects that cause audio to automatically move between the objects. Then you can control them using ordinary Arduino style coding, and of course you can use most other Arduino libraries (as long as they don’t shut off interrupts) to do other stuff while the audio is running.

      Again, this is all still at a pretty early stage of development and still being called “beta”. Over time, many more object types will be added to the library. Today it has only a fairly basic set, and many are only documented as examples (eg, from the File > Examples > Audio menu) and their source code.

      1. I used Paul’s Audio library to create the Teensy SDR. As he says, you connect the audio processing blocks together in your sketch and the DSP magic happens in the background. The main loop of the SDR sketch just handles the VFO tuning and the spectrum display. The Teensy SDR sketch is about 100 lines of code but of course it pulls in a lot of library code. The spectrum display uses the AdaFruit graphics library which compiles no prob and runs a lot faster on the Teensy 3.1.

        This is my first attempt at SDR software and I have done very little DSP before. Kudos to Paul – the Teensy, audio shield and the audio libraries are the bomb!

        Rich

    1. With enough processing power you can demodulate ANY signal with an SDR. Check out some of the advanced designs like the HackRF linked above which capture a huge chunk of radio spectrum and crunch on it. Antenna -> A/D -> DSP -> ears. Its the future of radio.

        1. Radio signals are used for lots of things you can’t “hear on the internet” e.g. the internet itself. Wifi, GPS, Bluetooth, garage door openers etc etc etc. Some really interesting SDR work shows up on HackaDay from time to time e.g. the guy who decoded the signals from his utility meter so he could monitor his electricity usage with a $10 RTLSDR dongle. These are interesting times – you don’t have to be a radio amateur to have fun with radio!

    2. There are powerful [but expensive] SDR’s like the HackRF and BladeRF, which start at about 50MHz and go to GigaHertz. There are cheaper dongles, and the Funcube dongle.

      As a rule, however, they rarely cover the HF bands of 2 – 30MHz. Which is where the SoftRock comes in: it converts a section of HF, typically about 100KHz wide, down to audio frequencies.

      Why should you care? Well, if you want to experiment with DSP, HF is likely to have multiple channels (SSB, CW, etc.) within that 100KHz for you to select and decode. Signals include:

      http://www.ntia.doc.gov/files/ntia/publications/2003-allochrt.pdf
      http://www.arrl.org/files/file/Regulatory/Band%20Chart/Hambands_color.pdf
      http://en.wikipedia.org/wiki/Amateur_radio_frequency_allocations#ITU_Region_1
      http://www.csgnetwork.com/hamfreqtable.html

      It’s actually disappointing – that so many fancy devices choose to ignore this portion of the spectrum.

      1. Cool infographic/posters! Thanks for sharing those here. :)

        For what it’s worth, on the bladeRF, you can bypass the LMS6002D and directly sample from the ADC to tune to HF. (Some additional circuitry is require though, if that’s not obvious.) SMBS5Z, the author of Linrad, tested this out and shared some notes and observations on his website.

        http://www.sm5bsz.com/linuxdsp/hware/bladerf/bladerf-direct.htm

        With that said, though, if all one is looking to do is stay in HF or VHF, it seems to me that the most reasabonable thing to do would be to stick with the lowest cost device that gets the job done. That SoftRock seems like it would cover the HAM bands nice nicely, and I assume at a very low cost.

        Most importantly, kudos to VE3MKC on his project! There’s some really great info on his writeup, and even more cool stuff on the rest of his page. Well…I guess I how I’ll be spending the rest of my afternoon!

        1. AFAIK the trick of bypassing the tuner and get radio signals directly into the DAC to demodulate HF signals also was documented on some SDR receivers based on cheap TV dongles. Cannot find the relevant pages now.

Leave a Reply to TruiCancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.