

The SHT20 MODBUS is a digital temperature and humidity sensor designed for high-accuracy environmental measurements. It communicates using the MODBUS protocol, making it suitable for industrial and commercial applications requiring robust and reliable data transmission. The sensor integrates a capacitive humidity sensor and a band-gap temperature sensor, ensuring precise and stable readings over time.








The SHT20 MODBUS sensor is built to deliver reliable performance under a wide range of conditions. Below are its key technical details:
| Parameter | Value |
|---|---|
| Supply Voltage | 3.3V to 5.5V |
| Communication Protocol | MODBUS RTU (RS485 interface) |
| Temperature Range | -40°C to +125°C |
| Temperature Accuracy | ±0.3°C (typical) |
| Humidity Range | 0% RH to 100% RH |
| Humidity Accuracy | ±2% RH (typical) |
| Power Consumption | < 1 mA (during measurement) |
| Response Time (Humidity) | 8 seconds (typical) |
| Response Time (Temperature) | 5 seconds (typical) |
| Dimensions | 59mm x 18mm x 8mm |
The SHT20 MODBUS sensor typically comes with a 4-pin interface for easy integration into systems. Below is the pinout:
| Pin | Name | Description |
|---|---|---|
| 1 | VCC | Power supply input (3.3V to 5.5V) |
| 2 | GND | Ground connection |
| 3 | A (D+) | RS485 differential data line (positive) |
| 4 | B (D-) | RS485 differential data line (negative) |
Below is an example of how to interface the SHT20 MODBUS with an Arduino UNO using an RS485 module:
#include <ModbusMaster.h>
// Instantiate ModbusMaster object
ModbusMaster node;
// RS485 control pin
const int DE_RE_PIN = 2;
void preTransmission() {
digitalWrite(DE_RE_PIN, HIGH); // Enable RS485 transmitter
}
void postTransmission() {
digitalWrite(DE_RE_PIN, LOW); // Disable RS485 transmitter
}
void setup() {
Serial.begin(9600); // Initialize serial communication
pinMode(DE_RE_PIN, OUTPUT); // Set RS485 control pin as output
digitalWrite(DE_RE_PIN, LOW); // Set RS485 to receive mode
node.begin(1, Serial); // Set MODBUS slave ID to 1
node.preTransmission(preTransmission);
node.postTransmission(postTransmission);
}
void loop() {
uint8_t result;
uint16_t data[2];
// Read temperature and humidity registers (example addresses: 0x0001 and 0x0002)
result = node.readInputRegisters(0x0001, 2);
if (result == node.ku8MBSuccess) {
data[0] = node.getResponseBuffer(0); // Temperature data
data[1] = node.getResponseBuffer(1); // Humidity data
float temperature = data[0] / 10.0; // Convert to Celsius
float humidity = data[1] / 10.0; // Convert to %RH
Serial.print("Temperature: ");
Serial.print(temperature);
Serial.println(" °C");
Serial.print("Humidity: ");
Serial.print(humidity);
Serial.println(" %RH");
} else {
Serial.println("Failed to read from sensor.");
}
delay(2000); // Wait 2 seconds before next reading
}
No Data Received
MODBUS Communication Fails
Inaccurate Readings
Interference on RS485 Bus
Q: Can I use the SHT20 MODBUS with a 3.3V microcontroller?
A: Yes, the sensor supports a supply voltage range of 3.3V to 5.5V, making it compatible with 3.3V systems.
Q: How many sensors can I connect to a single RS485 bus?
A: You can connect up to 32 devices on a single RS485 bus, provided each has a unique slave address.
Q: What is the default slave address of the SHT20 MODBUS?
A: The default slave address is typically 0x01, but refer to the sensor's datasheet for confirmation.
Q: Can the sensor operate in high-humidity environments?
A: Yes, the SHT20 MODBUS is designed to operate in 0% to 100% RH, but prolonged exposure to condensation should be avoided.