{
  "metadata": {
    "id": "arducam-imx519-autofocus-camera",
    "name": "Arducam IMX519 Autofocus Camera Module (16MP, 80° DFOV)",
    "type": "sensor",
    "description": "16MP Sony IMX519 autofocus camera module for Raspberry Pi with 80° DFOV, hybrid PDAF+CDAF, HDR, 2-lane MIPI CSI-2 interface on 22-pin FPC connector. Supports 4656x3496 stills, 1080p@60fps and 720p@120fps video. Compatible with Raspberry Pi 5/4B/3B/3B+, Pi Zero 2W, and Jetson boards.",
    "manufacturer": "Arducam",
    "part_number": "B0371",
    "datasheet_url": "https://docs.arducam.com/Raspberry-Pi-Camera/Native-camera/16MP-IMX519/",
    "tags": [
      "camera",
      "imx519",
      "csi",
      "mipi",
      "autofocus",
      "pdaf",
      "cdaf",
      "hdr",
      "raspberry-pi",
      "opencv",
      "libcamera",
      "16mp",
      "vision",
      "jetson"
    ],
    "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 pin 22 of the 22-pin FPC connector"
        }
      ],
      "resources": [
        {
          "id": "csi_d0_n",
          "name": "CAM_D0_N",
          "description": "MIPI CSI-2 data lane 0 negative (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 (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 (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 (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 (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 (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 (pin 17)",
          "functions": [
            {
              "name": "digital_io",
              "direction": "sink",
              "signal_class": "data"
            }
          ],
          "connector_type": "fpc"
        },
        {
          "id": "led_en",
          "name": "LED-EN",
          "description": "LED indicator / auxiliary clock output (pin 18)",
          "functions": [
            {
              "name": "digital_io",
              "direction": "sink",
              "signal_class": "data"
            }
          ],
          "connector_type": "fpc"
        },
        {
          "id": "scl",
          "name": "SCL",
          "description": "I2C clock for camera control registers and VCM autofocus motor (pin 20)",
          "functions": [
            {
              "name": "i2c_scl",
              "signal_class": "clock"
            }
          ],
          "connector_type": "fpc"
        },
        {
          "id": "sda",
          "name": "SDA",
          "description": "I2C data for camera control registers and VCM autofocus motor (pin 21)",
          "functions": [
            {
              "name": "i2c_sda",
              "signal_class": "data"
            }
          ],
          "connector_type": "fpc"
        },
        {
          "id": "vcc",
          "name": "VCC",
          "description": "3.3V power input (pin 22)",
          "functions": [
            {
              "name": "power_input",
              "signal_class": "power"
            }
          ],
          "connector_type": "fpc",
          "power_domain_id": "vcc_3v3"
        },
        {
          "id": "gnd_1",
          "name": "GND (pin 1)",
          "description": "Ground (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 Output",
          "description": "2-lane MIPI CSI-2 video stream. 4656x3496 stills, 1920x1080@60fps, 1280x720@120fps. RAW10 output.",
          "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",
          "description": "I2C slave for sensor register configuration (IMX519 + VCM autofocus motor)",
          "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",
          "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 IMX519",
        "sensor_type": "CMOS BSI",
        "sensor_format": "1/2.53\"",
        "pixel_size_um": 1.22,
        "max_resolution": "4656x3496",
        "max_resolution_mp": 16,
        "autofocus_type": "PDAF + CDAF hybrid",
        "autofocus_range_cm": [
          10,
          "infinity"
        ],
        "lens_aperture": "f/1.75",
        "lens_efl_mm": 4.28,
        "dfov_degrees": 80,
        "csi_lanes": 2,
        "output_format": "RAW10",
        "video_modes": [
          {
            "resolution": "4656x3496",
            "fps": 10,
            "bit_depth": 10
          },
          {
            "resolution": "1920x1080",
            "fps": 60,
            "bit_depth": 10
          },
          {
            "resolution": "1280x720",
            "fps": 120,
            "bit_depth": 10
          }
        ],
        "ir_cut_filter": true,
        "shutter_type": "rolling",
        "hdr_support": true,
        "fpc_pin_count": 22,
        "fpc_pitch_mm": 0.5,
        "power_consumption_W": 0.3
      }
    },
    {
      "domain": "mechanical",
      "package_type": "PCB Module",
      "dimensions_mm": {
        "length": 25,
        "width": 24
      },
      "mounting": {
        "type": "screw",
        "hole_pattern": "Raspberry Pi Camera standard 4-hole pattern"
      },
      "resources": [],
      "interfaces": [
        {
          "id": "fpc_connector",
          "name": "22-pin FPC Connector",
          "description": "0.5mm pitch 22-position bottom-contact FPC connector. Includes 22-to-22 pin cable and 15-to-22 pin adapter cable for older Pi boards.",
          "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/3B+, use the included 15-to-22 pin adapter cable.",
    "This is an Arducam module — NOT the official Raspberry Pi Camera. Requires Arducam's custom libcamera build: follow instructions at docs.arducam.com for your OS version.",
    "Add 'dtoverlay=imx519' to /boot/firmware/config.txt (Bookworm) or /boot/config.txt (Bullseye) to enable the sensor driver.",
    "Use libcamera or Picamera2 for capture. For OpenCV integration, capture frames via Picamera2 and convert to NumPy arrays. cv2.VideoCapture() does not directly support libcamera devices.",
    "Power is supplied through the FPC connector from the host board. No external power connection needed.",
    "2-lane CSI-2 interface. The module uses only 2 of the 4 available data lanes on the 22-pin connector.",
    "Autofocus is hybrid PDAF+CDAF. PDAF provides fast initial lock, CDAF refines. Minimum focus distance is 10cm."
  ],
  "validation_requirements": [
    "Verify camera is detected: 'libcamera-hello --list-cameras'",
    "Confirm autofocus engages by capturing a test image at varying distances",
    "Check dtoverlay is correctly set in config.txt for IMX519",
    "Verify Arducam custom libcamera is installed (standard libcamera does not include IMX519 driver)"
  ],
  "usage_notes": "16MP autofocus camera for Raspberry Pi. Supports still capture at 4656x3496, video at 1920x1080@60fps or 1280x720@120fps with HDR. Hybrid phase-detection + contrast-detection autofocus (PDAF+CDAF) with 10cm to infinity range and f/1.75 aperture. Compatible with libcamera (Arducam build), Picamera2, and OpenCV via Picamera2 bridge. Includes IR-cut filter for daylight imaging.",
  "application_examples": [
    "Machine vision and image recognition with OpenCV",
    "High-resolution still capture and time-lapse photography",
    "Barcode and QR code scanning with autofocus",
    "Video streaming and surveillance at 1080p60 or 720p120",
    "Object detection and tracking with downstream AI frameworks"
  ],
  "compatibility_notes": "Compatible with Raspberry Pi 5, Pi 4B, Pi 3B/3B+, Pi Zero 2W, Pi Zero W, and Jetson Nano/Xavier NX. Requires Arducam's custom libcamera fork (standard libcamera does not include IMX519 support). Raspberry Pi OS Bullseye or Bookworm recommended. The 22-pin FPC cable connects directly to Pi 5/Zero; the 15-to-22 adapter cable is for Pi 4B/3B. OpenCV works via Picamera2 bridge — cv2.VideoCapture() does not directly support libcamera devices.",
  "warnings": [
    "This is NOT an official Raspberry Pi Camera. Requires Arducam's custom libcamera build — the standard Raspberry Pi libcamera does not include the IMX519 driver.",
    "Do not connect or disconnect the FPC cable while the Pi is powered on.",
    "The lens is autofocus with a mechanical VCM actuator — avoid excessive vibration in the mounting.",
    "80° DFOV variant (B0371). Arducam also makes B0371 NoIR (no IR filter) and wider-angle M12 lens variants.",
    "16MP full-resolution capture is limited to ~10fps due to CSI-2 bandwidth. Use 1080p or 720p modes for higher frame rates."
  ]
}