LabWired The easy way to build hardware
UART device

XY-MD02

The XY-MD02 is a UART device in the LabWired part catalog. Its catalog type is xy-md02. It connects to the MCU over UART. The catalog gives a supply range of 5–30 V. It has 4 pins. A registered peripheral model runs in the engine: the firmware talks to it over the real bus and gets device-accurate responses.

From the catalog: XY-MD02 Modbus RTU slave modelled from the manufacturer manual: input registers 0x0001/0x0002 (temperature, humidity), holding registers 0x0101..0x0104 (address, baud, temperature and humidity correction), functions 03/04/06/10, CRC-16, 3.5-character framing, standard exceptions 01-03. No text protocol (READ, AUTO, BR:, TC:), no parity.

XY-MD02 in LabWired
Rendered by the matching LabWired editor component.

Key facts

CategoryUART devices
Catalog typexy-md02
InterfaceUART
Supply range5–30 V
Pins4
DatasheetXY-MD02 Modbus RTU temperature/humidity sensor manual

What LabWired simulates

What is simulated

Simulated device model

How it was validated

Built from the datasheet

XY-MD02 pinout

PinElectrical typeFunction
B Passive —
A Passive —
GND Power input Supply
VCC Power input Supply

How to simulate the XY-MD02 in LabWired

  1. Open the Playground at app.labwired.com and place an MCU board.
  2. Add the XY-MD02 (catalog type xy-md02).
  3. Connect GND and VCC to the supply and ground of the board. Use a supply inside the catalog range of 5–30 V.
  4. Connect B and A as your circuit needs.
  5. Run the firmware. It sends and receives bytes on the simulated UART as on hardware.

Related UART devices

All UART devices · All parts

Further reading

Modelled from XY-MD02 Modbus RTU temperature/humidity sensor manual.