Thursday, January 2, 2020

Digi-Mode Interface on the cheap: Arduino Nano VOX BOX

There are many 'digi mode interfaces' available that require a Serial port to control PTT on the radio.
As most modern PCs do not have a proper Serial port on them A USB to Serial adaptor is required in order to get PTT / TX control to work.

BEWARE: Many cheap (and some not so cheap) USB-Serial converters/adapters only provide very basic Data IN and OUT serial lines with NO hardware flow control support. If You do get a digi-mode interface that needs a serial port and intend to purchase a USB-Serial unit make sure it does actually have fully working CTS/RTS/DTR etc hardware flow control before You buy or You will end up with a Serial device that will Not work with Your interface!

Of course there are 'digi mode interfaces' available that only require a USB connection to the PC but they tend to be rather expensive. (even the older ones that use a Serial port are not particularly cheap)  If funds are tight, or You just don't want to pay over the odds for a simple interface unit there are much cheaper ways to set up your PC and radios for digi mode operation.

Home Brew Digi-Mode Interfacing.

Working FT8 (and other digi modes) can be quite easily achieved with only simple audio cables connecting the radio and PC and manually switching TX/RX.  I have used good quality shielded cable with 600ohm audio isolating transformers in line to ensure there are no potential difference / ground loop issues between radio and PC.

Using this very basic setup on both radios I worked 500+ stations in 50+ countries but it did become tedious manually operating the TX toggle button on the radios. (MOX button on FT 707 and TRANSMIT button on Icom IC-756) 

As I had an Arduino Nano doing nothing I decided to use it to make a VOX BOX that would use the audio output from the PC to control TX / RX on the radios with more accurate timing than pushing buttons on the radios manually.
 A socket on the rear of the radios is used to feed received audio from the radio into an external USB sound card and accept audio input from the same USB sound device on the PC.  

Feeding Audio into the Arduino Nano.

The audio LINE OUT from the PC is connected to the radio but it is also connected through a capacitor to a simple potential divider circuit comprising of two resistors which feeds into an analogue input on the Arduino Nano via a second capacitor. This effectively gives the Arduino a relatively smooth LINE level audio input at a decent level that is easy to handle by reading the analog input pin voltage on the Arduino. There is also a resistor from the input pin to ground that 'bleeds off' the charge from the second capacitor when the audio input stops, this ensures the Arduino reacts rapidly to the input level drop when the audio output from the PC stops.

NOTE: On the Arduino Nano board the command analogReference(INTERNAL) sets the reference voltage for analog input pins to 1.1V instead of  the default analogReference(DEFAULT) that uses the on-board regulator voltage (+5v) for the analog input reference voltage. 
Using analogReference(INTERNAL) as the voltage reference provides more accurate level sensing for standard audio LINE LEVEL input (1.1V Peak to Peak) 
You MUST read the Arduino documentation for Your specific Arduino device carefully before using the reference voltage commands. The analogReference control is NOT the same on all Arduino boards.

How Arduino VOX BOX controls the radio.

When WSJT-X / JTDX or other digimode software on the PC sends Audio out, the Arduino 'hears' it and sets a Digital Output pin HIGH. (+5V) This pin drives a 2N2222A transistor via a current limiting resistor that simply switches the PTT pin on ACC socket of the radio to Ground. This puts the radio into TX mode.
The Arduino also illuminates a red LED on the board when the output pin is set HIGH giving clear indication when TX is enabled.
The program sets the Digital Output pin LOW (0V) when the audio input drops below a set threshold level. This turns OFF the output transistor switch returning the radio to RX mode.

I included a single pole latching switch (ON/OFF) that disconnects the electrical connection between the Arduino VOX BOX and PTT pin on the radio ACC socket to guard against any possible accidental TX. This is handy when testing and adjusting the program on the Arduino and You don't want it to actually transmit 'on air'. 

Programming the Arduino.

If You only wish to use FT8 mode a really simple program in the Arduino can be used to 'listen' for audio input and Hold the radio in TX mode for 14 seconds by keeping the Digital Output pin HIGH and then switching it LOW when the timer runs out putting the radio back into RX mode.

To make the VOX BOX more flexible for modes that use different operating time periods the Arduino is programmed to set the Digital Output pin HIGH when audio above a set threshold is applied to the Analog Input. It then keeps checking the Analog Input level and sets the Digital Output pin LOW when the incoming audio drops below a set threshold level for longer than a defined delay time.  

It would be easy to add features to this simple unit to make a multi-mode, multi purpose user adjustable VOX BOX. 
Adding rotary controls (variable resistors/pots) connected to analogue input pins on the Arduino to provide easy manual adjustment of the threshold levels for TX and RX switching. A third rotary control could be used to adjust the delay time and another could be used to adjust the audio input level if required. 
The Arduino program can be made to read the voltage level of each pot and set a variable for the threshold levels and delay time accordingly. This would make the Arduino VOX BOX easily adjustable to suit different radios, PCs and modes requiring VOX control. With the addition of a small microphone audio amplifier You could even use the VOX BOX for 'hands free' operation when using Voice / Phone modes (Would be handy if You have a radio that does not have its own built in VOX function)

: I have now worked over 900 stations in 78 countries and I am enjoying FT8 mode much more since the VOX BOX controls TX/RX switching with perfect timing every time. :-) 

Grab an Arduino and have some fun.
73 de MM7WAB 'Hairy' Paul 

No comments:

Post a Comment