March 18, 2022: Click this link to download my latest CTR2 Node-RED flows!

David De Coons, WO2X, and Michael Walker, VA3MW, published an article describing how to use Node-RED to control ham radios in the September 2021 issue of QST. I had chatted with Dave a couple of times on the Flex Radio forum while I was integrating Flex Radio control into CTR2. I knew Dave was working on Node-RED but wasn’t overly interested in it because I was so focused on this project. I thought it was interesting that we both published articles in ARRL magazines in the same month essentially describing how we approached the same problem from different directions.

By a quirk of fate (and a little confusion at ARRL), a link to this blog was inserted into the first paragraph of Dave’s article. That little mistake got me thinking, could Node-RED be an option to the Nextion display I am currently using?

The answer is YES, you can use Node-RED instead of a Nextion display. There are a few compromises that had to be made to use a web based application instead of a hardware display, but they are minor. For instance, Node-RED doesn’t support tuning by clicking on a signal in the FFT display. As a workaround, a slider control was added to the Node-RED Home page just below the FFT display. Clicking on this slider in the approximate location of the signal will tune the radio to that frequency. Note that the frequency step resolution must be set to 1 kHz for this to work. A new [<->] button was added to the left of the slider to toggle between 1 kHz and 100 Hz steps. This allows you switch to fine-tuning to center the signal with the slider.

Node-RED can be installed on about any PC in your shack. Installation instructions are in this post. Many use the Raspberry PI 4. I’m using an old Mac-Mini running Linux dedicated to Node-RED for now. I also have it installed on my home server (also running Linux) so I can use that PC instead of the Mini. I wanted two options in case the processor loading on the server became an issue for Node-RED’s performance. You can download Node-RED here. I’ll post the CTR2 flows once everything settles down.

There are two ways to interface Node-RED to your PC. Both require a USB serial adapter.

  1. Use a USB TTL serial adapter and connect it to the local display pins on the HMI. These are 3.3V data pins and are not 5 volt tolerant so the USB serial adapter must be capable of 3.3V logic levels. There are many available, such as this one. The adapter connects to the TD, RD, and Ground pins on J20 of the HMI board.
  2. Use an USB RS-232 dongle and connect it to the Display port normally used for the Nextion display on the front of the HMI using a DB9 to RJ45 adapter.

The HMI will automatically select the display port with the active display.

NOTE: You cannot run the Nextion display and Node-RED at the same time.

In the future I’ll look at allowing Node-RED to use the virtual serial port on the micro-USB connector. This connection already handles the USB audio so it would be one USB connection between your PC and CTR2. However, using this serial port for the display would make it unavailable to 3rd party apps like WSJT-X and loggers. This may not be too important when using CTR2 remotely.

The lead photo shows my Xiegu G90 selected, (R: 1), on antenna 2 (A: 3) listening to 20 meters CW. In addition to the normal Home page that mimics the Home page on the Nextion display, three other panels are also visible, Tx Memory, VFO Select, and Log Entry. These panels can be shown or hidden as needed using the <TXM, >LOG, and VFO buttons. You can also close the panel by clicking the violet triangle in the top left or right corner of each panel.

Here’s the latest pages so you can see what I’m working on.

Select Radio Port Page
The Antenna Page allows you select antennas

Using the Antenna page you can select a different antenna for each band. When using phased arrays, set Ant Mode to Multi and select the antenna combination you need per band. Antenna settings are save in the radio file for each radio so your HF radios can have one group of settings and your VHF/UHF radios can have another.

Select Band Page

On this page you can easily jump to another band. The Radio CAT settings are also located here.

Select Modes Page
VFO Panel

Clicking the VFO button on the Home page opens the VFO and Scan Mode panel above. From here you can easily switch VFOs, enable Split mode, select Frequency or Memory scan, scan up or down, and start and stop Scan.

Log and Auto Log panel

The Log panel allows you to record your QSO. It also includes links for QRZ call lookups, Reverse Beacon Network (RBN), PSK Reporter (PSKR) and Wx reports. To look up a call on QRZ, just enter it in the Called Station text box and click QRZ.

Clicking the top-right > icon opens the Auto Log panel. This panel parses the receive buffer and displays call signs (groups of letters with 1 to 3 numbers) and RST reports (groups of three numbers). In Beacon mode, call signs of the beacons are automatically timestamped as they are received, and with 4UN1UN above.

CW Settings Page

On the CW Settings page you can edit your CW memories, select the keyer mode, select normal or reverse paddle configuration, and change the left paddle input from normal to straight key. Just plug your paddles into the Key jack on the HMI and your straight key into the PTT jack.

Voice Settings Page

The Voice page gives you full control over the 5-band equalizers on the Tx and Rx audio paths.

RTTY Settings Page
Digital Settings Page

The Digital Settings page allows you to select between analog (mic & headphones) or digital (USB) audio. You can also monitor the USB audio and apply the Voice mode filters to the digital audio stream. The VOX action can be selected from none, pass audio to radio, and key PTT when audio is above the Vox Level.

Frequency Memory with Edit Memory panel enabled to edit Record 6
CW Tx Memory page – select, edit, or delete Tx Memory buffers
Set Levels page allows you to change levels to suit each radio
Flex 6xxx Settings
Icom PCR-1000 Settings
Micro SD Card Audio File Record/Playback Page (playing VMSG2-11.wav)

Rx audio can be saved to one of ten files on the micro SD card using the RX->SD option.

Help Page

Node-RED adds a lot of functionality with a slick user interface and the ability to control CTR2 from your shack’s PC or remotely from the Internet. It even looks pretty good on my smartphone. It will also be much better that using the Nextion simulator I described in this post.

The next order of business is handling two-way audio between the Node-RED PC controlling the HMI and a remote PC or smartphone. I’ve looked into a few 3rd party apps and for now I’ve settled on SonoBus written by Jesse Chappell. This is a highly refined IP audio package used by musicians to play in virtual groups, so you know it delivers high-quality sound with low-latency. It also runs well on Windows, Linux, Mac, ISO, and Android. It’s a little complicated to set up but the results are worth it. I’ll put a blog post together for it once I’m more comfortable with it.

There you have it. Node-RED is a viable option to using a standalone Nextion touch screen. There are a few things I had to compromise on (like no encoder or touch tuning) but over all, it delivers a nice control interface.