Example Code for Serial Port Assistant-RS485 Relay Control

Last revision 2025/12/26

This article guides users through controlling an RS485 relay using Serial Port Assistant, covering hardware setup with LattePanda boards, software preparation, wiring diagrams, and sending correct commands for relay control.

Hardware Preparation

Software Preparation

Note: the driver needs to be installed when using on Windows for the first time. There is no need to install driver in Linux system.

Wiring Diagram

  1. Plug the shield into LattePanda Alpha & Delta:

Connection graph

You need to use nylon columns and nylon screws to fix the expansion board and LattePanda.

Connection2

Use serial port debugging assistant

  1. After connecting Lattepanda Alpha & Delta and RS485 interface extension board, boot up
  2. Power on RLY-8-PoE-RS485 8-channel network control relay module
  3. According to the custom communication rules of the 8-channel network control relay module, use the serial port debugging tool to send the correct instructions, then control the relay module.

Result

As shown in the picture below, control the switch of relay No. 1

Result

Was this article helpful?

TOP