Skip to content

Commit

Permalink
pns for JST PHK RA
Browse files Browse the repository at this point in the history
  • Loading branch information
ducky64 committed Jul 5, 2023
1 parent a165241 commit 70c94fa
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
21 changes: 20 additions & 1 deletion electronics_lib/PassiveConnector_Header.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,28 @@ def part_footprint_mfr_name(self, length: int) -> Tuple[str, str, str]:


"""JST S*B-PH-K series connector: 2.00mm shrouded and polarized, in horizontal (right-angle) through-hole."""
class JstPhKHorizontal(FootprintPassiveConnector):
class JstPhKHorizontal(FootprintPassiveConnector, JlcPart):
allowed_pins = range(2, 16+1)
PART_NUMBERS = { # white colored, -S part suffix
2: 'C173752',
3: 'C157929',
4: 'C157926',
5: 'C157923',
6: 'C157920',
7: 'C157917',
8: 'C157915',
9: 'C157912',
10: 'C157947',
11: 'C157945',
12: 'C157943',
13: 'C157940',
14: 'C157938',
15: 'C157936',
16: 'C157934',
}
def part_footprint_mfr_name(self, length: int) -> Tuple[str, str, str]:
self.assign(self.lcsc_part, self.PART_NUMBERS[length])
self.assign(self.actual_basic_part, False)
return (f'Connector_JST:JST_PH_S{length}B-PH-K_1x{length:02d}_P2.00mm_Horizontal',
"JST", f"S{length}B-PH-K")

Expand Down
5 changes: 5 additions & 0 deletions examples/jlcpcb_pcba_postprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@
'OptoDevice:Osram_BPW34S-SMD': 180,

'Connector_Coaxial:BNC_Amphenol_B6252HB-NPP3G-50_Horizontal': 180,

'Connector_JST:JST_PH_S2B-PH-K_1x02_P2.00mm_Horizontal': 180,
}

# footprint position export doesn't include the footprint library name
Expand All @@ -82,6 +84,9 @@
'RF_Module:ESP32-WROOM-32': (0, 0.8),

'Connector_Coaxial:BNC_Amphenol_B6252HB-NPP3G-50_Horizontal': (0, -2.5),

'Connector_JST:JST_PH_S2B-PH-K_1x02_P2.00mm_Horizontal': (1, 0),
'Connector_JST:JST_PH_S6B-PH-K_1x06_P2.00mm_Horizontal': (5, 0),
}
PACKAGE_OFFSETS = {footprint.split(':')[-1]: offset for footprint, offset in _FOOTPRINT_OFFSETS.items()}

Expand Down

0 comments on commit 70c94fa

Please sign in to comment.