Controlling a
16 channel RS485 Modbus relay board is discussed in this post.
The board needs to be powered with a 12V power supply.
It has has a DIP switch to set its ID. If only the switch 1 is on and others are off, its ID will be 1.
To communicate the board from a PC, a USB to RS485 converter can be used. The setup is illustrated in the following figure.
Alternatively, you can use a USB UART adapter together with a UART to RS485 converter.
Wire connection for this setup is shown below.
Unlike conventional RS485 devices, these devices do not have the control line for transmit or receive.
They use autoflow control as shown below.