Skip to content

Connector pairs for sub-boards#488

Merged
ducky64 merged 14 commits into
masterfrom
connect-pair
May 18, 2026
Merged

Connector pairs for sub-boards#488
ducky64 merged 14 commits into
masterfrom
connect-pair

Conversation

@ducky64
Copy link
Copy Markdown
Collaborator

@ducky64 ducky64 commented May 18, 2026

Adds the SubboardConnectorPair class, which is meant to support re-usable connector-pair (one external connector in the parent board, one internal connector in the sub-board) libraries. Implements connector pairs for 2.54mm pin socket/headers and 0.50mm FPCs with all combinations of cables and contact sides.

Implementation-wise, this is handled by the netlister as taking on the parent and self-scopes of its container, recursively (SubboardConnectorPairs should be arbitrarily directly-nestable).

Since it shares an API with SubboardBlock (in terms of external / internal boards and export-tap), refactors that into a common HasSubooardBlockApi internal class.

Refactors the BLE joystick demo board to use this to move the joystick off the main board using a 0.50mm FPC. The example will be more thoroughly redone later.

Refactors the test infrastructure to support checking multiple generated netlists.

Opportunistic cleanup: deletes an extraneous reference netlist.

Resolves #367

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds sub-board connector-pair support so parent-board connectors and sub-board connectors can be modeled together while netlisting into separate board scopes.

Changes:

  • Introduces SubboardConnectorPair and updates board-scoped netlisting to support external/internal connector-pair scopes.
  • Adds reusable 2.54mm pin socket/header and 0.50mm FPC connector-pair blocks.
  • Refactors the BLE joystick example and test utility to handle multiple generated netlists.

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
edg/electronics_model/SubboardBlock.py Adds common subboard API base and connector-pair block type.
edg/electronics_model/BoardScopedTransform.py Extends board scoping for connector-pair internals.
edg/electronics_model/NetlistGenerator.py Applies parent-scope connection processing to mixed-scope hierarchy blocks.
edg/electronics_model/__init__.py Exports SubboardConnectorPair.
edg/electronics_model/test_netlist_connector_pair.py Adds tests for connector-pair netlist splitting.
edg/parts/PassiveConnector_Header.py Adds 2.54mm socket/header connector pair.
edg/parts/PassiveConnector_Fpc.py Adds configurable FPC connector pair and length assertion for flipped FPC.
edg/parts/__init__.py Exports new connector-pair parts.
examples/test_ble_joystick.py Moves joystick onto a sub-board using an FPC connector pair.
examples/util.py Updates example netlist comparison to support multiple netlists.
examples/BleJoystick/BleJoystick.net.ref Updates parent-board reference netlist for FPC connector.
examples/BleJoystick/BleJoystick_stick.net.ref Adds joystick sub-board reference netlist.
examples/BleJoystick/BleJoystick.svgpcb.js Updates generated SVG PCB placement/netlist for joystick connector.
examples/Multimeter/Multimeter.ref.net Removes obsolete reference netlist.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Parameters:
cable = "same" | "opposite": whether the FPC cable has contacts on the same side (Type A, mirror pin numbering)
or opposite sides (Type B, same pin numbering both sides)
ext_contact, int_contact = "top" | "bottom": the contact side for the external and internal connectors, respectively.
Comment thread edg/parts/PassiveConnector_Fpc.py Outdated
Comment on lines +74 to +77
if self.get(self.cable) == "same": # assuming same side contact side connectors
mirror = True
else:
mirror = False
Comment thread edg/electronics_model/SubboardBlock.py Outdated
while export-tapping ports from the external Block. The external Block should be generated first
for refdes ordering. This block's pin numbering should correspond to the external Block.

These should not be instantiated outside a SubboardBlock or SubblockConnectorPair. Bad things can happen.
@ducky64 ducky64 merged commit cbe46eb into master May 18, 2026
12 checks passed
@ducky64 ducky64 deleted the connect-pair branch May 18, 2026 00:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Connector-pairs for daughterboards

2 participants