Skip to content

Move USB ESD diode into USB connector; add USB speed modeling#533

Merged
ducky64 merged 8 commits into
masterfrom
usb-esd
Jul 7, 2026
Merged

Move USB ESD diode into USB connector; add USB speed modeling#533
ducky64 merged 8 commits into
masterfrom
usb-esd

Conversation

@ducky64

@ducky64 ducky64 commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

Move USB ESD diode into USB connector, since most designs have this part. Simplifies example designs to eliminate the explicit ESD diode.

Add USB speed modeling to ensure that passives do not limit link speed, eg for a low-speed USB diode (which none are in the library, yet). Many microcontrollers are full speed only (PHY not low-speed capable, especially in device mode).

Other changes:

  • change the USB C receptacle footprint descriptors to be generic

This changes a lot of netlists since the ESD diode gets moved to the USB connector, shifting its refdes up.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the USB connector abstractions so ESD protection is generated as part of common USB connector blocks, and adds a USB link-speed model to catch incompatible endpoint speeds and passives that would constrain a link.

Changes:

  • Move USB ESD diode generation into USB connector blocks (and update example netlists/layout exports accordingly).
  • Add USB speed capability modeling (host/device endpoints) plus validation that passives don’t constrain the negotiated link speed.
  • Make USB-C receptacle footprint metadata generic (“USB-C Receptacle”) instead of a specific SparkFun part descriptor.

Reviewed changes

Copilot reviewed 84 out of 84 changed files in this pull request and generated no comments.

Show a summary per file
File Description
examples/UsbUart/UsbUart.svgpcb.js Updates generated layout export for in-connector USB ESD and refdes/net renumbering.
examples/UsbUart/UsbUart.net.ref Updates reference netlist for in-connector USB ESD and generic USB-C receptacle descriptors.
examples/UsbFpgaProgrammer/UsbFpgaProgrammer.svgpcb.js Updates generated layout export for in-connector USB ESD and refdes/net renumbering.
examples/UsbFpgaProgrammer/UsbFpgaProgrammer.net.ref Updates reference netlist for in-connector USB ESD and generic USB-C receptacle descriptors.
examples/TestBlinkyWithSchematicImport/TestBlinkyWithSchematicImport.net.ref Updates USB-C receptacle descriptor to generic naming.
examples/TestBlinkyWithModeledSchematicImport/TestBlinkyWithModeledSchematicImport.net.ref Updates USB-C receptacle descriptor to generic naming.
examples/TestBlinkyWithLibraryExport/TestBlinkyWithLibraryExport.net.ref Updates USB-C receptacle descriptor to generic naming.
examples/TestBlinkyWithLibrary/TestBlinkyWithLibrary.net.ref Updates USB-C receptacle descriptor to generic naming.
examples/TestBlinkyRgb/TestBlinkyRgb.svgpcb.js Updates generated layout export for in-connector USB ESD and refdes/net renumbering.
examples/TestBlinkyRgb/TestBlinkyRgb.net.ref Updates reference netlist for in-connector USB ESD and refdes/net renumbering.
examples/TestBlinkyRegulated/TestBlinkyRegulated.svgpcb.js Updates generated layout export for in-connector USB ESD and refdes/net renumbering.
examples/TestBlinkyRegulated/TestBlinkyRegulated.net.ref Updates reference netlist for in-connector USB ESD and refdes/net renumbering.
examples/TestBlinkyPinned/TestBlinkyPinned.svgpcb.js Updates generated layout export for in-connector USB ESD and refdes/net renumbering.
examples/TestBlinkyPinned/TestBlinkyPinned.net.ref Updates reference netlist for in-connector USB ESD and refdes/net renumbering.
examples/TestBlinkyPacked/TestBlinkyPacked.net.ref Updates USB-C receptacle descriptor to generic naming.
examples/TestBlinkyImplicit/TestBlinkyImplicit.svgpcb.js Updates generated layout export for in-connector USB ESD and refdes/net renumbering.
examples/TestBlinkyImplicit/TestBlinkyImplicit.net.ref Updates reference netlist for in-connector USB ESD and refdes/net renumbering.
examples/TestBlinkyArray/TestBlinkyArray.net.ref Updates USB-C receptacle descriptor to generic naming.
examples/test_usb_uart.py Removes explicit USB ESD diode block and connects USB directly (ESD now in connector).
examples/test_usb_source_measure.py Removes explicit USB ESD diode block and updates grouping strings accordingly.
examples/test_usb_key.py Adds a local USB-A plug pads footprint block (since library export was removed).
examples/test_usb_fpga_programmer.py Removes explicit USB ESD diode block and connects USB directly (ESD now in connector).
examples/test_tofarray.py Removes explicit USB ESD diode block and connects USB directly (ESD now in connector).
examples/test_swd_debugger.py Removes explicit USB ESD diode block(s) and connects USB directly (ESD now in connector).
examples/test_pcbbot.py Removes explicit USB ESD diode block and connects USB directly (ESD now in connector).
examples/test_multimeter.py Removes explicit USB ESD diode block and connects USB directly (ESD now in connector).
examples/test_lora.py Removes explicit USB ESD diode block and connects USB directly (ESD now in connector).
examples/test_keyboard.py Removes explicit USB ESD diode block and connects USB directly (ESD now in connector).
examples/test_iot_thermal_camera.py Removes explicit USB ESD diode block and connects USB directly (ESD now in connector).
examples/test_iot_iron.py Removes explicit USB ESD diode block and connects USB directly (ESD now in connector).
examples/test_iot_display.py Removes explicit USB ESD diode block and connects USB directly (ESD now in connector).
examples/test_esp_programmer.py Removes explicit USB ESD diode block and connects USB directly (ESD now in connector).
examples/test_ble_joystick.py Removes explicit USB ESD diode block and connects USB directly (ESD now in connector).
examples/SwdDebugger/SwdDebugger.net.ref Updates reference netlist for in-connector USB ESD and refdes/net renumbering.
examples/ProtectedCharger/ProtectedCharger.net.ref Updates USB-C receptacle descriptor to generic naming.
examples/LedMatrix/LedMatrix.net.ref Updates USB-C receptacle descriptor to generic naming.
examples/Keyboard/Keyboard.net.ref Updates reference netlist for in-connector USB ESD and refdes/net renumbering.
examples/IotFan/IotFan.net.ref Updates USB-C receptacle descriptor to generic naming.
examples/EspProgrammer/EspProgrammer.svgpcb.js Updates generated layout export for in-connector USB ESD and refdes/net renumbering.
examples/EspProgrammer/EspProgrammer.net.ref Updates reference netlist for in-connector USB ESD and refdes/net renumbering.
examples/EspLora/EspLora.net.ref Updates reference netlist for in-connector USB ESD and refdes/net renumbering.
edg/parts/power/converter/Mp2722.py Constrains charger IC USB port speed (per new USB speed modeling).
edg/parts/microcontroller/Stm32l432.py Marks MCU USB device port as full-speed-only.
edg/parts/microcontroller/Stm32g431.py Marks MCU USB device port as full-speed-only.
edg/parts/microcontroller/Stm32f103.py Marks MCU USB device port as full-speed-only.
edg/parts/microcontroller/Rp2040.py Marks MCU USB device port as full-speed-only and documents host/device speed capability.
edg/parts/microcontroller/nRF52840.py Marks MCU USB device port as full-speed-only.
edg/parts/microcontroller/Lpc1549.py Declares MCU USB device port as supporting low + full speed.
edg/parts/microcontroller/Esp32s3.py Marks MCU USB device port as full-speed-only.
edg/parts/microcontroller/Ch32v203.py Marks MCU USB device port as full-speed-only.
edg/parts/interface/UsbUart_Cp2102.py Constrains CP2102 interface USB device speed to full-speed-only.
edg/parts/interface/UsbInterface_Ft232h.py Constrains FT232H interface USB device speed to full + high speed.
edg/parts/connector/UsbPorts.py Moves/generated ESD diode into USB connector blocks; adds speed constraints to connector USB ports; makes USB-C descriptor generic.
edg/parts/connector/init.py Removes export of UsbAPlugPads from connector module exports.
edg/electronics_interfaces/UsbPort.py Implements USB link speed modeling and passive speed-limit validation; propagates speed through bridges.
edg/electronics_interfaces/test_usb_link.py Adds unit tests for USB speed compatibility and passive speed limiting behavior.
edg/circuits/UsbSeriesResistor.py Propagates USB speed/passive-speed constraints through the series-resistor subcircuit.
edg/circuits/UsbBitBang.py Constrains bit-banged USB port speed to low/full-speed.
edg/abstract_parts/UsbConnectors.py Adds generate_esd_diode parameter to USB connector abstract bases (enabling in-connector ESD generation).

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

@ducky64 ducky64 merged commit 088ec45 into master Jul 7, 2026
13 checks passed
@ducky64 ducky64 deleted the usb-esd branch July 7, 2026 07:27
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.

2 participants