Hamradio and software come to life

During big contests it can be useful to have a touchscreen antenna switch placed near computer keyboard to be handy.

In my case I do have a relays flip wire antenna for 40 meters and East / West  FB ratio is quite big as 20 dB.

The drawback is that I have to switch it very often while CQ, not to lose precious contacts.

Also, fast switching beverage or wire beam can also be an advantage, without loosing N1MM windows focus.

Of course, for remote operations will have a Dot Net app via serial port.


Touchscreen Antenna Switch

6 antenna ports, can be set in any configuration as distinct RX or TX antenna. Transceiver PTT will trigger display events.

6 auxiliary relays can be used as 12V output for any kind of purposes.

Using an intelligent Nextion 10.1 inches capacitive display, I can use its own 8 GPIO for input / output relays control.
Of course, having only 8 GPIO and 12 remote relays, I have to design my own CD4028 binary to decimal converter, 3 by 3 for antennas and aux relays. Another pin will be used as TCVR PTT sensing to switch RX /TX antenna, and another one hopefully to interface with rotator control in the future.
Via serial port, the main screen will get messages from cluster, power amplifier and transceiver.Due to display relative latency, probably will have to set TCVR TX delay to 30 milliseconds but will be tested once project is done.

Nextion display is a nice piece of hardware, some models have 8 GPIO pins configurable as input or output. My display has an audio speaker port, RTC and fast TTL serial port.

Code editor is quite straightforward, but it lacks primitive graphics in toolbar, also is lacking user defined functions.

To overcome this, I created timers, set default as disable, put the code inside and a self disable at the end. In this way, I can callback this timer from an event by simply using something like timer.en=1. Once timer is active, will execute code inside and self closing.  To be as fast as possibe, instead of timer clock 50  ms which is minimum value, I put timer.tim=0 in main windows postinitialize, so it gets closer to 10 miliseconds.