Design Guide for STC31-C
Design-in guidelines for best performance CO2 concentration measurement

Key Topics•••

Measurement modes
Sensor integration / Design-in advice
Evaluation options•••

Factory and field calibration options
Cross-sensitivity considerations
Specific breath-related considerations

Sensirion STC sensors are accurate and long-term stable thermal conductivity sensors calibrated forconcentration measurements. The thermal conductivity measurement principle is not gas selective, and thesensor output depends on environmental conditions.
This Design Guide explains the measurement principle, how to compensate for environmental conditions, andgives recommendations and guidelines for physical sensor integration.

Contents
1

Introduction .......................................................................................................................................................................................... 2

2

Measurement modes ........................................................................................................................................................................ 3

3

Sensor integration .............................................................................................................................................................................. 3

4

Factory and field calibration ........................................................................................................................................................... 7

5

State retention during sleep, PoR or reset ............................................................................................................................... 96

Important considerations about cross-sensitivities ............................................................................................................12

7

Use case: measurement of CO2 in breath ...............................................................................................................................14

8

STC31-C evaluation..........................................................................................................................................................................20

9

Revision history .................................................................................................................................................................................21

Scan me to provide feedback
www.sensirion.com / D1

Version 1.2 – September 2024

1 / 22

1

Introduction

The STC31-C sensor is based on the thermal conductivity measurement principle: the embedded heater heats
the gas within the sensor cavity and the embedded temperature sensor measures the temperature change todetermine the thermal conductivity of the gas. The thermal conductivity of CO2 and air/N2 differ, and the sensor
can hence determine the concentration of CO2 in Air.

Figure 1. Thermal conductivity sensor schematic
Due to the integration on a single chip and the thermal measurement principle, the STC31-C has multiple
advantages over traditional carbon dioxide (CO2) sensors:• Individual sensor calibration and compensation for thermal conductivity conversion to accurate gas
concentration• Excellent long-term stability• Small size
• Robustness to shock and vibration• Very low power consumption• SMD soldering• Fast response time
• Wide measurement range up to 100% CO2
Note that the thermal conductivity measurement is not selective: a change of thermal conductivity will betranslated into a change of concentration in the STC31-C concentration output, independently of the gas orcondition responsible for the change in thermal conductivity.

www.sensirion.com / D1

Version 1.2 – September 2024

2 / 22

2

Measurement modes

The STC31-C offers two measurement modes:• Low-cross-sensitivity: (recommended standard measurement mode)
In this measurement mode, the influence of humidity, temperature, pressure, and oxygen on the CO2
measurement is significantly reduced. Therefore, the low-cross-sensitivity mode is recommended inmost cases. It offers a sample frequency of up to 7Hz and the physical response time to gas change
is identical to the low-noise mode.
• Low-noise:
The low-noise measurement mode has the advantage of a slightly faster sampling rate (10Hz) and alower measurement noise but shows significant cross-sensitivities to humidity, temperature, pressure,and oxygen and is therefore not recommended for most use cases. The communication interface forthis mode is kept identical to the predecessor sensor STC31 (NRND Mai 2024) for backward
compatibility.
Independent of the measurement mode, pressure, humidity (and temperature) need to be provided as inputs
to the STC31-C to achieve specified accuracy of the concentration measurement.

3

Sensor integration

Important note: the SHT4x and pressure sensor used for compensation must be exposed to the identicalhumidity, temperature and pressure condition as the STC31-C sensor and must be integrated next to the
STC31-C sensor.

3.1

Compensation of temperature, humidity, and pressure

Temperature, humidity, and pressure affect the thermal conductivity and must be compensated for toaccurately measure the gas concentration. Therefore, it is strongly recommended to integrate a SHT4x humidity
sensor and a pressure sensor1 to provide these values as inputs to the STC31-C.
Without these inputs, the STC31-C sensor defaults to a pressure of 1013mbar and a relative humidity of 0%
and operates on its internal temperature measurement. Deviating from those default pressure and humidity
values without providing the inputs will result in measurement errors.
Regarding temperature, there are two options:• using the internal temperature measurement of the STC31-C, or• providing an external value from the SHT4x sensor.
While the SHT4x offers a higher temperature accuracy, the SHT4x might physically have a different local
temperature than the STC31-C chip. It is recommended to evaluate both options to determine the better
solution in terms of accuracy and robustness/repeatability, which depends on the application.
As a rule of thumb, for measurements with fast temperature transients, the internal temperature (thus noexternal temperature input) might provide the better result, while for stable temperatures and without
gradients, the external SHT4x temperature might be the better choice.
In any case, once one or more compensation parameters are provided, they need to be updated whenever thevalue changes, otherwise the STC31-C will do the compensation based on the last (outdated) input value.
These compensation parameters are also required in the low-cross-sensitivity measurement mode, despite its
lower cross-sensitivity to ambient condition.

1

For many projects ST Microelectronics’ LPS22DF pressure sensor is a good choicewww.sensirion.com / D1

Version 1.2 – September 2024

3 / 22

3.2

Thermal coupling

The STC31-C uses a thermal principle to measure gas concentrations. This implies that the sensor is sensitive
to external heat sources or other forms of heating or cooling. Consider the following:• Design the PCB and the sensor surroundings in such a way that thermal gradients and transients arelimited as much as possible in the surroundings of STC31-C/SHT4x.
Thermal gradients and changing thermal gradients need to be avoided! 2• Keep the sensor away (thermally decouple) from any heat sources like power converters, MCUs,
motors, etc., for example by adding holes in the PCB. Also consider thermal decoupling of electricalconnections, such as ground and VDD planes, etc."• Ensure that the STC31-C and SHT4x sensor are thermally well coupled. Placing these sensors on thesame PCB and minimizing the distance between them to achieve this.
• Prevent sources emitting infrared radiation onto the sensor element.
• Prefer a high resistance pull-up resistor to a low resistance pull-up resistor.

Figure 2. Decoupling the sensors from heat sources by adding slits or holes in the PCB design
Consult the SHTxx Design Guide and documentation concerning recommendations for the SHT sensors designin.

3.3

Gas flows and gas exposure

For a good response time, proper exposure to the environment where the gas concentration should bemeasured is important. On the other hand, it should be considered that exposure to gas flows (e.g. wind,breath) can affect the thermal balance and that gas flow, bursts or turbulence can influence the pressurecompensation.
To ensure good exposure to the environment, but at the same time minimize the influence of gas flows, it isrecommended to place the STC31-C and SHT4x in a 'pocket' with a large enough opening and small enoughvolume to keep the gas exchange and response time high.

Figure 3. A small pocket with sufficiently large opening and sensors placed close to the opening.

A good way to analyze the performance of the design-in this regard is by recording the temperature outputs of the STC31-C and the
SHT4x after start-up and during operation and comparing their behavior. Fluctuations of the difference in their temperature readings
can be a sign that temperature gradients and transients are not well managed.
2

www.sensirion.com / D1

Version 1.2 – September 2024

4 / 22

If fast gas exchange is crucial, for example for breath measurements, the sensor must be placed directly in theflow of the sample gas. In this case it is advisable to reduce the flow rate to a minimum and thermalize the gas
before reaching the sensors. See the specific section for the breath application.
Sudden ambient pressure fluctuations, that can result from large flow rates fluctuations, should be avoided
during the concentration measurement. If possible, a design approach that leaves the STC31-C stable atambient pressure is preferable.
In most cases the placement of the pressure sensor in this pocket as close as possible to the STC31-C andSHT4x is the best choice. If the pressure sensor is not placed in the same pocket, it must otherwise be assured
by design that the pressure sensor and STC31-C are at the same pressure during any measurement.
If during design-in the gas flows still have a notable influence on the measurement signal, a membrane could
help to reduce the pressure and temperature influences.
The membrane might also help to protect the electronics from dirt or liquids. However, impact on the responsetime by adding a membrane must be verified. It might be required to make the hole with membrane bigger.

Figure 4. A pocket with a membrane helps reducing the influence of gas flows further.
It is recommended to seal the pocket to decouple it from the device itself. This might further improve responsetime and can reduce other influences like warm air coming from the device itself.

Figure 5. Pocket sealed from device’s insidewww.sensirion.com / D1

Version 1.2 – September 2024

5 / 22

3.4 Protection from direct sunlight
Exposing the STC31-C and SHT4x sensor to direct sunlight can lead to undesired heating of the sensors.
Therefore, the sensors are to be shielded from direct sunlight.

Figure 6. Shield the STC31-C and SHT4x sensors from direct sunlight.

3.5

Condensation

Condensation on the sensor or the PCB around the sensor must be avoided for several reasons:• Condensation on the sensor membrane can hinder or block the gas exchange into the sensor cavity.
• Condensation (and evaporation) is accompanied by heat transfer, which affects the thermal measuring
principle of STC31-C and thus the measurement accuracy.
• Condensation can create corrosion of the solder joints and PCB.
For applications in humid environments active heating schemes might be needed.

www.sensirion.com / D1

Version 1.2 – September 2024

6 / 22

4

Factory and field calibration

There are two mechanisms on the STC31-C to correct the offset and restore the sensor’s accuracy over theentire calibration range: the Automatic Self-Calibration (ASC) and Forced ReCalibration (FRC).
The concepts behind the ASC and FRC are similar. The main difference is that the FRC uses a value provided
by the host and performs an instant offset correction, whereas the ASC assumes a zero-backgroundconcentration of CO2 and continuously lets the output very slowly ‘gravitate’ towards it.
• In applications where the STC31-C sensor (end device) is exposed to environments where the target
gas CO2 is absent most of the time (i.e. 0% CO2), we recommend using ASC to ensure accurate readings
over long periods of time.
• In all other cases, we recommend executing FRC at conditions (pressure, humidity, temperature, andconcentration) which are close to the target conditions to be measured.
The offset value is not stored in the sensor when the sensor is powered down, reset, or put to sleep mode.

4.1

Forced recalibration (FRC)

For a forced recalibration (FRC), the host feeds a (known) reference concentration value to the STC31-C. This
triggers an internal concentration measurement which is compared with the provided reference value and theinternal offset value is used for correcting all successive measurements.
The resulting correction is only valid for the active measurement mode, binary gas and range. After switching
to a different mode, FRC must be repeated.
This offset value is only stored in the sensor’s volatile memory and lost when the sensor is powered down or
put to sleep mode. At restart or wake up, it is recommended to execute a new FRC (if the application allows
this, i.e. when the sensor is exposed to a known concentration). Alternatively, the host must read out and store
the offset value from the sensor before power down/sleep mode and reapply it again after a restart or wakeup. See section 5 for using FRC in combination with sleep mode.
The effect of FRC takes place immediately after the corresponding command and can be executed at arbitrary
intervals.
For the best possible performance, the FRC must be executed at the temperature, humidity, pressure,and concentration that are relevant for the application and after receiving accurate compensation
parameters.
Typical scenarios for FRC:
• After soldering and assembly• Before commissioning of a product• Before placing a product in a controlled environment• When measurement series start with a known CO2 concentration (for example for breathmeasurements where Air can be assumed before measuring an exhalation)
4.1.1 FRC with low-cross-sensitivity mode require a low pass filter
While the low-cross-sensitivity mode has much less cross-sensitivity to other gases and ambient conditions, asingle measurement is quite noisy which impacts the effectiveness of the FRC. To overcome this, the following
procedure is recommended:
1) Enable weak and/or strong filtering and take several consecutive measurements to have a stable, noise
free CO2 reading (while providing relative humidity, temperature (if external is used), and pressure inputs
for compensation – see Figure 7: Low-pass filter behavior for low pass filter behavior).
2) Execute FRC command (which is then based on this filtered “noise-free” value).
3) Disable or change the filtering if needed and proceed with the measurements.

www.sensirion.com / D1

Version 1.2 – September 2024

7 / 22

Figure 7: Low-pass filter behavior

4.2 Automatic self-calibration
The STC31-C provides the option of on-chip automatic self-calibration (ASC). This feature is designed for
applications where there is zero concentration of target gas (i.e. CO2) for most of the time. A typical scenario
is gas detection to monitor dangerous concentrations of CO 2 due to gas leakage from a storage tank. Here,the sensor will see no CO2 for most of the time (the atmospheric concentration of 0.04% CO2 is below the
STC31-C accuracy), except in the event where a leak does occur.
When ASC is switched on, the STC31-C will run a zero-point self-calibration that gradually adjusts its output
over time. The algorithm is optimized for a measurement interval of 1 s. Significantly different measurement
intervals may decrease the performance of ASC.

Figure 8: Schematic representation of ASC

www.sensirion.com / D1

Version 1.2 – September 2024

8 / 22

5

State retention during sleep, PoR or reset

The STC31-C does not have internal non-volatile memory (NVM) to retain its configured state during power
off, sleep or (accidental) reset.
The following information will be lost, and thus must be stored off-sensor in the NVM of the MCU and be
written back to the sensor:• Selected gas model.
• ASC Enable and correction value.
• FRC correction value.
• Compensation inputs: last supplied values of temperature, humidity, and pressure.
The following sections give command sequences for the most common sensor use-cases.

5.1

Post-soldering

After soldering, during assembly, board-test or at a later stage, an FRC must be performed to ensure
performance within specifications. After the FRC, the correction value of the FRC must be stored in the NVMof the MCU to be persisted for the next power-up.
The following command sequence is recommended for normal production environments with air. We
recommend following the first loop for FRC with a second loop for verification.

Figure 9: State retention sequence post-soldering in air

www.sensirion.com / D1

Version 1.2 – September 2024

9 / 22

During the post-soldering phase, the RH, T and P values should come from the sensors on the same PCB, butshould also be compared with references, so that PCBs with faulty pressure and relative humidity sensors canbe sorted out, or abnormalities in the production process can be detected. The FRC function of the STC31-C
must not be used to correct out-of-specification offsets of the sensors measuring the pressure, humidity, andtemperature.

5.2

Continuous Sensor operation without sleep mode

In some applications the sensor will run 24 hours a day, seven days a week, possibly for years without thepower supply being removed and without being reset or going to sleep mode.
However, it cannot be excluded that the supply is interrupted accidentally, or an unexpected reset of the sensor
occurs. In this case the sensor state with latest ASC correction value will be lost, and it is important that a recent‘back-up can be restored. The following sequence proposes how such back-up sequence can be integrated incontinuous sensor operation.

Figure 10: Continuous sensor operation without sleep mode or regular resets
A back-up every four days is an adequate interval where the loss of an ASC correction value loss would only
be small and well within sensor specifications. With a lifetime of 10 years, this would result in approximately
1000 write cycles to the NVM of the MCU, which is supported by most Flash memories on common MCUs. It
assumes of course that accidental power cycles or resets don’t occur regularly with intervals shorter than fourdays. If there is a risk this could happen, the back-up frequency must be adjusted.

www.sensirion.com / D1

Version 1.2 – September 2024

10 / 22

5.3

Sensor operation with sleep mode

The following sequence is the recommended use of the sensor when the sensor is put into sleep mode
frequently, at least every four days. If the time between sleep modes is more than four days, it is recommended
to study the previous section, and implement the ‘regular back-up’ into this sequence.
The first time this sequence is executed, the state saved in the MCU NVM during the post-soldering sequenceis written to the sensor in the ‘Write & Apply state’.

Figure 11: Sensor operation with sleep mode
If during this sequence an FRC is desired, this must then be done in between the ‘Write & Apply state’ and‘Prepare and read state’.

www.sensirion.com / D1

Version 1.2 – September 2024

11 / 22

6

Important considerations about cross-sensitivities

6.1

Environmental uncertainties

Environmental conditions affect the STC31-C output because they change the thermal conductivity of the gas.
Section 3.1 explains in detail how to compensate for these effects. Inaccuracy of the compensation inputs(pressure, humidity, and temperature) leads to an error of the STC31-C output, as specified in the datasheet.

6.2

Background gas

The STC31-C sensor measures thermal conductivity and translates this to a gas concentration. Thismeasurement principle relies on the assumption that there is a known background gas, to which the target gas
is added (binary gas mixture).
For the CO2 in air measurement, the background gas is air which is diluted by the target gas CO2, thus it
assumes a mixture of air and CO2. Changes in the composition of the background gas will influence themeasurement.
This is for example relevant when using synthetic air during testing (which often does not contain argon), see
the section about argon below.
Since the STC31-C measures in the percent range (1% = 10’000 ppm), only gases that are present in this range
are relevant:Gases in airc [vol%]TC @25°C [mW/m/K]

Nitrogen

78.08

25.6

Oxygen

20.95

26.1

Argon

0.93

17.8

Carbon Dioxide (CO2)

0.04

17.0

OthersVery low, not relevant

Table 1: Composition of air and thermal conductivity at 25°C of the individual gases
6.2.1 Argon
The amount of argon in air is relatively small but it plays a significant role for the thermal measurement principleof STC31-C in both measurement modes: low-cross-sensitivity, and low-noise.
Reducing (or omitting) the Argon content will affect the CO2 measurement by approximately the same amount.
For example, if the Argon content is reduced to 0%, the CO 2 reading will decrease by about 1%.
This is particularly important for the use case of CO 2 measurement in breath. As real breath is not repeatable,
artificial breath and air mixtures are frequently used for test purposes and oftentimes these gas mixtures omit
argon for simplicity. While for other measurement principles like NDIR, this approximation might work well,
the thermal measurement principle requires this 0.93% of argon for proper outputs. Please note that this is nota limitation for the use case, only a constraint for test gas mixtures containing the argon content.
Example of recommended gas mixtures for test purposes of breath applications:• Composition of inhaled air (artificial or ambient):
78.08% N2, 20.95% O2, 0.93% argon (and 0.04% CO2)
• Exhaled air contains the same amount of argon since it is not metabolized but some O2 is exchangedroughly 1:1 by CO2 (assuming an RER of 1) thus the composition could for example be:
78.08% N2, 17.0% O2, 0.93% argon and 4.0% CO2

www.sensirion.com / D1

Version 1.2 – September 2024

12 / 22

6.2.2 Oxygen
Changes in O2 are compensated automatically by the low-cross-sensitivity mode but play a role when using
the low-noise mode. For applications where oxygen concentration differs significantly from the air content, thefollowing compensation formular can be used for measurements in low-noise mode.
Low-noise mode

Low-cross-sensitivity mode

CO2
O2
Ccorr = 1.032 Cmeas− 0.151(21 vol. % − Cmeas)

no correction needed3

Table 2: Compensation formular for oxygen deviations in air
Where:
•
•
•

𝐶𝑂2
𝐶𝑐𝑜𝑟𝑟
is the corrected CO2 concentration in vol%
𝐶𝑂2
𝐶𝑚𝑒𝑎𝑠
is the measured CO2 concentration in vol%𝑂2
𝐶𝑚𝑒𝑎𝑠 is the measured O2 concentration in vol%The correction formula assumes that the STC31-C is operated using the “CO2 in air” gas model in low-noisemode. Knowledge of the O2 concentration is required to apply this correction.
6.2.3 Trace gases
Changes that do not significantly influence the thermal conductivity include:• Changes in VOC concentration in the order of 500 ppm or less• Absence of noble gases other than argon

3

Oxygen sensitivity of the low-cross-sensitivity measurement mode is much lower than for the low-noise mode but is notnecessarly correcting within specifications and needs to be valideted for the specific application.

www.sensirion.com / D1

Version 1.2 – September 2024

13 / 22

7

Use case: measurement of CO2 in breath

7.1

Measurement mode

For breath applications, only the low-cross-sensitivity mode should be used. In this mode, the sensor cansample at up to 7Hz and has a low cross-sensitivity to changes in:• temperature• humidity• pressure• oxygenWhile the maximal sampling rate is slightly reduced, the response time of the STC31-C is not affected by the
low-cross-sensitivity measurement mode.

7.2

Offset correction for repetitive breath applications

In applications with repetitive breathing, a subject breathes through a device, alternating between in-breathand out-breath for a series of multiple breath cycles. The STC31-C measures the CO2 concentration of thisalternating stream of ambient air and human breath.
First, the sensor’s offset should be corrected with the FRC function before the series of measurements is started.
For the best possible performance, the FRC must be performed at the ambient air conditions (temperature,humidity, pressure, and concentration) that are maintained during the measurement series. A possible solution
can be that the device (with the STC31-C sensor inside) must be allowed to acclimate to the environment andthe user must draw fresh air through the device.
During the measurement series, the conditions at the STC31-C will however still slightly change. This change
can affect the offset of the sensor slightly and affect the measured concentrations.
For best performance, it is necessary to correct for this measurement offset. Since breath is a dynamic process,it is not possible to use the sensor’s FRC function as it requires setting noise filter and performing manymeasurements. Instead, this must be performed in the devices MCU.
Best performance is achieved with a dynamic offset correction that uses the clean air measurement during inbreath before, after or an average of both for the compensation of each out-breath. Additionally, totemperature effects, this also accounts for elevating CO2 levels in the ambient air over the course of ameasurement series.
The experimental data in section 7.5 uses this approach. The measurements during seconds 0 to 3 are used as
the offset for the measurement during second 4 to 6. In other words, the difference between these two
averaged measurement intervals is used as the final CO2 concentration result for each breath cycle.

www.sensirion.com / D1

Version 1.2 – September 2024

14 / 22

7.3

Design-In recommendations for breath measurements

The STC31-C offers a fast response time and a wide measurement range suitable for CO2 measurements inbreath. For best performance, it requires a careful design-in because of its thermal measurement principle.
While the sensor has a temperature compensation algorithm on the chip, the challenge lies in accurately
determining the gas temperature. Since the internal temperature measurement or external temperature
measurements are strongly coupled to the PCB temperature, inaccuracies arise if the gas temperature differsfrom the PCB temperature. Since the temperature of exhaled air is close to the body temperature,
thermalization is the key for a good design-in.
A good thermalization means that the air going to the sensor gets cooled down/heated up to the temperature
at the STC31-C sensor. This is achieved by increasing the surface area in proportion to the gas volume thatgets to the sensor. Possible solutions are using a pump that samples a small portion of the exhaled gas orusing a passive side stream that only allows a small volume of the air to pass by the sensor.

Figure 12. Bypass flow for optimal breath gas thermalization
Since breath also has rapid changes in CO2 concentration the response time of the system is another importantdesign-in consideration. A balance must be found where the thermalization is good enough while keeping anadequate gas exchange for short response time.

7.4

Breath measurement procedure

To design your own breath measurement procedure, consider the following steps to achieve the best
measurement performance:
1.
2.
3.

4.
5.

6.

Temperate sensor environment for optimal FRC and measurement conditions and to avoid
condensation during breath sampling.
Ensure that sensor environment is filled with fresh air (for example, user inhales through device).
Run FRC with 400 ppm CO2 level (if the device may be used in an indoor environment with higher CO 2
levels make sure that 400 ppm is realistic). The ambient humidity should be determined with an SHT4x
as the input for the FRC measurements.
Perform single or series of breath tests and dynamically correct the offset (section 7.2)
Humidity input for the compensation:a. For a single captured breath, use a SHT4x sensor in proximity to the STC31-C
b. For continuous breathing, choose the best available estimate. For example, use a SHT4x
measurement for the ambient air for the in-breath in and estimate/measure the humidity forthe out-breath. The humidity profile of an outbreath can, for example, be determined during
the device development and may be modelled with available flow, concentration, and slow
humidity inputs.
Keep the elevated temperature around the sensor until the humidity has dropped enough if you areconcerned about condensation.

www.sensirion.com / D1

Version 1.2 – September 2024

15 / 22

7.5

Typical performance example

As a guidance of the possible performance that can be achieved, we provide results from Sensirion internal
evaluations.
The test setup switches in < 100 ms between the two gases passing over the sensor chip, as described above:▪ Air4, 21 °C, dry, 0% CO2▪ Air3, 37 °C, RH > 90%, 5% CO2
The test setup achieves a response time of τ90 of < 0.5 s and we averaged the sensor readouts between the
1st and 3rd second after the gas switching. Figure 13 shows the measurement data of 100 repetitions and thecalculated concentration values in the histogram. The CO2 concentration is determined from the difference
between the two stable gas states (red), seconds 4-6 versus seconds 1-3. The concentration average is 4.94
with a sigma of 0.06 This means 95% of all measurements measured between 4.82 and 5.06

Figure 13. Typical breath measurement performance in Sensirion’s test design
Due to the signal noise the statistical distribution can be improved when longer averaging is possible by e.g.
capture of the breath or if multiple breaths are averaged for continuous breathing (see 7.6).
The low-cross-sensitivity measurement mode is strongly preferred for breath applications. Figure 14 shows theperformance difference between the low-cross-sensitivity mode (gray) and the low-noise mode (blue) when
the humidity value is not provided to the sensor.

4

Air is defined as 78.1% nitrogen, 21.0% oxygen and 0.9% argon

www.sensirion.com / D1

Version 1.2 – September 2024

16 / 22

Figure 14. Humidity cross effect without compensation: low-cross-sensitivity (gray) vs. low-noise mode (blue)

Figure 15. Response time low-cross-sensitivity mode to a medium fast breath pattern

7.6

Accuracy and repeatability of breath measurement:

The attainable accuracy level for breath measurements depends considerably on the design-in of the sensor
and the breath measurement procedure. The datasheet provides achievable accuracy; however, it assumes
wider ranges than are typical for breath applications. Internal analysis shows that smaller coefficients can beassumed for limited ranges:• Concentration: 0.0 – 10%• Temperature: 20 – 40°C
• Relative humidity: 30 – 90%• Pressure: stable at ~ 1 atm.
With this the following coefficients and calculation results:
Typical base accuracy:
0.2 vol%= 0.2 vol%additional concentration error: cC * ΔC=
0.01 vol% * (5% – 0.04%)= 0.05 vol%additional temperature error: cT * ΔT=
0.01 vol% * (30°C – 25°C)= 0.05 vol%additional RH error:cRH * ΔRH =0.003 vol% * (90% – 50%)
= 0.12 vol%Total typical accuracy (2-sigma) = 0.2 + 0.05 + 0.05 + 0.12 = ± 0.42 vol%Internal tests, as shown in the previous section, show that even better results can be achieved with careful
design-in.

www.sensirion.com / D1

Version 1.2 – September 2024

17 / 22

Repeatability between breath measurements depends on the number of measurement points that can be
sampled during the exhalation. The 1-sigma noise of a single measurement in low-cross-sensitivity mode is~0.16 vol% (see section 1.2 in the datasheet) and can be approximated to be normally distributed.
This estimate is reflected in the performance example in section 7.5. The average over 2 seconds corresponds
to 14 measurement points and is only 100 ppm or 0.01 vol% larger than expected from the statistical noise
calculated for independent normally distributed variables plotted in Figure 16: Measurement noise of
averaged low-cross-sensitivity measurements.
The same logic can be extended to averaging over multiple breath cycles.
This does not take other variations that can affect the repeatability besides the sensor noise into account.

Figure 16: Measurement noise of averaged low-cross-sensitivity measurements

7.7

Summary and guidelines for breath applications

For designing a device to measure CO 2 in breath, the following points should be considered:• Start from a working starting point (for example STC31-C Evaluation Kit with Sensirion ControlCenterand plain air without breath) and incrementally work towards your product design, checking at eachstep that the behavior makes sense. If something does not work, go back, and determine at which step
the problem arises.
• During evaluation and design tests, the temperature reading of the STC31-C and the SHT4x should berecorded and tracked/plotted against the CO2 reading to detect fluctuations and other unwanted
instabilities.
• Once own firmware is used it is recommended to log all compensation values, measurement values,and commands.
• Special focus needs to be on temperature gradients (changes over space) and temperature transientconditions (changes over time) which need to be managed / limited by a suitable sensor integration.
Transients can be compensated to some extend by dynamic offset correction (see section 7.2).
• While CO2 changes are intended and the value of interest, other transient conditions / changes caninfluence the measurement accuracy.
o Oxygen is managed very well by the sensor, very low impact on the measurement.
o Pressure might have an impact at fast breathing frequency but not devices with slow and longexhalation phases. This can be mitigated by placing the sensor closer to ambient conditions
along the sample path.

www.sensirion.com / D1

Version 1.2 – September 2024

18 / 22

The presence of humidity is well compensated by the sensor; however, condensation (andevaporation) will have a thermal effect which is critical, see next point.
o Temperature is by far the most critical parameter. To get best performance from the STC31-C
sensor, a stable temperature at the STC31-C sensor needs to be achieved.
The goal of the design is: zero temperature gradients across the sensors (STC31-C and SHT4x)
and zero temperature transients (changes over time) during measurement.
o Performance can be tweaked by applying the best estimates for the humidity during each partof the breath cycle; this should, however, not be the focus during the initial design-in as it is
only a small optimization.
Avoiding or limiting condensation (and evaporation) can be managed with two strategies:o Heating the sensor’s surrounding helps to limit condensation. However, this needs to be welldesigned and avoid temperature gradients and transients/fluctuations around and at thesensor - which need to be avoided.
o Another strategy is gas thermalization where only a small fraction of the breath is guided
through a thin channel to the STC31-C sensor. By the time and distance, the gas has traveledthrough the thin channel, the gas has thermalized, and all excess humidity has condensed
before reaching the sensor.
o Both strategies can be combined for optimal performance.
Avoiding temperature gradients around the STC31-C sensor:o Avoid point heating sources close to the sensor. (i.e. microcontroller, LDO, etc.)
o If heating is applied, use a homogeneous heating and work with thermally conducting
surfaces/materials.
o Preheat the sensor and its direct environment before the measurement to reach a stabletemperature for the measurement.
General considerations:o At any equilibrium (no transient) the sensor should always indicate the right CO 2 value.
o If not, there is either:▪ a transient effect (check temperature trends),▪ a gradient (compare STC31-C and SHT4x readings,▪ the sensor gets wrong input data (p, RH, T) or▪ was damaged.
o As temperature is critical, SHT4x and STC31-C should be placed next to each other andthermally isolated from heating sources close by.
o You can compare performance of internal temperature compensation by forcing the STC31-C
sensor to use its internal temperature by only providing a relative humidity and pressure input(no temperature input). Note that once an input has been provided, this value is used
indefinitely until a power cycle of the sensor, i.e. if once a single temperature input wasprovided to the sensor, this STC31-C will always use the external temperature for calculation,
whether that value has been updated or not.
o All the discussed parameters may influence the measurement accuracy; however, no lasting
sensor drift / damage was ever observed.
o All this information only applies to the “low-cross-sensitivity” measurement mode (thesituation is completely different for the low-noise mode). We strongly recommend the lowcross mode for breath applications.
o

•

•

•

www.sensirion.com / D1

Version 1.2 – September 2024

19 / 22

8

STC31-C evaluation

8.1

Evaluation with Sensirion ControlCenter

The initial evaluation of STC31-C can be done with
ControlCenter software of Sensirion. For this you need:
1. STC31-C evalkit, including:a. Flexible PCB with STC31-C and SHT4x
b. Connecting cable
2. Sensor bridge
3. ControlCenter software of Sensirion
Connect STC31-C via sensor bridge to a PC and launch theControlCenter software. Following configurations can bemade (see Figure 17):
1.
2.
3.
4.

5.
6.

8.2

Sampling rate
Enable humidity compensation
Set absolute ambient pressure
Select Gas Model and measurement mode. For
instance:• Air/CO2 (0-40%)• Low-cross-sensitivity
Enable a filter (depending on application)
Set the calibration value (offset correction, see forced
recalibration in STC31-C datasheet

Figure 17: STC31-C configuration

Evaluation with own embedded software

The STC31-C can also be evaluated by writing a driver following the datasheet’s command set description. The
order of the I2C commands upon startup is described below:
1. Start sensor up
2. Set measurement mode (see section “Set Measurement Mode and Binary Gas” in STC31-C datasheet)
3. Option: Enable a filter
4. Option: Forced recalibration or enable automatic self-calibration depending on the application (seenext paragraph)
5. Read out while updating humidity, temperature, and ambient pressure. Please check maximal
recommended readout frequency in the STC31-C datasheet section “Timings”.
Note that the sensor will continue using an external temperature input until reset if it was provided even once
(for example, for FRC). This can lead to seemingly strange behavior when the temperature changes, but noupdates are provided.
If the sleep function should be used to save power consumption, please refer to the datasheet section “Sleepmode”.

www.sensirion.com / D1

Version 1.2 – September 2024

20 / 22

9

Revision history

Date

Version

Chapters

Changes

June 2024

1.0

all

Completely new revision and compilationof relevant design guidance for STC31-C

June 2024

1.1

all

Minor clarifications and corrections

4.1

Notice: The resulting correction is only valid for the active
measurement mode, binary gas and range.

6.2.2

Notice added: Oxygen sensitivity of the low-cross-sensitivity
measurement mode is much lower than for the low-noisemode but is not necessarly correcting within specifications
and needs to be valideted for the specific application.

September 2024

www.sensirion.com / D1

1.2

Version 1.2 – September 2024

21 / 22

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 deathassociated with such unintended or unauthorized use, even if SENSIRION shall be allegedly negligent with respect to the designor 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, freeof 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 PARTICULARPURPOSE, 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 andproper 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 thisdocument and (ii) to improve reliability, functions and design of this product.

Headquarters and Subsidiaries
Sensirion AG
Laubisruetistr. 50
CH-8712 Staefa ZH
Switzerland

Sensirion Inc., USA
phone: +1 312 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

phone: +41 44 306 40 00
fax:+41 44 306 40 30
info@sensirion.com
www.sensirion.com

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
www.sensirion.com / D1

Version 1.2 – September 2024

22 / 22