{
  "version": "0.1",
  "title": "Berkeley Humanoid Lite: wiring",
  "components": [
    {
      "id": "board-beelink-mini-s12-n95",
      "name": "Beelink Mini S12 (Intel N95) mini PC",
      "kind": "board",
      "outline": [
        0.115,
        0.102
      ],
      "source": "https://www.amazon.com/gp/product/B0BVLPCDVW",
      "ports": [
        {
          "id": "unstated-usb",
          "label": "connector not stated",
          "type": "usb"
        }
      ]
    },
    {
      "id": "board-fysetc-ucan-v1",
      "name": "FYSETC UCAN Board V1.0 (USB-to-CAN adapter, STM32F072, candleLight / gs_usb)",
      "kind": "board",
      "outline": [
        0.055,
        0.01593
      ],
      "holes": [
        [
          0.01046,
          0.00152,
          0.0032
        ],
        [
          0.04102,
          0.00152,
          0.0032
        ],
        [
          0.04102,
          0.0144,
          0.0032
        ],
        [
          0.01046,
          0.0144,
          0.0032
        ]
      ],
      "source": "https://github.com/FYSETC/UCAN/blob/4265cb87ae8eec6ac8ebfd0ff196d58614e13587/CAD/UCAN_%20V1.0.step",
      "ports": [
        {
          "id": "usb-c",
          "label": "USB1 - USB Type-C (to the host / USB hub)",
          "type": "usb",
          "position": [
            0.00345,
            0.0079,
            0.00319
          ],
          "size": [
            0.0073,
            0.00894,
            0.00321
          ]
        },
        {
          "id": "p1-can",
          "label": "P1 - 3-pin pluggable screw terminal: CANH, CANL, GND (BHL wires it CAN-L, CAN-H, GND as labelled on the back of the PCB)",
          "type": "can",
          "position": [
            0.05042,
            0.00728,
            0.00519
          ],
          "size": [
            0.0092,
            0.0113,
            0.0072
          ]
        },
        {
          "id": "jp1-termination",
          "label": "JP1 - termination enable/disable jumper header (2 x 59R on-board termination, enabled by default)",
          "type": "signal",
          "position": [
            0.05194,
            0.01455,
            0.00512
          ],
          "size": [
            0.00498,
            0.0025,
            0.00706
          ]
        }
      ]
    },
    {
      "id": "board-st-b-g431b-esc1",
      "name": "STMicroelectronics B-G431B-ESC1 Discovery kit (ESC, main board MB1419 + ST-LINK daughterboard)",
      "kind": "board",
      "outline": [
        0.041,
        0.03
      ],
      "source": "https://static.chipdip.ru/lib/365/DOC011365748.pdf",
      "ports": [
        {
          "id": "j7-motor",
          "label": "J7 - 3-phase motor solder pads (A/B/C, OUT1-OUT3); motor leads soldered here",
          "type": "motor"
        },
        {
          "id": "j5-vplus",
          "label": "J5 - V+ battery input pad (3S-6S); VIN",
          "type": "power"
        },
        {
          "id": "j6-vminus",
          "label": "J6 - V- battery input pad; GND",
          "type": "power"
        },
        {
          "id": "j8-encoder",
          "label": "J8 - motor sensor (Hall/encoder) pads incl. +5V and GND; BHL wires the AS5600 VCC/GND/SDA/SCL to 5V/GND/B/Z",
          "type": "i2c"
        },
        {
          "id": "j1-can",
          "label": "J1 - CAN pads (CANH, CANL, GND, 5V)",
          "type": "can"
        },
        {
          "id": "u4-usb",
          "label": "U4 - Micro USB on the ST-LINK daughterboard (flashing/debug)",
          "type": "usb"
        },
        {
          "id": "j3-pwm-uart",
          "label": "J3 - PWM / UART / 5V BEC pads (not used by BHL)",
          "type": "uart"
        }
      ]
    },
    {
      "id": "board-arduino-nano",
      "name": "Arduino Nano (A000005, ATmega328P, Nano V3.3 layout)",
      "kind": "board",
      "outline": [
        0.04318,
        0.01778
      ],
      "holes": [
        [
          0.00127,
          0.00127,
          0.00165
        ],
        [
          0.04191,
          0.00127,
          0.00165
        ],
        [
          0.04191,
          0.01651,
          0.00165
        ],
        [
          0.00127,
          0.01651,
          0.00165
        ]
      ],
      "source": "https://docs.arduino.cc/resources/datasheets/A000005-datasheet.pdf",
      "ports": [
        {
          "id": "usb-mini-b",
          "label": "J3 - Mini-USB B (to the computer)",
          "type": "usb",
          "position": [
            0.00338,
            0.00888,
            0.0031
          ]
        },
        {
          "id": "j2-header",
          "label": "J2 - 15-pin header: D13, 3V3, REF, A0-A7 (A4 = SDA, A5 = SCL), 5V, RST, GND, VIN",
          "type": "i2c",
          "position": [
            0.02159,
            0.00127,
            -0.0015
          ]
        },
        {
          "id": "j1-header",
          "label": "J1 - 15-pin header: TX1, RX0, RST, GND, D2-D12",
          "type": "signal",
          "position": [
            0.02159,
            0.01651,
            -0.0015
          ]
        },
        {
          "id": "icsp",
          "label": "J4 - ICSP 2x3 header",
          "type": "signal",
          "position": [
            0.04054,
            0.00889,
            0.0031
          ]
        }
      ]
    },
    {
      "id": "board-gy-bno08x-imu-breakout",
      "name": "GY-BNO08X (BNO085) IMU breakout (generic, purple PCB)",
      "kind": "board",
      "source": "https://berkeley-humanoid-lite.gitbook.io/docs/getting-started-with-hardware/building-the-robot#imu-connection",
      "ports": [
        {
          "id": "unstated-i2c",
          "label": "connector not stated",
          "type": "i2c"
        }
      ]
    },
    {
      "id": "w-usb-hub",
      "name": "USB hub",
      "kind": "part",
      "ports": [
        {
          "id": "usb",
          "label": "USB",
          "type": "usb"
        }
      ]
    },
    {
      "id": "w-lipo-battery",
      "name": "LiPo battery",
      "kind": "battery",
      "node": "base_visual",
      "ports": [
        {
          "id": "power",
          "label": "power",
          "type": "power"
        }
      ]
    },
    {
      "id": "w-main-switch-circuit-breaker",
      "name": "Main switch & circuit breaker",
      "kind": "switch",
      "ports": [
        {
          "id": "power",
          "label": "power",
          "type": "power"
        }
      ]
    },
    {
      "id": "w-power-bus",
      "name": "Power bus",
      "kind": "part",
      "ports": [
        {
          "id": "power",
          "label": "power",
          "type": "power"
        }
      ]
    },
    {
      "id": "w-ammeter-and-voltmeter",
      "name": "Ammeter and voltmeter",
      "kind": "part",
      "ports": [
        {
          "id": "power",
          "label": "power",
          "type": "power"
        }
      ]
    },
    {
      "id": "w-motor",
      "name": "Motor (3 phases)",
      "kind": "motor",
      "ports": [
        {
          "id": "motor",
          "label": "motor leads",
          "type": "motor"
        }
      ]
    },
    {
      "id": "w-as5600-vcc-gnd-sda-scl",
      "name": "AS5600 VCC / GND / SDA / SCL",
      "kind": "part",
      "ports": [
        {
          "id": "i2c",
          "label": "I²C",
          "type": "i2c"
        }
      ]
    },
    {
      "id": "w-computer",
      "name": "Computer (for flashing only)",
      "kind": "computer",
      "ports": [
        {
          "id": "usb",
          "label": "USB",
          "type": "usb"
        }
      ]
    }
  ],
  "connections": [
    {
      "id": "wire-1",
      "from": {
        "component": "board-beelink-mini-s12-n95",
        "port": "unstated-usb"
      },
      "to": {
        "component": "w-usb-hub",
        "port": "usb"
      },
      "type": "usb",
      "label": "USB",
      "notes": "Source: building-the-robot wiring diagram"
    },
    {
      "id": "wire-2",
      "from": {
        "component": "w-usb-hub",
        "port": "usb"
      },
      "to": {
        "component": "board-fysetc-ucan-v1",
        "port": "usb-c"
      },
      "type": "usb",
      "label": "USB",
      "notes": "Source: building-the-robot wiring diagram"
    },
    {
      "id": "wire-3",
      "from": {
        "component": "board-fysetc-ucan-v1",
        "port": "p1-can"
      },
      "to": {
        "component": "board-st-b-g431b-esc1",
        "port": "j1-can"
      },
      "type": "can",
      "label": "CAN + GND, 30 AWG, screw terminal order CAN-L, CAN-H, GND",
      "notes": "Source: wiring diagram; joint-id-mapping; building-the-robot#connecting-can-bus-to-the-usb-can-adapter"
    },
    {
      "id": "wire-4",
      "from": {
        "component": "board-fysetc-ucan-v1",
        "port": "p1-can"
      },
      "to": {
        "component": "board-st-b-g431b-esc1",
        "port": "j1-can"
      },
      "type": "can",
      "label": "CAN + GND",
      "notes": "Source: wiring diagram; joint-id-mapping"
    },
    {
      "id": "wire-5",
      "from": {
        "component": "board-fysetc-ucan-v1",
        "port": "p1-can"
      },
      "to": {
        "component": "board-st-b-g431b-esc1",
        "port": "j1-can"
      },
      "type": "can",
      "label": "CAN + GND",
      "notes": "Source: wiring diagram; joint-id-mapping"
    },
    {
      "id": "wire-6",
      "from": {
        "component": "board-fysetc-ucan-v1",
        "port": "p1-can"
      },
      "to": {
        "component": "board-st-b-g431b-esc1",
        "port": "j1-can"
      },
      "type": "can",
      "label": "CAN + GND",
      "notes": "Source: wiring diagram; joint-id-mapping"
    },
    {
      "id": "wire-7",
      "from": {
        "component": "board-beelink-mini-s12-n95",
        "port": "unstated-usb"
      },
      "to": {
        "component": "board-arduino-nano",
        "port": "usb-mini-b"
      },
      "type": "usb",
      "label": "USB",
      "notes": "Source: wiring diagram; building-the-robot#imu-connection"
    },
    {
      "id": "wire-8",
      "from": {
        "component": "board-arduino-nano",
        "port": "j2-header"
      },
      "to": {
        "component": "board-gy-bno08x-imu-breakout",
        "port": "unstated-i2c"
      },
      "type": "i2c",
      "label": "I2C",
      "notes": "Source: wiring diagram"
    },
    {
      "id": "wire-9",
      "from": {
        "component": "w-lipo-battery",
        "port": "power"
      },
      "to": {
        "component": "w-main-switch-circuit-breaker",
        "port": "power"
      },
      "type": "power",
      "label": "Power (14 AWG; XT60 on the main cable)",
      "notes": "Source: wiring diagram; building-the-robot#joining-the-cables-together"
    },
    {
      "id": "wire-10",
      "from": {
        "component": "w-main-switch-circuit-breaker",
        "port": "power"
      },
      "to": {
        "component": "board-st-b-g431b-esc1",
        "port": "j6-vminus"
      },
      "type": "power",
      "label": "Power, XT30 per actuator to the main bus (or WAGO connectors)",
      "notes": "Source: wiring diagram; building-the-actuator wiring diagram"
    },
    {
      "id": "wire-11",
      "from": {
        "component": "w-power-bus",
        "port": "power"
      },
      "to": {
        "component": "w-ammeter-and-voltmeter",
        "port": "power"
      },
      "type": "power",
      "label": "Power",
      "notes": "Source: wiring diagram"
    },
    {
      "id": "wire-12",
      "from": {
        "component": "w-motor",
        "port": "motor"
      },
      "to": {
        "component": "board-st-b-g431b-esc1",
        "port": "j7-motor"
      },
      "type": "motor",
      "label": "Motor phase leads",
      "notes": "Source: building-the-actuator wiring diagram"
    },
    {
      "id": "wire-13",
      "from": {
        "component": "w-as5600-vcc-gnd-sda-scl",
        "port": "i2c"
      },
      "to": {
        "component": "board-st-b-g431b-esc1",
        "port": "j8-encoder"
      },
      "type": "i2c",
      "label": "30 AWG (SDA yellow, SCL green)",
      "notes": "Source: building-the-actuator wiring diagram"
    },
    {
      "id": "wire-14",
      "from": {
        "component": "board-st-b-g431b-esc1",
        "port": "u4-usb"
      },
      "to": {
        "component": "w-computer",
        "port": "usb"
      },
      "type": "usb",
      "label": "Micro USB",
      "notes": "Source: flashing-the-motor-controllers"
    }
  ]
}
