{
  "metadata": {
    "id": "raspberry-pi-ai-camera",
    "name": "Raspberry Pi AI Camera",
    "type": "sensor",
    "description": "12.3MP Sony IMX500 intelligent vision sensor with integrated AI/NPU accelerator, 2-lane MIPI CSI-2 interface, and RP2040 firmware MCU. Supports on-sensor neural network inference (object detection, classification, pose estimation, segmentation) at up to 4056x3040@10fps or 2028x1520@30fps. Includes 15-pin and 22-pin FPC cables for all Raspberry Pi boards.",
    "manufacturer": "Raspberry Pi",
    "part_number": "SC1174",
    "datasheet_url": "https://datasheets.raspberrypi.com/camera/ai-camera-product-brief.pdf",
    "tags": [
      "camera",
      "imx500",
      "ai",
      "npu",
      "csi",
      "mipi",
      "machine-learning",
      "object-detection",
      "image-classification",
      "raspberry-pi",
      "opencv",
      "libcamera",
      "picamera2",
      "12mp",
      "vision",
      "edge-ai",
      "rp2040"
    ],
    "schema_version": "1.4.0",
    "version": "1.0.0-rc.0",
    "taxonomy": [
      "sensor.camera"
    ]
  },
  "domains": [
    {
      "domain": "electrical",
      "power_domains": [
        {
          "id": "vcc_3v3",
          "name": "3.3V Supply (from host via FPC)",
          "nominal_voltage_V": 3.3,
          "isolation_type": "non_isolated",
          "ground_reference": "common",
          "description": "Power supplied by host board through FPC connector (pin 15 on 15-pin, pin 22 on 22-pin)"
        }
      ],
      "resources": [
        {
          "id": "csi_d0_n",
          "name": "CAM_D0_N",
          "description": "MIPI CSI-2 data lane 0 negative (22-pin: pin 2, 15-pin: pin 2)",
          "functions": [
            {
              "name": "csi_data",
              "direction": "source",
              "signal_class": "data"
            }
          ],
          "connector_type": "fpc"
        },
        {
          "id": "csi_d0_p",
          "name": "CAM_D0_P",
          "description": "MIPI CSI-2 data lane 0 positive (22-pin: pin 3, 15-pin: pin 3)",
          "functions": [
            {
              "name": "csi_data",
              "direction": "source",
              "signal_class": "data"
            }
          ],
          "connector_type": "fpc"
        },
        {
          "id": "csi_d1_n",
          "name": "CAM_D1_N",
          "description": "MIPI CSI-2 data lane 1 negative (22-pin: pin 5, 15-pin: pin 5)",
          "functions": [
            {
              "name": "csi_data",
              "direction": "source",
              "signal_class": "data"
            }
          ],
          "connector_type": "fpc"
        },
        {
          "id": "csi_d1_p",
          "name": "CAM_D1_P",
          "description": "MIPI CSI-2 data lane 1 positive (22-pin: pin 6, 15-pin: pin 6)",
          "functions": [
            {
              "name": "csi_data",
              "direction": "source",
              "signal_class": "data"
            }
          ],
          "connector_type": "fpc"
        },
        {
          "id": "csi_ck_n",
          "name": "CAM_CK_N",
          "description": "MIPI CSI-2 clock lane negative (22-pin: pin 8, 15-pin: pin 8)",
          "functions": [
            {
              "name": "csi_clock",
              "direction": "source",
              "signal_class": "clock"
            }
          ],
          "connector_type": "fpc"
        },
        {
          "id": "csi_ck_p",
          "name": "CAM_CK_P",
          "description": "MIPI CSI-2 clock lane positive (22-pin: pin 9, 15-pin: pin 9)",
          "functions": [
            {
              "name": "csi_clock",
              "direction": "source",
              "signal_class": "clock"
            }
          ],
          "connector_type": "fpc"
        },
        {
          "id": "power_en",
          "name": "POWER-EN",
          "description": "Camera power enable input (22-pin: pin 17, 15-pin: pin 11)",
          "functions": [
            {
              "name": "digital_io",
              "direction": "sink",
              "signal_class": "data"
            }
          ],
          "connector_type": "fpc"
        },
        {
          "id": "led_en",
          "name": "LED-EN / XCLK",
          "description": "LED indicator or 24MHz external clock input (22-pin: pin 18, 15-pin: pin 12)",
          "functions": [
            {
              "name": "digital_io",
              "direction": "sink",
              "signal_class": "data"
            }
          ],
          "connector_type": "fpc"
        },
        {
          "id": "scl",
          "name": "SCL",
          "description": "I2C clock for sensor register configuration and IMX500 firmware loading (22-pin: pin 20, 15-pin: pin 13)",
          "functions": [
            {
              "name": "i2c_scl",
              "signal_class": "clock"
            }
          ],
          "connector_type": "fpc"
        },
        {
          "id": "sda",
          "name": "SDA",
          "description": "I2C data for sensor register configuration and IMX500 firmware loading (22-pin: pin 21, 15-pin: pin 14)",
          "functions": [
            {
              "name": "i2c_sda",
              "signal_class": "data"
            }
          ],
          "connector_type": "fpc"
        },
        {
          "id": "vcc",
          "name": "VCC",
          "description": "3.3V power input (22-pin: pin 22, 15-pin: pin 15)",
          "functions": [
            {
              "name": "power_input",
              "signal_class": "power"
            }
          ],
          "connector_type": "fpc",
          "power_domain_id": "vcc_3v3"
        },
        {
          "id": "gnd_1",
          "name": "GND (pin 1)",
          "description": "Ground (22-pin: pin 1, 15-pin: pin 1)",
          "functions": [
            {
              "name": "ground",
              "signal_class": "ground"
            }
          ],
          "connector_type": "fpc",
          "power_domain_id": "vcc_3v3"
        }
      ],
      "interfaces": [
        {
          "id": "csi2_video",
          "name": "MIPI CSI-2 Video + AI Output",
          "description": "2-lane MIPI CSI-2 video stream with AI inference metadata. 4056x3040@10fps full-res, 2028x1520@30fps 2x2 binned. On-sensor NPU returns inference results (bounding boxes, classifications, keypoints) as frame metadata.",
          "protocol": {
            "type": "camera",
            "role": "sensor"
          },
          "requires": [
            {
              "function": "csi_data",
              "count": 4,
              "shareable_with": [
                "csi_clock"
              ]
            },
            {
              "function": "csi_clock",
              "count": 2,
              "shareable_with": [
                "csi_data"
              ]
            }
          ],
          "timing": {
            "max_data_rate_mbps": 1500
          }
        },
        {
          "id": "i2c_control",
          "name": "I2C Camera Control + Firmware",
          "description": "I2C slave for sensor register configuration and IMX500 neural network firmware loading via RP2040 MCU",
          "protocol": {
            "type": "i2c",
            "role": "slave"
          },
          "requires": [
            {
              "function": "i2c_sda",
              "count": 1,
              "shareable_with": [
                "i2c_scl"
              ]
            },
            {
              "function": "i2c_scl",
              "count": 1,
              "shareable_with": [
                "i2c_sda"
              ]
            }
          ]
        },
        {
          "id": "power_supply",
          "name": "3.3V Power Input",
          "description": "3.3V power supplied via FPC connector from host board. Draws ~1.87W while running model and streaming.",
          "protocol": {
            "type": "power",
            "role": "sink"
          },
          "requires": [
            {
              "function": "power_input",
              "count": 1
            },
            {
              "function": "ground",
              "count": 1
            }
          ]
        }
      ],
      "supply_voltage_V": [
        3.3,
        3.3
      ],
      "metadata": {
        "sensor": "Sony IMX500",
        "sensor_type": "CMOS with integrated AI/NPU accelerator",
        "sensor_diagonal_mm": 7.857,
        "sensor_format": "1/2.3\"",
        "pixel_size_um": 1.55,
        "max_resolution": "4056x3040",
        "max_resolution_mp": 12.3,
        "color_filter": "Bayer RGB",
        "ir_cut_filter": true,
        "focus_type": "manual",
        "focus_range_cm": [
          20,
          "infinity"
        ],
        "csi_lanes": 2,
        "output_format": "RAW10",
        "video_modes": [
          {
            "resolution": "4056x3040",
            "fps": 10,
            "bit_depth": 10
          },
          {
            "resolution": "2028x1520",
            "fps": 30,
            "bit_depth": 10,
            "binning": "2x2"
          }
        ],
        "ai_accelerator": {
          "npu": "Sony IMX500 integrated",
          "max_input_tensor": "640x640",
          "input_data_types": [
            "int8",
            "uint8"
          ],
          "model_memory_bytes": 8388480,
          "onboard_flash_mb": 16,
          "firmware_mcu": "Raspberry Pi RP2040",
          "model_format": ".rpk",
          "preloaded_model": "MobileNet SSD (object detection)",
          "supported_tasks": [
            "object detection",
            "image classification",
            "semantic segmentation",
            "pose estimation"
          ]
        },
        "fpc_pin_count_15": 15,
        "fpc_pitch_mm_15": 1,
        "fpc_pin_count_22": 22,
        "fpc_pitch_mm_22": 0.5,
        "power_consumption_W": 1.87
      }
    },
    {
      "domain": "mechanical",
      "package_type": "PCB Module",
      "dimensions_mm": {
        "length": 25,
        "width": 24,
        "height": 11.9
      },
      "mounting": {
        "type": "screw",
        "hole_pattern": "Raspberry Pi Camera standard 4-hole pattern"
      },
      "resources": [],
      "interfaces": [
        {
          "id": "fpc_connector",
          "name": "FPC Connector (dual cable included)",
          "description": "Includes two 200mm FPC ribbon cables: 15-pin (1mm pitch) for Pi 1/2/3/4 and 22-pin (0.5mm pitch) for Pi 5/Zero/CM.",
          "protocol": {
            "type": "clip_connection",
            "role": "receptacle"
          },
          "requires": []
        }
      ]
    }
  ],
  "design_rules": [
    "Connect via 22-pin FPC cable to Raspberry Pi 5 or Pi Zero 2W CSI port. For Pi 4B/3B/2B, use the included 15-pin FPC cable.",
    "This is the official Raspberry Pi AI Camera with Sony IMX500 sensor. No additional dtoverlay configuration needed on supported Raspberry Pi OS versions.",
    "AI models are loaded as .rpk files via the RP2040 firmware MCU over I2C. Models are cached in the 16MB onboard flash. Use picamera2 with the imx500 helper library.",
    "For OpenCV integration, capture frames via Picamera2 and convert to NumPy arrays. AI inference results are returned as frame metadata, not requiring OpenCV for basic AI tasks.",
    "Power is supplied through the FPC connector from the host board. The module draws ~1.87W when running a model and streaming — ensure the host board's power supply can handle the additional load.",
    "2-lane CSI-2 interface. Only 2 of the 4 available data lanes on the 22-pin connector are used.",
    "Custom TensorFlow and PyTorch models can be converted to .rpk format using Sony's IMX500 converter tools."
  ],
  "validation_requirements": [
    "Verify camera is detected: 'libcamera-hello --list-cameras'",
    "Confirm AI inference works: run 'picamera2' with imx500 object detection example",
    "Verify firmware loading: check RP2040 loads model from flash without errors"
  ],
  "usage_notes": "12.3MP AI camera module with on-sensor neural network acceleration for Raspberry Pi. The Sony IMX500 sensor integrates an NPU that runs inference models (YOLO, MobileNet, EfficientNet, etc.) directly on the sensor, returning structured results (bounding boxes, class labels, pose keypoints) as frame metadata. Supports object detection, image classification, pose estimation, and semantic segmentation. Compatible with all Raspberry Pi boards with CSI connectors. Use picamera2 + imx500 library for capture and inference, or bridge to OpenCV for additional processing.",
  "application_examples": [
    "Real-time object detection and tracking with on-sensor YOLO inference",
    "Image classification for sorting, quality inspection, or wildlife monitoring",
    "Pose estimation for gesture recognition and activity tracking",
    "Edge AI inference without GPU — runs models directly on the sensor",
    "OpenCV-based computer vision with AI-accelerated preprocessing"
  ],
  "compatibility_notes": "Compatible with Raspberry Pi 5, Pi 4B, Pi 3B/3B+, Pi 2B, Pi Zero W/WH, Pi Zero 2W, and Compute Modules. Requires Raspberry Pi OS Bookworm or later with libcamera and picamera2. The 15-pin FPC cable works with Pi 1/2/3/4, and the 22-pin FPC cable works with Pi 5/Zero/CM. OpenCV works via picamera2 bridge — cv2.VideoCapture() does not directly support libcamera devices.",
  "warnings": [
    "Do not connect or disconnect the FPC cable while the Pi is powered on.",
    "The module draws ~1.87W — significantly more than standard camera modules. Ensure adequate power supply.",
    "AI model inference is limited to 640x640 input tensor size. Larger images are downscaled before inference.",
    "Model memory is limited to ~8MB — complex models may not fit. Check model size before deploying.",
    "Manual focus lens — requires physical adjustment of the focus ring. No autofocus.",
    "Operating temperature: 0-50C. Thermal throttling may occur at elevated temperatures under sustained AI load."
  ]
}