Application of high precision temperature and humidity sensor SHT2x

introduction

The new generation Sensirion temperature and humidity sensor SHT2x is available in a dual-row flat leadless DFN lead-free package for reflow soldering. The bottom surface is 3 mm & TImes; 3 mm and height is 1.1 mm. It has an ultra-small size and is especially suitable for mobile measuring equipment. The sensor outputs a calibrated digital signal in a standard I2C bus format. The SHT2x features a newly designed 4C CMOS ensens chip, an improved capacitive humidity sensing element and a standard bandgap temperature sensing element, built-in amplifier, A/D converter, OTP memory and digital processing unit. Simultaneously measure temperature and humidity. The performance and reliability of the SHT2x, especially in high-humidity environments, is greatly improved compared to the previous generation of sensors SHT1x and SHT7x, while data transfer operations are much simpler. Each sensor is calibrated and tested, and an electronic identification code is stored on the chip, which can be read by inputting commands. In addition, the resolution of the SHT2x can be changed by inputting commands. The sensor can detect the low battery state of the battery, has a very low power consumption mode, and has excellent long-term stability. The highest precision SHT25 in the SHT2x series has a relative humidity measurement accuracy of 1.8% and a temperature measurement accuracy of 0.2.

1 interface and communication protocol

1.1 Chip Pin, Signal and Timing Description

The SHT2x uses four pins in a 6-pin package, power supply VDD, ground VSS, bidirectional serial clock SCL, and bidirectional serial data SDA. The SHT2x power supply range is 2.1 to 3.6 V, and the recommended voltage is 3.0 V. SCK is used for communication synchronization between the microprocessor and the SHT1x.

The SDA pin is used for data input and output of the sensor. SDA is active on the rising edge of serial clock SCL when a command is sent to the sensor, and SDA must remain stable when SCL is high. After the falling edge of SCL, the SDA value can be changed. To ensure communication security, the effective time of SDA should be extended to tSU and tHD before and after the rising edge of SCL, respectively. The digital input/output timing is shown in Figure 1. When reading data from the sensor, SDA is valid for tVD duration after SCL goes low and is maintained until the falling edge of the next SCL. The abbreviations in Figure 1 are explained in Table 1. In Figure 1, the DATA OUT SDA is controlled by the sensor and the DATA IN SDA is controlled by the MCU. The SDA active read time is triggered by the falling edge of the previous transition.

Application of high precision temperature and humidity sensor SHT2x

1.2 Communication Protocol

The SHT2x communicates using the standard I2C bus protocol. All sensors are set to the same 7-bit I2C bus address 1000 000. 1.2.1 Sensor Start and Stop Timing After power-up, the sensor takes 15 ms to reach idle state, ie Ready to receive commands sent by the host (MCU), at which point SCL is high. Each transmission sequence starts with a start transmission state (S) and ends with a stop transmission state (P). Figure 2 is a timing diagram of the start transfer state.

Application of high precision temperature and humidity sensor SHT2x

When SCL is high, SDA transitions from high to low. The start state is a special bus state controlled by the master, indicating the start of the slave transfer, after the start, the bus is busy. Fig. 3 is a timing chart of the stop transmission state.

Application of high precision temperature and humidity sensor SHT2x

When SCL is high, SDA transitions from low to high. The stop state is a special bus state controlled by the host, indicating that the slave transfer ends, and after the stop, the bus is idle.

1.2.2 Sending commands and receiving data

After the transfer is initiated, the first byte of the subsequent transfer consists of a 7-bit I2C bus device address and an SDA direction bit, read as "1", written as "0". After the falling edge of the eighth SCL clock, the sensor data reception is normal by pulling the SDA pin low (ACK bit). The host must wait for the measurement to complete after issuing the measurement command. The basic commands are described in Table 2 and are available in two different ways - either host mode or non-host mode.

Application of high precision temperature and humidity sensor SHT2x

There are two different modes of operation between the MCU and the sensor: host mode and non-host mode. In master mode, the SCL line is blocked (controlled by the sensor) during measurement; in non-host mode, when the sensor is performing a measurement task, the SCL line remains open for other communications. The non-master mode allows the sensor to process other I2C bus communication tasks on the bus while making measurements. This article only covers the host mode, and its timing is shown in Figure 4.

Application of high precision temperature and humidity sensor SHT2x

When measured in master mode, the SHT2x pulls SCL low, forcing the master to enter a wait state. By releasing the SCL line, it indicates that the internal processing of the sensor is completed, and the data transfer can be continued.

The gray portion in Figure 4 is controlled by SHT2x. If the checksum (CRC) transfer is to be omitted, the 45th bit can be changed to NACK followed by a transfer stop sequence.

Since the maximum resolution of the measurement is 14 bits, the last two LSBs on the second byte SDA, ie, bits 43 and 44 are used to transmit the relevant status information, the 43rd bit indicates the type of measurement, and the "0" indicates the measurement. Temperature, "1" means measuring humidity, and bit 0 is not currently used.

In Figure 4, the sensor output is 0110 0011 0101 0010. When performing physical scaling, the last two status bits should be set to 0. The maximum measurement time required depends on the measurement type and resolution, and the highest resolution 14-bit measurement time. The maximum value is 85ms, and the maximum value of the measurement time is controlled by the MCU.

2 signal conversion sensor

The default resolution of the internal settings is the highest resolution, ie 12 bits relative humidity and 14 bits temperature. The output data of the SDA is converted into a two-byte data packet with the high byte MSB first and the low byte LSB followed by the left alignment. Each byte is followed by two status bits and one acknowledge bit. The two status bits, the last two bits of the LSB, must be set to 0 before the physical calculation. Thus in the example of Figure 4, the transmitted 16-bit relative humidity data is SRH=0110 0011 0101 0000=25 424. 2.1 Relative Humidity The conversion formula relative humidity RH can be calculated according to the relative humidity signal SRH output by the SDA by the following formula, and the unit is expressed by %RH.

RH=-6+125.(SRH/216)

For the example of Figure 4, the relative humidity is calculated to be 42.5% RH. The RH physical value corresponds to the relative humidity based on liquid water as specified by the World Meteorological Organization (WMO).

2.2 Temperature conversion formula

The temperature T can be calculated by substituting the SDA temperature output signal ST into the following formula, and the unit is expressed in °C.

T=-46.85+175.72.(ST/216)

Education Tablet

As a mobile multi-purpose platform, tablet computers also provide many possibilities for mobile teaching. The touch-based learning & entertainment teaching platform allows children to efficiently improve their academic performance in a relaxed and pleasant atmosphere. Such tablet computers generally integrate two learning sections of various courses and systematic learning functions. Generally, it includes multi-disciplinary high-quality teaching resources. The education tablet has the following main functions: it has the functions of touch screen input, text editing, picture editing, data storage, data management, wired and wireless Internet access that ordinary tablet computers have; Management functions, search methods support manual search, query by keyword, query by time; text and pictures can be scanned and converted into documents to save.

Education Tablet,learning tablet,leaning machine,New learning tablet

Jingjiang Gisen Technology Co.,Ltd , https://www.jsgisentec.com

Posted on