• 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: ESP32-S3FH4R2-MINI-Tiny-Stamp-WIFI-Bluetooth5 Argon Neo 5 AI Machine Vision Kit OAK-D-POE JPEG Encoder 12MP IP67 Waterproof 4TOPS OpenCV Camera Mini Uninterruptible Power Supply module Supports charging And Power output at the same time 5V 2.5A Spotpear Raspberry Pi Pico 2 RP2350B 2.8 inch LCD Development Board RGB Display Round TouchScreen 480x480 LVGL QMI8658 / SD / RTC ESP32-S3 Smart 86 Box Development Board with 4 inch 480x480 Display Touch Screen For AI and DeepSeek 2.13 inch Passive NFC e-Paper ink (G) RYBW Display Screen No Need Battery Wireless Power & Data Transfer Raspberry Pi 5 Heatsink Xiaozhi-AI-video-tutorial-2 ESP32-S3 AI Voice Images Chat Robot Electronic PhotoPainter Frame E-Paper Ink Screen 7.3-inch E6 Full-Color Deepseek Development Board Arducam Lichee-Tang-Primer-20K-FPGA-Unboxing Raspberry Pi X1003 Raspberry Pi 5 PCIe to M.2 NVMe SSD MINI Adapter Board HAT Pi5 2242 2230 LuckFox Pico UART PC Monitor Screen Gyroscope Sensor SpotPear DeepSeek AI Voice Chat ESP32 S3 Development Board 1.8 inch AMOLED Display 368×448 1.8inch TouchScreen Programmable Watch QMI8658 /MIC /Audio /Battery