Wiring Weintek MT8071iP to UniPi 1.1 over RS485 Modbus RTU

Daniel Price7 min read
ModbusOther ManufacturerTechnical Reference
Licensed PE Working through this on a live machine? A Maine-licensed engineer can take it from here — included with IMD hardware, by the hour for everything else. Book an engineer

A UniPi 1.1 has no built-in RS485 port. To link a Weintek MT8071iP without Ethernet, add a USB-RS485 converter to the Raspberry Pi under the UniPi 1.1. Wire it to the RS485 pins on the HMI's DB9 COM connector, and run Modbus RTU with the HMI as master and the Pi as slave. On the UniPi product line, RS485 Modbus RTU is standard only on the Neuron and Axon families.

Where does the HMI's request stop on a stock UniPi 1.1?

Trace a Modbus RTU poll from the HMI. It leaves the MT8071iP on a COM port pinned out on the DB9 connector and looks for an RS485 transceiver at the far end. A bare UniPi 1.1 has none, so the request dies at the first hop. The two connectors that look like shortcuts are also dead ends:

Port What it is Carries RS485 Modbus RTU?
UniPi 1.1 RJ11 An existing serial port, but not the RS485 Modbus port found on Neuron/Axon No. A DE-9 to RJ11 cable does not create an RS485 link.
MT8071iP USB-A USB host port for peripherals and storage No. It is not a serial port.
MT8071iP DB9 COM HMI serial COM port(s), including RS485 Yes. This is the HMI end of the link.
USB-RS485 converter on the Pi Adds an RS485 port to Linux, separate from the RJ11 port Yes. This is the UniPi end of the link.

The full working path, hop by hop:

Hop Element Role
1 MT8071iP project, Modbus RTU device Master: issues read/write requests
2 HMI DB9 COM port, RS485 pins Physical driver
3 Twisted pair, D+/D-/reference ground Bus
4 USB-RS485 converter Transceiver plus USB-UART bridge
5 Raspberry Pi USB port, /dev/ttyUSB0 (or similar) Linux serial device
6 Modbus RTU slave process on the Pi Answers requests and maps registers to UniPi I/O

Check 1: Is a point-to-point Ethernet cable acceptable instead?

"No network" often means "no plant LAN or switch." Both devices have Ethernet. A single cable between the MT8071iP and the Raspberry Pi, with static IPs on the same subnet, carries Modbus TCP with no switch and no other hosts. Modern Ethernet ports auto-negotiate MDI/MDI-X, so a standard patch cable normally works.

  • Direct cable is acceptable: use Modbus TCP and skip the converter. This avoids RS485 wiring, termination, and baud-rate matching.
  • No Ethernet at all (port reserved, isolation requirement, cable length): go to Check 2 and build the RS485 link.

Check 2: Does the USB-RS485 converter enumerate on the Raspberry Pi?

Plug the converter into the Pi and read the kernel log before touching any wiring:

dmesg | tail -20
ls -l /dev/ttyUSB*
ls -l /dev/serial/by-id/
Reading Meaning Next
/dev/ttyUSB0 appears, log shows a USB-serial driver attach Converter recognised Check 3
Nothing in dmesg Bad USB cable/port, or dead converter Try another Pi USB port and another converter
Device seen but no ttyUSB node No kernel driver for that bridge chip Use a converter whose chipset the Pi's kernel supports
Node exists, open fails with permission denied User not in the serial group Add the service user to dialout, or run the service with access

Point the slave software at the /dev/serial/by-id/ path, not ttyUSB0. The numbered name can change after a reboot or when another USB serial device is plugged in.

Check 3: Is the RS485 pair wired to the correct DB9 pins?

RS485 is differential. The receiver reads the voltage difference between D+ and D-, so a swapped pair produces bytes the UART cannot frame, or no response at all. The MT8071iP's DB9 carries more than one COM port, and RS485 appears on specific pins. Read the COM port pin table in the MT8071iP installation instruction sheet. Pick the RS485 2-wire port and note its Data+ and Data- pins.

Item Requirement Failure if wrong
Mode 2-wire (half-duplex) on both ends 4-wire HMI setting with 2-wire converter: no replies
Polarity HMI Data+ to converter D+/A, Data- to D-/B Timeouts or garbage. Vendors label A/B inconsistently, so swap once if silent.
Reference ground HMI signal ground to converter GND Common-mode errors, intermittent CRC failures
Cable Twisted pair for D+/D- Noise pickup on longer runs
Termination 120 Ω across the pair at each end, needed on long runs Reflections at higher baud rates. A short bench link usually runs without it.
Direction control Converter switches TX/RX automatically Converter never releases the bus, so the master's next request collides

Check 4: Do frame settings and slave ID match on both ends?

Once the physical layer is right, a no-response fault is almost always a parameter mismatch. Modbus RTU has no auto-baud. The slave silently discards any frame it cannot decode or that carries another station ID or a bad CRC, so the HMI sees a timeout, not an error reply.

Setting HMI (master) Pi slave process
Interface RS485 2W on the chosen COM Converter device path
Baud rate Identical value Identical value
Station / unit ID Target slave ID Its own slave ID
Register addressing Check the 0-based vs 1-based offset in the HMI driver Register map of the slave application
Timeout Longer than the Pi's worst-case response time n/a

The Pi is not a hard real-time slave. Linux scheduling and USB latency add delay before each reply. If you see sporadic timeouts on an otherwise working link, raise the HMI timeout and poll interval before you look for a wiring fault.

How do you build and prove the RS485 link?

  1. Fit the USB-RS485 converter to the Raspberry Pi and confirm the device node (Check 2).
  2. Install and configure a Modbus RTU slave application on the Pi. Bind it to the converter's /dev/serial/by-id/ path, set the baud/parity/stop bits and slave ID, and map holding registers and coils to the UniPi 1.1 relays and inputs.
  3. Make up the cable: HMI DB9 RS485 Data+/Data- to converter D+/D-, plus signal ground. Add 120 Ω termination at both ends on long runs.
  4. In the HMI project, add a Modbus RTU (master) device on the RS485 2W COM port. Enter the same serial settings, slave ID, and a generous timeout, then download the project.
  5. Before involving the HMI, test the slave from a PC with a second USB-RS485 converter and a Modbus master test tool. Read one known register to isolate Pi-side faults.
  6. Reconnect the HMI. Place a numeric display on a holding register the Pi updates and a toggle on a coil mapped to a UniPi relay.
  7. Confirm the displayed value tracks changes on the Pi. Confirm the relay clicks when you press the HMI toggle and its state reads back correctly.
  8. If the value or relay does not respond, watch the converter's TX/RX LEDs while the HMI polls. TX with no RX means the slave is not answering: recheck the Check 4 settings and polarity. No TX means the HMI is not driving that COM port: recheck the pinout and COM selection. With both LEDs active and the tracking and relay tests passing, leave the HMI polling for an extended period and confirm the HMI's communication-error indicator never asserts.

FAQ

Why doesn't a DB9 to RJ11 cable connect the Weintek HMI to UniPi 1.1?

The UniPi 1.1 RJ11 connector is not an RS485 Modbus RTU port. RS485 is standard only on the Neuron and Axon lines. Add a USB-RS485 converter to the Pi and wire the HMI's DB9 RS485 pins to it.

Why does the USB-A port on the MT8071iP not work for RS485?

It is a USB host port for peripherals and storage, not a serial COM port. The HMI's RS485 signals are on the DB9 connector. Use the pin table in the installation sheet to find the 2-wire Data+ and Data- pins.

Why does the HMI report no response after wiring RS485 to the UniPi?

The usual causes are swapped D+/D-, a baud/parity/stop-bit or slave ID mismatch, or no Modbus RTU slave process bound to the converter's device path. Swap the pair once, match every serial setting, and confirm the slave responds to a PC-based master before retesting with the HMI.

Can the MT8071iP talk to a UniPi 1.1 without a switch or LAN?

Yes, two ways. A single Ethernet cable between the HMI and Raspberry Pi with static IPs carries Modbus TCP. Alternatively, a USB-RS485 converter on the Pi carries Modbus RTU to the HMI's DB9 port. Verify either link by reading a changing register and toggling a relay-mapped coil from the HMI.

Back to blog