{
  "metadata": {
    "id": "sparkfun-sen-15112-scd30-co2-sensor",
    "name": "SparkFun SCD-30 - NDIR True CO2 Temperature and Humidity Sensor",
    "type": "sensor",
    "description": "Sensirion SCD30 NDIR CO2 sensor module carried by SparkFun (SEN-15112) with on-module temperature and humidity sensing. Supports I2C or Modbus/UART operation, plus RDY and PWM pins for data-ready and concentration output.",
    "manufacturer": "SparkFun Electronics",
    "part_number": "SEN-15112",
    "datasheet_url": "https://cdn.sparkfun.com/assets/8/4/1/2/2/61652CD3_Sensirion_CO2_Sensors_SCD30_Datasheet.pdf",
    "tags": [
      "sen-15112",
      "scd30",
      "co2",
      "ndir",
      "temperature",
      "humidity",
      "i2c",
      "uart",
      "modbus",
      "pwm",
      "0x61",
      "sensirion",
      "sparkfun"
    ],
    "schema_version": "1.4.0",
    "version": "0.1.1",
    "taxonomy": [
      "sensor.environmental",
      "sensor.gas",
      "expansion.breakout"
    ]
  },
  "domains": [
    {
      "domain": "electrical",
      "power_domains": [
        {
          "id": "vdd_3v3_5v5",
          "name": "VDD (3.3V-5.5V)",
          "nominal_voltage_V": 3.3,
          "voltage_range_V": [
            3.3,
            5.5
          ],
          "max_current_mA": 75,
          "isolation_type": "non_isolated",
          "ground_reference": "common",
          "description": "Main sensor supply rail."
        }
      ],
      "resources": [
        {
          "id": "pin_1_vdd",
          "name": "Pin 1 / VDD",
          "description": "Power input.",
          "functions": [
            {
              "name": "power_input",
              "direction": "sink",
              "signal_class": "power"
            }
          ],
          "connector_type": "pin_header",
          "power_domain_id": "vdd_3v3_5v5"
        },
        {
          "id": "pin_2_gnd",
          "name": "Pin 2 / GND",
          "description": "Ground reference.",
          "functions": [
            {
              "name": "ground",
              "direction": "bidirectional",
              "signal_class": "ground"
            }
          ],
          "connector_type": "pin_header",
          "power_domain_id": "vdd_3v3_5v5"
        },
        {
          "id": "pin_3_sda_rx",
          "name": "Pin 3 / SDA (I2C) / RX (Modbus)",
          "description": "Multiplexed between I2C SDA and UART RX (Modbus).",
          "functions": [
            {
              "name": "i2c_sda",
              "direction": "bidirectional",
              "signal_class": "data"
            },
            {
              "name": "uart_rx",
              "direction": "sink",
              "signal_class": "data"
            }
          ],
          "connector_type": "pin_header",
          "power_domain_id": "vdd_3v3_5v5"
        },
        {
          "id": "pin_4_scl_tx",
          "name": "Pin 4 / SCL (I2C) / TX (Modbus)",
          "description": "Multiplexed between I2C SCL and UART TX (Modbus).",
          "functions": [
            {
              "name": "i2c_scl",
              "direction": "sink",
              "signal_class": "clock"
            },
            {
              "name": "uart_tx",
              "direction": "source",
              "signal_class": "data"
            }
          ],
          "connector_type": "pin_header",
          "power_domain_id": "vdd_3v3_5v5"
        },
        {
          "id": "pin_5_rdy",
          "name": "Pin 5 / RDY",
          "description": "Data-ready status output.",
          "functions": [
            {
              "name": "digital_io",
              "direction": "source",
              "signal_class": "status"
            }
          ],
          "connector_type": "pin_header",
          "power_domain_id": "vdd_3v3_5v5"
        },
        {
          "id": "pin_6_pwm",
          "name": "Pin 6 / PWM",
          "description": "PWM CO2 concentration output.",
          "functions": [
            {
              "name": "pwm_output",
              "direction": "source",
              "signal_class": "data"
            }
          ],
          "connector_type": "pin_header",
          "power_domain_id": "vdd_3v3_5v5"
        },
        {
          "id": "pin_7_sel",
          "name": "Pin 7 / SEL",
          "description": "Mode-select input (low=I2C, high=Modbus/UART).",
          "functions": [
            {
              "name": "digital_io",
              "direction": "sink",
              "signal_class": "control"
            }
          ],
          "connector_type": "pin_header",
          "power_domain_id": "vdd_3v3_5v5"
        }
      ],
      "interfaces": [
        {
          "id": "power_input",
          "name": "Power Input",
          "protocol": {
            "type": "power",
            "role": "input"
          },
          "requires": [
            {
              "function": "power_input",
              "count": 1
            },
            {
              "function": "ground",
              "count": 1
            }
          ],
          "description": "Power input interface."
        },
        {
          "id": "i2c_slave",
          "name": "I2C Slave",
          "protocol": {
            "type": "i2c",
            "role": "slave"
          },
          "requires": [
            {
              "function": "i2c_sda",
              "count": 1
            },
            {
              "function": "i2c_scl",
              "count": 1
            }
          ],
          "protocol_max_freq_Hz": 100000,
          "constraints": {
            "requires_matching_voltage_domain": true
          },
          "description": "I2C interface (default 7-bit address 0x61)."
        },
        {
          "id": "co2_pwm_output",
          "name": "CO2 PWM Output",
          "protocol": {
            "type": "pwm",
            "role": "output"
          },
          "requires": [
            {
              "function": "pwm_output",
              "count": 1
            }
          ],
          "constraints": {
            "requires_matching_voltage_domain": true
          },
          "description": "PWM output encoding CO2 concentration."
        },
        {
          "id": "rdy_output",
          "name": "RDY Output",
          "protocol": {
            "type": "digital",
            "role": "output"
          },
          "requires": [
            {
              "function": "digital_io",
              "count": 1
            }
          ],
          "constraints": {
            "requires_matching_voltage_domain": true
          },
          "description": "Data-ready digital output."
        },
        {
          "id": "mode_select_input",
          "name": "SEL Mode Select",
          "protocol": {
            "type": "digital",
            "role": "input"
          },
          "requires": [
            {
              "function": "digital_io",
              "count": 1
            }
          ],
          "constraints": {
            "requires_matching_voltage_domain": true
          },
          "description": "SEL pin selects I2C vs Modbus/UART mode."
        }
      ],
      "supply_voltage_V": [
        3.3,
        5.5
      ],
      "pin_count": 7,
      "metadata": {
        "i2c_address_7bit": "0x61",
        "co2_range_ppm": [
          400,
          10000
        ],
        "co2_max_detectable_ppm": 40000,
        "co2_accuracy_ppm_plus_percent": {
          "offset_ppm": 30,
          "percent_of_reading": 3
        },
        "measurement_interval_s": [
          2,
          1800
        ],
        "avg_current_mA": 19,
        "peak_current_mA": 75,
        "uart_default_baud": 19200
      }
    },
    {
      "domain": "thermal",
      "resources": [],
      "interfaces": [],
      "operating_temperature_C": [
        0,
        50
      ]
    },
    {
      "domain": "mechanical",
      "package_type": "Sensor Module",
      "dimensions_mm": {
        "length": 35,
        "width": 23,
        "height": 7
      },
      "resources": [],
      "interfaces": []
    }
  ],
  "design_rules": [
    "Set SEL low for I2C mode or high for Modbus/UART mode before operation.",
    "Use I2C bus speed at or below 100 kHz as specified for SCD30 I2C operation.",
    "Allow periodic exposure to fresh-air baseline conditions when using automatic self-calibration."
  ],
  "usage_notes": "SCD30 combines NDIR CO2 sensing with on-module RH/T compensation. It is intended for indoor air quality, ventilation demand control, and environmental monitoring applications.",
  "application_examples": [
    "Indoor air quality monitor",
    "HVAC demand-controlled ventilation",
    "Greenhouse CO2 monitoring",
    "Building automation telemetry node"
  ],
  "warnings": [
    "SEL must not exceed 4 V and should not be left floating.",
    "For I2C operation above 3 V, account for level shifting and board pull-up interactions.",
    "Avoid condensation and severe contamination; long-term accuracy depends on proper calibration strategy."
  ]
}