Arduino Repeater Controller

Overview

This was one of the first projects I did using the Arduino with Amateur Radio. At the time, I only had a FT-1900 radio and a couple hand-held radios; one of which was a Baofeng submini handheld. I was hoping to connect them together easily and cheaply to build a crossband repeater since I couldn't afford something fancy like the popular Yaesu FT-8800/8900 dual-band dual-tuner radios with built in crossband capability.

Ultimately this project didn't work out for a variety of reasons. It did function, however the VOX capability was very unreliable and finnicky to adjust the levels "just right" for each time I set it up. The Baofeng handheld also had a nasty habbit of locking up in TX when anything was plugged into it's headphone jack, apparently a known defect with the series that I had chosen. I still considered it a great exercise in learning, so I am documenting it here.

If you're serious about building a good repeater controller on an Arduino, this can absolutely be a starting point; though I would make some modifications to the hardware/software (e.g. bring in a carrier-operated squealch signal instead of VOX). I would also strongly urge anyone who wants to build a repeater controller to first consider more feature-rich alternatives such as Svxlink running on an old computer or Raspberry Pi. I use Svxlink for my Echolink node (also documented under my Hobby Projects) and it has a vast number of features including simplex operation, repeater operation, voice prompts, linking, and DTMF decoding among other things.

UPDATE 17-Sept-2016: After getting feedback, I've attempted to make modifications to this for supporting COS (Carrier Operated Squealch). More information is available at the end of this article.


Design

The controller was prototyped on an Arduino Uno microcontroller board, though I also took this project as an opportunity to learn how to shrink projects following a guide from MIT High-Low Tech Group (may differ from my code, the pinout "cores" changed since I did this project) and programmed it into an ATTINY microcontroller. They are smaller but can be programmed with the Arduino IDE very easily and perform a large number of the same tasks. This also has an advantage (though less of an issue now with clones from China all over the market) that the ATTINY only costs a couple dollars vs the Arduion Uno which was around $40 at the time. The whole thing was built on a fragment of breadboard and liberal use of electrical tape kept it from shorting on the Altoids tin.

 

This is the completed repeater controller in an Altoids tin with adapter wiring for 2 radios I had at the time. By separating the Speaker, Microphone, and PTT into 3 connectors it provides lots of flexability for future radios and a trivial interface to connect things -- I could just as easily connect to a laptop soundcard or radio scanner as the "input".




This is the schematic I used to connect the Arduino/ATTINY to the radios. The left/right connections document where the radios are connected. The lines labeled "VOX sense", "Code Out", "PTT Control", and "Input Volt Sense" were connected to the Arduino/ATTINY microcontroller I/O pins.

The software I wrote is available here, on my GitHub page. It's not especially elaborate but I tried to pack as many features as I could into the memory I had to work with in the ATTINY.


UPDATE - Adding COS

After exchanging emails with a fellow operator, WA6IPZ, I have made some modifications to support radios using COS. This should greatly improve the reliability of operation compared with VOX detection. While I haven't personally tried this design the changes are very minimal, only adjusting the input that is used to trigger a received transmission. All the other logic remains the same. Note, the COS input from the radio should not exceed the voltage levels of the Arduino (usually 5V or 3.3V depending on what model Arduino).



This is the schematic that would be used to connect the Arduino/ATTINY to the radios using COS instead of VOX. The left/right connections document where the radios are connected. The lines labeled "COS Sense", "Code Out", "PTT Control", and "Input Volt Sense" should be connected to the Arduino/ATTINY microcontroller I/O pins.

The modified software for COS support is also available here, on the same GitHub page. Again, it's not especially elaborate but I tried to pack as many features as I could into the memory I had to work with in the ATTINY. There are configurable fields to adjust whether COS is triggered by HIGH (+V) or LOW (0V) signals depending on the radio.

If it's used as a "traditional" repeater instead of bi-directiona/crossband you could just tie the unused COS sense pin (from TX radio) to either HIGH or LOW depending on what you configure so it thinks the unused input is always "idle" and then leave the unused PTT pin (for the RX radio) disconnected on the microcontroller.