This page describes how to use at $25-$35 Raspberry Pi single board computer, a USB sound card, some Python code, and a two-way radio to create a simplex repeater. A simplex repeater is also known as a store-and-forward voice repeater. Unlike a traditional duplex repeater that receives and transmits at the same time on two different frequencies, a simplex repeater first receives a voice message, stores it, and then retransmits it out. Often this is done on a single frequency, although it can be done using different frequencies for receive and transmit. The advantage of a simplex repeater is that it is very small and compact, since no complex tuned filter cavities are needed. The disadvantage is that there is a delay between when a user speaks and when their message is repeated, and this can lead to confusion and “doubling” unless all operators are well-disciplined and understand how the system functions.
The Raspberry Pi is a single board computer that runs Linux. A Python script uses PyAudio to read in audio from an attached USB sound card, which is in turn attached to the audio output of the two-way radio. When audio is detected, the script will record audio until a silence of predetermined duration is detected, and will then key up the radio (using a GPIO pin on the Raspberry Pi) and replay the audio to the radio’s microphone input. The video below shows the system in action.
To interface the Raspberry Pi with a two-way radio, you need to connect the audio output of the radio to the audio input of the Pi and vice versa. You also need an interface circuit to allow one of the General Purpose I/O (GPIO) pins of the Raspberry Pi to key the push to talk (PTT) line of the radio. Below are example schematics for interfacing the Raspberry Pi with Icom and Kenwood handheld radios. Other radios should be similar to one of these.
Future versions of the PeaterPiPyr will also include provisions to use the COR output of a radio to trigger recording, but for now it is audio level triggered (VOX operation).
To get started using your Raspberry Pi as a simplex repeater, first follow the steps on this page to get your Pi configured and to install the necessary prerequisites. If you follow the steps on that page you’ll end up installing a few things you don’t really need for the PeaterPiPyr, but that’s ok.
Once you have all of the prerequisites installed, you can download the source files here. Simply and copy this tarball into a directory on your Pi and uncompress it:
tar zxf PeaterPiPyr2.tgz
There are some parameters that you’ll need to set up by editing the config.cfg file. You can do this by using the built-in nano editor (from the command line) or Leafpad (in the XWindows GUI). Before editing the config.cfg file, you’ll need to determine the index of the pulseaudio input and output so that you can set the input_device_index and output_device_index parameters accordingly. You’ll also need to determine what level to set the audio_threshold parameter to. To help with these tasks, I’ve include a LevelMeter utility. To start it, navigate to your PeaterPiPyr directory and type:
The utility will list all of your input and output sound devices. You want to find the input and output named pulse. Make note of the index (number) of these, as this is what you’ll want to specify for the input_device_index and output_device_index in your config.cfg file.
For more detail: Rhe PeaterPiPyr – a simplex repeater using the Raspberry Pi
Current Project / Post can also be found using:
- simplex repeater
- simplex repeater raspberry pi