Reference
Library
- Arduino Library: Download and install the SCD4X Library. (About how to install the library?)
- Raspberry Pi Python Library: Download and install the SCD41 CO2 Sensor python library.
Communication Protocol Description
The sensor uses I2C communication. The I2C address is 0x62.
API Description
/**
* @fn enablePeriodMeasure
* @brief set periodic measurement mode
* @param mode - periodic measurement mode:
* @n SCD4X_START_PERIODIC_MEASURE : start periodic measurement, signal update interval is 5 seconds.
* @n SCD4X_STOP_PERIODIC_MEASURE : stop periodic measurement command
* @n SCD4X_START_LOW_POWER_MEASURE : start low power periodic measurement, signal update interval is approximately 30 seconds.
* @return None
* @note The measurement mode must be disabled when configuring the sensor; after giving the stop_periodic_measurement command, the sensor needs to wait 500ms before responding to other commands.
*/
void enablePeriodMeasure(uint16_t mode);
/**
* @fn readMeasurement
* @brief Read the measured data
* @param data - sSensorMeasurement_t, the values measured by the sensor, including CO2 concentration (ppm), temperature (℃) and humidity (RH)
* @return None
* @note CO2 measurement range: 0~40000 ppm; temperature measurement range: -10~60 ℃; humidity measurement range: 0~100 %RH.
*/
void readMeasurement(sSensorMeasurement_t * data);
/**
* @fn getDataReadyStatus
* @brief get data ready status
* @return data ready status:
* @n true : data ready
* @n false : data not ready
*/
bool getDataReadyStatus(void);
Principle
CO2 is a key factor for indoor air quality as high levels compromise human’s cognitive performance and well-being.
This Gravity: SCD41 CO2 sensor is based on the SCD41 miniature CO2 sensor from Sensirion. SCD41 builds on the photoacoustic NDIR sensing principle and Sensirion’s patented PAsens® and CMOSens® technology to offer high accuracy at an unmatched price and smallest form factor. On-chip signal compensation is realized with the built-in temperature and humidity sensor, while temperature and humidity data outputs are also available.
SCD41 sensor detects the amount of energy that is absorbed by CO2 molecules. When pulsing the infra-red emitter, CO2 molecules absorb infrared light periodically. This causes additional molecular vibration resulting in a pressure wave inside the measurement chamber. The higher the CO2 concentration, the more light is absorbed, and thus the greater the amplitude of this acoustic wave becomes. A microphone inside the gas chamber measures this, from which the CO2 concentration can then be calculated.

Click to learn more about PAsens® technology.
Click to learn more about NDIR sensor.
Click to learn more about What types of NDIR sensors exist and how do they work?
Click to learn more about Design-in guide
Was this article helpful?
