{
  "metadata": {
    "id": "arduino-mega-2560-rev3",
    "name": "Arduino Mega 2560 Rev3",
    "type": "microcontroller",
    "description": "Arduino Mega 2560 Rev3 microcontroller development board based on ATmega2560. Extended Arduino form factor with 54 digital I/O pins and 4 UART ports.",
    "manufacturer": "Arduino",
    "part_number": "A000067",
    "datasheet_url": "https://docs.arduino.cc/resources/datasheets/A000067-datasheet.pdf",
    "tags": [
      "mcu",
      "board",
      "5v",
      "usb",
      "atmega2560",
      "arduino",
      "microcontroller",
      "development",
      "extended-io"
    ],
    "schema_version": "1.4.0",
    "version": "0.2.0",
    "taxonomy": [
      "microcontroller.arduino"
    ]
  },
  "domains": [
    {
      "domain": "electrical",
      "power_domains": [
        {
          "id": "vin",
          "name": "VIN (Raw Input)",
          "nominal_voltage_V": 9,
          "voltage_range_V": [
            7,
            12
          ],
          "voltage_tolerance_percent": 10,
          "max_current_mA": 500,
          "regulation_type": "unregulated",
          "isolation_type": "non_isolated",
          "ground_reference": "common",
          "efficiency_percent": 85,
          "voltage_ripple_mV": 100,
          "compatible_domains": [],
          "description": "External power input through barrel jack or VIN pin"
        },
        {
          "id": "usb_5v",
          "name": "USB 5V",
          "nominal_voltage_V": 5,
          "voltage_range_V": [
            4.5,
            5.5
          ],
          "voltage_tolerance_percent": 10,
          "max_current_mA": 500,
          "regulation_type": "regulated",
          "isolation_type": "non_isolated",
          "ground_reference": "common",
          "efficiency_percent": 90,
          "voltage_ripple_mV": 50,
          "compatible_domains": [],
          "description": "USB-supplied power with built-in protection"
        },
        {
          "id": "regulated_5v",
          "name": "Regulated 5V",
          "nominal_voltage_V": 5,
          "voltage_range_V": [
            4.8,
            5.2
          ],
          "voltage_tolerance_percent": 4,
          "max_current_mA": 800,
          "regulation_type": "regulated",
          "isolation_type": "non_isolated",
          "ground_reference": "common",
          "efficiency_percent": 85,
          "voltage_ripple_mV": 10,
          "compatible_domains": [
            "usb_5v"
          ],
          "description": "Regulated 5V output for powering external components"
        },
        {
          "id": "regulated_3v3",
          "name": "Regulated 3.3V",
          "nominal_voltage_V": 3.3,
          "voltage_range_V": [
            3.1,
            3.5
          ],
          "voltage_tolerance_percent": 6,
          "max_current_mA": 50,
          "regulation_type": "regulated",
          "isolation_type": "non_isolated",
          "ground_reference": "common",
          "efficiency_percent": 80,
          "voltage_ripple_mV": 5,
          "compatible_domains": [
            "regulated_5v"
          ],
          "description": "Low-power 3.3V output for sensors and low-power devices"
        },
        {
          "id": "digital_io",
          "name": "Digital I/O",
          "nominal_voltage_V": 5,
          "voltage_range_V": [
            4.5,
            5.5
          ],
          "voltage_tolerance_percent": 10,
          "max_current_mA": 40,
          "regulation_type": "regulated",
          "isolation_type": "non_isolated",
          "ground_reference": "common",
          "compatible_domains": [
            "regulated_5v"
          ],
          "description": "5V logic level for digital I/O pins"
        },
        {
          "id": "analog_ref",
          "name": "Analog Reference",
          "nominal_voltage_V": 5,
          "voltage_range_V": [
            1.1,
            5.5
          ],
          "voltage_tolerance_percent": 1,
          "max_current_mA": 1,
          "regulation_type": "regulated",
          "isolation_type": "non_isolated",
          "ground_reference": "common",
          "compatible_domains": [
            "regulated_5v"
          ],
          "description": "Precision reference for ADC measurements"
        }
      ],
      "resources": [
        {
          "id": "vin",
          "functions": [
            {
              "name": "power_input"
            }
          ],
          "connector_type": "pin",
          "power_domain_id": "vin",
          "description": "External power input pin"
        },
        {
          "id": "usb_5v",
          "functions": [
            {
              "name": "power_input"
            }
          ],
          "connector_type": "usb",
          "power_domain_id": "usb_5v",
          "description": "USB power input"
        },
        {
          "id": "5v_out",
          "functions": [
            {
              "name": "power_output"
            }
          ],
          "connector_type": "pin",
          "power_domain_id": "regulated_5v",
          "voltage_output_V": 5,
          "max_continuous_current_mA": 800,
          "description": "5V power output pin"
        },
        {
          "id": "3v3_out",
          "functions": [
            {
              "name": "power_output"
            }
          ],
          "connector_type": "pin",
          "power_domain_id": "regulated_3v3",
          "voltage_output_V": 3.3,
          "max_continuous_current_mA": 50,
          "description": "3.3V power output pin"
        },
        {
          "id": "gnd1",
          "functions": [
            {
              "name": "ground"
            }
          ],
          "connector_type": "pin",
          "power_domain_id": "regulated_5v",
          "description": "Ground pin 1"
        },
        {
          "id": "gnd2",
          "functions": [
            {
              "name": "ground"
            }
          ],
          "connector_type": "pin",
          "power_domain_id": "regulated_3v3",
          "description": "Ground pin 2"
        }
      ],
      "interfaces": [
        {
          "id": "power_output",
          "protocol": {
            "type": "power",
            "role": "output"
          },
          "requires": [
            {
              "function": "power_output",
              "count": 1
            },
            {
              "function": "ground",
              "count": 1
            }
          ],
          "constraints": {
            "max_connections": 10,
            "requires_matching_voltage_domain": false
          },
          "power_delivery": {
            "max_voltage_V": 5,
            "max_current_mA": 800,
            "efficiency_percent": 85,
            "regulation_tolerance_percent": 4,
            "ripple_voltage_mV": 10
          },
          "description": "Power supply output interface",
          "name": "Power Output"
        },
        {
          "id": "digital_output",
          "protocol": {
            "type": "digital",
            "role": "transmitter"
          },
          "requires": [
            {
              "function": "digital_io",
              "count": 1
            }
          ],
          "constraints": {
            "max_connections": 1,
            "requires_matching_voltage_domain": true
          },
          "description": "Digital output interface",
          "name": "Digital Output"
        },
        {
          "id": "digital_input",
          "protocol": {
            "type": "digital",
            "role": "receiver"
          },
          "requires": [
            {
              "function": "digital_io",
              "count": 1
            }
          ],
          "constraints": {
            "max_connections": 1,
            "requires_matching_voltage_domain": true
          },
          "description": "Digital input interface",
          "name": "Digital Input"
        },
        {
          "id": "analog_input",
          "protocol": {
            "type": "analog",
            "role": "receiver"
          },
          "requires": [
            {
              "function": "analog_input",
              "count": 1
            }
          ],
          "constraints": {
            "max_connections": 1,
            "requires_matching_voltage_domain": true
          },
          "description": "Analog input interface",
          "name": "Analog Input"
        },
        {
          "id": "i2c_master",
          "protocol": {
            "type": "i2c",
            "role": "master"
          },
          "requires": [
            {
              "function": "i2c_sda",
              "count": 1
            },
            {
              "function": "i2c_scl",
              "count": 1
            }
          ],
          "exclusive": false,
          "protocol_max_freq_Hz": 400000,
          "pullups_on_master": false,
          "supports_clock_stretching": true,
          "constraints": {
            "max_connections": 8,
            "requires_matching_voltage_domain": true
          },
          "description": "I2C master communication interface",
          "name": "I2C Master"
        },
        {
          "id": "spi_master",
          "protocol": {
            "type": "spi",
            "role": "master"
          },
          "requires": [
            {
              "function": "spi_mosi",
              "count": 1
            },
            {
              "function": "spi_miso",
              "count": 1
            },
            {
              "function": "spi_sck",
              "count": 1
            },
            {
              "function": "spi_ss",
              "count": 1
            }
          ],
          "exclusive": false,
          "protocol_max_freq_Hz": 8000000,
          "constraints": {
            "max_connections": 8,
            "requires_matching_voltage_domain": true
          },
          "description": "SPI master communication interface",
          "name": "SPI Master"
        },
        {
          "id": "uart_transmitter",
          "protocol": {
            "type": "uart",
            "role": "transmitter"
          },
          "requires": [
            {
              "function": "uart_tx",
              "count": 1
            }
          ],
          "protocol_max_freq_Hz": 115200,
          "constraints": {
            "max_connections": 1,
            "requires_matching_voltage_domain": true
          },
          "description": "UART transmitter interface",
          "name": "UART Transmitter"
        },
        {
          "id": "uart_receiver",
          "protocol": {
            "type": "uart",
            "role": "receiver"
          },
          "requires": [
            {
              "function": "uart_rx",
              "count": 1
            }
          ],
          "protocol_max_freq_Hz": 115200,
          "constraints": {
            "max_connections": 1,
            "requires_matching_voltage_domain": true
          },
          "description": "UART receiver interface",
          "name": "UART Receiver"
        }
      ],
      "supply_voltage_V": [
        7,
        12
      ],
      "power_consumption_mW": 700,
      "pin_count": 70,
      "metadata": {
        "supports_usb": true,
        "supports_hot_plug": true,
        "max_operating_freq_Hz": 16000000,
        "emc_compliance": [
          "CE",
          "FCC"
        ],
        "safety_standards": [
          "UL",
          "CSA"
        ],
        "package_type": "PCB Module"
      }
    },
    {
      "domain": "mechanical",
      "resources": [
        {
          "id": "mount_hole_1",
          "functions": [
            {
              "name": "mounting_hole"
            }
          ],
          "connector_type": "through_hole",
          "hole_diameter_mm": 3.2,
          "thread_spec": "M3",
          "max_force_N": 50,
          "description": "Top-left mounting hole"
        },
        {
          "id": "mount_hole_2",
          "functions": [
            {
              "name": "mounting_hole"
            }
          ],
          "connector_type": "through_hole",
          "hole_diameter_mm": 3.2,
          "thread_spec": "M3",
          "max_force_N": 50,
          "description": "Top-right mounting hole"
        },
        {
          "id": "mount_hole_3",
          "functions": [
            {
              "name": "mounting_hole"
            }
          ],
          "connector_type": "through_hole",
          "hole_diameter_mm": 3.2,
          "thread_spec": "M3",
          "max_force_N": 50,
          "description": "Bottom-left mounting hole"
        },
        {
          "id": "mount_hole_4",
          "functions": [
            {
              "name": "mounting_hole"
            }
          ],
          "connector_type": "through_hole",
          "hole_diameter_mm": 3.2,
          "thread_spec": "M3",
          "max_force_N": 50,
          "description": "Bottom-right mounting hole"
        }
      ],
      "interfaces": [
        {
          "id": "pcb_mounting",
          "protocol": {
            "type": "threaded_connection",
            "role": "mounting_point"
          },
          "requires": [
            {
              "function": "mounting_hole",
              "count": 4
            }
          ],
          "connection_type": "removable",
          "installation_torque_Nm": 0.3,
          "working_load_N": 200,
          "description": "PCB mounting interface using 4 corner holes",
          "name": "PCB Mounting"
        }
      ],
      "package_type": "PCB Module",
      "dimensions_mm": {
        "length": 101.5,
        "width": 53.3,
        "height": 12
      },
      "weight_g": 37,
      "mount_holes": [
        {
          "x": 3.2,
          "y": 3.2,
          "diam_mm": 3.2
        },
        {
          "x": 98.3,
          "y": 3.2,
          "diam_mm": 3.2
        },
        {
          "x": 3.2,
          "y": 50.1,
          "diam_mm": 3.2
        },
        {
          "x": 98.3,
          "y": 50.1,
          "diam_mm": 3.2
        }
      ],
      "metadata": {
        "mounting_method": "through_hole",
        "enclosure_type": "open_pcb",
        "assembly_time_min": 5,
        "field_serviceable": true
      }
    },
    {
      "domain": "thermal",
      "resources": [],
      "interfaces": [],
      "operating_temperature_C": [
        -40,
        85
      ],
      "metadata": {
        "thermal_design_power_W": 0.7,
        "requires_thermal_management": false,
        "thermal_monitoring_available": false,
        "cooling_method": "passive"
      }
    }
  ],
  "design_rules": [
    "Maximum 40mA per I/O pin",
    "Maximum 200mA total I/O current",
    "VIN must be 7-12V when using external power",
    "USB and VIN power sources are mutually exclusive",
    "Do not exceed 5.5V on any pin when powered by USB",
    "Use external pull-up resistors for I2C communication",
    "Ensure proper decoupling capacitors for stable operation",
    "Place and connect shields using the same R3 footprint",
    "Manage signal routing carefully due to large pin count"
  ],
  "validation_requirements": [
    "Check power supply compatibility",
    "Verify I/O voltage levels",
    "Validate current limits",
    "Check communication protocol compatibility",
    "Ensure proper grounding",
    "Verify analog reference voltage",
    "Load example sketches to test all four Serial ports",
    "Validate analog inputs reading expected values"
  ],
  "usage_notes": "Suitable for projects requiring many I/O lines or multiple serial devices. Use the additional serial ports for communications without interfering with USB. Can control lots of sensors, motors, or a graphical LCD simultaneously.",
  "application_examples": [
    "3D printers with RAMPS or similar shield",
    "CNC machines",
    "Large LED displays",
    "Home automation with many sensors/relays",
    "Robotics with multiple servos and sensors",
    "Projects needing multiple communication interfaces"
  ],
  "compatibility_notes": "Arduino Uno shields will plug into the Mega (pins D0-D13, A0-A5 align), with extra Mega-specific pins available for expanded functionality. Libraries that assume an ATmega328 may need adapting to use Mega's additional serial ports or different interrupt vectors.",
  "warnings": [
    "Do not exceed 40mA per I/O pin",
    "Do not reverse power supply polarity",
    "Ensure proper grounding for all connections",
    "USB and external power should not be used simultaneously",
    "Avoid exposing to high humidity or corrosive environments",
    "Maximum operating temperature is 85°C",
    "All I/O are 5V logic - ensure shields or modules are 5V tolerant",
    "The Mega's larger board draws slightly more power",
    "Avoid shorting the 5V rail - a resettable fuse protects the USB 5V"
  ]
}