Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Component Documentation

How to Use SHT20 MODBUS: Examples, Pinouts, and Specs

Image of SHT20 MODBUS
Cirkit Designer LogoDesign with SHT20 MODBUS in Cirkit Designer

Introduction

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.

Explore Projects Built with SHT20 MODBUS

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
ESP32-Based Environmental Monitoring and Home Automation System with Ethernet Connectivity
Image of ESP32 38Pin 3Phase Air Conditioner USB-C: A project utilizing SHT20 MODBUS in a practical application
This circuit is designed for environmental monitoring and home automation, featuring an ESP32 microcontroller connected to a W5500 Ethernet module, DHT22 and Adafruit SHTC3 sensors for temperature and humidity readings, a ZMPT101B module for voltage sensing, and a 4-channel relay for controlling external devices. Network connectivity enables remote data access and control functions.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP32-Based Environmental Monitoring System with Ethernet Connectivity
Image of ESP32 38Pin USBMicro: A project utilizing SHT20 MODBUS in a practical application
This circuit features an ESP32 microcontroller interfaced with a W5500 Ethernet module for network connectivity, a DHT22 sensor for measuring temperature and humidity, and an Adafruit SHTC3 sensor for additional temperature and humidity readings. The ZMPT101B module is connected to the ESP32 for voltage measurement in an AC power line. The ESP32 manages data collection from the sensors and communicates with the Ethernet module, likely for data logging or remote monitoring purposes.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP32-Based Environmental Monitoring and Home Automation System with Ethernet Connectivity
Image of ESP32 30Pin 3Phase AC Box W5500 Ethernet Standard: A project utilizing SHT20 MODBUS in a practical application
This circuit features an ESP32 microcontroller interfaced with a W5500 Ethernet module for network connectivity, a DHT22 sensor for measuring temperature and humidity, a ZMPT101B module for AC voltage sensing, and an Adafruit SHTC3 sensor for additional temperature and humidity readings. The ESP32 also controls a 4-channel relay module for switching external devices. The sensors and Ethernet module communicate with the ESP32 via GPIO pins, with the W5500 using SPI and the SHTC3 using I2C. Common ground and power lines are shared among the components.
Cirkit Designer LogoOpen Project in Cirkit Designer
Wi-Fi Controlled Weather Station with ESP32, DHT22, and SHTC3 Sensors
Image of ESP32-POE-ISO 2 AC and 2 Sensor: A project utilizing SHT20 MODBUS in a practical application
This circuit integrates an ESP32 microcontroller with a DHT22 temperature and humidity sensor, an Adafruit SHTC3 sensor, and a 2-channel relay module. The ESP32 reads environmental data from the sensors and can control external devices through the relay module.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with SHT20 MODBUS

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Image of ESP32 38Pin 3Phase Air Conditioner USB-C: A project utilizing SHT20 MODBUS in a practical application
ESP32-Based Environmental Monitoring and Home Automation System with Ethernet Connectivity
This circuit is designed for environmental monitoring and home automation, featuring an ESP32 microcontroller connected to a W5500 Ethernet module, DHT22 and Adafruit SHTC3 sensors for temperature and humidity readings, a ZMPT101B module for voltage sensing, and a 4-channel relay for controlling external devices. Network connectivity enables remote data access and control functions.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of ESP32 38Pin USBMicro: A project utilizing SHT20 MODBUS in a practical application
ESP32-Based Environmental Monitoring System with Ethernet Connectivity
This circuit features an ESP32 microcontroller interfaced with a W5500 Ethernet module for network connectivity, a DHT22 sensor for measuring temperature and humidity, and an Adafruit SHTC3 sensor for additional temperature and humidity readings. The ZMPT101B module is connected to the ESP32 for voltage measurement in an AC power line. The ESP32 manages data collection from the sensors and communicates with the Ethernet module, likely for data logging or remote monitoring purposes.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of ESP32 30Pin 3Phase AC Box W5500 Ethernet Standard: A project utilizing SHT20 MODBUS in a practical application
ESP32-Based Environmental Monitoring and Home Automation System with Ethernet Connectivity
This circuit features an ESP32 microcontroller interfaced with a W5500 Ethernet module for network connectivity, a DHT22 sensor for measuring temperature and humidity, a ZMPT101B module for AC voltage sensing, and an Adafruit SHTC3 sensor for additional temperature and humidity readings. The ESP32 also controls a 4-channel relay module for switching external devices. The sensors and Ethernet module communicate with the ESP32 via GPIO pins, with the W5500 using SPI and the SHTC3 using I2C. Common ground and power lines are shared among the components.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of ESP32-POE-ISO 2 AC and 2 Sensor: A project utilizing SHT20 MODBUS in a practical application
Wi-Fi Controlled Weather Station with ESP32, DHT22, and SHTC3 Sensors
This circuit integrates an ESP32 microcontroller with a DHT22 temperature and humidity sensor, an Adafruit SHTC3 sensor, and a 2-channel relay module. The ESP32 reads environmental data from the sensors and can control external devices through the relay module.
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications

  • HVAC systems for monitoring and controlling environmental conditions
  • Industrial automation and process control
  • Weather stations and environmental monitoring
  • Smart agriculture and greenhouse management
  • Data logging and IoT applications

Technical Specifications

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

Pin Configuration and Descriptions

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)

Usage Instructions

How to Use the SHT20 MODBUS in a Circuit

  1. Power Supply: Connect the VCC pin to a 3.3V or 5V power source and the GND pin to the ground of your circuit.
  2. RS485 Communication: Connect the A (D+) and B (D-) pins to the corresponding RS485 interface of your microcontroller or RS485-to-USB converter.
  3. Termination Resistor: If the sensor is at the end of an RS485 bus, add a 120-ohm termination resistor between A and B to prevent signal reflections.
  4. MODBUS Configuration: Configure your microcontroller or software to communicate using the MODBUS RTU protocol. The default baud rate is typically 9600 bps, with 8 data bits, no parity, and 1 stop bit (8N1).

Important Considerations and Best Practices

  • Wiring: Use twisted-pair cables for the RS485 lines to minimize noise and signal degradation.
  • Addressing: Each SHT20 MODBUS sensor has a unique slave address. Ensure no two devices on the same bus share the same address.
  • Environmental Protection: If used in harsh environments, consider housing the sensor in a protective enclosure with proper ventilation.
  • Warm-Up Time: Allow the sensor to stabilize for a few seconds after powering up before taking measurements.

Example Code for Arduino UNO

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
}

Troubleshooting and FAQs

Common Issues and Solutions

  1. No Data Received

    • Cause: Incorrect wiring or loose connections.
    • Solution: Verify all connections, especially the RS485 A and B lines.
  2. MODBUS Communication Fails

    • Cause: Incorrect slave address or baud rate settings.
    • Solution: Ensure the slave address and communication parameters match the sensor's configuration.
  3. Inaccurate Readings

    • Cause: Sensor exposed to condensation or contaminants.
    • Solution: Allow the sensor to dry and ensure it is used in a clean environment.
  4. Interference on RS485 Bus

    • Cause: Long cable runs or improper termination.
    • Solution: Use shielded cables and add termination resistors at both ends of the bus.

FAQs

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.