Welcome to the new FlexRadio Community! Please review the new Community Rules and other important new Community information on the Message Board.
If you are having a problem, please refer to the product documentation or check the Help Center for known solutions.
Need technical support from FlexRadio? It's as simple as Creating a HelpDesk ticket.

Automating an external Antenna switch from smartsdr

Steven Catani
Steven Catani Member ✭✭
edited September 2019 in SmartSDR API
Has anyone written an API to control an external antenna switch from smart SDR. It really would just need to switch a set of relays based on the radio frequency. The relays could then control the antenna switch.

much thanks

Steve
N2TAO

Answers

  • Mark_WS7M
    Mark_WS7M Member ✭✭✭
    edited January 2017
    Hi Steve,

    Yes I took an Ameritron HL4 I think is the number and modified the circuit board inside to make the fourth position an "automatic" position.  This means I only get 3 usable antennas out of the 4 but I was never going to have 4 anyway.

    I then ran wires out of the box to a relay board I designed.  I wrote simple software to query the radio and make changes to both an amplifier I have and the antenna switch.

    The modifications to the HL4 were very simple. Cut 1 trace, solder in some wires to go out to the relays.

    For any switch that had RS-232 or other input the modification would be nil and just need software to read the radio frequency and send out the appropriate commands.

    Mark = WS7M

    image
  • Steve - KD8QWT
    edited December 2016
    Steve,
    Unfortunately there is nothing in SSDR to allow for a custom UI component that could be used for an external antenna switch. 

    I see 2 options.  You could write a simple PC application like Mark did to control the antenna switch.  The other option is to use an Arduino with an ethernet shield to control the relays.  Then use Enzo's libraries to write some custom logic to follow the Flex via the API and switch antennas based on the frequency of the slice that has TX enabled.

    I saw this on your QRZ page.

    "Currently there is a multi-wire dipole for 30, 20 and 15 meters that points ew, a dipole for 15-20 facing ns, a 40 meter cage, a 40 meter caged loop, and a multiwire dipole for 80m. There is also a 2m vertical dipole."

    Since you have multiple antennas in the same band, it will be difficult to determine which antenna to use on say 20m using only one antenna port on the Flex.  You'd have to use both ports on the Flex wired to a switcher with 2 inputs and 2 sets of relays.  Wire the "30, 20, and 15" and 40m loop to one input of the switch and the rest to the other input.  Essentially it would be two separate switches.  Then have the Arduino watching for which slice has TX enabled and grab it's frequency.  Based on the frequency, switch both sides of the switch to antennas that can handle that frequency.  In SSDR you can then switch between the to two 20m dipoles for example by switching between the 2 ports on the Flex. 


    73'  Steve
  • Dave - WB5NHL
    Dave - WB5NHL Member ✭✭
    edited November 2015
    Steve, checkout Enzo's Arduino libraries for Flex Radio. They work VERY well. It would be very easy to write a simple Arduino sketch to read freq/band and control antenna relays. Also, Enzo is very accessible and halpful via email.
    http://iw7dmh.jimdo.com/arduino-flex-libraries/



  • K2CM
    K2CM Member ✭✭
    edited September 2019
    I have an Arduino with an internet shield, controlling relays in a switchbox. It has a timeout feature to disconnect from the radio after 20 minutes with no PTT in the prior 20 minutes. You can switch as many antennae as you wish.
  • William Hein
    William Hein Member ✭✭
    edited November 2018
    The 4O3A Antenna Genius 8x2 antenna matrix has TCP/IP and FlexRadio API support built-in. Disclosure - I work for the US importer Force 12.

    http://www.force12inc.com/products/4o3a-antenna-genius-8x2-matrix-so2r-antenna-switch-with-tcp-ip.ht...
  • Phil M0VSE
    Phil M0VSE Member ✭✭
    edited September 2016
    If you are already running DDUtil then you could get one of these relay boards DDUtil can be configured to switch these relays on an almost infinite number of situations. http://www.ebay.com/itm/SainSmart-8-channel-12-V-USB-Relay-Board-Module-Controller-4-Automation-Robotics-/271052850490?ssPageName=ADME:L:OU:US:3160
  • pa0bie
    pa0bie Member
    edited November 2015
    The simplest solution is with a USB-8 relay card under DDUtil. I have made a LPT to 16 relay card interface wich also control to wich PA the PTT command is going.
  • Steve K9ZW
    Steve K9ZW Member ✭✭✭
    edited November 2016
    Eagerly anticipating the upcoming USA deliveries of the 4o3a Antenna Genius 8x2 Switches, as planning initially one each at my two station QTHs.

    Bill was kind enough to forward an advance copy of the manual which I've just printed out to review.

    Had a 4o3a Station Genius SSC XL integration device setting next my desk, which I've held off implementing with the major v2.0 firmware due shortly.

    73

    Steve K9ZW
  • Marc Lalonde
    Marc Lalonde Member ✭✭
    edited November 2015
    Hi   not the by API but Telnet to radio and GUI by webpage , was easy to mod to HF if need  

    http://alphatronique.com/forum/viewtopic.php?f=3&t=7

    i work this week on a updated 2.0 version 
  • Steven Catani
    Steven Catani Member ✭✭
    edited February 2016
    Can you share the code for your program

    much thanks,

    Steve
    N2TAO

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.