Raspberry Pi Takes Control Of Ham Radio

Today’s ham radio gear often has a facility for remote control, but they most often talk to a computer, not the operator. Hambone, on the other hand, acts like a ham radio robot, decoding TouchTone digits and taking action — for example, keying the radio and reading off the weather — in response to the commands received.

The code is in Python and uses numpy’s fast Fourier transform to identify digits. We’d be interested to test the performance of that compared to doing a Goertzel to specifically probe for the 8 digit tones: there are four row tones and four column tones. On the other hand, the FFT is handy and clearly works fast enough for this application.

The project is actually a spin off from [notpike’s] failed project to send paging tones. It is set up for a specific Yaesu handheld, but any radio should be workable with it. However, if you are connecting it to the same radio, there were a few tricks involved that you’ll want to read about.

Remote operation is getting more common and this probably would be one place to start if you wanted to build your own remote setup. If you ever thought about being a ham, we can do it for about $50.

16 thoughts on “Raspberry Pi Takes Control Of Ham Radio

  1. And, hopefully, the software and hardware is designed to fail in a manner consistent with national regulations and etiquette. The station operator is ultimately responsible.

    1. A radio technician I knew told a story about something like that.

      There was a pager transmitter setup somewhere, and the guy I knew was sent to do some maintenance work on it – I don’t remember what.

      He goes onsite and finds the radio in the rack.

      The plastic housing was melted and had run down all over the transmitter.

      The relay that triggered the transmitter when sending the pager signal had gotten stuck. The transmitter had been operating for days (or weeks) non-stop. It got hot, and melted the housing, but it kept right on trucking.

      Motorola made some damn good radios back then. The incident happend in the late 1980s, and I heard about it in the early 1990s.

        1. It wasn’t a repeater. It was a pager transmitter.

          That’s a standard radio with a controller to generate the POCSAG and key the transmitter.

          Many of the radios had plastic covers over metal frames.

          It was also definitely Motorola. The guy was a technician for Motorola, Germany.

  2. With just 8 Goertzel filters it will be difficult to meet the DTMF performance specification (actually very difficult to meet). But it will work perfectly fine in practice.

    1. Eh. No.

      The Goertzel algorithm the the “go to” method for detecting DTMF tones with a microcontroller.

      https://www.embedded.com/the-goertzel-algorithm/

      The FFT has to calculate a lot of bins to be able to separate the DTMF tones. That’s a low of calculation, and a lot of memory.

      The Goertzel algorithm only calculates the bins you need – 8 of them for DTMF.

      You can tune the Goertzel to be as narrow as you want – it doesn’t take up any more memory or processing power if it is narrow.

      You can tune the Goertzel react as fast as you want – again, it doesn’t change the processor load or memory requirements no matter how quickly it reacts to the signal.

      The speed of reaction and the width of the bins are, of course, inversely proportional. Super fast and super narrow is impossible. You can tune them both, however, to decode DTMF tones according to the standards.

      The FFT isn’t any better in that regard. If you want narrow bins, you need more data (and more bins for the FFT.) It takes longer to get them, and longer to process them. If you want fast, then you have to use an FFT with fewer bins, or do overlapping (which is even more comuptationally expensive.)

      Really, DTMF is better done with the Goertzel algorithm then with an FFT.

      1. The problem is not detecting the tones, for this Goertzel is perfect. The issue is mostly voice rejection. There are two standardized test-benches for a DTMF decoder: MITEL and Bellcore. A pure 8-filter detector will find many tone sequences in the Bellcore voice tapes. Many real life detectors look also at the harmonics of the tones in addition to a few wideband channels and energy detection.

        Fancy detectors with more than 16 bins or so benefit from FFT as it is more efficient than Goertzel if you need a high amount of bins.

    2. “Just 8.” Eight is all you need. One for each tone of the set of eight DTMF tones. I don’t see how you can figure you need more than 8 filters to detect 8 tones.

  3. I’ve always wanted to do something much like this using FreeSWITCH utilizing the IVR functionality but never looked into it or if its even possible as its been many many years. Good work!

  4. Using DTMF over radio for remote control of hardware is very useful, I was doing it back in the Eighties with my VIC20 and Commodore 64 computers. The TTL-level output from the ‘202’ and ‘8870’ DTMF decoder chips sourced from many manufacturers were directly compatible with the game paddle port on the Commodores and determining which DTMF tone had been detected by PEEKing a memory location on the computer when the DV (digit valid) pin of the DTMF decoder chip activated the FIRE pin on the game paddle port was a piece of cake. I built a radio/telephone interface known as a ‘simplex autopatch’ and several remote control projects to turn on/off yard lights and whatnot. Considering the low cost of a DTMF decoder chip I’m confused as to why someone would write an entire DTMF decoding routine in software other than for the intellectual challenge of doing so. It seems like a needlessly complex and error-prone way of accomplishing a simple task and reminds me of those that use an Arduino for something a 555 timer chip could accomplish. I’d rather spend a few bucks and let the professionals decode the DTMF with their on-chip filters and anti-aliasing built in and save the code writing for the tasks I wish to accomplish with the device.
    https://www.ebay.com/sch/i.html?_nkw=Dtmf%20Decoder%20Chip

Leave a Reply to NotPikeCancel 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.