SHT31
Humidity and Temperature Sensor
Manufacturer
unknown
Overview
Part: SHT3x-DIS from Sensirion
Type: Humidity and Temperature Sensor
Key Specs:
- Supply voltage range: 2.15 V to 5.5 V
- I2C communication speed: up to 1 MHz
- SHT35 typical humidity accuracy: 1.5 %RH
- SHT35 typical temperature accuracy: 0.1 °C
- Package footprint: 2.5 x 2.5 mm²
- Package height: 0.9 mm
Features:
- Fully calibrated, linearized, and temperature compensated digital output
- I2C Interface with two user selectable addresses
- Very fast start-up and measurement time
- Enhanced signal processing
- High reliability and long-term stability
- High signal-to-noise ratio
Applications:
- null
Package:
- 8-Pin DFN: 2.5 x 2.5 mm² footprint, 0.9 mm height
Pin Configuration
The SHT3x-DIS comes in a 8-pin DFN package – see Table 7.
| Pin | Name | Comments |
|---|---|---|
| 1 | SDA | Serial data; input / output |
| 2 | ADDR | Address pin; input; connect to either logic high or low, do not leave floating |
| 3 | ALERT | Indicates alarm condition; output; must be left floating if unused |
| 4 | SCL | Serial clock; input / output |
| 5 | VDD | Supply voltage; input |
| 6 | nRESET | Reset pin active low; input; if not used it is recommended to be left floating; can be connected to VDD with a series resistor of R ≥2 kΩ |
| 7 | R | No electrical function; to be connected to VSS |
| 8 | VSS | Ground |
3.1 Power Pins (VDD, VSS)
The electrical specifications of the SHT3x-DIS are shown in Table 3. The power supply pins must be decoupled with a 100 nF capacitor that shall be placed as close to the sensor as possible – see Figure 11 for a typical application circuit.
3.2 Serial Clock and Serial Data (SCL, SDA)
SCL is used to synchronize the communication between microcontroller and the sensor. The clock frequency can be freely chosen between 0 to 1000 kHz. Commands with clock stretching according to I2C Standard11 are supported.
The SDA pin is used to transfer data to and from the sensor. Communication with frequencies up to 400 kHz must meet the I2C Fast Mode11 standard.
Communication frequencies up to 1 Mhz are supported following the specifications given in Table 21.
Both SCL and SDA lines are open-drain I/Os with diodes to VDD and VSS. They should be connected to external pull-up resistors (please refer to Figure 11). A device on the I2C bus must only drive a line to ground. The external pull-up resistors (e.g. Rp=10 kΩ) are required to pull the signal high. For dimensioning resistor sizes please take bus capacity and communication frequency into account (see for example Section 7.1 of NXPs I2C Manual for more details11). It should be noted that pull-up resistors may be included in I/O circuits of microcontrollers. It is recommended to wire the sensor according to the application circuit as shown in Figure 11.
Figure 11 Typical application circuit. Please note that the positioning of the pins does not reflect the position on the real sensor. This is shown in Table 7.
3.3 Die Pad (center pad)
The die pad or center pad is visible from below and located in the center of the package. It is electrically connected to VSS. Hence electrical considerations do not impose constraints on the wiring of the die pad. However, due to mechanical reasons it is recommended to solder the center pad to the PCB. For more information on design-in, please refer to the document "SHTxx_STSxx Design Guide".
3.4 ADDR Pin
Through the appropriate wiring of the ADDR pin the I2C address can be selected (see Table 8 for the respective addresses). The ADDR pin can either be connected to logic high or logic low. The address of the sensor can be changed dynamically during operation by switching the level on the ADDR pin. The only constraint is that the level has to stay constant starting from the I2C start condition until the communication is finished. This allows to connect more than two SHT3x-DIS onto the same bus.
11 http://www.nxp.com/documents/user\_manual/UM10204.pdf
The dynamical switching requires individual ADDR lines to the sensors.
Please note that the I2C address is represented through the 7 MSBs of the I2C read or write header. The LSB switches between read or write header. The wiring for the default address is shown in Table 8 and Figure 11. The ADDR pin must not be left floating. Please note that only the 7 MSBs of the I2C Read/Write header constitute the I2C Address.
| SHT3x-DIS | I2C Address in Hex. representation | Condition |
|---|---|---|
| I2C address A | 0x44 (default) | ADDR (pin 2) connected to logic low |
| I2C address B | 0x45 | ADDR (pin 2) connected to logic high |
Table 8 I2C device addresses.
3.5 ALERT Pin
The alert pin may be used to connect to the interrupt pin of a microcontroller. The output of the pin depends on the value of the RH/T reading relative to programmable limits. Its function is explained in a separate application note. If not used, this pin must be left floating. The pin switches high, when alert conditions are met. The maximum driving loads are listed in Table 3. Be aware that self-heating might occur, depending on the amount of current that flows. Self-heating can be prevented if the Alert Pin is only used to switch a transistor.
3.6 nRESET Pin
The nReset pin may be used to generate a reset of the sensor. A minimum pulse duration of 1 μs is required to reliably trigger a reset of the sensor. Its function is explained in more detail in section 4. If not used it is recommended to leave the pin floating or to connect it to VDD with a series resistor of R ≥2 kΩ. However, the nRESET pin is internally connected to VDD with a pull up resistor of R = 50 kΩ (typ.).
4 Operation and Communication
The SHT3x-DIS supports I2C fast mode (and frequencies up to 1000 kHz). Clock stretching can be enabled and disabled through the appropriate user command. For detailed information on the I2C protocol, refer to NXP I2C-bus specification12 .
After sending a command to the sensor a minimal waiting time of 1ms is needed before another command can be received by the sensor.
All SHT3x-DIS commands and data are mapped to a 16 bit address space. Additionally, data and commands are protected with a CRC checksum. This increases communication reliability. The 16 bits commands to the sensor already include a 3 bit CRC checksum. Data sent from and received by the sensor is always succeeded by an 8 bit CRC.
In write direction it is mandatory to transmit the checksum, since the SHT3x-DIS only accepts data if it is followed by the correct checksum. In read direction it is left to the master to read and process the checksum.
4.1 Power-Up and Communication Start
The sensor starts powering-up after reaching the powerup threshold voltage VPOR specified in Table 3. After reaching this threshold voltage the sensor needs the time tPU to enter idle state. Once the idle state is entered it is ready to receive commands from the master (microcontroller).
Each transmission sequence begins with a START condition (S) and ends with a STOP condition (P) as described in the I2C-bus specification. Whenever the sensor is powered up, but not performing a measurement or communicating, it automatically enters idle state for energy saving. This idle state cannot be controlled by the user.
4.2 Starting a Measurement
A measurement communication sequence consists of a START condition, the I2C write header (7-bit I2C device address plus 0 as the write bit) and a 16-bit measurement command. The proper reception of each byte is indicated by the sensor. It pulls the SDA pin low (ACK bit) after the falling edge of the 8th SCL clock to indicate the reception. A complete measurement cycle is depicted in Table 9.
With the acknowledgement of the measurement command, the SHT3x-DIS starts measuring humidity and temperature.
4.3 Measurement Commands for Single Shot Data Acquisition Mode
In this mode one issued measurement command triggers the acquisition of one data pair. Each data pair consists of one 16 bit temperature and one 16 bit humidity value (in this order). During transmission each data value is always followed by a CRC checksum, see section 4.4.
12 http://www.nxp.com/documents/user\_manual/UM10204.pdf
In single shot mode different measurement commands can be selected. The 16 bit commands are shown in Table 9. They differ with respect to repeatability (low, medium and high) and clock stretching (enabled or disabled).
The repeatability setting influences the measurement duration and thus the overall energy consumption of the sensor. This is explained in section 2.
| SHT3x-DIS | I2C Address in Hex. representation | Condition |
|---|---|---|
| I2C address A | 0x44 (default) | ADDR (pin 2) connected to logic low |
| I2C address B | 0x45 | ADDR (pin 2) connected to logic high |
e.g. 0x2C06: high repeatability measurement with clock stretching enabled
Table 9 Measurement commands in single shot mode. The first "SCL free" block indicates a minimal waiting time of 1ms. (Clear blocks are controlled by the microcontroller, grey blocks by the sensor).
4.4 Readout of Measurement Results for Single Shot Mode
After the sensor has completed the measurement, the master can read the measurement results (pair of RH& T) by sending a START condition followed by an I2C read header. The sensor will acknowledge the reception of the read header and send two bytes of data (temperature) followed by one byte CRC checksum and another two bytes of data (relative humidity) followed by one byte CRC checksum. Each byte must be acknowledged by the microcontroller with an ACK condition for the sensor to continue sending data. If the sensor does not receive an ACK from the master after any byte of data, it will not continue sending data.
The sensor will send the temperature value first and then the relative humidity value. After having received the checksum for the humidity value a NACK and stop condition should be sent (see Table 9).
The I2C master can abort the read transfer with a NACK condition after any data byte if it is not interested in subsequent data, e.g. the CRC byte or the second measurement result, in order to save time.
In case the user needs humidity and temperature data but does not want to process CRC data, it is recommended to read the two temperature bytes of data with the CRC byte (without processing the CRC data); after having read the two humidity bytes, the read transfer can be aborted with a with a NACK.
No Clock Stretching
When a command without clock stretching has been issued, the sensor responds to a read header with a not acknowledge (NACK), if no data is present.
Clock Stretching
When a command with clock stretching has been issued, the sensor responds to a read header with an ACK and subsequently pulls down the SCL line. The SCL line is pulled down until the measurement is complete. As soon as the measurement is complete, the sensor releases the SCL line and sends the measurement results.
4.5 Measurement Commands for Periodic Data Acquisition Mode
In this mode one issued measurement command yields a stream of data pairs. Each data pair consists of one 16 bit temperature and one 16 bit humidity value (in this order).
In periodic mode different measurement commands can be selected. The corresponding 16 bit commands are shown in Table 10. They differ with respect to repeatability (low, medium and high) and data acquisition frequency (0.5, 1, 2, 4 & 10 measurements per second, mps). Clock stretching cannot be selected in this mode.
The data acquisition frequency and the repeatability setting influences the measurement duration and the current consumption of the sensor. This is explained in section 2 of this datasheet.
If a measurement command is issued, while the sensor is busy with a measurement (measurement durations see Table 4), it is recommended to issue a break command first (see section 4.8). Upon reception of the
break command the sensor abort the ongoing measurement and enter the single shot mode.
| Condition | Hex. code | |
|---|---|---|
| Repeatability | Clock stretching | MSB |
| High | enabled | 0x2C |
| Medium | ||
| Low | ||
| High | disabled | 0x24 |
| Medium | ||
| Low |
4.6 Readout of Measurement Results for Periodic Mode
Transmission of the measurement data can be initiated through the fetch data command shown in Table 11. If no measurement data is present the I2C read header is responded with a NACK (Bit 9 in Table 11) and the communication stops. After the read out command fetch data has been issued, the data memory is cleared, i.e. no measurement data is present.
4.7 ART Command
The ART (accelerated response time) feature can be activated by issuing the command in Table 12. After issuing the ART command the sensor will start acquiring data with a frequency of 4Hz.
The ART command is structurally similar to any other command in Table 10. Hence section 4.5 applies for starting a measurement, section 4.6 for reading out data and section 4.8 for stopping the periodic data acquisition.
The ART feature can also be evaluated using the Evaluation Kit EK-H5 from Sensirion.
Table 12 Command for a periodic data acquisition with the ART feature (Clear blocks are controlled by the microcontroller, grey blocks by the sensor).
4.8 Break command / Stop Periodic Data Acquisition Mode
The periodic data acquisition mode can be stopped using the break command shown in Table 13. It is recommended to stop the periodic data acquisition prior to sending another command (except Fetch Data command) using the break command. Upon reception of the break command the sensor will abort the ongoing measurement and enter the single shot mode. This takes 1ms.
| Command | Hex Code |
|---|---|
| Break | 0x3093 |
4.9 Reset
A system reset of the SHT3x-DIS can be generated externally by issuing a command (soft reset) or by sending a pulse to the dedicated reset pin (nReset pin). Additionally, a system reset is generated internally during power-up. During the reset procedure the sensor will not process commands.
In order to achieve a full reset of the sensor without removing the power supply, it is recommended to use the nRESET pin of the SHT3x-DIS.
Interface Reset
If communication with the device is lost, the following signal sequence will reset the serial interface: While leaving SDA high, toggle SCL nine or more times. This must be followed by a Transmission Start sequence preceding the next command. This sequence resets the interface only. The status register preserves its content.
Soft Reset / Re-Initialization
The SHT3x-DIS provides a soft reset mechanism that forces the system into a well-defined state without removing the power supply. When the system is in idle state the soft reset command can be sent to the SHT3x-DIS. This triggers the sensor to reset its system controller and reloads calibration data from the memory. In order to start the soft reset procedure the command as shown in Table 14 should be sent.
It is worth noting that the sensor reloads calibration data prior to every measurement by default.
| Command | Hex Code |
|---|---|
| Soft Reset | 0x30A2 |
Reset through General Call
Additionally, a reset of the sensor can also be generated using the "general call" mode according to I2C-bus specification12. This generates a reset which is
functionally identical to using the nReset pin. It is important to understand that a reset generated in this way is not device specific. All devices on the same I2C bus that support the general call mode will perform a reset. Additionally, this command only works when the sensor is able to process I2C commands. The appropriate command consists of two bytes and is shown in Table 15.
Table 15 Reset through the general call address (Clear blocks are controlled by the microcontroller, grey blocks by the sensor).
Reset through the nReset Pin
Pulling the nReset pin low (see Table 7) generates a reset similar to a hard reset. The nReset pin is internally connected to VDD through a pull-up resistor and hence active low. The nReset pin has to be pulled low for a minimum of 1 μs to generate a reset of the sensor.
Hard Reset
A hard reset is achieved by switching the supply voltage to the VDD Pin off and then on again. In order to prevent powering the sensor over the ESD diodes, the voltage to pins 1 (SDA), 4 (SCL) and 2 (ADDR) also needs to be removed.
4.10 Heater
The SHT3x is equipped with an internal heater, which is meant for plausibility checking only. The temperature increase achieved by the heater depends on various parameters and lies in the range of a few degrees centigrade. It can be switched on and off by command, see table below. The status is listed in the status register. After a reset the heater is disabled (default condition).
| Hex Code | |
|---|---|
| Command | MSB |
| Heater Enable | |
| Heater Disabled | 0x30 |
4.11 Status Register
The status register contains information on the operational status of the heater, the alert mode and on the execution status of the last command and the last write sequence. The command to read out the status register is shown in Table 17 whereas a description of the content can be found in Table 18.
Table 17 Command to read out the status register (Clear blocks are controlled by the microcontroller, grey blocks by the sensor).
| Bit | Field description | Default value |
|---|---|---|
| 15 | Alert pending status '0': no pending alerts '1': at least one pending alert | '1' |
| 14 | Reserved | '0' |
| 13 | Heater status '0' : Heater OFF '1' : Heater ON | '0' |
| 12 | Reserved | '0' |
| 11 | RH tracking alert '0' : no alert '1' : alert | '0' |
| 10 | T tracking alert '0' : no alert '1' : alert | '0' |
| 9:5 | Reserved | 'xxxxx' |
| 4 | System reset detected '0': no reset detected since last 'clear status register' command '1': reset detected (hard reset, soft reset command or supply fail) | '1' |
| 3:2 | Reserved | '00' |
| 1 | Command status '0': last command executed successfully '1': last command not processed. It was either invalid, failed the integrated command checksum | '0' |
| 0 | Write data checksum status '0': checksum of last write transfer was correct '1': checksum of last write transfer failed | '0' |
Clear Status Register
All flags (Bit 15, 11, 10, 4) in the status register can be cleared (set to zero) by sending the command shown in Table 19.
| Command | Hex Code |
|---|---|
| Clear status register | 0x 30 41 |
4.12 Checksum Calculation
The 8-bit CRC checksum transmitted after each data word is generated by a CRC algorithm. Its properties are displayed in Table 20. The CRC covers the contents of the two previously transmitted data bytes. To calculate
the checksum only these two previously transmitted data bytes are used.
| Property | Value |
|---|---|
| Name | CRC-8 |
| Width | 8 bit |
| Protected data | read and/or write data |
| Polynomial | 0x31 (x8 + x5 + x4 + 1) |
| Initialization | 0xFF |
| Reflect input | False |
| Reflect output | False |
| Final XOR | 0x00 |
| Examples | CRC (0xBEEF) = 0x92 |
Table 20 I2C CRC properties.
4.13 Conversion of Signal Output
Measurement data is always transferred as 16-bit values (unsigned integer). These values are already linearized
4.14 Communication Timing
and compensated for temperature and supply voltage effects. Converting those raw values into a physical scale can be achieved using the following formulas.
Relative humidity conversion formula (result in %RH):
$mathcal{RH} = mathfrak{t}mathcal{O}mathcal{O} · frac{mathbf{S}mathfrak{H}}{mathbf{2}mathfrak{t6} - 1}$
Temperature conversion formula (result in °C & °F):
$mathcal{T}≤ft[°Cright] = -mathbf{45} + mathbf{175} · frac{mathbf{S}tau}{mathbf{2prime 6} - 1}$
$mathcal{T}≤ft[°Fright] = -mathbf{49} + mathbf{315} · frac{mathbf{S}tau}{mathbf{2prime 6} - 1}$
SRH and ST denote the raw sensor output for humidity and temperature, respectively. The formulas work only correctly when SRH and ST are used in decimal representation.
| Parameter | Symbol | Conditions | Min. | Typ. | Max. | Units | Comments |
|---|---|---|---|---|---|---|---|
| SCL clock frequency | fSCL | 0 | - | 1000 | kHz | ||
| Hold time (repeated) START condition | tHD;STA | After this period, the first clock pulse is generated | 0.24 | - | - | μs | |
| LOW period of the SCL clock | tLOW | 0.53 | - | - | μs | ||
| HIGH period of the SCL clock | tHIGH | 0.26 | - | - | μs | ||
| SDA hold time | tHD;DAT | 0 | - | 250 | ns | Transmitting data | |
| 0 | - | - | ns | Receiving data | |||
| SDA set-up time | tSU;DAT | 100 | - | - | ns | ||
| SCL/SDA rise time | tR | - | - | 300 | ns | ||
| SCL/SDA fall time | tF | - | - | 300 | ns | ||
| SDA valid time | tVD;DAT | - | - | 0.9 | μs | ||
| Set-up time for a repeated START condition | tSU;STA | 0.26 | - | - | μs | ||
| Set-up time for STOP condition | tSU;STO | 0.26 | - | - | μs | ||
| Capacitive load on bus line | CB | - | - | 400 | pF | ||
| Low level input voltage | VIL | 0 | - | 0.3xVDD | V | ||
| High level input voltage | VIH | 0.7xVDD | - | 1xVDD | V | ||
| Low level output voltage | VOL | 3 mA sink current | - | - | 0.4 | V |
Figure 12 Timing diagram for digital input/output pads. SDA directions are seen from the sensor. Bold SDA lines are controlled by the sensor, plain SDA lines are controlled by the micro-controller. Note that SDA valid read time is triggered by falling edge of preceding toggle.
Electrical Characteristics
| Parameter | Symbol | Condition | Min. | Typ. | Max. | Units | Comments |
|---|---|---|---|---|---|---|---|
| Supply voltage | VDD | 2.15 | 3.3 | 5.5 | V | ||
| Power-up/down level | VPOR | 1.8 | 2.10 | 2.15 | V | ||
| Slew rate change of the supply voltage | VDD,slew | - | - | 20 | V/ms | Voltage changes |
Table 3 Electrical specifications, typical values are valid for T=25°C, min. & max. values for T=-40°C … 125°C
Absolute Maximum Ratings
Stress levels beyond those listed in Table 6 may cause permanent damage to the device or affect the reliability of the sensor. These are stress ratings only and functional operation of the device at these conditions is not guaranteed. Ratings are only tested each at a time.
| Parameter | Rating | Units |
|---|---|---|
| Supply voltage VDD | -0.3 to 6 | V |
| Max Voltage on pins (pin 1 (SDA); pin 2 (ADDR); pin 3 (ALERT); pin 4 (SCL); pin 6 (nRESET)) | -0.3 to VDD+0.3 | V |
| Input current on any pin | ±100 | mA |
| Operating temperature range | -40 to 125 | °C |
| Storage temperature range | -40 to 150 | °C |
| ESD HBM (human body model)9 | 4 | kV |
| ESD CDM (charge device model)10 | 750 | V |
Table 6 Minimum and maximum ratings; voltages may only be applied for short time periods.
10 According to ANSI/ESD S5.3.1-2009; AEC-Q100-011.
9 According to ANSI/ESDA/JEDEC JS-001-2014; AEC-Q100-002.
Recommended Operating Conditions
The sensor shows best performance when operated within recommended normal temperature and humidity range of 5 °C – 60 °C and 20 %RH – 80 %RH, respectively. Long-term exposure to conditions outside normal range, especially at high humidity, may temporarily offset the RH signal (e.g. +3%RH after 60h kept at >80%RH). After returning into the normal temperature and humidity range the sensor will slowly come back to calibration state by itself. Prolonged exposure to extreme conditions may accelerate ageing. To ensure stable operation of the humidity sensor, the conditions described in the document "SHTxx Assembly of SMD Packages", section "Storage and Handling Instructions" regarding exposure to volatile organic compounds have to be met. Please note as well that this does apply not only to transportation and manufacturing, but also to operation of the SHT3x-DIS.
Get structured datasheet data via API
Get started free