====== lamaPLC project: Sension SCD CO² measurement module ====== {{ :sensor:scd30.png?120|SCD 30 Modul}} The main distinction between these Sensirion sensors lies in their measurement technology, which affects their size and power use. The **SCD30** employs conventional **NDIR** (//Non-Dispersive Infrared//) technology, whereas the **SCD40/41** series utilises a more recent, compact Photoacoustic principle. |< 100%>| ^Feature^SCD30^SCD40^SCD41| ^Technology|NDIR (Dual-Channel)|Photoacoustic|Photoacoustic| ^Size|35 x 23 x 7 mm|10.1 x 10.1 x 6.5 mm|10.1 x 10.1 x 6.5 mm| ^CO² Range|0 – 40,000 ppm|400 – 2,000 ppm|400 – 5,000 ppm| ^Accuracy|±(30 ppm + 3% MV)|±(50 ppm + 5% MV)|±(40 ppm + 5% MV)| ^Voltage|3.3V – 5.5V|2.4V – 5.5V|2.4V – 5.5V| ^Power (avg)|~19 mA|~15 mA|~0.5 mA (Low Power Mode)| ^Interface|[[com:basic_i2c|I²C]] (Address **0x61**), [[com:basic_uart|UART]], PWM|[[com:basic_i2c|I²C]]|[[com:basic_i2c|I²C]]| ^Operating Temperature|0°C to 50°C||| **Key Differences** * **Form Factor:** The SCD40/41 is approximately ten times smaller than the SCD30, making it well-suited for compact wearables or integrated smart home devices. * **Precision vs Size:** The SCD30 generally offers slightly better accuracy and stability over extended periods, thanks to its dual-channel NDIR design, which naturally compensates for sensor drift. * **Power Efficiency:** For battery-powered devices, the SCD41 is the preferred choice, featuring a "Single Shot" mode that significantly reduces power consumption compared to the SCD30 or SCD40. * **Mounting:** The SCD40/41 is an SMD (Surface-Mount Device) component suitable for reflow soldering and mass production. In contrast, the SCD30 is usually hand-soldered or connected via pins. {{page>:tarhal}} ===== SCD30 ===== The SCD30 is a high-precision, 3-in-1 sensor module from Sensirion that measures Carbon Dioxide (CO²), Temperature, and Relative Humidity. It is considered a "true" CO² sensor because it uses Non-Dispersive Infrared (NDIR) technology to directly measure CO² molecules, rather than approximating levels from other gases. **Key Features & Technology** * **Dual-Channel Detection:** It uses a dedicated reference channel to compensate for long-term drift, ensuring superior stability over its 15-year lifetime. * **Integrated Compensation:** The module uses its built-in temperature and humidity data to internally calibrate and normalise the CO2 readings. * **Self-Calibration Options:** Supports Automatic Self-Calibration (ASC), which resets the sensor's baseline when exposed to fresh air (~400 ppm) regularly, or Forced Recalibration (FRC) for manual setup. * **Adjustable Sampling:** While the default interval is 2 seconds, it can be set to 1-1800 seconds to reduce power consumption in battery-powered projects. ==== SCD30 Pinout ==== {{ :sensor:scd30_pinout.png|}} ^Pin^Name^Description^Logic Level| ^1|VDD|Supply Voltage (3.3V – 5.5V)|—| ^2|GND|Ground|—| ^3|TX / SCL|Modbus Transmit / I²C Clock|3.0V (internal pull-up)| ^4|RX / SDA|Modbus Receive / I²C Data|3.0V (internal pull-up)| ^5|RDY|Data Ready (High when new data is available)|3.0V| ^6|PWM|Pulse Width Modulation output|3.0V| ^7|SEL|Interface Select (Floating/GND = I²C; High = Modbus)|< 4.0V| **Key Wiring Notes** * **Internal Pull-ups:** The module has internal 45 kΩ resistors connected to a 3V supply for the I²C lines. * **Voltage Warning:** The module can be powered with 5V, but the SCL/SDA logic pins operate at 3V. When using a 5V microcontroller like an Arduino Uno, a level shifter is strongly advised to prevent damage to the sensor. * **Interface Selection:** For I²C (the standard mode), leave the SEL pin floating or connect it to Ground. To use Modbus, connect the SEL pin to VDD via a voltage divider, ensuring the voltage does not exceed 4V. ==== SCD30 Arduino example code ==== To use the SCD30 with an Arduino, the **SparkFun SCD30** Arduino Library and the Adafruit SCD30 Library are the most common choices. #include #include "SparkFun_SCD30_Arduino_Library.h" // SCD30 airSensor; void setup() { Wire.begin(); Serial.begin(9600); if (airSensor.begin() == false) { Serial.println("Sensor not detected. Check wiring!"); while (1); } Serial.println("SCD30 detected!"); } void loop() { if (airSensor.dataAvailable()) { Serial.print("CO2(ppm): "); Serial.print(airSensor.getCO2()); Serial.print(" Temp(C): "); Serial.print(airSensor.getTemperature(), 1); Serial.print(" Humidity(%): "); Serial.println(airSensor.getHumidity(), 1); } delay(2000); // Sensor updates every 2 seconds by default } ===== Communication topics on lamaPLC ===== {{topic>communication}} {{tag>BMP280 AHT20 temperature humidity pressure sensor arduino oled SH1106 arduino_code}} This page has been accessed for: Today: {{counter|today}}, Until now: {{counter|total}}