{
  "metadata": {
    "id": "adafruit-as7331-breakout",
    "name": "Adafruit AS7331 UVA/UVB/UVC Sensor Breakout",
    "type": "sensor",
    "description": "AS7331 ultraviolet spectral sensor breakout with STEMMA QT/Qwiic I2C connectivity, onboard 3-5 V power conditioning, UV index estimation support, and interrupt output.",
    "manufacturer": "Adafruit",
    "part_number": "5724",
    "datasheet_url": "https://look.ams-osram.com/m/4a271f29ee2d3cc1/original/AS7331-DS000636.pdf",
    "tags": [
      "as7331",
      "uv",
      "uva",
      "uvb",
      "uvc",
      "uv-index",
      "i2c",
      "0x74",
      "stemmaqt",
      "qwiic",
      "adafruit"
    ],
    "schema_version": "1.4.0",
    "version": "1.0",
    "taxonomy": [
      "sensor.light",
      "expansion.breakout"
    ]
  },
  "domains": [
    {
      "domain": "electrical",
      "power_domains": [
        {
          "id": "vin_3to5",
          "name": "VIN (3-5 V)",
          "nominal_voltage_V": 3.3,
          "voltage_range_V": [
            3,
            5
          ],
          "isolation_type": "non_isolated",
          "ground_reference": "common",
          "description": "Board input rail for the regulator and level-shifted interface."
        },
        {
          "id": "vlogic_3v3",
          "name": "3.3 V breakout rail",
          "nominal_voltage_V": 3.3,
          "voltage_range_V": [
            3.2,
            3.4
          ],
          "isolation_type": "non_isolated",
          "ground_reference": "common",
          "description": "Regulated logic rail available on the breakout."
        }
      ],
      "resources": [
        {
          "id": "vin",
          "name": "VIN",
          "description": "Primary board power input.",
          "functions": [
            {
              "name": "power_in",
              "direction": "sink",
              "signal_class": "power"
            }
          ],
          "connector_type": "pin_header",
          "power_domain_id": "vin_3to5"
        },
        {
          "id": "3vo",
          "name": "3Vo",
          "description": "Regulated breakout output rail.",
          "functions": [
            {
              "name": "power_out",
              "direction": "source",
              "signal_class": "power"
            }
          ],
          "connector_type": "pin_header",
          "power_domain_id": "vlogic_3v3"
        },
        {
          "id": "gnd",
          "name": "GND",
          "description": "Common ground.",
          "functions": [
            {
              "name": "ground",
              "direction": "sink",
              "signal_class": "ground"
            }
          ],
          "connector_type": "pin_header",
          "power_domain_id": "vin_3to5"
        },
        {
          "id": "scl",
          "name": "SCL",
          "description": "I2C clock line with onboard pull-up and level shifting.",
          "functions": [
            {
              "name": "i2c_scl",
              "direction": "input",
              "signal_class": "clock"
            }
          ],
          "connector_type": "pin_header"
        },
        {
          "id": "sda",
          "name": "SDA",
          "description": "I2C data line with onboard pull-up and level shifting.",
          "functions": [
            {
              "name": "i2c_sda",
              "direction": "bidirectional",
              "signal_class": "data"
            }
          ],
          "connector_type": "pin_header"
        },
        {
          "id": "int",
          "name": "INT",
          "description": "Interrupt output for configured events and data-ready signaling.",
          "functions": [
            {
              "name": "interrupt",
              "direction": "output",
              "signal_class": "data"
            }
          ],
          "connector_type": "pin_header"
        },
        {
          "id": "stemma_qt_a",
          "name": "STEMMA QT A",
          "description": "JST-SH 4-pin I2C connector.",
          "functions": [
            {
              "name": "i2c_sda",
              "direction": "bidirectional",
              "signal_class": "data",
              "shareable_with": [
                "i2c_scl"
              ]
            },
            {
              "name": "i2c_scl",
              "direction": "input",
              "signal_class": "clock",
              "shareable_with": [
                "i2c_sda"
              ]
            },
            {
              "name": "power_in",
              "direction": "sink",
              "signal_class": "power"
            },
            {
              "name": "ground",
              "direction": "sink",
              "signal_class": "ground"
            }
          ],
          "connector_type": "jst-sh",
          "power_domain_id": "vin_3to5"
        },
        {
          "id": "stemma_qt_b",
          "name": "STEMMA QT B",
          "description": "Pass-through JST-SH 4-pin I2C connector.",
          "functions": [
            {
              "name": "i2c_sda",
              "direction": "bidirectional",
              "signal_class": "data",
              "shareable_with": [
                "i2c_scl"
              ]
            },
            {
              "name": "i2c_scl",
              "direction": "input",
              "signal_class": "clock",
              "shareable_with": [
                "i2c_sda"
              ]
            },
            {
              "name": "power_in",
              "direction": "sink",
              "signal_class": "power"
            },
            {
              "name": "ground",
              "direction": "sink",
              "signal_class": "ground"
            }
          ],
          "connector_type": "jst-sh",
          "power_domain_id": "vin_3to5"
        }
      ],
      "interfaces": [
        {
          "id": "i2c_target",
          "name": "I2C target interface",
          "protocol": {
            "type": "i2c",
            "role": "target"
          },
          "requires": [
            {
              "function": "i2c_sda",
              "count": 1,
              "shareable_with": [
                "i2c_scl"
              ]
            },
            {
              "function": "i2c_scl",
              "count": 1,
              "shareable_with": [
                "i2c_sda"
              ]
            }
          ],
          "timing": {
            "max_i2c_freq_hz": 400000
          },
          "description": "Default 7-bit I2C address 0x74."
        },
        {
          "id": "interrupt_out",
          "name": "Interrupt output",
          "protocol": {
            "type": "gpio_interrupt",
            "role": "source"
          },
          "requires": [
            {
              "function": "interrupt",
              "count": 1
            }
          ],
          "description": "Configurable interrupt output for sensor events."
        }
      ],
      "supply_voltage_V": [
        3,
        5
      ],
      "metadata": {
        "i2c_address_7bit": "0x74",
        "spectral_bands": [
          "UVA",
          "UVB",
          "UVC"
        ],
        "can_report_uv_index": true,
        "sensor_type": "ultraviolet spectral sensor"
      }
    },
    {
      "domain": "mechanical",
      "package_type": "PCB Module",
      "resources": [],
      "interfaces": [],
      "metadata": {
        "mounting_method": "through_hole_or_cabled_breakout",
        "connector_system": "STEMMA QT / Qwiic"
      }
    }
  ],
  "design_rules": [
    "Power VIN from a 3-5 V host rail and keep the I2C bus referenced to the same ground domain.",
    "Use the default I2C address 0x74 unless the board-level address configuration has been intentionally changed.",
    "Keep the UV sensor aperture unobstructed and avoid housings or conformal coatings that attenuate ultraviolet light.",
    "Treat the breakout as a light-measurement sensor, not as a safety-certified personal UV exposure instrument."
  ],
  "usage_notes": "The Adafruit breakout exposes the ams AS7331 ultraviolet sensor over I2C and is intended for UVA, UVB, and UVC intensity measurement along with derived UV index style calculations. It is a breakout board for integration into embedded systems and robotics projects rather than a standalone handheld meter.",
  "application_examples": [
    "UV source monitoring and comparative intensity measurements.",
    "Environmental ultraviolet trend logging.",
    "Embedded projects that need UVA/UVB/UVC sensing over I2C."
  ],
  "compatibility_notes": "The breakout provides STEMMA QT/Qwiic connectivity for quick I2C integration with common microcontroller platforms. The AS7331 is a UV-focused optical sensor, so system-level calibration, enclosure transparency, and source geometry strongly affect real-world readings.",
  "warnings": [
    "Ultraviolet transmission is strongly affected by plastics, adhesives, and window materials; enclosure choices can invalidate readings.",
    "Strong direct UV sources can saturate the sensor or produce misleading readings without application-specific calibration.",
    "Use this board for instrumentation and relative sensing, not as a certified human-safety dosimeter."
  ]
}