Knowledge Base
Article

DONGKER XY-MD02 - temperature and humidity sensor

Edit

DONGKER XY-MD02 - temperature and humidity sensor

Introduction

This document describes the integration between the DONGKER XY-MD02 RS485 temperature and humidity transmitter and the myPower24 online monitoring platform using the LoggerV data logger, for real-time monitoring and data logging.

Phase A - Selection & Compatibility

1. Models covered

  • XY-MD02: DONGKER; product type: Sensors. A two-value RS485 environmental transmitter reporting air temperature and relative humidity from an industrial SHT20 element. It appears in My Devices as DONGKER XY-MD02.

The XY-MD02 is a DIN35 rail-mounted module, 65 x 46 x 28.5 mm, with screw terminals and no probe on a lead. Its measuring ranges are -40 to +60 °C at ±0.5 °C and 0 to 80 %RH at ±3 %RH, both to a resolution of 0.1. It draws less than 0.2 W.

XY-MD02 is a module designation, not a brand. The same board is sold under several seller names, and nothing on the bus reports either the brand or the model. It is filed here under DONGKER because that is the badge on the units Solar MD supplies. A unit bought elsewhere that carries the XY-MD02 designation reads identically.

The XY-MD01 is not covered. It shares the protocol but has no humidity element, and this integration reads and records both values.

2. Communication & compatibility

  • RS485 (Modbus RTU): the sensor's only port, read with an active Modbus scan. LoggerV compatible: yes. The driver declares no fixed list of baud rates, so the rate configured on the LoggerV RS485 port is the rate used. It can also be reached over Modbus TCP through an RTU to TCP converter, as for any other RS485 device on the platform.
  • Serial settings on the sensor: factory default 9600-8-N-1 on device address 1. The sensor accepts 9600, 14400 and 19200 bps, all selectable from the device page as described in section 7. Its device address may be set anywhere from 1 to 247.
  • Bus length: RS485 to 1000 m.
  • Supply: DC5V to DC30V, so the LoggerV's own 24 VDC auxiliary rail suits it with headroom.

The sensor has no display and no buttons. Its Modbus address and baud rate can only be changed over the bus, from the LoggerV device page, so the sensor must be reachable on its current settings before either can be changed.

3. Plant-control capability

  • Monitor only. The LoggerV reads this sensor and records it.

4. Recorded data points

  • Temperature, °C, average with min/max.
  • Humidity, %RH, average with min/max.

Both points are recorded with their extremes as well as their mean, because for an environmental sensor the peak inside a logging interval is the diagnostic signal, not the average: a brief hot spot or a condensation risk is exactly what an average hides.

The sensor reports both values to one decimal place, which is the resolution the platform records and displays.

5. Reference documents

  • Solar MD connection guide, drawing SMD_SMD_LV2/TEMP_HUMID_MS_00, "LV221 Temp Humid Sensors". The wiring diagram for connecting this sensor to the LoggerV: the RS485-1 ports, the termination resistor, the RJ45 pinout and the sensor's terminal labels. It is reproduced in section 6, which is where you want it while wiring.
  • XY-MD01 / XY-MD02 RS485 Modbus SHT20 transmitter manual. The vendor manual, and the source for the mechanical, electrical and serial figures in sections 1 and 2, and for the register map. Held by the Solar MD team; ask if you need the register-level detail, which is beyond anything required to run one of these sensors on a LoggerV.

Phase B - Installation & Commissioning

6. Wiring & connection

Connection diagrams are generated by the platform's Add-Device wizard; see How to add a device in myPower24. The Solar MD connection guide for these sensors is reproduced here, and the notes below explain it.

Solar MD connection guide SMD_SMD_LV2/TEMP_HUMID_MS_00: the Logger V2 EMS, its RS485-1 ports with a 120 Ohm terminator, and the XY-MD02 and CWT-TH03S-H sensors wired to the RS485 pair and the 24 VDC and ground rails

Device-specific notes, all from that guide:

  • The logger end is RS485-1, which has two RJ45 ports, PORT 1 and PORT 2. The bus cable goes into PORT 1.
  • A 120 Ohm RJ45 termination resistor goes into RS485-1 PORT 2. The guide shows it fitted as standard, not as an option for long runs.
  • RJ45 connectors are crimped to the T568B pinout of the ANSI/TIA-568-E standard. On that pinout the RS485 pair is pin 4 (blue) for RS485 B+ and pin 5 (white and blue) for RS485 A-.
  • The sensor end is four screw terminals in two pairs. Left to right the guide labels them RS485: B-, A+ and DC5-30V: -, +.
  • Match the letters, not the signs. The sensor's B- terminal goes to the bus RS485 B+ conductor, which is RJ45 pin 4, and its A+ terminal goes to RS485 A-, which is pin 5. The plus and minus suffixes are printed differently at the two ends and are not a polarity instruction: B goes to B and A goes to A.
  • Supply: the + terminal goes to the 24 VDC rail and the - terminal to the ground rail, alongside the logger's own DC in. The sensor draws less than 0.2 W, so it adds nothing meaningful to the auxiliary supply budget.
  • The same connection guide also covers the ComWinTop CWT-TH03S-H sensor, which is a different product with a different default baud rate and is documented by its own page.

Getting RS485 A and B the wrong way round does no damage. The sensor simply does not answer, which shows up as the scan failure in section 9, so swapping the pair is the cheapest first test.

7. Configuration steps

  1. Mount the sensor on the DIN rail and connect the comms cable per the generated diagram. The RS485 pair is pins 4 and 5 of the RJ45 at the logger, landing on B- and A+ at the sensor; see section 6 for which goes where.
  2. Fit the 120 Ohm termination resistor in RS485-1 PORT 2.
  3. Connect the supply terminals: + to the 24 VDC rail and - to ground.
  4. Confirm the LoggerV RS485 port is set to the sensor's current serial settings. A sensor straight out of the box is 9600-8-N-1.
  5. Add the device on the LoggerV; see How to add a device in myPower24.
  6. Enter the serial number by hand. This sensor publishes no serial number register, so the LoggerV cannot read one. Use your own asset number, since the module carries no serial on its label either. It becomes the device's permanent identity on the platform, so decide the convention before adding a batch of sensors.
  7. If more than one sensor shares the RS485 line, give each a unique address: open the device page, Settings, Communication Settings, and set Slave ID. The field accepts 1 to 247. The sensor moves to the new address immediately and the LoggerV follows it, so no re-add is needed.
  8. Leave Baudrate alone unless you have a reason to change it, and read the warning below first.
  9. Leave Temperature Correction and Humidity Correction on 0.0 unless you are trimming the sensor against a reference; see section 8.

Changing Baudrate re-rates this sensor only. The setting writes the sensor's own RS485 port, but baud rate belongs to the shared LoggerV port and every device on that line. Change it and the sensor drops off the bus until the LoggerV port, and every other device on the line, are changed to match. There is no per-device override to recover from, so treat it as a deliberate commissioning action.

Phase C - Maintenance & Monitoring

8. Monitoring

The device page has two tabs.

  • Actual Values carries two cards. Measurements shows Temperature in °C and Humidity in %RH, each to one decimal place. Communication shows Slave ID and Baudrate as read-only values, so the bus settings can be checked without opening Settings.
  • Settings carries two sections. Calibration holds Temperature Correction and Humidity Correction. Communication Settings holds Slave ID and Baudrate, as described in section 7. These four are the only settings the sensor has.

The two correction fields are fixed offsets that the sensor itself adds to its own reading before reporting it, for trimming out a known installation error such as self-heating inside an enclosure. Each accepts -10.0 to +10.0, in steps of 0.1, in °C and %RH respectively. Because the sensor applies them before the LoggerV ever sees the value, an offset changes what the platform records from that moment on, and it does not restate the history recorded before it.

To confirm a healthy link:

  • Both readings update and track the actual conditions at the sensor. A temperature that sits exactly on 0.0 °C with humidity on 0.0 %RH is the driver's start-up value, not a reading.
  • Baudrate on the Actual Values tab reads a rate label such as 9600bps rather than a bare number, which confirms the register is being read and decoded, and Slave ID matches the address the sensor was given.
  • No communication alarm is active on the device.

The recorded temperature and humidity series are available to the dashboard's device historical analytics widget, where they can be charted over time alongside other devices on the plant.

9. Troubleshooting

Reported by the LoggerV:

  • "Failed to scan ID (device did not respond to all register groups)": the sensor did not answer both register blocks the driver reads, so it was not added. Check the A and B terminals first, since matching the letters rather than the signs is the easy mistake, then that the LoggerV port baud rate matches the sensor (9600-8-N-1 from the factory), then the Modbus address. This message also appears when a different device answers on that address.
  • "Serial Number required. Please provide serial number": Try to connect was pressed with the Serial Number field empty. This sensor publishes no serial register, so the field is mandatory and the scan does not start without it. Enter your own site asset number, up to 50 characters.

If a sensor that was working goes quiet, the usual causes are on the bus rather than in the sensor: a missing 120 Ohm termination resistor in RS485-1 PORT 2, a second device sharing the same Slave ID, or a baud rate changed on one device and not the others.

A sensor that reads but reads wrong, consistently high or low by the same amount, is usually a correction offset someone left behind. Check Settings, Calibration before suspecting the element.

10. Who can do what

  • Regular user (basic): can view the device page and both readings, and can edit all four settings, being Slave ID, Baudrate, Temperature Correction and Humidity Correction.

Every setting on this sensor is editable by a regular user. Changing Baudrate takes the sensor off the bus as described in section 7, and a correction offset silently biases everything the platform records from then on. Nothing on the platform gates either, so brief whoever commissions the site.

11. Tips & gotchas

  • Two sensors on one line need two addresses, set one at a time. Both ship on the same factory address, so wire and address the first sensor before connecting the second, or they will answer together and neither will scan.
  • The serial number is yours to manage. The platform cannot read one and the module has none printed, so nothing stops the same serial being entered twice. Use a site asset number consistently.
  • This sensor and the ComWinTop one do not share a default baud rate. The XY-MD02 ships at 9600 and the CWT-TH03S-H at 4800. Both appear on the same connection guide, so a site fitting one of each cannot put them on one RS485 port until the two are set to the same rate.
  • Correction offsets are trimming, not calibration. They shift the reported value by a fixed amount and do nothing for a drifting or faulty element. Set them against a reference instrument in the same air, or leave them on 0.0.
  • The humidity element is specified only to 80 %RH. A reading from a consistently damp location is at the limit of the instrument rather than a measurement to act on.
  • Nothing on this sensor needs periodic maintenance beyond keeping the vents clear. A blocked module shows up as humidity that responds far more slowly than the temperature does.

Related articles