Sensirion STC31-C Datasheet
Smart CO2 sensor based on thermal conductivity
Highlights
- Digital and calibrated output of gas concentration and temperature
- Long-term stable measurement
- Low power
- Low-cross-sensitivity to humidity and oxygen concentration changes
The STC31-C sensor is a thermal conductivity gas concentration sensor designed for high-volume applications. The STC31-C utilizes a revolutionary thermal conductivity measurement principle, which results in superior repeatability and long-term stability. The outstanding performance of these sensors is based on Sensirion's patented CMOSens® sensor technology, which combines the sensor element, signal processing and digital calibration on a small CMOS chip. The well-proven CMOS technology is perfectly suited for high-quality mass production and is the ideal choice for demanding and cost-sensitive OEM applications.
With the introduction of the STC31-C as successor of the STC31, the low-cross-sensitivity measurement mode has been introduced. It provides low-cross sensitivity to humidity and oxygen concentration changes.
Device Overview
Product | Details |
---|---|
STC31-C | SMD Component on Reel |
Evalkit | STC31-C + SHT40 on Flex PCB |
SCAN ME to give feedback and help us to improve this document. - Thank you!
A block diagram shows the sensor's internal components including TC Sensor, T Sensor, ADC, Data Processing, Calibration Memory, State Register, and I2C Interface, connected to VDD and VSS.
1 Measurement specifications
The STC31-C is a highly versatile thermal conductivity sensor for CO2 concentration measurement. The table below provides relevant information for the most common use cases. For detailed considerations of special cases consult the Design Guide. Examples are controlled atmosphere loggers, fast measurement (i.e., breath cycles) or lowest power operation.
The low-cross-sensitivity measurement mode is the recommended standard mode, and the specifications are provided in section 1.1 below. For the specifications of the low-noise mode, refer to section 1.2.
Every STC31-C is individually tested and calibrated and is identifiable by its unique serial number (see sections 3.3.15 and 4.1).
1.1 Concentration of CO2 in Air¹ or N2
Sensor performance in default conditions of 3.3V supply voltage, horizontal orientation, 1 Hz measurement frequency, combined with SHT45 and an accurate pressure sensor; for measurements after forced recalibration (FRC) or automatic self-calibration (ASC)² in standard low-cross-sensitivity measurement mode.
Parameter | 0-40 vol% or 0-100% CO2 Range³ | Note | Conditions |
---|---|---|---|
Achievable Accuracy⁴,⁵ | ±0.5 (0.2 – 2.0) vol% | Depending on measurement and FRC conditions, assuming ideal design-in | Measurement Range: 0-100 vol% |
Base Accuracy⁴,⁵ | ±0.2 vol% | Base accuracy at T, RH and P at which FRC was performed | -10-50 °C, 10-95% RH, 800-1200 mbar |
Conc. Coefficient (cc) | 0.02 vol% / ΔC (%Conc. CO2) | Additional accuracy error for deviations from FRC conditions | For FRC at 0 vol%, 30 °C, 30% RH, 1000 mbar |
Temp. Coefficient (cT) | 0.02 vol% / ΔT (°C) | 0 vol%, 20°C, 50% RH, 1013 mbar | |
Humidity Coefficient (CRH) | 0.01 vol% / ΔRH (%RH) | ||
Pressure Coefficient (CP) | 0.001 vol% / ΔΡ (mbar) | ||
Resolution | 16 bit / 30.5 ppm | ||
Response time (t63) | < 0.5 s | strong filter setting | |
Noise⁷ | ±0.07 vol% | no filter | 0 vol%, 20°C, 50% RH, 1013 mbar |
±0.32 vol% |
The STC31-C measures concentration in the unit: volume percent (vol%) of carbon dioxide (CO2) with respect to the standard conditions: 25°C and 1000 mbar. Volume percent is here defined as volume of the dry constituent divided by the sum of the volumes of all dry constituents of the mixture prior to mixing, multiplied by 100.
¹ Air is defined as 78.1% nitrogen, 21.0% oxygen and 0.9% argon.
² FRC and ASC are comparable to baseline correction or zeroing functions of NDIR and other sensors.
³ Measurement range and measurement mode can be chosen by setting the gas model as described in 3.3.2. The advantage of the 0-40% range is the reduced sensitivity to input errors. See section 2.1.
⁴ Accuracy refers to averaged measurements, excluding noise. Error given for the statistical 2σ range, i.e. 95% of parameter combinations and measurements.
⁵ Accuracy specifies the performance of the sensor after FRC was performed. Drift over time needs to be evaluated in the specific application environment.
⁶ ΔC: concentration deviation from FRC setpoint in % volume concentration; ΔT: temperature deviation from FRC setpoint in °C; ΔRH: relative humidity deviation from FRC setpoint in %RH; ΔP: pressure deviation from FRC setpoint in millibar.
⁷ Error given for the statistical 2σ range, i.e. 95% of consecutive measurements. Smoothing filters available on chip, see Section 3.3.9. Noise may be higher or lower at other measurement conditions.
1.1.1 Total accuracy calculation:
Total typical accuracy = ±(Base Accuracy + cc * ΔC + cT * ΔT + CRH * ΔRH + CP * ΔP)
1.1.2 Example for accuracy calculation:
Product initialized and sensor FRC performed at conditions: 400 ppm CO2 (0.04%), 20°C, 50%RH, 1000 mbar. Sensor target conditions for measurement: 10 vol% CO2 in a cold (0°C) and dry (10% RH) environment with possible elevation up to 2000 m and 800 mbar. Accuracy is calculated by assuming worst case scenarios for each parameter:
- Typical base accuracy: 0.2 vol%
- additional concentration error: cc * ΔC = 0.02 vol% * (10% – 0.04%) = 0.2 vol%
- additional temperature error: cT * ΔT = 0.02 vol% * (20 – 0) = 0.4 vol%
- additional RH error: CRH * ΔRH = 0.01 vol% * (50% – 10%) = 0.4 vol%
- additional pressure error: CP * ΔP = 0.001 vol% * (1000 – 800) = 0.2 vol%
- Total typical accuracy = 0.2 + 0.2 + 0.4 + 0.4 + 0.2 = ±1.4 vol%
1.2 Low-noise measurement mode specifications
The following specifications for the low-noise measurement mode are adopted without change from the STC31 Datasheet V1.1 and are still valid for the STC31-C.
The new standard low-cross-sensitivity measurement mode is the recommended mode for most applications; however, the low-noise mode might offer some advantages in specific cases.
See section 1.1 for the unit of measurement.
Parameter | Low-noise measurement mode | |
---|---|---|
Value | ||
Calibrated for⁸ | CO2 in N2 and CO2 in air | |
Measurement range¹⁰ | 0 to 25 vol% | 0 to 100 vol% |
Span Accuracy¹¹ | 0.5 vol% + 3% measured value | 1 vol% + 3% measured value |
Noise¹² | < 0.2 vol% | |
Temperature stability¹³ | 0.025 vol% / °C | |
Resolution | 16 bit | |
Response time (t63) | < 0.5 s |
⁸ Specifications are only valid for these binary gas mixtures (air is interpreted as being one type of gas).
⁹ Air is defined as 78.1 vol% nitrogen, 21.0 vol% oxygen and 0.9 vol% argon.
¹⁰ Measurement mode and range can be chosen by setting the gas model as described in 3.3.2.
¹¹ Accuracy is defined after performing FRC at 0 vol% providing a correct temperature, humidity, and pressure measurement. Consult sections 3.3.3, 3.3.4, 3.3.5 and 3.3.7. for detailed information. Fulfilled by 90% of sensors after calibration.
¹² Error given for the statistical 2σ range, i.e. 95% of consecutive measurements. Smoothing filters available on chip, see Section 3.3.9.
¹³ Slope of CO2 accuracy tolerance after correct temperature compensation when changing temperature compared to the temperature at which the FRC has been performed. Fulfilled by 90% of sensors after calibration. Valid for the temperature range of 0-50°C.
2 Sensor specifications
2.1 Sensitivity to compensation inputs of low-cross-sensitivity mode
The STC31-C should be provided with inputs for temperature (T), relative humidity (RH) and pressure (p) to compensate environmental conditions see Sections 3.3.3 to 3.3.5. Without external input, the sensor will take its internal temperature and assume RH=0%, p=1013 mbar. Inaccurate environmental inputs affect the STC31-C output, by an amount which depends on the selected measurement mode. The table below describes the additional inaccuracies resulting from errors of the input parameters in the vicinity of the true values.
Condition | Selected Range | Typical additional STC31-C output error (vol.%) due to: | ||
---|---|---|---|---|
0.1°C error in T | 1% error in RH | 1 mbar error in p | ||
T=30 °C, RH=30%, p=1000 mbar, c=0.0% | 0-40 vol% | 0.025 | 0.0002 | 0.0001 |
0-100 vol% | 0.06 | 0.04 | 0.01 |
The sensitivity to errors in the compensation inputs is significantly higher for the low-noise mode.
2.2 Temperature
The measured temperature is the temperature of the bulk silicon in the sensor. This temperature value is not only depending on the gas temperature, but also on the sensor's contact surface (PCB) and other surroundings. See the Engineering Guide for more details. Values are determined for the measurement frequency of 1 Hz.
Parameter | Value |
---|---|
Measurement range | -40 °C to 105 °C |
Resolution | 16 bit |
Accuracy | 0.5 °C (25 °C to 60 °C), 1.0 °C (10 °C to 90 °C), 1.5 °C (-30 °C to 100 °C), 2.0 °C (-40 °C to 105 °C) |
Repeatability | 0.1 °C |
2.3 Electrical specifications
Parameter | Symbol | Condition | Min. | Typ. | Max. | Units | Comments |
---|---|---|---|---|---|---|---|
Supply Voltage | VDD | 2.7 | 3.3 | 5.5 | V | ||
Power-up/down level | VPOR | 2.3 | 2.5 | 2.7 | V | ||
Supply current (for I²C add. 0x29, see below and section 4.3.3) | IDD | Measuring | 3 | 5 | mA | ||
Idle state | 50 | µA | |||||
Sleep mode | 1 | µA | |||||
ADDR resistor current | ADDR | 50 | µA |
2.4 Timings
tpu ms tsR ms f12C kHz ms msParameter | Symbol | Typ. | Max. | Units | Comments |
---|---|---|---|---|---|
Power-up time | 14 | Time to sensor ready | |||
Soft reset time | 12 | Time between soft reset command or exit sleep mode and sensor ready | |||
I2C SCL frequency | 400 | 1000 | |||
Low-cross-sensitivity concentration measurement duration | 110 | Measurement result is returned together with temperature value | |||
Low-noise concentration measurement duration | 75 | ||||
Low-cross-sensitivity mode recommended sampling frequency | 1 | 7 | Hz | A higher readout frequency (limited by measurement duration) will lead to self-heating and should be consistent during FRC as well as measurement. | |
Low-noise mode recommended sampling frequency | 1 | 10 | Hz |
2.5 Mechanical specifications
W gParameter | Symbol | Typ. | Max. | Units | Comments |
---|---|---|---|---|---|
Weight | 0.025 |
2.6 Materials
REACH, ROHS
REACH and RoHS compliant
2.7 Absolute minimum and maximum ratings
V V mA °C °C °C mbar kVParameter | Rating | Units |
---|---|---|
Supply Voltage VDD | -0.3 to 5.5 | |
Max Voltage on pins (SDA, SCL) | -0.3 to VDD+0.3 | |
Input current on any pin | ±70 | |
Operating temperature range | -40 to +105 | |
Maximum short term storage temperature range | -40 to +105 | |
Recommended storage temperature range | -10 to +40 | |
Operating absolute pressure range | 200 to 2000 | |
Max. humidity for long term exposure | 40 °C dew point | |
ESD HBM (human body model) | 2 | |
Media Compatibility | Noncorrosive gases |
3 Sensor operation
The STC3x interface is compatible with the I²C protocol in Standard-mode, Fast-mode and Fast-mode Plus. Clock stretching is not supported. This chapter describes the command set for STC31-C. For detailed information about the I²C protocol, please check the document "NXP I²C-bus specification and user manual".
3.1 I²C addresses
The address is followed by a read or write bit. See section 4.3.3 for selecting alternative I²C addresses.
I2C address in hex. representation | Binary representation |
---|---|
default 0x29 | b 010 1001 |
selectable 0x2A | b 010 1010 |
selectable 0x2B | b 010 1011 |
selectable 0x2C | b 010 1100 |
3.2 I²C sequences
The commands are 16-bit. Data is read from the sensor in multiples of 16-bit words, each followed by an 8-bit checksum to ensure communication reliability. I²C sequences can be aborted with a NACK and STOP condition.
I2C master writes a 16-bit command
A diagram illustrates the I2C master writing a 16-bit command to the sensor, showing the sequence of ACK signals.
I2C master writes a 16-bit command with a 16-bit argument and CRC byte
A diagram illustrates the I2C master writing a 16-bit command with a 16-bit argument and CRC byte to the sensor. The CRC byte must be generated from the 16-bit argument. See section 3.4 for details. When the sensor responds with a NACK on to the CRC byte, a new START condition and valid command is required to further communicate with the sensor.
Alternatively, with CRC disabled, the I²C master writes a 16-bit command with a 16-bit argument
A diagram illustrates the I2C master writing a 16-bit command with a 16-bit argument to the sensor, with CRC disabled.
I2C master sends read header and receives multiple 16-bit words with CRC byte
A diagram illustrates the I2C master sending a read header and receiving multiple 16-bit words with CRC bytes from the sensor. The diagram shows options for aborting the sequence with a NACK or ACK.
Alternatively, with the CRC disabled, I²C master sends read header and receives multiple 16-bit words
A diagram illustrates the I2C master sending a read header and receiving multiple 16-bit words from the sensor, with CRC disabled. The diagram shows options for aborting the sequence with a NACK or ACK.
Dark areas with white text indicate that the sensor controls the SDA (Data) line.
3.3 I²C commands
The command set of the STC31-C consists of a set of different commands:
Command | Command code (hex) | Section |
---|---|---|
Disable CRC | 0x3768 | 3.3.1 |
Set measurement mode and binary gas | 0x3615 | 3.3.2 |
Set relative humidity | 0x3624 | 3.3.3 |
Set temperature | 0x361E | 3.3.4 |
Set pressure | 0x362F | 3.3.5 |
Measure gas concentration | 0x3639 | 3.3.6 |
Forced recalibration (FRC) | 0x3661 | 3.3.7 |
Automatic self-calibration (ASC) | 3.3.8 | |
Configure noise filter | 3.3.9 | |
Self-test | 0x365B | 3.3.10 |
Soft reset | 3.3.11 | |
Prepare and read state | 0x3752, 0xE133 | 3.3.12 |
Write and apply state | 0xE133, 0x3650 | 3.3.12 |
Read offset value | 0x370A | 3.3.13 |
Write offset value | 0x3608 | 3.3.13 |
Enter sleep mode | 0x3677 | 3.3.14 |
Exit sleep mode | 0x367C, 0xE102 | 3.3.15 |
Read product identifier | 3.3.15 |
3.3.1 Disable CRC
By default, the arguments written to the sensor and the data coming from the sensor are protected by CRC (cyclic redundancy check). There may be cases where it is beneficial to disable the CRC, for example to reduce the sensor overhead and general power consumption, or during the first stages of development.
In cases where the MCU and sensor are not close together on a PCB, and are for example connected with a wire, it is recommended to not disable the CRC. For safety related applications it is strongly recommended not to disable the CRC.
Command | Command code (hex) | Description |
---|---|---|
Disable CRC | 0x3768 | This command disables the CRC on the data for both read and write. See section 3.2 for more details. |
When the system is reset or wakes up from sleep mode, the CRC mode is reset to its default value: enabled.
3.3.2 Set measurement mode and binary gas
The STC31-C measures the concentration of binary gas mixtures. It is important to note that the STC31-C is not selective for gases, and it assumes that the binary gas is set correctly. The sensor can only give a correct concentration value when only the gases set with this command are present.
Standard measurement modes (low-cross-sensitivity):
Set binary gas | Range of CO2 | Command code (hex) | Argument (hex) | Output of measurement command (see 3.3.6) |
---|---|---|---|---|
CO2 in N2 | 0 to 100 vol% | 0x3615 | 0x0010 | CO2 concentration between 0 to 100 vol% in N2 |
CO2 in air | 0x0011 | CO2 concentration between 0 to 100 vol% in air | ||
CO2 in N2 | 0 to 40 vol% | 0x0012 | CO2 concentration between 0 to 40 vol% in N2 | |
CO2 in air | 0x0013 | CO2 concentration between 0 to 40 vol% in air |
Low-noise measurement modes:
Set binary gas | Range of CO2 | Command code (hex) | Argument (hex) | Output of measurement command (see 3.3.6) |
---|---|---|---|---|
CO2 in N2 | 0 to 100 vol% | 0x3615 | 0x0000 | CO2 concentration between 0 to 100 vol% in N2 |
CO2 in air | 0x0001 | CO2 concentration between 0 to 100 vol% in air | ||
CO2 in N2 | 0 to 25 vol% | 0x0002 | CO2 concentration between 0 to 25 vol% in N2 | |
CO2 in air | 0x0003 | CO2 concentration between 0 to 25 vol% in air |
The command sequence needs to be closed off with a valid CRC byte for the 16-bit argument if the CRC is not disabled. When the CRC byte does not match the argument, the sensor will respond with a NACK and no gas will be selected.
When the system is reset or wakes up from sleep mode, no binary gas is selected (default). This means that the binary gas must be reconfigured.
When no binary gas is selected (default), the consecutive read after a "Measure gas concentration” command will return a NACK. This allows to detect unexpected sensor interruption (e.g., due to temporary power loss).
3.3.3 Set relative humidity
Accurate concentration measurement requires compensation of humidity because the measurement principle of the concentration measurement is dependent on the humidity of the gas. The new low-cross-sensitivity mode reduces this sensitivity by smart internal compensation to a minimum. If possible, it is still recommended to compensate for relative humidity with the SHT4x and to update the compensation input whenever the relative humidity changes significantly (see Engineering Guide).
Command | Command code (Hex) | Argument | Description |
---|---|---|---|
Set relative humidity | 0x3624 | Relative Humidity: 16-bit unsigned integer For relative humidity scaling, see section 3.5.3. | When no value is written to the sensor after a soft reset, wake-up or power-up, a relative humidity of 0% is assumed. The value written to the sensor is used until a new value is written to the sensor. |
This command sequence needs to be closed off with a valid CRC byte for the 16-bit argument if the CRC is not disabled.
When the CRC byte does not match the argument, the sensor will respond with a NACK. The sensor will omit the command and will use the previous value, or when no value was written, assume a relative humidity of 0%.
3.3.4 Set temperature
Accurate concentration measurement requires compensation of temperature. It is recommended to use the temperature value of the SHT4x, because it is more accurate. When no value has been written since start-up, the sensor uses the internal temperature signal. The temperature compensation input must be updated whenever the temperature changes significantly (see Design Guide).
Command | Command code (hex) | Argument | Description |
---|---|---|---|
Set temperature | 0x361E | Temperature: 16-bit signed integer (two's complement number) For temperature scaling, see section 3.5.2. | When no value is written to the sensor after a soft reset, wake-up or power-up, the internal temperature signal is used. The value written to the sensor is used until a new value is written to the sensor. |
This command sequence needs to be closed off with a valid CRC byte for the 16-bit argument if the CRC is not disabled.
When the CRC byte does not match the argument, the sensor will respond with a NACK. The sensor will omit the command and will use the previous value, or when no value was written, the internal temperature signal.
3.3.5 Set pressure
The concentration measurement requires compensation of pressure. With the set pressure command, the sensor uses the input to compensate the concentration results. The pressure should be updated just before a new measurement is started. Pressure compensation is valid from 600 mbar to 1500 mbar.
Command | Command code (hex) | Argument | Description |
---|---|---|---|
Set pressure | 0x362F | Absolute pressure: 16-bit unsigned integer For pressure scaling, see section 3.5.4. | When no value is written to the sensor after a soft reset, wake-up or power-up, a pressure of 1013mbar is assumed. The value written is used until a new value is written to the sensor. |
This command sequence needs to be closed off with a valid CRC byte for the 16-bit argument if the CRC is not disabled.
When the CRC byte does not match the argument, the sensor will respond with a NACK. The sensor will omit the command and will use the previous value, or when no value was written, assume the default value of 1013mbar.
3.3.6 Measure gas concentration
The duration of a gas concentration measurement is defined in section 2.4. When measurement data is available, it can be read out by sending an I²C read header and reading out the data from the sensor. If no measurement data is available yet, the sensor will respond with a NACK on the I²C read header. The gas model needs to be set once before the measurement command, see 3.3.2.
Command | Command code (hex) | Consecutive read | Description |
---|---|---|---|
Measure gas concentration | 0x3639 | Byte1: Gas concentration 8msb Byte2: Gas concentration 8lsb Byte3: CRC Byte4: Temperature 8msb Byte5: Temperature 8lsb Byte6: CRC Byte7: Reserved 8msb Byte8: Reserved 8lsb Byte9: CRC |
The gas concentration is a 16-bit unsigned integer. The temperature and byte 7 and 8 do not need to be read out. The read sequence can be aborted after any byte by a NACK and a STOP condition. |
In case the 'Set temperature command' has been used prior to the measurement command, the temperature value given out by the STC31-C will be that one of the 'Set temperature command'. When the 'Set temperature command' has not been used, the internal temperature value can be read out.
During product development it is recommended to compare the internal temperature value of the STC31-C and the temperature value of the SHT4x, to check whether both sensors are properly thermally coupled. The values must be within 0.7°C at room temperature.
3.3.7 Forced recalibration (FRC)
Forced recalibration is used to improve the sensor output with a known reference value. The resulting correction is only valid for the active measurement mode, binary gas and range. See the Design Guide for more details.
If no argument is given, the sensor will assume a default value of 0 vol%. The FRC command takes the same amount of time as the concentration measurement. The measurement rate should be the same during FRC and normal measurement. The FRC correction is lost upon a power cycle and must be stored externally to be fed back to the sensor upon restart (see section 3.3.12).
Command | Command code (Hex) | Argument | Description |
---|---|---|---|
Forced recalibration | 0x3661 | Reference concentration: 16-bit unsigned integer | The sensor output is changed to correspond to the reference value given. |
This command sequence needs to be closed off with a valid CRC byte for the 16-bit argument if CRC is not disabled. In the case that the CRC byte does not match the argument, the sensor will respond with a NACK and the forced recalibration is performed with the default reference concentration of 0%. In this case FRC must be repeated.
3.3.8 Automatic self-calibration (ASC)
The sensor can run in automatic self-calibration mode. This mode will enhance the accuracy for applications where the target gas is not present for most of the time. See the Design Guide for more details. This feature can be enabled or disabled by using the commands as shown below. The default state is disabled.
Command | Command code (hex) | Argument | Description |
---|---|---|---|
Enable automatic self-calibration | 0x3FEF | NA | The sensor will apply automatic self-calibration |
Disable automatic self-calibration | 0x3F6E (default) | NA | The sensor will not apply automatic self-calibration (default) |
The automatic self-calibration is optimized for a gas concentration measurement interval of 1s. Substantially different measurement intervals may decrease the self-calibration performance. The ASC correction is lost upon a power cycle, reset, and sleep mode and must be stored externally to be feed back to the sensor upon restart (see section 3.3.12).
3.3.9 Configure noise filter
The STC31-C has two built-in noise filters that run an exponential smoothing over the past measurement points.
Command | Command code (hex) | Description |
---|---|---|
Enable weak filter | 0x3FC8 | Default is disabled. The weak filter has a smoothing factor of 1/2.5. y[n] = 0.6 * y[n – 1] + 0.4 * x |
Disable weak filter | 0x3F49 | |
Enable strong filter | 0x3FD5 | Default is disabled. The strong filter has a smoothing factor of 1/7.5. y[n] = 0.867 * y[n − 1] + 0.133 * X |
Disable strong filter | 0x3F54 |
By default, no filter is applied to the data. If smoothing is desired, the following command(s) must be executed once upon starting the sensor. When enabled, the filter is applied for all subsequent concentration measurements.
Please note:
- Both filters can be activated at the same time (chained) for stronger smoothing.
- Forced recalibration (section 3.3.7) can only benefit from this filtering if sufficient measurement points have been taken before executing the FRC.
- The response time (specified in section 1.1) will increase if a noise filter is applied.
- Filtering will not function if the sensor is put to sleep between each concentration measurement, as the last output value is lost.
- The self-test command will disable both filters.
3.3.10 Self-test
The self-test command runs an on-chip self-test which takes less than 30ms. It performs a full memory integrity check and checks that the operating voltage is within specifications.
Command | Command code (hex) | Consecutive read | Description |
---|---|---|---|
Self-test | 0x365B | Byte1: Self-test 8msb Byte2: Self-test 8lsb Byte3: CRC |
The sensor will run an on-chip self-test. A successful self-test will return b00 for the two least significant bits. |
The self-test errors are decoded as follows:
Bits | Error State | Description |
---|---|---|
1:0 | Memory error | |
9:2 | For debugging only | |
15:10 | Always 0 |
In case of a memory error, the sensor should be soft reset and the self-test should be repeated. If the problem persists, the supply voltage should be cycled to trigger a Power-on-Reset and the self-test should be repeated. If then the problem persists, measurement results might be compromised.
Bits 9:2 should only be considered during design-in and is for debugging purposes.
During design-in and debugging, the self-test should be performed during stable conditions, i.e. stable and noise free supply voltage, and stable pressure, humidity and temperature. If one or more bits return 1, contact Sensirion for support. The self-test command will disable both filters.
3.3.11 Soft reset
Command | I2C address + W bit + command code (hex) | Consecutive read | Description |
---|---|---|---|
General call reset | 0x0006 | NA | This sequence resets the sensor with a separate reset block, which is as much as possible detached from the rest of the system on chip. Note that the I²C address is 0x00, which is the general call address, and that the command is 8 bit. The reset is implemented according to the I2C specification. |
After the reset command the sensor is in the same state as after a power-up cycle. Reset takes a maximum of 12ms. During this time the sensor will not acknowledge its address nor accept commands.
3.3.12 Sensor state retention
The sensor stores settings like the gas model or reference values of FRC and ASC in volatile memory. These are not retained when the sensor loses power and must be stored externally to be sent to the sensor after each power cycle.
To store the state of the sensor externally use the following two commands:
- Prepare read state
- Read state
Check the CRC of the state and store the 30 bytes. After each power cycle return the state to the sensor by using the two commands:
- Write state
- Apply state
The sensor state contains the following information:
- Selected binary gas index (see 3.3.2)
- ON or OFF flag and offset value to apply to the sensor's output for the ASC (automatic self-calibration, see 3.3.8)
- Offset value to apply to the sensor's output used in FRC and ASC (forced recalibration, see 3.3.7)
- Compensation inputs: last supplied values of temperature (see 3.3.4), humidity (see 3.3.3) and pressure (see 3.3.5)
Remark on what is not part of the sensor state:
- If CRC disabling is desired, it needs to be disabled after each wake-up
- The noise filter (see section 3.3.9) is not saved in the sensor state and therefore, this filtering cannot be used in combination with sleep mode.
Command | Command code (hex) | Consecutive read | Description |
---|---|---|---|
Prepare read state | 0x3752 | NA | The sensor will prepare its current state to be read out. Please wait 2 ms before sending the next command. |
Read state | 0xE133 | 30 bytes (10 times 16-bit word + CRC) | Read out the sensor state. The 30 bytes must be stored on the microcontroller to be written back to the sensor after exiting sleep mode |
Command | Command code (hex) | Argument | Description |
---|---|---|---|
Write state | 0xE133 | 30 bytes (10 times 16-bit word + CRC) | Write the sensor state as read out earlier with the "Read state" (0xE133) command. |
Apply state | 0x3650 | NA | The sensor will apply the written state data. Please wait 2 ms before sending the next command. |
It is important to check that no corrupted state is applied to the sensor. Therefore, abort the process as soon as a NACK is received during the Read state or Write state commands. Example procedures of sensor state retention can be found in the Design Guide.
3.3.13 Alternative FRC persistence
When using FRC, the read and write offset value commands can be used to persist only the offset value used for FRC. All other settings, like the binary gas index must be set with the separate commands.
Command | Command code (hex) | Consecutive read / argument | Description |
---|---|---|---|
Read offset value command | 0x370A | 16 bits | Returns a single value with the most significant 16 bits of the offset value. |
Write offset value command | 0x3608 | 16 bits | Expects the most significant 16 bits of the offset value as an I2C command argument. |
Note that this is not suitable for ASC in combination with sleep mode, because the least significant bits of the offset value are lost.
3.3.14 Sleep mode
In sleep mode the sensor uses the minimum amount of current. The mode can be entered when no other command is running. This mode is particularly useful for battery operated devices.
Implement and test the Sensor state retention sequence as described in section 3.3.12 before implementing the sleep sequence.
For the sensor state retention, a sleep mode is equivalent to a power cycle. Follow the procedure in section 3.3.13 to keep settings and FRC and ASC values.
Since the noise filter state is not part of the state retention it cannot be used in combination with the sleep mode.
In sleep mode the sensor cannot be soft reset.
Command | Command code (hex) | Consecutive read | Description |
---|---|---|---|
Enter Sleep mode | 0x3677 | NA | The sleep command can be sent anytime, whenever no other command is running. |
Exit Sleep mode | NA | NA | The sensor exits the sleep mode when it receives the valid I²C address and a write bit ('0'). Note that the I²C address is not acknowledged. It is possible to poll the sensor to see whether the sensor has received the address and has woken up. This takes maximum 12 ms. |
3.3.15 Read product identifier
During assembly and start-up of the device it might be required to check some basic parameters in the sensor - for example to check if the correct sensor is integrated.
The product identifier and serial number can be read out after sending a sequence of two commands.
Command | Command code (hex) | Consecutive read | Description |
---|---|---|---|
Read product identifier | 0x367C 0xE102 |
Byte1: Product number [31:24] Byte2: Product number [23:16] Byte3: CRC Byte4: Product number [15:8] Byte5: Product number [7:0] Byte6: CRC Byte7: Serial number [63:56] Byte8: Serial number [55:48] Byte9: CRC Byte10: Serial number [47:40] Byte11: Serial number [39:32] Byte12: CRC Byte13: Serial number [31:24] Byte14: Serial number [23:16] Byte15: CRC Byte16: Serial number [15:8] Byte17: Serial number [7:0] Byte18: CRC |
Note that both commands need to be preceded with an I2C write header (I2C address + W). The second command returns: 32-bit unique product and revision number. The number is listed in the table below. Note that the last 8 bits are the revision number and can be subject to change. 64-bit unique serial number as ASCII representation of the serial number on the sensor. |
Product | Product number |
---|---|
STC31-C | 0x08010304 |
3.4 Checksum calculation
The checksum byte is generated by a CRC algorithm with the following properties:
Property | Value |
---|---|
Name | CRC-8 |
Protected data | read data |
Width | 8 bit |
Polynomial | 0x31 (x8 + x5 + x4 +1) |
Initialization | 0xFF |
Reflect input | False |
Reflect output | False |
Final XOR | 0x00 |
Example | CRC(0xBEEF) = 0x92 |
3.5 Conversion to physical values
3.5.1 Gas concentration
The digital calibrated gas concentration signal read from the sensor is an unsigned integer number. The integer value can be converted to the physical value by the following conversion formula.
Concentration [vol %] = (STC3x output - 2¹⁴) / 2¹⁵ * 100
Example: 32000 => 47.7% volume concentration for the selected gas.
3.5.2 Temperature
The digital calibrated temperature signal read from or written to the sensor is a signed integer number (two's complement number). The integer value can be converted to the physical value by the following conversion formula.
Temperature [°C] = STC3x output or input / 200
Example: 2500 => 12.5°C
3.5.3 Relative humidity
The relative humidity value written to the sensor is an unsigned integer number. The integer value can be converted to the physical value by the following conversion formula.
Relative Humidity [%] = STC3x input * 100 / (2¹⁶ - 1)
Example: 65535 => 100% relative humidity
3.5.4 Pressure
The pressure value written to the sensor is an unsigned integer number. The integer value can be converted to the physical value by the following conversion formula.
Pressure [mbar] = STC3x input
Example 1023 => 1023 mbar
4 Physical specifications
4.1 Package outline
A dimensional drawing of the STC3x package including package tolerances (units mm). XXXXXX denotes the sensor version "C" + serial number.
A diagram shows the package outline with dimensions and pin layout.
4.2 Land pattern
The land pattern is recommended to be designed according to the used PCB and soldering process together with the physical outer dimensions of the sensor. For more details about soldering see separate Handling and Assembly Instructions.
A diagram shows an example land pattern, top view on PCB.
4.3 Pin assignment
The pin assignments of the STC31-C, bottom view.
Pin no. | Name | Description |
---|---|---|
1 | VSS | Connect to ground |
2 | Reserved. Do not connect | |
3 | ADDR | I2C Address Selection |
4 | SCL | Serial Clock (I2C Interface) |
5 | VSS | Connect to ground |
6 | VDD | VDD Supply |
7 | SDA | Bidirectional Serial Data (I2C Interface) |
8 | Reserved. Do not connect | |
9 | VSS | Connect to ground |
10 | Reserved. Do not connect | |
11 | VSS | Connect to ground |
12 | Reserved. Do not connect |
A diagram shows the pinout of the STC31-C sensor.
4.3.1 Power pins (VDD, GND)
The power supply pin must be decoupled with a 100 nF capacitor that shall be placed as close to the sensor as possible.
4.3.2 Serial clock and serial data (SCL, SDA)
The SCL and SDA are bidirectional pins of the I²C slave interface. The SCL is the Serial Clock pin and the SDA is the Serial Data pin. For more details about the I²C interface refer to section 3.
Both SCL and SDA lines are open-drain I/Os with diodes to VDD und VSS. They should be connected to external pull-up resistors (please refer to Figure 3). 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 I²C Manual for more details¹⁴). 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 in Figure 3.
A diagram shows a typical application circuit with the STC31 (slave), MCU (master), VDD, VSS, 100 nF capacitor, and pull-up resistors (Rp).
¹⁴ https://www.nxp.com/documents/user_manual/UM10204.pdf
4.3.3 Address selection pin (ADDR)
A resistor between ADDR and VDD may be used to configure the I²C address the STC31-C uses for communication. The selectable addresses and their respective conditions are:
I2C Address (hex) | Condition |
---|---|
0x29 (default) | Ground or no connection between ADDR (pin 3) and VDD (pin 6) |
0x2A | 10 kOhm (±5%) between ADDR (pin 3) and VDD (pin 6) |
0x2B | 3.3 kOhm (±5%) between ADDR (pin 3) and VDD (pin 6) |
0x2C | 1 kOhm (±5%) between ADDR (pin 3) and VDD (pin 6) |
The resistor to select alternative addresses results in an additional current draw of approximately 50 uA.
4.3.4 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 floating and therefore it is recommended to connect it to GND. Depending on the application, it may or may not be advantageous to solder the center pad to a larger ground trace/plane to increase thermal coupling.
5 Shipping package
STC31-C is provided in tape & reel shipment packaging. Available packaging size is 400 or 5000 units per reel.
A technical drawing of the packaging tape with sensor orientation in tape is provided, showing dimensions in millimeters.
6 Ordering information
Use the part names and product numbers shown in the following table when ordering STC31-C Thermal Conductivity Sensor. For the latest product information and local distributors, visit www.sensirion.com.
Part name | Description / Output | Order number | Packaging | Tape & reel size |
---|---|---|---|---|
SEK-STC31-C | I2C | 3.001.061 | Single package evaluation kit | n/a |
STC31-C-R3 | PC | 3.001.031 | Tape & Reel | 400 |
STC31-C-R5 | 3.001.032 | Tape & Reel | 5000 |
7 Revision history
Date | Version | Sections | Changes |
---|---|---|---|
Oct. 2020 | 1.1 | all | Last Datasheet for STC31 |
April 2024 | 3.0 | all | First release for STC31-C |
all | Minor corrections | ||
3.3.10 | Chapter Self Test rewritten with new recommendations | ||
June 2024 | 3.1 | 1.1 | Precise definition for measurement unit vol% added |
4.2 | Land pattern recommendation added | ||
3.3.2-3.3.6 | Wording and clarity of text | ||
all | Minor corrections of spelling and format | ||
Sept. 2024 | 3.2 | 3.2 | Added additional information for handing NACK response to CRC byte |
3.3.7 | Added clarification: The resulting correction is only valid for the active measurement mode, binary gas and range. | ||
1.1 | Added clarification to footnote 7 “Noise”: Noise may be higher or lower at other measurement conditions. | ||
Nov. 2024 | 2.4 | Low-noise concentration measurement duration changed from 66 to 75 ms. (Incorrect declaration no product change) | |
3.3 | 3.3.14 | Corrected reference: Implement and test the Sensor state retention sequence as described in section 3.3.12 before implementing the sleep sequence. | |
7 | Product Revision Notice deleted – transition to STC31-C completed | ||
July 2025 | 3.4 | all | Spelling: 16bit corrected |
2.3 / 4.3.3 | Clarification for current requirement with resistor for alternative addresses | ||
3.4 | Backward compatibility notice deleted – transition to STC31-C completed | ||
3.3.9/3.3.10 | Added information: The self-test command will disable both filters. |
Important Notices
Warning, Personal Injury
Do not use this product as safety or emergency stop devices or in any other application where failure of the product could result in personal injury. Do not use this product for applications other than its intended and authorized use. Before installing, handling, using or servicing this product, please consult the data sheet and application notes. Failure to comply with these instructions could result in death or serious injury.
If the Buyer shall purchase or use SENSIRION products for any unintended or unauthorized application, Buyer shall defend, indemnify and hold harmless SENSIRION and its officers, employees, subsidiaries, affiliates and distributors against all claims, costs, damages and expenses, and reasonable attorney fees arising out of, directly or indirectly, any claim of personal injury or death associated with such unintended or unauthorized use, even if SENSIRION shall be allegedly negligent with respect to the design or the manufacture of the product.
ESD Precautions
The inherent design of this component causes it to be sensitive to electrostatic discharge (ESD). To prevent ESD-induced damage and/or degradation, take customary and statutory ESD precautions when handling this product. See application note "ESD, Latchup and EMC" for more information.
Warranty
SENSIRION warrants solely to the original purchaser of this product for a period of 12 months (one year) from the date of delivery that this product shall be of the quality, material and workmanship defined in SENSIRION's published specifications of the product. Within such period, if proven to be defective, SENSIRION shall repair and/or replace this product, in SENSIRION's discretion, free of charge to the Buyer, provided that:
- notice in writing describing the defects shall be given to SENSIRION within fourteen (14) days after their appearance;
- such defects shall be found, to SENSIRION's reasonable satisfaction, to have arisen from SENSIRION's faulty design, material, or workmanship;
- the defective product shall be returned to SENSIRION's factory at the Buyer's expense; and
- the warranty period for any repaired or replaced product shall be limited to the unexpired portion of the original period.
This warranty does not apply to any equipment which has not been installed and used within the specifications recommended by SENSIRION for the intended and proper use of the equipment. EXCEPT FOR THE WARRANTIES EXPRESSLY SET FORTH HEREIN, SENSIRION MAKES NO WARRANTIES, EITHER EXPRESS OR IMPLIED, WITH RESPECT TO THE PRODUCT. ANY AND ALL WARRANTIES, INCLUDING WITHOUT LIMITATION, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, ARE EXPRESSLY EXCLUDED AND DECLINED.
SENSIRION is only liable for defects of this product arising under the conditions of operation provided for in the data sheet and proper use of the goods. SENSIRION explicitly disclaims all warranties, express or implied, for any period during which the goods are operated or stored not in accordance with the technical specifications.
SENSIRION does not assume any liability arising out of any application or use of any product or circuit and specifically disclaims any and all liability, including without limitation consequential or incidental damages. All operating parameters, including without limitation recommended parameters, must be validated for each customer's applications by customer's technical experts. Recommended parameters can and do vary in different applications.
SENSIRION reserves the right, without further notice, (i) to change the product specifications and/or the information in this document and (ii) to improve reliability, functions and design of this product.
Headquarters and Subsidiaries
Sensirion AG
Laubisruetistr. 50
CH-8712 Staefa ZH
Switzerland
phone: +41 44 306 40 00
fax: +41 44 306 40 30
info@sensirion.com
www.sensirion.com
Sensirion Inc., USA
phone: +1312 690 5858
info-us@sensirion.com
www.sensirion.com
Sensirion Korea Co. Ltd.
phone: +82 31 337 7700~3
info-kr@sensirion.com
www.sensirion.com/kr
Sensirion Japan Co. Ltd.
phone: +81 45 270 4506
info-jp@sensirion.com
www.sensirion.com/jp
Sensirion China Co. Ltd.
phone: +86 755 8252 1501
info-cn@sensirion.com
www.sensirion.com/cn
Sensirion Taiwan Co. Ltd
phone: +886 2 2218-6779
info@sensirion.com
www.sensirion.com
To find your local representative, please visit www.sensirion.com/distributors
Copyright © 2024, by SENSIRION. CMOSens® is a trademark of Sensirion. All rights reserved
Related Documents
![]() |
Sensirion CO2 Sensors: Advanced NDIR, PA NDIR, and TC Technologies for HVAC and IAQ Discover Sensirion's comprehensive range of CO2 sensors, including SCD30, SCD4x, STCC4, and STC31-C. Learn about NDIR, PA NDIR, and Thermal Conductivity measurement principles for accurate indoor air quality monitoring in smart buildings and devices. |
![]() |
Sensirion CO2 Sensors for Accurate Monitoring in Any Environment Explore Sensirion's advanced CO2 sensor solutions, including SCD30, SCD4x, STCC4, and STC31-C, designed for accurate monitoring of CO2, humidity, and temperature. Learn about their NDIR and thermal conductivity sensing technologies, features, benefits, and applications in HVAC, smart devices, and indoor air quality. |
![]() |
Sensirion CO2 Sensors: Precise Monitoring in Any Environment Explore Sensirion's advanced CO2 sensors, including SCD30, SCD4x, STCC4, and STC31-C. Learn about their measurement principles (NDIR, Photoacoustic NDIR, Thermal Conductivity), features, applications in HVAC, air quality monitoring, and more. Discover evaluation kits and detailed specifications for optimal integration into smart devices. |
![]() |
Sensirion CO2 Sensors: Accurate Monitoring for All Environments Explore Sensirion's advanced CO2 sensor solutions, including NDIR and Thermal Conductivity technologies, for accurate environmental monitoring in HVAC, smart devices, and IAQ applications. Features SCD30, SCD4x, STCC4, and STC31-C models. |
![]() |
Sensirion CO2 Sensors: Precise Monitoring for Diverse Environments Sensirion offers a comprehensive range of CO2 sensors, including NDIR and Thermal Conductivity technologies, designed for precise environmental monitoring. This document details the SCD30, SCD4x family (SCD40, SCD41, SCD43), STCC4, and STC31-C sensors, highlighting their features, benefits, applications in HVAC, IAQ, and medical sectors, and available evaluation kits. It also explains the underlying measurement principles and provides a comparative overview of key specifications. |
![]() |
Sensirion CO2 Sensors: Precise Monitoring for Any Environment Explore Sensirion's advanced CO2 sensors, including the SCD30, SCD4x, STCC4, and STC31-C. Learn about their measurement principles (NDIR, Photoacoustic NDIR, Thermal Conductivity), features, benefits, and applications in HVAC, IAQ, and medical fields. Discover evaluation kits and technical specifications. |
![]() |
Sensirion CO₂センサー:あらゆる環境での正確なモニタリング SensirionのSCD30、SCD4x、STCC4、STC31-C CO₂センサー製品群をご紹介します。NDIRおよび熱伝導率技術を採用し、高精度な環境モニタリング、IAQ、HVACアプリケーションに最適です。 |
![]() |
Sensirion CO2 Sensors: Precise Monitoring for Various Environments Explore Sensirion's advanced CO2 sensors, including NDIR and thermal conductivity technologies. Learn about their features, applications, and evaluation kits for HVAC, IAQ, and medical uses. Products include SCD30, SCD4x (SCD40, SCD41, SCD43), STCC4, and STC31-C. |