G'Day fellow Hams,I am searching for a design for a controller to control a 6x2 antenna switch.The antenna switch has the capability to switch between 2 inputs and 6 outputs (antenna, in any combination).Preferred option would be to have a Arduino control the selection, but not to have the other port to select an active connection that is already connected.I would like to be able to use a graphical interface if possible.Any help would be grateful.

I can add part of the design. MANY years ago I constructed an antenna switch for a USN project to allow 4 HF radios to share 2 antennas. The switch was operated from the parallel port of an IBM PC and provides good isolation. I have expanded the circuit and changed the nomenclature to instead switch 2 radios between 6 antennas. Un-selected antennas are grounded.

This exact project has been in the back of my mind for a while now. The KG4RUL schematic and truth table at a glance look good. Is there any particular relays in mind? Latching, non-latching?

What type of Display? Simple LCD and a couple push buttons or some more fancy like an Oled touch? I'd start with an LCD and two push buttons. One to cycle between the input selections and one to cycle through the output antenna ports. Obviously a "lockout" to prevent conflict.

Am I missing anything? The type of relay will be important in the code.

Another quick question. Power level capability for the matrix? 100-200w? LL? I think LL would be the obvious choice. Maybe prototype a lower power unit. I think that there are some hardware designs out there but I haven't seen any Arduino code. I just started on some basic code to see it it's as basic as I hope.

Is the switch remotely located? Communications? hardwired Serial? wireless Ethernet? Wireless serial? Wifi Ethernet means there wouldn't be a need for two arduinos. A simple PC application could be developed to remote control the switching unit.

Is the switch remotely located? Communications? hardwired Serial? wireless Ethernet? Wireless serial? Wifi Ethernet means there wouldn't be a need for two arduinos. A simple PC application could be developed to remote control the switching unit.

I played with it for a while today usin an Arduino Uno and just serial control. Still has a few bugs but it’s fairly close. I’ve setup the serial code so that it should move over to Ethernet fairly easily. Then I’ll start on the windows app for control.

I have Arduino code for a 2x6 antenna switch working. It should be able to work with both of the schematics in this thread. I did manage to get an Arduino Uno to work with a standard Arduino Ethernet shield. I managed to reserve the two serial port pins but I think all of the rest are used.

I did also manage to get a small Windows Form application working as a control for it via Ethernet. It's pretty simple but it's controls are based directly on what is returned from the Arduino after commands are sent.

Yes, active antennas are locked out.

One last thing I could add. There is a "default" configuration. But the current settings could be save to flash so that the last config would be the startup config.

The last known configuration is now being saved and recalled from EEPROM. Windows software syncs perfectly with the Arduino controller no matter the starting sequences. It should work with Arduino UNO and Mega without issues. Portability is limited due to the EEPROM usage. Using the SD card slot on most Ethernet shields could be used. This would be a bit slower but speed isn't really an issue in this case. It would resolve the issue of max EEPROM writes. But even that isn't much of an issue.

I plan on building this project, but I need to finish an HF-Auto type antenna tuner I'm working on. That's a much bigger project and I should post my progress on it so far in another thread. It uses an AD8302, AD8307 and a frequency counter to turn two stepper motors driving a roller inductor and Differential cap. All of the building blocks are working but I'm kind of stuck on the actual tuning of the antenna. It saves tuning solutions based on a frequency +/- a configurable bandwidth. Essentially unlimited memories per band and will eventually track with a rig's vfo via cat. But initially there's no datalink as I'm targeting 100% remote automatic operation. A wireless data link was implemented in the project's earlier life as an manual tuner controlled via wifi with a Windows application. There are a few older videos on youtube of the manual version in operation. Search for wd4ed.

If you have a need for this Arduino firmware/Windows software for a project PM or email me directly. edclarkiv1@verizon.net It would probably be a good idea for some further testing with actual hardware. During development I was monitoring the pins switching with a relay shield and voltmeters.

The cool part for me is that I've been wanting to tackle this for a long time and just kept putting it off. This thread helped motivate me! Thanks!I'll make a short video of it's operation... the software anyway.

Firmware and Windows Form application are intended to work with several existing 2x6 Hardware solutions already on the Internet.For the purposes of this firmware/software operation all that is required is an Arduino UNO/MEGA2560, a standard Arduino Ethernet shieldand a Networked PC. Windows Application requires MS Framework 4.7.1 or later. I intend on using a cheap wireless bridge to make my 2x6 switch "wireless'.

*Standard Arduino Ethernet shield pin usage. 13, 12, 11, 10, and Pin 4 if SD card slot use is desired. But is currently not supported in this application.

*Allows control of 2 Radios connected to 6 Antennas. Allows any non-conflicted combination of Radios and Antennas

*Active antennas are locked out to the opposite radio.

*Receive data format (input to Arduino from Windows software via Ethernet) is "<R1A1>". Which would set Radio 1 to Antenna 1.

*9600 Serial data rate by default.

*if relay is not already in use and pin toggle is successful the new radio/antenna combination is returned to the Ethernet port if connected or Serial port. Or both if both are configured.

*Return format (Data from the Arduino controller back to the Windows application via Ethernet) is "1,1,2,2\n\r". Or "Radio1#,Ant1#,Radio2#,Ant2#\n\r". This allows the Windows application control states to be determined by the actual relay states. If you cannot select an antenna it is locked out. If you can select the same antenna for with both radios.... you are not connected.

*Setup tab allows for basic IP/Port configuration. No hostnames.

*Other options are "Always On Top" and "Connect on Start". "Always on top" should be obvious. "Connect On Start" is only for use after the local configuration is working and stable. Otherwise connection timeouts will become annoying.

*Last known pin states are saved and restored during reboots via AVR flash. Writes occur immediately after each successful configuration change. But only if there are actual changes. This is an attempt to cut back on needless EEPROM writes.

This sketch works on an Arduino UNO but with an Ethernet shield most of the digital capable pins are used.Pins 0 and 1 are tied to the Serial port. That leaves only A5 open for potential use. Using an SD card via flash would require at least pin 4 reassigned to probably A4 or A5. UNO is a tight fit.

While researching how BCD band decoders work, I found that RemoteQTH.com has much of the Arduino code for projects just like this. It's highly configurable for different hardware. This makes it I bit harder to read through but every educational. It gave me some ideas for incorporating a BCD encoder into my own version of the 6x2 switch. In both the firmware and the windows application. A lot of good information on that site if you are an Ham Radio Arduino nerd!

Because of what I learned on that site, it only took a few minutes to get a basic Yaesu BCD decoder working on a separate MEGA. Since the 6x2 project on an UNO doesn't have much space left, it will have to move to a MEGA to combine the BCD decoder with the 6x2 controller. It's probably best. I'll merge up the code sometime today.

It's very good of them to publish code for others to learn from. I suggest looking there. The products are too steep for me currently and I prefer to use my own code, but I do appreciate the sharing of information! It is educational.

Copyright 2000-2017 eHam.net, LLC
eHam.net is a community web site for amateur (ham) radio operators around the world.
Contact the site with comments or questions.
WEBMASTER@EHAM.NETSite Privacy Statement