The SCD30 is a high-precision digital sensor manufactured by Sensirion, designed for measuring carbon dioxide (CO2), temperature, and humidity. It employs non-dispersive infrared (NDIR) technology for CO2 detection, ensuring accurate and reliable measurements. The SCD30 is widely used in applications such as indoor air quality monitoring, HVAC systems, greenhouses, and smart home devices.
Parameter | Value |
---|---|
CO2 Measurement Range | 400 ppm to 10,000 ppm |
CO2 Accuracy | ±(30 ppm + 3% of reading) |
Temperature Range | -40°C to +70°C |
Temperature Accuracy | ±(0.8°C) |
Humidity Range | 0% RH to 100% RH |
Humidity Accuracy | ±(3% RH) |
Supply Voltage | 3.3V to 5.5V |
Current Consumption | 19 mA (typical) |
Communication Interface | I2C and Modbus (via UART) |
Dimensions | 35 mm x 23 mm x 7 mm |
Pin Number | Pin Name | Description |
---|---|---|
1 | VDD | Power supply input (3.3V to 5.5V) |
2 | GND | Ground |
3 | SDA | I2C data line |
4 | SCL | I2C clock line |
5 | RX | UART receive line (for Modbus communication) |
6 | TX | UART transmit line (for Modbus communication) |
7 | SEL | Interface selection (I2C or UART) |
8 | NC | Not connected |
#include <Wire.h>
#include <SensirionI2CScd30.h>
// Create an instance of the SCD30 sensor
SensirionI2CScd30 scd30;
void setup() {
Wire.begin(); // Initialize I2C communication
Serial.begin(9600); // Initialize serial communication for debugging
// Initialize the SCD30 sensor
scd30.begin(Wire);
if (scd30.startPeriodicMeasurement() != 0) {
Serial.println("Failed to start periodic measurement!");
while (1); // Halt execution if initialization fails
}
Serial.println("SCD30 initialized successfully.");
}
void loop() {
float co2, temperature, humidity;
// Check if new measurement data is available
if (scd30.readMeasurement(co2, temperature, humidity) == 0) {
// Print the sensor readings to the serial monitor
Serial.print("CO2: ");
Serial.print(co2);
Serial.print(" ppm, Temp: ");
Serial.print(temperature);
Serial.print(" °C, Humidity: ");
Serial.print(humidity);
Serial.println(" %RH");
} else {
Serial.println("Failed to read measurement data.");
}
delay(2000); // Wait 2 seconds before the next reading
}
No Data from the Sensor:
Inaccurate Readings:
I2C Address Conflict:
Sensor Not Responding:
Q: Can the SCD30 measure CO2 levels below 400 ppm?
A: No, the SCD30's CO2 measurement range starts at 400 ppm.
Q: How often should the sensor be recalibrated?
A: Sensirion recommends recalibrating the sensor every 6 months to 1 year, depending on usage conditions.
Q: Can the SCD30 operate in high-humidity environments?
A: Yes, the SCD30 can measure humidity up to 100% RH, but prolonged exposure to condensation should be avoided.
Q: Is the SCD30 compatible with 3.3V microcontrollers?
A: Yes, the SCD30 operates with a supply voltage range of 3.3V to 5.5V, making it compatible with both 3.3V and 5V systems.
This concludes the documentation for the Sensirion SCD30 sensor. For further details, refer to the official datasheet provided by Sensirion.