Skip to content

Humidity Sensor

Updated: 6/28/2025 Words: 0 words Reading time: 0 minutes

Humidity refers to the water vapor content in the air. This content can affect human comfort and health, and also influences the use of precision electronic instruments, such as static-sensitive devices and high-voltage equipment. Additionally, the presence of water vapor affects various physical, chemical, and biological processes. Therefore, sensing, measuring, monitoring, and controlling humidity is a very important task.

Preparation

Hardware

HardwareDescriptionImage
Creative Box PlatformMy Image
Environmental Monitoring ModuleIncluded with Creative Box purchaseMy Image

Software

SoftwareLinkDescription
Environmental Monitoring AppLinkOfficial frontend application, can be loaded and used directly through the console.

Connection

My Image
Connection
Connect the environmental monitoring module to any pin group on the platform, the connection shown above uses pins 12-15

Usage

Reading Current Humidity

Open the Creative Box console and load the Environmental Monitoring Board application from the sensor applications. Enter the application and select the pin number where the Creative Box connects to the environmental monitoring module. The webpage will then automatically display the current humidity information.

Creative Box ConsoleLoad ApplicationSelect Pin Number and Display Current Environmental Data

Principles

My Image

Humidity Sensor

A humidity sensor, also known as a hygrometer, is designed to measure and monitor the moisture content in air or specific environments, converting this information into electrical signals for electronic systems to measure and interpret. Humidity sensors play important roles in meteorology, HVAC, agriculture, food processing, pharmaceuticals, and other industries.

Types

Humidity sensors mainly have three basic types: capacitive, resistive, and thermal conductivity. All three types monitor minute changes in the atmosphere to calculate humidity in the air.

Capacitive humidity sensors measure relative humidity by placing a thin metal oxide strip between two electrodes. This metal oxide belongs to hygroscopic dielectric materials that absorb moisture as humidity increases, changing the capacitance, which is then converted to humidity readings. Capacitive humidity sensors have the advantage of nearly linear output voltage, can be used for long periods, provide stable results, and detect a wide range of humidity. However, the distance between the sensor and signal circuit is very limited. They are suitable for HVAC systems, printers and fax machines, weather stations, automobiles, and household appliances.

Resistive humidity sensors use humidity-sensitive materials whose resistance characteristics change with moisture absorption. The resistance change can be used to calculate humidity levels. Resistive humidity sensors have the advantages of small size, low cost, and the ability to have larger distances between sensor and signal circuit, suitable for remote operation. However, they are more sensitive to chemical gases and other pollutants.

Thermal conductivity humidity sensors conduct current based on the humidity of surrounding air. One sensor is wrapped in dry nitrogen, while another measures environmental air. The difference between them measures humidity. Thermal conductivity humidity sensors have the advantages of being suitable for high-temperature and highly corrosive environments, and are very durable. They also have higher resolution compared to other types. Common applications include drying kilns, pharmaceutical plants, ovens, and dryers.

Optimal Humidity for Human Body

The most comfortable humidity for the human body is typically between 40% and 60%. Within this humidity range, people usually feel most comfortable, and skin doesn't become too dry or too moist.

Too low humidity may cause skin dryness, throat discomfort, coughing, and eye irritation. On the other hand, too high humidity may cause discomfort because sweat cannot evaporate effectively, making people feel stuffy and uncomfortable. Additionally, excessive humidity may promote the growth of mold and bacteria, affecting indoor air quality and health.

In home and office environments, maintaining appropriate humidity can improve comfort in living and working.

My Image

SHT30 Temperature and Humidity Sensor

The official environmental monitoring module integrates the SHT30 temperature and humidity sensor.

Reference Datasheet Download

Datasheet DownloadLink
SHT30Link

Parameters

Parameter NameSHT30
Temperature Range-40°C to +120°C
Measurement AccuracyHumidity error typically within ±2%, temperature error typically within ±0.1°C
Control InterfaceI2C Interface
I2C Address0x44
Interface Support Rate0-1MHz
Operating Voltage3.3V
Power ConsumptionStandby current 0.2µA, measurement current 600µA

Reading Humidity and Temperature Values

SHT30 supports single measurement or continuous measurement.

  • Single measurement: The controller needs to send an I2C command to trigger SHT30 to perform humidity and temperature measurement. When the sensor finishes measurement, the controller needs another I2C command to read the measurement results.
  • Continuous measurement: In continuous measurement mode, SHT30 will continuously perform temperature measurement at given intervals. First, the controller sends an I2C command to set SHT30 to continuous temperature measurement mode, then the controller only needs to continuously send I2C commands to read measurement results.

Using the SHT30 datasheet as an example, the following diagram (SHT30 datasheet 4.3) shows how to perform single measurement.

My Image
  • The controller needs to send the I2C address, command high byte, and command low byte to SHT30 in sequence. Each time the sensor receives a byte of data, it sends an acknowledgment bit to notify the controller. If the sensor doesn't send an acknowledgment bit, the platform will return a failure code. In this case, please check if your I2C address is set correctly and if the pin number connecting the platform to the sensor is set correctly.
  • After the controller sends the single measurement command, wait for the sensor to finish measurement (about 1ms later) and then read the measurement data. The controller also needs to first send the I2C address, then read 6 bytes, which are temperature and temperature checksum bytes, and humidity and humidity checksum bytes.

Humidity and Temperature Calculation

After the controller receives measurement data from the sensor, it needs to apply formulas to calculate the corresponding temperature in Celsius or Fahrenheit and humidity percentage. The calculation formulas can be found in section 4.13 of the SHT30 datasheet:

My Image