name: KH-RJ45-56-8P8C-D
description: connector, RJ45, with LEDs
datasheet: https://datasheet.lcsc.com/lcsc/2105241836_Shenzhen-Kinghelm-Elec-KH-RJ45-56-8P8C-D_C2828082.pdf

pinout:
  LED_R:
    LEDA_R: 12
    LEDC_R: 11
  LED_L:
    LEDA_L: 10
    LEDC_L: 9
  8P8C: 1-8
  SHIELD: SH, SH_L

properties:
  passive: LED_R, LED_L, 8P8C, SHIELD

schematic:
  symbol: connector
  left: LED_L, LED_R
  right: 8P8C
  bottom: SHIELD

housing:
  pattern: custom
  bodyWidth: 16.26
  bodyLength: 15.75
  height: 13.1

  model: # from /usr/share/kicad/3dmodels/Connector_RJ.3dshapes/RJ45_Amphenol_RJHSE538X.step
    file: "library/connector/rj45_kh-rj45-56-8p8c-d.step"
    rotation: 0,0,180
    position: 3.5,0,0

  # 8P8C pins
  holeDiameter: 0.89
  padDiameter: 1.3
  verticalPitch: 1.02
  horizontalPitch: 1.78
  # pin 1 on 1.02*3.5-1.02*n, 15.75/2-5.4-4.32+1.78=-0.065 or 15.75/2-5.4-4.32=-1.845
  padPosition: 3.57, -0.065, 2.55, -1.845, 1.53, -0.065, 0.51, -1.845, -0.51, -0.065, -1.53, -1.845, -2.55, -0.065, -3.57, -1.845

  # right LED
  holeDiameter1: 0.89
  padDiameter1: 1.3
  # 15.75/2-5.4-9.13=-6.655 13.72/2=6.86 9.14/2=4.57
  padPosition1: 6.86, -6.655, 4.57, -6.655

  # left LED
  holeDiameter2: 0.89
  padDiameter2: 1.3
  # 15.75/2-5.4-9.13=-6.655 13.72/2=6.86 9.14/2=4.57
  padPosition2: -4.57, -6.655, -6.86, -6.655

  # mounting holes, small middle
  holeDiameter3: 1.8
  padDiameter3: 2.2
  # Y 15.75/2-5.4-3.56
  padPosition3: 8.13, -1.085, -8.13, -1.085

  # mounting holes, large bottom
  holeDiameter4: 3.25
  # Y 15.75/2-5.4
  padPosition4: 6.35, 2.475, -6.35, 2.475
