Wednesday, January 20, 2021

Flex Radio Turned Boat Anchor

Have you ever wanted the nostalgic sound of a vintage ham radio rig only to be stuck with an expensive modern transceiver?


Note:  As presented this project requires a FCC Amateur Radio license.  Amateur Radio is about experimentation.   Even still you must be versed in the band plan, stay in accordance to FCC Amateur Radio rules in FCC Section 97, and probably a few other things.  That said, let's continue....

The Flex Radio 6400 is an amazing state of the art ham radio transceiver with so many modern bells and whistles than no normal human could ever get around to using them all.   But, sometimes you long to send out that relaxing and warm sound that could only be achieved from a vintage "boat anchor" radio.  A signature trademark of these rigs is their inability to hold steady on a frequency.  This results in frequency drift.  This 'feature' is lost in modern rigs like the Flex Radio.  So what's a modern ham to do when that vintage sound is desired?


The Flex Radio is a SDR; think powerful computer turned radio.   Flex allows third party applications to interface with the radio to make it even more powerful.   One such program is FRStack .  One of FRStack's many many features makes it easy to use API calls to control and configure the Flex Radio.  We wrote a simple Python script to have the Flex Radio simulate a drifting vintage ham radio during transmit.   We really don't recommend using this application; it's just stupid.  Our goal was to experiment with the APIs when the idea hit us. 


 Here is a demo of the Flex Radio transmitting CW with the DriftyFlex script:


Here is the short DriftyFlex Python script:

#  JAN2021
# Python script to make the Flex Radio drift
# like that vintage rig you always wanted.
# WhiskeyTangoHotel.Com

# Simple novelty example of controlling
# a Flex Radio via FRStack

# FRStack is an amazing program with 100s of features that
# are a million times more useful than this stupid example.
# See:

import urllib.request
import time
import random

# Define initial XIT offset XIT (0 is suggested)
XIT = 0

# Define amount of XIT SHIFT (or drift) per loop
SHIFT = 5  # in Hz

# Define MAX_XIT (or drift) so things don't get too out of control
MAX_XIT = 300  # in Hz

# Define how often to simulate a new drift
DELAY = .1   # in seconds

# turn on XIT mode

print ( 'Drifty Flex endlesssssss loop.' )
while True:    
    DRIFT = (random.randint(-SHIFT, SHIFT))   


    if abs(NEW_XIT) > MAX_XIT:  # Maintain drift constraints
        NEW_XIT = XIT - DRIFT
    url = 'http://localhost:13522/api/ActiveSlice/XITFREQ?param=' + str(NEW_XIT)
    urllib.request.urlopen( url )

    print ( 'Current drift is: ', NEW_XIT, ' Hz.' )
    # end while loop