Tuning is one of the big disadvantages to using Node-RED in place of a dedicated Nextion display. The rotary encoder on the Nextion display provides a very convenient method of adjusting frequency and selecting various options in CTR2.

But all is not lost! It’s easy to connect a rotary encoder to the DISP port on the front panel of the HMI using a CAT5 cable. The lead photo shows one I created. I build a custom mount for it as an extension to my paddle. I had a cool old knob that I wanted to use on something, and this was the perfect place for it.

While the 3.3 volt logic on the internal Local Display header on the HMI board is great if you are using a Raspberry Pi to host Node-RED, it’s also a pain to get to. You have to disassemble the CTR2 stack in order to connect your Pi to the Local Display header in the middle of the HMI board, route the wires out of the stack to your Pi’s GPIO bus, and then reassemble the stack. You don’t need to do this if you have a USB-RS232 serial adapter kicking around. You can wire it to the DISP connector on the front of the HMI instead of using the internal 3.3 volt Local Display connections. Note that these are separate ports and are not using the same data levels!

The wiring connections to connect the encoder and a USB-RS232 adapter to the DISP connector on the HMI are shown in the drawing below. You can use an CAT5 screw terminal adapter like this one on Amazon, or you can just cut the RJ45 connector off one end of your CAT5 cable and hard wire the connections using the wire colors shown. (These are T-568B colors).

CTR2 will automatically find the connected display if you have the correct port selected in Node-RED. You will need to select the port mapped on your PC for the USB-RS232 adapter to the Serial In and Serial Out nodes in the Node-RED Comm Rx flow. I use the Raspberry Pi so the Node-RED flows provided here are mapped to the GPIO serial port, /dev/ttySO. On the Raspberry Pi the USB serial port is usually /dev/tty/USB0. You’ll need to locate the port assignment in the Windows Device Manager or on your Mac.