
CO₂ Sensor
True NDIR CO₂ sensor with temperature and humidity, for indoor air-quality monitoring
SCD40-based sensor that measures real CO₂ concentration (400–2000 ppm typical) using NDIR rather than estimating it. Temperature and humidity come along as calibration byproducts. Connects over I2C and reports on the sensor's native ~5s cadence.
For ages 14 and up. Not a toy. Contains small parts: choking hazard. Keep away from children under 3. Adult supervision recommended.
Made by Atech ApS, Lille Strandstræde 6A, st. th., 1254 København K, Denmark.
Technical specifications
- Part
- SCD40 Air Quality Sensor (CO2)
- Interface
- I2C (0x62)
- Ports
- 1 port
- Current
- ~18 mA
- Size
- 19.5 x 19.7 x 10.4 mm
- Chip
- SCD40 (Sensirion)
Pins
- 3.3V
- supply
- GND
- ground
- Data A
- I²C SDA
- Data B
- I²C SCL
Key features
- True NDIR CO₂ measurement (not estimated)
- 400–2000 ppm typical range
- Built-in temperature & humidity
- Single-width I2C module
Common applications
Technical
Air Quality
SCD40 Air Quality Sensor (CO2)Sensirion SCD40 NDIR CO2 sensor with true CO2 measurement (400-2000 ppm typical), with temperature and humidity returned as calibration byproducts. Background RTOS task polls the sensor at its native 5s cadence; readings are instant. First valid reading available ~5s after boot.
read_co2Read CO2 concentration in ppmint ppmread_temperatureRead temperature in Celsiusfloat Cread_humidityRead relative humidityfloat %RHis_readyCheck if first measurement has been receivedbool
SCD40 AIR QUALITY SENSOR (CO2 + temp + humidity): - readCO2() returns uint16_t ppm. readTemperature() returns float Celsius. readHumidity() returns float 0-100 %RH. - Sensor runs in a background FreeRTOS task. New measurements arrive every ~5s (sensor cadence). - All getters return the latest cached value: instant, never blocking. - readCO2() returns 0 until the first measurement lands (~5s after boot). Guard initial UI with isReady() if needed. - Indoor CO2 reference: <800 ppm fresh, 800-1200 ppm acceptable, >1500 ppm poor (sleepy/distracted), >2000 ppm uncomfortable. - Don't poll faster than every 500ms; the underlying sensor only updates every 5s.
Large CO2 readout in ppm front and centre, colour-coded by indoor-air-quality bands (≤800 green, 800-1200 yellow, ≥1200 red). Below it, two smaller temperature and humidity readouts and a 5-minute CO2 sparkline.
| Pin | Line | Dir | Function |
|---|---|---|---|
| 1 | HV | – | not connected |
| 2 | 5V | – | not connected |
| 3 | 3.3V | input | supply |
| 4 | GND | – | ground |
| 5 | Data A | bidirectional | I²C SDA |
| 6 | Data B | input | I²C SCL |
from p2p/ground_truth/hardware/prototyping_line/modules/co2_sensor.md
