I hate to admit it, but I have had a spectacular failure. Longtime readers may remember the prototype work I presented last year for all-inclusive antenna selector. This winter I made a concerted effort to progress and hopefully complete the project. I give up. A different approach is needed.
Let's recap what this device is intended to accomplish:
- One button press to select direction (or disconnection) of the Beverage receive system
- One button press to select the 80 meter yagi direction one CW, omni-directional on the CW or SSB segment, or the 160 mode
- One button press to select high or low antennas (physical height or elevation angle), for bands from 80 to 10 meters, both antennas for bands with stacks (20, 15, 10 meters), or the tri-bander(s) for the high bands
- Automatic antenna selection using band data from two radios (SO2R or multi-op), and prevent or delay switching when the rig is transmitting
- Electronic switching of all the remote relays
If you click the above link you'll see that the construction is as designed. The article includes details of the mechanical, electrical and software design that I won't repeat here. You can at least get an idea of how it is used from the above photo of its current state of construction.
LEDs indicate the selections, and for the top row the colour is green for low (ground) and blue for high (sky) antennas. When you press a button on the top row it advances through the available options (e.g. high, low, both for the stacks) and, for the high bands, the TH6 tri-bander. Tri-bander selection is blocked if it is in use by the other radio; I have no triplexer.
For the 80 meter yagi the mode button cycles through CW, SSB and 160 meter options. A long hold of a direction button selects omni-directional, and all direction LEDs turn off. Buttons are easy to manipulate during a contest when your attention is elsewhere and the LED colours are highly visible and intuitive. The 80 meter selector is on the left and the Beverage selector is on the right.
There's a lot inside the enclosure: software, controls, switching, communications and power management. Although conceptually simple the execution is more difficult than I anticipated. I'll briefly list the challenges I ran into:
- Too many LEDs (25) and buttons (18) resulted in a rat's nest of wires and wiring harnesses. Soldering, routing, and connections were dreadful. Then there were the resistors for the LEDs and the voltage divider network that needed their own boards and connectors. The initial version requires 21 relays and buffer stages, and at least 20 more are needed for antenna switching.
- Arduino GPIO pins are sufficiently current limited that many of the LEDs, due to size and colour, were weakly lit. The correction requires a buffer transistor stage (NPN + resistor) to access the power supply directly. Hence more connections and devices.
- Momentary push buttons do not close cleanly. Software correction and de-bouncing is possible, however the simple algorithm I developed for the prototype is inadequate. A better algorithm requires more work and experimentation, and the reliability is yet to be determined.
- Labelling of the controls and external connections is fairly easy with water slide decal paper. The labels are ready but I have run into problems. For example, both white and clear backings are needed for different graphics, which I only discovered after trying to apply them.
- Coming up with sensible behaviour and access to all switching features with the simplest tactile devices has been difficult. The current version uses momentary push buttons throughout, some with integrated LED illumination. The hardware and software is more work than I planned for.
- There is a lack of flexibility. No matter how well I plan the controls and layout there will be misjudgments and mistakes. Once you punch a hole in the enclosure there's no turning back. For a flexible user interface (UI), software has the upper hand. All amateur radio equipment is headed in that direction for good reason.
- GPIO pins are a scarce resource. I selected the Arduino Mega2560 for its large number of GPIO pins, and even that is not enough. A second Mega is required for interpretting band data and controlling the 2 × 8 antenna switch and second level switches for bands with more than one antenna or antenna stack. Communication between the Arduino processors is required.
You will get an idea of the mess of wiring from the above view taken from the open side panel. The Arduino is on the right, the 5 volt supplies bottom centre, direction buttons overhead, band selector LEDs and buttons at upper right and studs for the boards that will house the relays and transistor switches are at the front. Not everything is visible at this awkward camera angle, and the relay boards and their wiring harnesses to the Arduino and panel jacks are missing. The mess can be reduced with custom circuit boards and Arduino shields, but that has its own complications that I won't get into.
My patience is not what it once was. My aging eyes make it difficult to work in small and tight spaces. Soldering and wiring errors are inevitable, little things break, the small enclosure is a difficult space to arrange components and work on them. Microelectronics demand careful handling to prevent static discharges, shorts and excess heating. Errors can be expensive: mostly of my time and peace of mind since the components are not expensive.
The challenges can be overcome, but I no longer want to, at least for now. I am therefore skipping over the first generation of physical controls to pursue a software UI. The hardware switches and LEDs will be disconnected. I'll keep the enclosure since has been prepared, and I might resume wiring of the buttons and LEDs in future. There is also the benefit of freeing up desk space since it can be placed anywhere.
For the software UI, physical buttons are replaced by mouse clickable buttons, and eventually touch screen buttons. LEDs are replaced by button colours and other indicators. The Arduino GPIO pins will be solely used for antenna switch control lines, which greatly reduces the wiring challenge. Once band data for the radios is included it will still fit on one Arduino Mega. Eliminating much of the soldering and wiring is a great relief.
In my initial prototyping of the software I have established communication between the Windows PC and the Arduino, come up with a simple protocol with human readable data (for ease of debugging) and created a development environment on the PC. The first priority is to get it working. The appearance can be improved later.
My preference is to use a dedicated computer or monitor for the UI. But for now the UI will share the PC and display alongside other station software, including the multitude of windows I have open during contests. The mouse will eventually be replaced by a touch screen. In a multi-op conteset, each operator can reach over to use the common screen. Later, I may have a screen at each operating position. For SO2R just the one will suffice.
I am using multi-platform software so that the UI can be easily ported from a Windows PC to a Raspberry Pi or other computer. There are alternatives available. For example, I know many hams who use Node Red. For my needs I prefer an architecture that allows complex customization and algorithms.
Details of the software UI will be the subject of a future article, once I have it working. The project is not too daunting since I was a software professional and I am using tools I was once familiar with. However, I have to refresh my stale knowledge and much has changed over the intervening years. The screen shot provides a hint about how I am proceeding.
I am relieved to put down the magnifying glasses and soldering iron for a few days while I get the basics of the software system designed and implemented. Some of the questions I am pondering at this early stage include:
- Where to place the antenna selection logic: in the PC or the Arduino or both.
- The UI must be easy to use and the indicators clear so that the operator can make selections easily and without ambiguity, and protect against untimely or poor choices.
- Abstract the communications protocol so that it can expand as features are added and be compatible with a serial (USB) or IP (wireless) link.
- Hard coded switching algorithms and system configuration versus programmable via the UI. The latter entails enough additional complexity that I may never bother.
- Dual UI coexistence -- software and physical -- should I later finish restart work on the hardware controls.
- Last summer's lightning strike on the Beverage did damage in the shack. That experience compelled me to reconsider solid state (Darlington transistor) switches. I will use relays.
- Computer dependency is increasing in my station. A PC or software bug can lose a contest. I have ideas for risk mitigation which require investigation.
This turnabout is quite a change from the original design. It is nice that my frustration level has declined now that progress has accelerated. Perhaps I should have taken this route from the start. I have always been impressed at some of the beautiful antenna switching systems others have built. Those were a strong influence when I started this project. I love those large maps and lamps that indicate antenna selection and direction.
What a physical box does not allow is easy experimentation with alternative UIs. It is easier in software to move buttons around, change colours, change buttons to switches, etc. I'm looking forward to the flexibility.
The lesson I will leave you with is that you should never be afraid to discard or replace a project if it doesn't work out. It may be an antenna, electronics or other device for the shack. Stubbornly standing by a mistake is itself a mistake. To adopt the common cliche from the technology industry: celebrate your failures. The experience and knowledge gained leads to future success.
The weather is warming up and tower work is on the horizon. I'd like to get this project in a sufficiently usable state by April so that I am free to dive into my long list of tasks to meet my goals for 2022.
No comments:
Post a Comment
All comments are moderated, and should appear within one day of submission.