主要内容

CCS811 Air Quality Sensor

Measure equivalent CO2 (eCO2) and the equivalent total volatile organic compound concentration (eTVOC)

Since R2025a

  • CCS811 Sensor

Libraries:
STM32 Microcontroller Blockset / (Legacy) STM32 MBED Based Boards / MBED Based Sensors
Simulink Support Package for Arduino Hardware / Sensors

Description

The CCS811 Air Quality Sensor block measures the equivalent CO2 (eCO2) and the equivalent total volatile organic compound concentration (eTVOC) for indoor air quality monitoring. This block also provides the option to provide temperature and humidity data to enable compensation (either by specifying the humidity and temperature values or by interfacing CCS811 with an external sensor).

Ports

Output

expand all

The eCO2 port outputs the value for equivalent CO2 of indoor air in parts per million (ppm).

Data Types: single | double

The eTVOC port outputs the equivalent total volatile organic compound concentration of indoor air in parts per billion (ppb).

Data Types: single | double

Status of the values 0 indicates that the data read for eCO2 and eTVOC is new and 1 indicates that the data read is not new.

Data Types: uint8

Parameters

expand all

Specify the module on the board that you are using for I2C communication.

Programmatic Use

Block Parameter: I2CModule

The I2C address of the CCS811 sensor from which the block reads the values.

The I2C address of the CCS811 sensor from which the block reads the values. The CCS811 sensor can have two I2C addresses depending on the logic level on pin ADDR of the sensor.

Pin NamePin StateI2C Address
ADDRLow0x5A
High0x5B

Programmatic Use

Block Parameter: I2CAddress

Select the data acquisition interval in seconds for the sensor to read data. For example, if you select value 1, then the sensor reads values every 1 second.

Programmatic Use

Block Parameter: DriveMode

Select the option to specify the source of environmental inputs for the sensor while reading data.

Programmatic Use

Block Parameter: EnvironmentalInput

Humidity in percentage provided as an input to CCS811 sensor connected to STM32 Processors.

Dependencies

This parameter appears only if you select Mask dialog for Specify environmental conditions parameter.

Programmatic Use

Block Parameter: HumidityData

Temperature (in ℃) provided as an input to CCS811 sensor connected to STM32 Processors.

Dependencies

This parameter appears only if you select Mask dialog for Specify environmental conditions parameter.

Programmatic Use

Block Parameter: TemperatureData

If this option is selected, an interrupt is generated on pin nINT of the sensor when data is ready, allowing you to trigger other subsystems to perform any action.

Programmatic Use

Block Parameter: IsActiveInterrupt

Select the data type for output.

Programmatic Use

Block Parameter: DataType

Specify how often this block reads the data from the CCS811 sensor. When you set this parameter to -1, Simulink determines the best sample time for the block based on the block context within the model.

Programmatic Use

Block Parameter: SampleTime

Extended Capabilities

expand all

C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.

Version History

Introduced in R2025a