meta data for this page
Differences
This shows you the differences between two versions of the page.
| sensor:scd [2026/04/15 16:59] – created vamsan | sensor:scd [2026/04/15 17:34] (current) – vamsan | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== lamaPLC project: Sension SCD ====== | + | ====== lamaPLC project: Sension SCD CO² measurement module |
| - | {{ : | + | {{ : |
| - | The primary difference | + | The main distinction |
| |< 100%>| | |< 100%>| | ||
| Line 12: | Line 12: | ||
| ^Voltage|3.3V – 5.5V|2.4V – 5.5V|2.4V – 5.5V| | ^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)| | ^Power (avg)|~19 mA|~15 mA|~0.5 mA (Low Power Mode)| | ||
| - | ^Interface|[[com: | + | ^Interface|[[com: |
| + | ^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: | ||
| + | * **Mounting: | ||
| {{page>: | {{page>: | ||
| - | ===== Wiring | + | ===== SCD30 ===== |
| + | The SCD30 is a high-precision, | ||
| + | **Key Features & Technology** | ||
| + | * **Dual-Channel Detection: | ||
| + | * **Integrated Compensation: | ||
| + | * **Self-Calibration Options:** Supports Automatic Self-Calibration (ASC), which resets the sensor' | ||
| + | * **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 ==== | ||
| + | {{ : | ||
| + | ^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/ | ||
| + | |||
| + | **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: | ||
| + | |||
| + | ==== 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. | ||
| <code c> | <code c> | ||
| + | #include < | ||
| + | #include " | ||
| + | |||
| + | SCD30 airSensor; | ||
| + | |||
| + | void setup() { | ||
| + | Wire.begin(); | ||
| + | Serial.begin(9600); | ||
| + | | ||
| + | if (airSensor.begin() == false) { | ||
| + | Serial.println(" | ||
| + | while (1); | ||
| + | } | ||
| + | Serial.println(" | ||
| + | } | ||
| + | |||
| + | void loop() { | ||
| + | if (airSensor.dataAvailable()) { | ||
| + | Serial.print(" | ||
| + | Serial.print(airSensor.getCO2()); | ||
| + | Serial.print(" | ||
| + | Serial.print(airSensor.getTemperature(), | ||
| + | Serial.print(" | ||
| + | Serial.println(airSensor.getHumidity(), | ||
| + | } | ||
| + | delay(2000); | ||
| + | } | ||
| </ | </ | ||