Component guide · Intermediate · 4 min read
Waveshare Modbus RTU 8-Channel Digital, Analog Input and Analog Output Modules

By Geekobot Learning Team · Updated 29 Oct 2026
On this page
These DIN rail modules add inputs and outputs to any Modbus master over RS485. The 8-channel DIO module reads switches and drives relays or loads, the analog acquisition modules read 0 to 20 mA or 0 to 10 V sensors, and the analog output module sets 0 to 10 V for VFDs and valves. A PC, PLC, Raspberry Pi or ESP32 reads and writes them with standard Modbus function codes.
Key specs at a glance
- Interface
- Isolated RS485, Modbus RTU (USR-IO4040: Ethernet, Modbus TCP)
- Digital IO
- 8 optocoupled inputs and 8 outputs
- Analog inputs
- 8 channels, 0 to 20 mA / 4 to 20 mA or 0 to 10 V, 12-bit
- Analog outputs
- 8 channels, 0 to 10 V
- Supply
- 7 to 36 V DC
- Mounting
- 35 mm DIN rail
Models in this guide
These are alternatives. Pick the one that fits your project; you only need one.
Option 1Waveshare Industrial 8-Ch Digital Input and Output Module, Modbus RTU₹2,550
Option 2Waveshare Industrial 8-Channel Analog Acquisition Module 0-20mA RS485₹2,699
Option 3Waveshare Industrial 8-Channel Analog Acquisition Module, 0–10V, RS485 Modbus₹2,699
Option 4Waveshare Industrial 8-Ch Analog Output Module, Modbus RTU₹2,450
Option 5PUSR Remote IO Module (Ethernet / Modbus)₹2,350
What the Waveshare Modbus RTU IO module is
Each module has a Modbus address (default 1) and baud rate (default 9600) set by registers. Digital outputs are coils (function 05 and 15), digital inputs are discrete inputs (function 02), analog inputs are input or holding registers (function 03 or 04) and analog outputs are holding registers (function 06 and 16). Waveshare's wiki lists every register.
The USR-IO4040 is an Ethernet remote IO with 4 inputs and 4 relays that speaks Modbus TCP directly.
Waveshare Modbus RTU IO module pinout
The pins on the Waveshare Modbus RTU IO module and what each one does.
| Pin | Function |
|---|---|
| A+ / B- / GND | RS485 bus |
| V+ / V- | 7 to 36 V supply |
| DI1 to DI8, COM | Digital inputs |
| DO1 to DO8, COM | Digital outputs (open drain on DIO module) |
| AIN1 to AIN8 | Analog inputs |
| AO1 to AO8 | Analog outputs |
- A+ / B- / GND
- RS485 bus
- V+ / V-
- 7 to 36 V supply
- DI1 to DI8, COM
- Digital inputs
- DO1 to DO8, COM
- Digital outputs (open drain on DIO module)
- AIN1 to AIN8
- Analog inputs
- AO1 to AO8
- Analog outputs
Wiring the Waveshare Modbus RTU IO module
Give each module a unique address before putting several on one bus. For two-wire 4 to 20 mA sensors, power the loop from 24 V and return through the input; check the module's input type setting.
| Waveshare Modbus RTU IO module pin | Master side | Bus continues |
|---|---|---|
| A+ / B- | USB to RS485 or MAX485 A+ / B- | A+ / B- of the next module |
| V+ / V- | 12 or 24 V supply | Same supply |
| AIN (4-20 mA) | Two-wire sensor between 24 V and AIN | - |
- A+ / B-
- Master side:
- USB to RS485 or MAX485 A+ / B-
- Bus continues:
- A+ / B- of the next module
- V+ / V-
- Master side:
- 12 or 24 V supply
- Bus continues:
- Same supply
- AIN (4-20 mA)
- Master side:
- Two-wire sensor between 24 V and AIN
- Bus continues:
- -
Example code
Register numbers and scaling (mA, mV or raw counts) differ by module; check the Waveshare wiki page for your model. Node-RED's Modbus nodes work the same way.
from pymodbus.client import ModbusSerialClient
c = ModbusSerialClient(port="/dev/ttyUSB0", baudrate=9600, parity="N", stopbits=1)
c.connect()
ai = c.read_input_registers(0, count=8, slave=1) # analog module at address 1
print("mA or mV:", ai.registers)
c.write_coil(0, True, slave=2) # DIO module at address 2, output 1 on
c.close()Setup and tuning
connect one module at a time and write the address register.
set each input channel's range (0 to 20 mA, 4 to 20 mA or 0 to 10 V) by register.
Waveshare's Modbus Poll setups and screenshots match the wiki register map.
run A, B and a ground or shield wire; A to A and B to B on every device.
fit 120 ohm resistors only at the two ends of a long bus.
daisy-chain the devices; avoid stars and long stubs.
every device on one bus needs the same baud rate and parity and a unique Modbus address.
What you need
Shop this list10 of 10 found in our store · ₹95,514
Waveshare Industrial 8-Ch Digital Input and Output Module, Modbus RTU: the part this guide coversWaveshare Industrial 8-Ch Digital Input and Output Module, Modbus RTU₹2,550
Waveshare Industrial 8-Channel Analog Acquisition Module 0-20mA RS485: another version this guide coversWaveshare Industrial 8-Channel Analog Acquisition Module 0-20mA RS485₹2,699
Waveshare Industrial 8-Channel Analog Acquisition Module, 0–10V, RS485 Modbus: another version this guide coversWaveshare Industrial 8-Channel Analog Acquisition Module, 0–10V, RS485 Modbus₹2,699
Waveshare Industrial 8-Ch Analog Output Module, Modbus RTU: another version this guide coversWaveshare Industrial 8-Ch Analog Output Module, Modbus RTU₹2,450
PUSR Remote IO Module (Ethernet / Modbus): another version this guide coversPUSR Remote IO Module (Ethernet / Modbus)₹2,350
24V 4A switching power supply board: the usual supply for DIN rail devices24V 4A AC-DC Switching Power Supply Board₹411Closest match, check the specs
USB to RS485 converter adapter: to test the bus from a PCUSB to RS485 Converter Adapter₹74
MAX485 TTL to RS485 converter module: to put an Arduino or ESP32 on the same busKikobot C1 6-Axis Robotic Arm for Education and Research₹70,800
DIN rail screw terminal block: to land field wires neatly on the railDIN Rail Screw Terminal Block₹20
Raspberry Pi 4 Model B 4GB: a small Modbus master or Node-RED hostRaspberry Pi 4 Model B with 4GB RAM₹11,461Closest match, check the specs
Alternatives and when to choose them
- Wittelb WIN-IO Modbus modules: similar modules with mixed IO and MQTT options.
- Modbus RTU with Arduino and ESP32: use a microcontroller as the master.
- 4-20 mA signal conditioners: read loop current without Modbus.
Common mistakes to avoid
- Two modules with the same address.
- Reading coils when the data is in registers.
- Wrong input range setting for the sensor.
- Powering 4 to 20 mA sensors from 5 V.
Frequently asked questions
Can an ESP32 be the master?
Yes, with a MAX485 or isolated TTL to RS485 module and a Modbus master library.
How many modules on one bus?
Up to 32 standard loads, more with low-load transceivers.
Do the outputs drive relays?
Open drain outputs switch relay coils or small loads; use relays for mains.
Is the 0 to 20 mA module isolated?
The RS485 side is isolated; check the wiki for channel isolation.
What is the USR-IO4040?
An Ethernet remote IO with relays, controlled over Modbus TCP.
Parts for this guide
Keep learning
Sources
Written by the Geekobot team from manufacturer datasheets. Always check the datasheet for the exact part and variant you buy.

