• sales

    +86-0755-88291180

Modbus RTU Relay User Guide

Overview

This is an industrial 8-ch relay module controlled via RS485 bus, utilizing Modbus RTU protocol. It features embedded protection circuits such as power isolation, ADI magnetical isolation, and TVS diode, etc. It also comes with an ABS enclosure.

The Modbus RTU Relay is very easy to use. Due to its fast communication, stability, reliability, and safety, it is an ideal choice for industrial control equipments and/or applications with high communication requirements.

Hardware testing

  • Connect USB to 485 moduble to Modbus RTU Relay board by wires. Connect A to A and B to B. Then connect the USB to 485 module to your PC

  • Download the SSCOM software and Open it in your PC. Select the correct COM port (according to Devices Manager), set baud rate to 9600. Click Extension and send the commands to test

If you want to send other commands, please check HEX option and choose ModbusCRC16 parity. Input the commands and send.


For more details of the commands, please refero Protocol Manual of Modbus RTU Relay

Examples

Raspberry Pi

Enable Serial port
  • Open terminal of Raspberry Pi
  • Run the following command to configure
sudo raspi-config
  • Choose Interfacing Options -> Serial -> No -> Yes
  • Then reboot Raspberry Pi
sudo reboot
Hardware connection

You need to connect and RS485 devices to Raspberry Pi (the demo codes provided is based on our RS485 CAN HAT), Connect Modbus RTU Relay module to the RS485 CAN HAT, A to A and B to B.

Run example

Use the following commands to run the demo codes

sudo apt-get install p7zip
wget https://www.waveshare.com/w/upload/f/f9/Modbus_RTU_Relay_Code.zip
7zr x Modbus_RTU_Relay.7z -r -o./Modbus_RTU_Relay
cd Modbus_RTU_Relay/Python3
sudo python3 main.py

STM32

The Demo codes for STM32 is based on NULCEO-F103RB and RS485 CAN Shield module

Download the #demo codes and open the STM32 project by Keil software.

Program the codes to NUCLEO board

The codes will run and toggle the relay in turn.

Arduino

The Arduino demo is based on Waveshare UNO Plus and RS485 CAN Shield

Open Arduino project and program it to the UNO board.

The codes will run and toggle the relay in turn.
TAG: Raspberry Pi 5 Raspberry Pi Compute Module 4 CM4 PCIe to M.2 NVMe SSD RS485 to RJ45 Sipeed SLogic 4IN1 USB Logic Analyzer 80M / DAPLink / CKLink Debugger Tool / UART Module Raspberry Pi 1.54inch LCD Bookworm-Desktop Display and Touch Raspberry Pi 64MP Camera ESP32-C5 WIFI6 Development Board ESP32-C5-WROOM-1 N16R4/N16R8 1.47 inch LCD AXS5106L TouchScreen JD9853 Display 172x320 For Arduino/Raspberry Pi/Pico/ESP32 TVBOX Kit Luckfox Pico Ultra And 4inch LCD RGB Captive TouchScreen Display ESP32 S3 Refractive Prism NVIDIA Raspberry Pi Pico 2 RP2350 GEEK 1.14 inch LCD 240x135 65K SWD/UART/I2C For OpenOCD/CMSIS-DAP Development Board X1005 Raspberry Pi 5 PCIe to M.2 NVMe Dual SSD Adapter Board HAT Pi5 Double 2230/2242/2260/2280 Information Package Kit Raspberry Pi CM4S08032 And Compute Module PoE IO Board IMX477 IR CUT Camera (A) 12.3MP For Jetson Nano/Orin And Raspberry Pi Raspberry Pi Pico 2 RP2350-Zero Mini Board RP2350A Raspberry Pi 7 inch CAPLCD 1280x800 Capacitive TouchScreen HDMI/Type C Display Monitor For Computer mini PC