Same-day dispatch before 2 PM · Free delivery over ₹999 · GST invoices Get the appPrices incl. GST
Geekobot
Snap & SendNEWGeeko AIWhere's myOrder
Log in
Products
  • Projects
    • Component guidesHow parts work, with code you can run
    • Learning pathsFrom your first LED to your first robot
    • Workshops & eventsOnline sessions for makers and classes
    • ElectrolarkFree guided builds, simulator and certificates
    • Students & teachersStudent discount and classroom help
    • CommunityShare builds and ask other makers
    • CalculatorsOhm's law, LED resistor, 555 and 100+ more
    • Circuit builderWire parts and run the circuit, powered by Electrolark
    • Geeko AIAsk what to buy or how to wire it
    • Snap & SendPhotograph a part or list, we find it
    • Part finderAnswer a few questions, get the right part
    • Compatibility checkWill these two parts work together?
    • Compare partsSpecs side by side
    • Business & bulk ordersGST invoices, credit and volume prices
    • Request a quotationSend your list, get a quote
    • Classroom kitsPer-student kits and lab bundles
    • Gift cardsFor students, teams and events
  • Atal Tinkering Lab
BOM to cart
Geekobot

Components, kits and know-how for makers, students, engineers, labs and businesses across India.

Ask Geeko AIOrders, parts and projects, any timeEmail supportReply within 1 working dayGet the Geekobot appAdd it to your home screen, free

Follow us

Shop

  • Boards & SBCs
  • Sensors & Modules
  • IoT & Wireless
  • Drone & FPV
  • 3D Printing
  • Filaments & Resins
  • Motors & Drivers
  • Power & Batteries
  • Semiconductors
  • Passive
  • Displays & LEDs
  • Switches & Relays
  • Wires & Cables
  • Prototyping
  • Tools & Test
  • Robotics
  • STEM Kits
  • Atal Tinkering Lab
  • Mechanical Parts
  • Audio

Orders

  • Track your order
  • Help & support
  • Shipping and delivery
  • Refunds and cancellation
  • Contact us

Learn

  • Projects
  • Geeko AI project assistant
  • Learning paths
  • Guides
  • Calculators
  • Electrolark: free guided builds

Part tools

  • Part finder
  • Compare parts
  • Will it work with my board?

Institutions

  • Classroom kits
  • Atal Tinkering Lab
  • Students & teachers
  • Workshops & Events

Business

  • Business & education
  • Request a quotation
  • BOM bulk upload
  • Quick order by SKU

Company

  • About Geekobot
  • Community
  • Gift cards
  • Terms & conditions
  • Privacy policy
  • Product directory
  • Sitemap

© 2026 Geekobot, a trade name of OLatus Systems Private Limited. All rights reserved.

20, 1st Floor, Neeladri Complex, 10th Cross, Sampige Rd, 2nd Main, Malleshwaram, Bengaluru, Karnataka 560003 · GSTIN 29AACCO0462F1ZM

+91 91810 15607 · connect@geekobot.in · Monday to Saturday, 10 AM to 2 PM IST

UPI · CARDS · NETBANKING · GST INVOICES

ShopProjectsGeeko AIGuides
Compare 0 parts →
Log in

Shop by category

Shop all components
  • Boards & SBCs1,910 products
    • Alternative Single Board Computers
    • Arduino Ecosystem
    • FPGA & Logic Boards
    • Microcontroller & Wireless Boards
    View all
  • Sensors & Modules4,701 products
    • Biomedical & Heart Rate
    • Current, Voltage & Power
    • Force, Weight & Pressure
    • Gas, Weather & Environmental
    View all
  • IoT & Wireless2,314 products
    • RF Modules
    • RFID & NFC
    • Antennas & RF Accessories
    • Cameras & Smart Vision
    View all
  • Drone & FPV3,558 products
    • Flight Control & Navigation
    • FPV Video & Optics
    • Frames & Structural Parts
    • Motors & Propulsion
    View all
  • 3D Printing2,204 products
    • 3D Printers
    • 3D Scanners & Digitizers
    • Laser Engravers & Cutters
    • Material Management & Upgrades
    View all
  • Filaments & Resins1,472 products
    • Filaments
    • Photopolymer Resins
    View all
  • Motors & Drivers463 products
    • BLDC Motor Drivers
    • DC & Geared Motors
    • DC Motor Drivers
    • Linear Actuators & Solenoids
    View all
  • Power & Batteries557 products
    • Battery Holders & Connectors
    • Breadboard Power
    • Chargers & BMS
    • DC-DC Converters
    View all
  • Semiconductors295 products
    • Diodes & Rectifiers
    • Interface & RF Encoder ICs
    • Logic ICs (74xx)
    • Logic ICs (CD4000)
    View all
  • Passive67 products
    • Capacitors
    • Circuit Protection
    • Crystals & Oscillators
    • Inductors
    View all
  • Displays & LEDs572 products
    • 7-Segment & Dot Matrix
    • Addressable LEDs
    • Character LCDs
    • Graphic LCDs
    View all
  • Switches & Relays184 products
    • Keypads & Touch
    • Push Buttons & Tactile
    • Relay Modules
    • Relays
    View all
  • Wires & Cables233 products
    • Board-to-Wire Connectors
    • Crimp & Splice
    • Headers & Dupont
    • Heat Shrink & Sleeving
    View all
  • Prototyping101 products
    • Breadboards
    • Interface Modules
    • PCBs & Perfboards
    View all
  • Tools & Test717 products
    • Bench Power Supplies
    • Hand Tools
    • Measuring Tools
    • Meters & Testers
    View all
  • Robotics180 products
    • Humanoid & Legged Robots
    • Robot Chassis & Platforms
    • Robotic Arms & Grippers
    • Wheels & Casters
    View all
  • STEM Kits268 products
    • Arduino Learning Kits
    • Coding & IoT Kits
    • Early Coding (Ages 3-8)
    • Invention Kits
    View all
  • Atal Tinkering Lab196 products
    • Package 1: Electronics, Robotics, IoT and Sensors
    • Package 2: Rapid Prototyping Tools
    • Package 3: Mechanical, Electrical and Measurement Tools
    • Package 4: Power Supply, Accessories and Safety Equipment
    View all
  • Mechanical Parts212 products
    • Bearings
    • Brackets & Mounts
    • Couplers
    • Fasteners & Standoffs
    View all
  • Audio109 products
    • Amplifier Modules
    • Buzzers & Sirens
    • Speakers
    View all
  1. Home
  2. ›Guides
  3. ›Sensors
  4. ›RS485 Modbus Temperature and Humidity Sensors

Component guide · Intermediate · 5 min read

RS485 Modbus Temperature and Humidity Sensors

XY-MD02, XY-MD01, Renke RS-WS, SN-3002, Asair, DFRobot, Seeed)

By Geekobot Learning Team · Updated 29 Oct 2026

I'm using
Wiring, code and the Run it panels follow your board.
On this page
Short answerWhat the RS485 Modbus temperature and humidity sensors isRS485 Modbus temperature and humidity sensors pinoutWiring the RS485 Modbus temperature and humidity sensorsExample codeSetup and tuningWhat you needAlternatives and when to choose themCommon mistakesFAQsParts and next steps
Short answer

RS485 Modbus temperature and humidity sensors send readings over two twisted wires up to about 1 km, so they suit factories, cold rooms, server rooms and greenhouses. They run on 5 to 30 V, answer at address 1 and 9600 baud by default, and hold temperature and humidity in two registers scaled by 10. Wall, duct, DIN rail and probe versions use the same idea.

Key specs at a glance

Supply
5 to 30 V DC (10 to 30 V on most Renke and SN-3002)
Bus
RS485, Modbus RTU
Default
Address 1, 9600 baud, 8N1 (check the label)
Accuracy
About plus or minus 0.5 degrees C and 3% RH
Registers
Two values x10: humidity and temperature (order varies)
Mounting
Wall box, duct probe, DIN rail, cable probe

Models in this guide

These are alternatives. Pick the one that fits your project; you only need one.

  • Option 1XY-MD02 Temperature & Humidity Transmitter Modbus – RS485 DIN Rail Mount₹891
  • Option 2XY-MD01 SHT20 Temperature Humidity Transmitter with RS485 Modbus – 1M Shell Cable₹646
  • Option 3Sensirion SHT20 Temperature & Humidity Transmitter Module XY-MD01 – RS485 Modbus₹499
  • Option 4MD02 Temperature and Humidity Transmitter SHT20 Sensor – RS485 Modbus₹525
  • Option 5Renke RS-WS-N01-2-4 Industrial Temperature & Humidity Sensor Wall Mount – RS485 Modbus, IP65₹4,839
  • Option 6Renke RS-WS-N01-2D-LCD-EX Temperature & Humidity Sensor with LCD Display – RS485/4-20mA/0-10V Output, IP65₹4,189
01

What the RS485 Modbus temperature and humidity sensors is

RS485 temperature and humidity sensors are wall or probe transmitters that report temperature and RH over Modbus RTU for server rooms, warehouses, cold rooms and greenhouses.

The register map is the one thing that differs. Renke and SN-3002 sensors usually return humidity then temperature from holding register 0 (function 03). XY-MD02 and XY-MD01 return temperature then humidity from input register 1 (function 04). Read the manual or try both.

Every sensor on one bus needs a different address. Change it by writing the address register over Modbus, one sensor at a time.

02

RS485 Modbus temperature and humidity sensors pinout

The pins on the RS485 Modbus temperature and humidity sensors and what each one does.

PinFunction
Brown / redV+
BlackGND
Yellow / blueRS485 A+
Green / whiteRS485 B-
PinFunction
Brown / red
V+
Black
GND
Yellow / blue
RS485 A+
Green / white
RS485 B-
03

Wiring the RS485 Modbus temperature and humidity sensors

Use twisted pair and add a 120 ohm resistor across A and B at both ends of long buses. Share ground between the sensor supply and the controller.

RS485 Modbus temperature and humidity sensors pinArduino UnoESP32
Sensor A+ (often yellow or blue)MAX485 AMAX485 A
Sensor B- (often green or white)MAX485 BMAX485 B
Sensor V+ (brown or red)10 to 30 V supply +10 to 30 V supply +
Sensor GND (black)Supply - and board GNDSupply - and board GND
MAX485 RO / DISoftware serial pinsGPIO 16 (RX2) / GPIO 17 (TX2)
MAX485 DE + RED4GPIO 4
Sensor A+ (often yellow or blue)
Arduino Uno:
MAX485 A
ESP32:
MAX485 A
Sensor B- (often green or white)
Arduino Uno:
MAX485 B
ESP32:
MAX485 B
Sensor V+ (brown or red)
Arduino Uno:
10 to 30 V supply +
ESP32:
10 to 30 V supply +
Sensor GND (black)
Arduino Uno:
Supply - and board GND
ESP32:
Supply - and board GND
MAX485 RO / DI
Arduino Uno:
Software serial pins
ESP32:
GPIO 16 (RX2) / GPIO 17 (TX2)
MAX485 DE + RE
Arduino Uno:
D4
ESP32:
GPIO 4
04

Example code

A minimal sketch to check the part works.

Read temperature and humidity over Modbus (ESP32) · Arduino C++Verify & upload in Electrolark
#include <ModbusMaster.h>   // library: ModbusMaster by Doc Walker

const int DE_RE = 4;          // MAX485 DE and RE tied together
ModbusMaster node;

void pre()  { digitalWrite(DE_RE, HIGH); }
void post() { digitalWrite(DE_RE, LOW); }

void setup() {
  Serial.begin(115200);
  Serial2.begin(9600, SERIAL_8N1, 16, 17);   // RX, TX to the MAX485 RO, DI
  pinMode(DE_RE, OUTPUT); post();
  node.begin(1, Serial2);                    // slave address 1 (factory default on most)
  node.preTransmission(pre);
  node.postTransmission(post);
}

void loop() {
  // Many sensors: function 03, register 0 = humidity x10, register 1 = temperature x10.
  // XY-MD02 style: use readInputRegisters(1, 2) and the order is temperature, humidity.
  uint8_t r = node.readHoldingRegisters(0x0000, 2);
  if (r == node.ku8MBSuccess) {
    float h = node.getResponseBuffer(0) / 10.0;
    float t = (int16_t)node.getResponseBuffer(1) / 10.0;   // signed for below zero
    Serial.printf("RH %.1f %%  T %.1f C\n", h, t);
  } else {
    Serial.printf("Modbus error 0x%02X\n", r);
  }
  delay(2000);
}
05

Setup and tuning

Power

usually 5 to 30 V DC.

Wiring

A and B to the RS485 bus on shielded twisted pair; terminate the bus ends.

Modbus

read the holding registers; values are often temperature × 10 and RH × 10.

Address

set a unique address for each sensor on the bus.

Placement

mount away from doors, heaters and direct sun.

06

What you need

Shop this list20 of 20 found in our store · ₹67,279

  • Generic XY-MD02 Temperature & Humidity Transmitter Modbus – RS485 DIN Rail Mount: the part this guide coversXY-MD02 Temperature & Humidity Transmitter Modbus – RS485 DIN Rail Mount₹891
  • XY-MD01 SHT20 Temperature Humidity Transmitter with RS485 Modbus – 1M Shell Cable: another version this guide coversXY-MD01 SHT20 Temperature Humidity Transmitter with RS485 Modbus – 1M Shell Cable₹646
  • Sensirion SHT20 Temperature & Humidity Transmitter Module XY-MD01 – RS485 Modbus: another version this guide coversSensirion SHT20 Temperature & Humidity Transmitter Module XY-MD01 – RS485 Modbus₹499
  • MD02 Temperature and Humidity Transmitter SHT20 Sensor – RS485 Modbus: another version this guide coversMD02 Temperature and Humidity Transmitter SHT20 Sensor – RS485 Modbus₹525
  • Renke RS-WS-N01-2-4 Industrial Temperature & Humidity Sensor Wall Mount – RS485 Modbus, IP65: another version this guide coversRenke RS-WS-N01-2-4 Industrial Temperature & Humidity Sensor Wall Mount – RS485 Modbus, IP65₹4,839
  • Renke RS-WS-N01-2D-LCD-EX Temperature & Humidity Sensor with LCD Display – RS485/4-20mA/0-10V Output, IP65: another version this guide coversRenke RS-WS-N01-2D-LCD-EX Temperature & Humidity Sensor with LCD Display – RS485/4-20mA/0-10V Output, IP65₹4,189
  • Renke RS-WS-N01-8-EX Flat Rail Type Modbus Temperature and Humidity Sensor, -40°C ~ +60°C, 0%RH ~ 95%RH, RS485: another version this guide coversRenke RS-WS-N01-8-EX Flat Rail Type Modbus Temperature and Humidity Sensor, -40°C ~ +60°C, 0%RH ~ 95%RH, RS485₹1,549
  • Renke RS-WS-N01-9A-EX Industrial Duct-Mounted Temperature & Humidity Sensor, 10-30V DC, RS485 Modbus-RTU: another version this guide coversRenke RS-WS-N01-9A-EX Industrial Duct-Mounted Temperature & Humidity Sensor, 10-30V DC, RS485 Modbus-RTU₹6,809
  • Renke RS-WS-N01-9A-LCD-EX Industrial Duct-Mounted Temperature & Humidity Sensor – RS485 Modbus, LCD Display: another version this guide coversRenke RS-WS-N01-9A-LCD-EX Industrial Duct-Mounted Temperature & Humidity Sensor – RS485 Modbus, LCD Display₹7,789
  • Renke RS-WS-N01-9TH-EX Duct-Mounted Temperature & Humidity Sensor – RS485: another version this guide coversRenke RS-WS-N01-9TH-EX Duct-Mounted Temperature & Humidity Sensor – RS485₹3,889
  • Renke SHT20-59-B High Temperature Sensor Probe, 59mm Length – RS485 Modbus-RTU: another version this guide coversRenke SHT20-59-B High Temperature Sensor Probe, 59mm Length – RS485 Modbus-RTU₹2,239
  • Taidacent SN-3002-WS-N01-4 Wall-Mounted Temperature and Humidity Sensor – RS485 Modbus, 4-20mA, 0-10V Output: another version this guide coversTaidacent SN-3002-WS-N01-4 Wall-Mounted Temperature and Humidity Sensor – RS485 Modbus, 4-20mA, 0-10V Output₹1,329
  • DFRobot RS485 Temperature and Humidity Sensor: another version this guide coversDFRobot RS485 Temperature and Humidity Sensor₹3,332
  • Seeed Studio Industrial RS485 Modbus Temperature and Humidity Sensor: another version this guide coversSeeed Studio Industrial RS485 Modbus Temperature and Humidity Sensor₹4,342
  • Asair AGH3485 Temperature And Humidity Transmitter – RS485 Modbus RTU, 0-10V/4-20mA Output: another version this guide coversAsair AGH3485 Temperature And Humidity Transmitter – RS485 Modbus RTU, 0-10V/4-20mA Output₹1,469
  • Asair AW5485 Temperature & Humidity Transmitter Module – RS485 Modbus RTU Output: another version this guide coversAsair AW5485 Temperature & Humidity Transmitter Module – RS485 Modbus RTU Output₹1,799
  • Wittelb WIN-SN-TNH-AHT20-M Digital Temperature & Humidity Sensor with RS485 Modbus & Display: another version this guide coversWittelb WIN-SN-TNH-AHT20-M Digital Temperature & Humidity Sensor with RS485 Modbus & Display₹5,348
  • Renke RS-KB-1-N01-4-EX 22.4-inch Temperature & Humidity Display Panel – RS485 Modbus, DC 10-30V: another version this guide coversRenke RS-KB-1-N01-4-EX 22.4-inch Temperature & Humidity Display Panel – RS485 Modbus, DC 10-30V₹15,379
  • ESP32-WROOM-32 38-pin development board: for Wi-Fi logging and dashboardsESP32-WROOM-32 38-Pin Development Board₹389
  • MAX485 RS-485 to TTL module: to read the Modbus sensor from a microcontrollerMAX485 RS-485 to TTL Module₹28
07

Alternatives and when to choose them

  • ✓Modbus RTU with Arduino and ESP32: the protocol in detail.
  • ✓Humidity transmitters: 4 to 20 mA outputs.
  • ✓RS485 to 4G MQTT gateway: send readings to the cloud.
08

Common mistakes to avoid

  • !Duplicate addresses.
  • !Forgetting the ×10 scaling.
  • !No termination on long cables.
  • !Mounting near doors or heaters.
09

Frequently asked questions

How do I read an RS485 temperature sensor with ESP32?

Use a MAX485 or auto-direction RS485 module and a Modbus library.

Why does the reading show 253 instead of 25.3?

The register stores tenths of a degree, so divide the value by 10.

How long can the RS485 cable be?

Up to about 1200 m with good twisted pair and termination.

Can I connect many sensors on one cable?

Yes. Many sensors can share one cable if each has a unique address.

Why does it read high humidity in cold rooms?

Condensation; use sensors rated for high humidity and heated probes.

Parts for this guide

  • XY-MD02 Temperature & Humidity Transmitter Modbus – RS485 DIN Rail Mount
    ₹891View
  • XY-MD01 SHT20 Temperature Humidity Transmitter with RS485 Modbus – 1M Shell Cable
    ₹646View
  • Sensirion SHT20 Temperature & Humidity Transmitter Module XY-MD01 – RS485 Modbus
    ₹499View
  • MD02 Temperature and Humidity Transmitter SHT20 Sensor – RS485 Modbus
    ₹525View
  • Renke RS-WS-N01-2-4 Industrial Temperature & Humidity Sensor Wall Mount – RS485 Modbus, IP65
    ₹4,839View
  • Renke RS-WS-N01-2D-LCD-EX Temperature & Humidity Sensor with LCD Display – RS485/4-20mA/0-10V Output, IP65
    ₹4,189View
  • Renke RS-WS-N01-8-EX Flat Rail Type Modbus Temperature and Humidity Sensor, -40°C ~ +60°C, 0%RH ~ 95%RH, RS485
    ₹1,549View
  • Renke RS-WS-N01-9A-EX Industrial Duct-Mounted Temperature & Humidity Sensor, 10-30V DC, RS485 Modbus-RTU
    ₹6,809View
  • Renke RS-WS-N01-9A-LCD-EX Industrial Duct-Mounted Temperature & Humidity Sensor – RS485 Modbus, LCD Display
    ₹7,789View
  • Renke RS-WS-N01-9TH-EX Duct-Mounted Temperature & Humidity Sensor – RS485
    ₹3,889View
  • Renke SHT20-59-B High Temperature Sensor Probe, 59mm Length – RS485 Modbus-RTU
    ₹2,239View
  • Taidacent SN-3002-WS-N01-4 Wall-Mounted Temperature and Humidity Sensor – RS485 Modbus, 4-20mA, 0-10V Output
    ₹1,329View
  • DFRobot RS485 Temperature and Humidity Sensor
    ₹3,332View
  • Seeed Studio Industrial RS485 Modbus Temperature and Humidity Sensor
    ₹4,342View
  • Asair AGH3485 Temperature And Humidity Transmitter – RS485 Modbus RTU, 0-10V/4-20mA Output
    ₹1,469View
  • Asair AW5485 Temperature & Humidity Transmitter Module – RS485 Modbus RTU Output
    ₹1,799View
  • Wittelb WIN-SN-TNH-AHT20-M Digital Temperature & Humidity Sensor with RS485 Modbus & Display
    ₹5,348View
  • Renke RS-KB-1-N01-4-EX 22.4-inch Temperature & Humidity Display Panel – RS485 Modbus, DC 10-30V
    ₹15,379View
  • ESP32-WROOM-32 38-Pin Development Board
    ₹389View
  • MAX485 RS-485 to TTL Module
    ₹28View
  • USB to RS485 Converter Adapter
    ₹74View
  • SMPS Power Supply, Metal Enclosure (5V / 12V / 24V)
    ₹298View
  • Uno R3 Development Board (No Cable)
    ₹359View
Shop Temperature & Thermal SensorsShop Humidity & Dew Point Sensors

Keep learning

How-toAdvancedModbus RTU With Arduino and ESP32Connect industrial Modbus RTU sensors to Arduino or ESP32 with an RS485 module: wiring, termination, slave addresses, baud rate, registers and example code.3 min read · IoT & WirelessComponent guideIntermediateMAX485 RS485 to TTL ModuleThe MAX485 module converts a microcontroller's UART into RS485, the two-wire differential bus used by industrial sensors and Modbus devices over long cables (up to about 1200 m).3 min read · IoT & WirelessComponent guideIntermediateHumidity and Temperature TransmittersA humidity transmitter measures relative humidity and often temperature, then outputs a 4-20 mA or 0-10 V signal for a PLC, controller or data logger.3 min read · SensorsComponent guideIntermediateRS485 to 4G MQTT GatewaysAn RS485 to 4G gateway reads Modbus devices such as energy meters, flow meters and PLCs, and sends the data to a cloud server over a SIM card.4 min read · IoT & Wireless

Sources

  • Renke RS-WS-N01 manual
  • XY-MD02 Modbus register table

Written by the Geekobot team from manufacturer datasheets. Always check the datasheet for the exact part and variant you buy.

On this page
Short answerWhat the RS485 Modbus temperature and humidity sensors isRS485 Modbus temperature and humidity sensors pinoutWiring the RS485 Modbus temperature and humidity sensorsExample codeSetup and tuningWhat you needAlternatives and when to choose themCommon mistakesFAQsParts and next steps
Need a hand?Ask Geeko AI which part fits your project, or talk to the Geekobot team.Ask Geeko AIHelp & support

Parts for this guide (Arduino Uno)2 items · ₹1,095

XY-MD02 Temperature & Humidity Transmitter Modbus – RS485 DIN Rail Mount · Uno R3 CH340G ATmega328p Compatible Development Board

Run itChange the inputs and watch the output

Error 0xE2 is a timeout: nothing answered. Check A/B, address and baud.

Serial monitor115200 baud
RH 58.0 %  T 27.3 C

A simulation of the sketch above, so you know what to expect. Real readings vary with your parts and wiring.

Ask the Community

Ask a question