{
  "metadata": {
    "id": "rev-spark-max",
    "name": "REV SPARK MAX Motor Controller",
    "type": "motor_controller",
    "description": "REV SPARK MAX Motor Controller for FRC. Supports brushless (NEO) and brushed motors with CAN/PWM control and encoder feedback.",
    "manufacturer": "REV Robotics",
    "part_number": "REV-11-2158",
    "datasheet_url": "https://docs.revrobotics.com/brushless/spark-max/gs/wiring",
    "tags": [
      "FRC",
      "SPARK MAX",
      "REV",
      "brushless",
      "NEO",
      "CAN",
      "motor controller"
    ],
    "schema_version": "1.4.0",
    "version": "1.3.0",
    "taxonomy": [
      "actuator.motor_controller",
      "robotics.frc"
    ]
  },
  "domains": [
    {
      "domain": "electrical",
      "power_domains": [
        {
          "id": "12v-in",
          "name": "12V Input",
          "nominal_voltage_V": 12,
          "voltage_range_V": [
            6,
            16
          ],
          "max_current_mA": 60000,
          "isolation_type": "non_isolated",
          "ground_reference": "system_ground",
          "description": "Main power input from PDP/PDH"
        },
        {
          "id": "encoder-logic",
          "name": "Encoder Logic Rail",
          "nominal_voltage_V": 5,
          "voltage_range_V": [
            4.5,
            5.5
          ],
          "isolation_type": "non_isolated",
          "ground_reference": "system_ground",
          "description": "5V supply for hall encoder feedback"
        }
      ],
      "resources": [
        {
          "id": "vin-pos",
          "name": "VIN+",
          "functions": [
            {
              "name": "power_input",
              "direction": "sink",
              "signal_class": "power"
            }
          ],
          "power_domain_id": "12v-in"
        },
        {
          "id": "vin-neg",
          "name": "VIN-",
          "functions": [
            {
              "name": "ground",
              "direction": "sink",
              "signal_class": "ground"
            }
          ],
          "power_domain_id": "12v-in"
        },
        {
          "id": "can-h",
          "name": "CAN_H",
          "functions": [
            {
              "name": "can_h",
              "direction": "bidirectional",
              "signal_class": "data"
            }
          ]
        },
        {
          "id": "can-l",
          "name": "CAN_L",
          "functions": [
            {
              "name": "can_l",
              "direction": "bidirectional",
              "signal_class": "data"
            }
          ]
        },
        {
          "id": "phase-a",
          "name": "Motor Phase A",
          "functions": [
            {
              "name": "phase_a",
              "direction": "source",
              "signal_class": "power"
            }
          ]
        },
        {
          "id": "phase-b",
          "name": "Motor Phase B",
          "functions": [
            {
              "name": "phase_b",
              "direction": "source",
              "signal_class": "power"
            }
          ]
        },
        {
          "id": "phase-c",
          "name": "Motor Phase C",
          "functions": [
            {
              "name": "phase_c",
              "direction": "source",
              "signal_class": "power"
            }
          ]
        },
        {
          "id": "enc-5v",
          "name": "Encoder 5V",
          "functions": [
            {
              "name": "hall_5v",
              "direction": "source",
              "signal_class": "power"
            }
          ],
          "power_domain_id": "encoder-logic"
        },
        {
          "id": "enc-gnd",
          "name": "Encoder GND",
          "functions": [
            {
              "name": "hall_gnd",
              "direction": "source",
              "signal_class": "ground"
            }
          ],
          "power_domain_id": "encoder-logic"
        },
        {
          "id": "enc-a",
          "name": "Encoder A / Hall A",
          "functions": [
            {
              "name": "hall_a",
              "direction": "sink",
              "signal_class": "data"
            }
          ],
          "power_domain_id": "encoder-logic"
        },
        {
          "id": "enc-b",
          "name": "Encoder B / Hall B",
          "functions": [
            {
              "name": "hall_b",
              "direction": "sink",
              "signal_class": "data"
            }
          ],
          "power_domain_id": "encoder-logic"
        },
        {
          "id": "enc-c",
          "name": "Encoder C / Hall C / Index",
          "functions": [
            {
              "name": "hall_c",
              "direction": "sink",
              "signal_class": "data"
            }
          ],
          "power_domain_id": "encoder-logic"
        }
      ],
      "interfaces": [
        {
          "id": "power-in",
          "name": "12V Power Input",
          "protocol": {
            "type": "power",
            "role": "sink"
          },
          "requires": [
            {
              "function": "power_input",
              "count": 1
            },
            {
              "function": "ground",
              "count": 1
            }
          ],
          "max_instances": 1,
          "description": "Main 12V power input from PDP/PDH"
        },
        {
          "id": "can-bus",
          "name": "CAN Bus",
          "protocol": {
            "type": "can",
            "role": "peer"
          },
          "requires": [
            {
              "function": "can_h",
              "count": 1
            },
            {
              "function": "can_l",
              "count": 1
            }
          ],
          "max_instances": 1,
          "description": "CAN bus for control commands and telemetry"
        },
        {
          "id": "motor-out-3phase",
          "name": "3-Phase Motor Output",
          "protocol": {
            "type": "brushless_3phase",
            "role": "driver"
          },
          "requires": [
            {
              "function": "phase_a",
              "count": 1
            },
            {
              "function": "phase_b",
              "count": 1
            },
            {
              "function": "phase_c",
              "count": 1
            }
          ],
          "max_instances": 1,
          "description": "3-phase brushless motor output for NEO motors"
        },
        {
          "id": "encoder-port",
          "name": "Hall Encoder Input",
          "protocol": {
            "type": "hall_encoder",
            "role": "receiver"
          },
          "requires": [
            {
              "function": "hall_a",
              "count": 1
            },
            {
              "function": "hall_b",
              "count": 1
            },
            {
              "function": "hall_c",
              "count": 1
            },
            {
              "function": "hall_gnd",
              "count": 1
            },
            {
              "function": "hall_5v",
              "count": 1
            }
          ],
          "max_instances": 1,
          "description": "Hall encoder feedback from NEO motor"
        }
      ]
    }
  ]
}