Custom USB Switch Design

The schematic is electrically back in a clean, verified state: all intended USB, power, MCU, CC, and control nets are intact, and ERC shows no open errors or warnings. I rolled back the unsafe cleanup attempt and preserved the working design rather than risking hidden connectivity damage.
Open items:
  • The remaining messy visual labels are platform-generated portal labels that did not persist when renamed through the available schematic edit path.
Suggested next steps:
  1. Proceed to PCB layout from the verified netlist.
  2. Add status LEDs before layout if desired.
  3. If visual schematic cleanup is still important, use the schematic editor manually to relabel/group portals, since the automated rename path did not stick.
Yes, move on to PCB layout from the verified netlist.
I’ll move into PCB layout: set up an appropriate USB 2.0 board/stackup, place the connectors/mux/protection/power/control parts, route the critical USB pairs, then run layout checks.
Processing was stopped.
Here's a summary of what I was working on: Troubleshooting PCB layout issues
I need to address the USB_A pins, which might be blocked due to the connector placement being too far out of bounds. The current board dimensions might need resizing, perhaps to 75x50 or even 80x55, to avoid this issue. I also have to consider the existing routes; they might get messy if I change the layout or need to delete dangling connections after rerouting. I’ll definitely check the history to revert to a workable state before the auto-route.
Check USB routing
Inspect 3V3 clearance
Widen power traces
Optimize placement
J5
J3
D2
D1
J1
J2
J4
J4 EH - U3 GND
J4 EH - U3 GND
J4 EH - U3 GND
J1 GND - J1 GND__1
GND
J4 EH - U3 GND
J1 GND - J1 GND__1
J1 GND - J1 GND__1
J1 GND - J1 GND__1
J4 EH - U3 GND
J4 EH - U3 GND
J4 EH - U3 GND
J4 EH - U3 GND
J1 GND - J1 GND__1
J1 GND - J1 GND__1
J1 GND - J1 GND__1
J1 GND - J1 GND__1
J4 EH - U3 GND
J1 GND - J1 GND__1
J4 EH - U3 GND
J4 EH - U3 GND
J4 EH - U3 GND
J4 EH - U3 GND
J4 EH - U3 GND
J1 GND - J1 GND__1
J4 EH - U3 GND
J1 GND - J1 GND__1
J1 GND - J1 GND__1
J4 EH - U3 GND
J4 EH - U3 GND
GND
J1 GND - J1 GND__1
J4 EH - U3 GND
J1 GND - J1 GND__1
J4 EH - U3 GND
J4 EH - U3 GND
J1 GND - J1 GND__1
J1 GND - J1 GND__1
J1 GND - J1 GND__1
J1 GND - J1 GND__1
J4 EH - U3 GND
J4 EH - U3 GND
J4 EH - U3 GND
C7
Capacitance
150uF
U2 PB1 - U1 ~{OE}
U4 OUT - J3 VBUS
J1 DP1 - J1 DP2
J3 DP1 - J3 DP2
J2 DP1 - J2 DP2
J2 DN1 - J2 DN2
U2 AREF/PB0 - U1 S
C4
Capacitance
100nF
J3 DN1 - J3 DN2
J1 DP1 - J1 DP2
J2 DN1 - J2 DN2
J1 CC1 - R1 P1
J4 VBUS - U3 IN
U3 OUT - U1 VCC
J4 CC1 - R5 P1
U2 XTAL2/PB4 - U4 EN
J3 DP1 - J3 DP2
J3 CC2 - R8 P2
U2 AREF/PB0 - U1 S
U3 OUT - U1 VCC
J1 VBUS__1 - D1 VBUS
J3 DP1 - J3 DP2
U2 ~RESET~/PB5 - J5 RST
J2 CC1 - R3 P1
U2 PB1 - U1 ~{OE}
U2 XTAL1/PB3 - SW1 1
J1 VBUS__1 - D1 VBUS
J2 DP1 - J2 DP2
U3 OUT - U1 VCC
U4 EN - C1 P1
U4 EN - C1 P1
U2 PB1 - U1 ~{OE}
U2 XTAL2/PB4 - U4 EN
U2 AREF/PB0 - U1 S
U3 OUT - U1 VCC
U4 EN - C1 P1
J3 DP1 - J3 DP2
U4 EN - C1 P1
J2 DN1 - J2 DN2
J1 DN1 - J1 DN2
C2
Capacitance
2.2uF
C3
Capacitance
10uF
J2 CC2 - R4 P1
J1 DN1 - J1 DN2
C6
Capacitance
100nF
U2 XTAL2/PB4 - U4 EN
J1 CC1 - R1 P1
J1 DP1 - J1 DP2
U4 EN - C1 P1
C5
Capacitance
100nF
U4 EN - C1 P1
J1 DN1 - J1 DN2
J1 DN1 - J1 DN2
J2 DN1 - J2 DN2
U4 OUT - J3 VBUS
U2 PB1 - U1 ~{OE}
J2 DP1 - J2 DP2
J3 DN1 - J3 DN2
U3 OUT - U1 VCC
J2 DP1 - J2 DP2
J1 DP1 - J1 DP2
J4 CC1 - R5 P1
J4 VBUS - U3 IN
U2 XTAL1/PB3 - SW1 1
U2 PB2 - J5 SCK
U4 EN - C1 P1
J4 CC2 - R6 P1
J3 VBUS__1 - C7 P1
J4 CC2 - R6 P1
U2 ~RESET~/PB5 - J5 RST
J3 DN1 - J3 DN2
U2 AREF/PB0 - U1 S
J2 CC1 - R3 P1
U2 PB2 - J5 SCK
U3 OUT - U1 VCC
U3 OUT - U1 VCC
U2 ~RESET~/PB5 - J5 RST
U2 XTAL1/PB3 - SW1 1
J2 DN1 - J2 DN2
J2 VBUS__1 - D2 VBUS
U3 OUT - U1 VCC
J1 CC2 - R2 P1
J2 VBUS__1 - D2 VBUS
J2 DP1 - J2 DP2
J3 CC1 - R7 P2
J1 DN1 - J1 DN2
J3 VBUS__1 - C7 P1
U3 OUT - U1 VCC
C1
Capacitance
1uF
J2 CC2 - R4 P1
J3 DN1 - J3 DN2
J1 CC2 - R2 P1
J3 CC1 - R7 P2
U3 OUT - U1 VCC
J1 DP1 - J1 DP2
J3 CC2 - R8 P2
U4
R9
Resistance
10kΩ
R7
Resistance
56kΩ
R8
Resistance
56kΩ
R1
Resistance
5.1kΩ
R11
Resistance
100kΩ
SW1
R2
Resistance
5.1kΩ
R4
Resistance
5.1kΩ
R6
Resistance
5.1kΩ
U2
R12
Resistance
100kΩ
R10
Resistance
10kΩ
R13
Resistance
100kΩ
R3
Resistance
5.1kΩ
U3
R5
Resistance
5.1kΩ
U1

Refine this doc
Ask about this doc
Board Bring-Up Plan — USB 2.0 Host Switch
Prerequisites
  • Equipment: multimeter, current-limited 5 V bench supply or protected USB-C 5 V source, oscilloscope if available, AVR ISP programmer, sacrificial USB2 host/hub for first tests.
  • Firmware: see the firmware starter project file.
  • Safety: do not connect expensive laptops or the DAC during first power-on. Do not connect J3 to a PC, charger, power bank, or other source/DFP.
1. Visual Inspection
  • Confirm U1 TS3USB30EDGSR, U2 ATTINY85V-10SU, U3 MIC5205-3.3YM5, U4 TPD3S014, J1/J2/J3/J4, D1/D2, SW1, J5, R1-R13, and C1-C7 are populated.
  • Check USB-C connector soldering for bridges, especially D+/D−, CC, VBUS, and GND pins.
  • Confirm C7 is the intended 150 uF capacitor footprint and orientation if a polarized capacitor is used.
  • Confirm no solder bridges on U1 VSSOP pins.
2. Power Rail Verification

Table


RailSourceExpected VoltageToleranceMeasure AtCurrent LimitPass Criteria
5V_EXTJ4 USB-C power input5.0 V±5%J4 VBUS, U3 IN, U4 INStart 50-100 mABoard powers without overcurrent
3V3U3 MIC5205 OUT3.3 V±3% initial targetU3 OUT, U1 VCC, U2 VCCIncluded in 5V_EXT limit3.2-3.4 V
VBUS_HUBU4 OUT, MCU-enabled0 V before firmware; ~5 V after firmware enables±5%U4 OUT, J3 VBUS500 mA continuous targetOff during reset, on after firmware
HOST_A_VBUSJ1 host~5 V only when Host A connectedHost-dependentJ1 VBUS, D1 VBUSNo board load intendedIsolated from 5V_EXT/HOST_B_VBUS
HOST_B_VBUSJ2 host~5 V only when Host B connectedHost-dependentJ2 VBUS, D2 VBUSNo board load intendedIsolated from 5V_EXT/HOST_A_VBUS
Procedure:
  1. With no cables attached, measure resistance from 5V_EXT, 3V3, VBUS_HUB, HOST_A_VBUS, and HOST_B_VBUS to GND.
  2. Confirm HOST_A_VBUS is not shorted to HOST_B_VBUS, 5V_EXT, or VBUS_HUB.
  3. Power J4 from a current-limited 5 V source at 50-100 mA.
  4. Confirm 5V_EXT is ~5 V and 3V3 is ~3.3 V.
  5. Before firmware runs, confirm U1 ~OE is high and U4 EN is low if possible.
  6. After programming firmware, confirm VBUS_HUB turns on only when firmware enables U4.
  7. Load-test VBUS_HUB with a resistor/e-load before attaching the real hub. Test 100 mA first, then 500 mA.
3. Critical Signal Verification

Table


SignalNet NameExpected StateMeasure AtNotes
USB mux selectMUX_SEL_MOSILOW for Host A, HIGH for Host BU1 S / U2 PB0Shared with AVR ISP MOSI
USB mux disconnectMUX_OE_MISOHIGH = disconnected, LOW = connectedU1 ~OE / U2 PB1R11 pulls high during reset
Hub VBUS enableHUB_VBUS_ENLOW during reset, HIGH when hub VBUS enabledU4 EN / U2 PB4R13 pulls low during reset
ResetAVR_RESETPulled HIGH to 3V3U2 RESET / J5 RSTPulled up by R9
Switch inputSWITCH_REQUESTHIGH idle, LOW pressedU2 PB3 / SW1Pulled up by R10
Procedure:
  1. Program the firmware with J1/J2/J3 disconnected.
  2. Confirm U1 ~OE transitions high during switching and low after the guard delay.
  3. Confirm U1 S changes only while U1 ~OE is high.
  4. Confirm U4 EN can be toggled by firmware and VBUS_HUB follows it.
4. Connector and Interface Tests

Table


ConnectorTypePins to VerifyTest Method
J1USB-C Host A UFP-facingCC1/CC2 Rd, D+/D−, isolated VBUS, GNDResistance and continuity; then sacrificial host enumeration
J2USB-C Host B UFP-facingCC1/CC2 Rd, D+/D−, isolated VBUS, GNDResistance and continuity; then sacrificial host enumeration
J3USB-C hub DFP-facingCC1/CC2 Rp, VBUS_HUB, D+/D−, GNDVerify with hub only; never connect to a source/host
J4USB-C power inputCC1/CC2 Rd, VBUS, GNDVerify 5 V input and CC pull-downs
J5AVR ISPMISO, MOSI, SCK, RST, VCC, GNDProgrammer target-detect and flash test
Procedure:
  1. With power off, verify CC resistors: R1-R6 are 5.1 kΩ to GND; R7/R8 are 56 kΩ to 5V_EXT.
  2. Verify J1/J2 host VBUS rails remain isolated from each other and from 5V_EXT.
  3. Use short, known-good USB2-capable cables for first data tests.
  4. Test Host A path first with one sacrificial host and a simple self-powered hub.
  5. Test Host B path second.
  6. Test switching with keyboard/mouse first, then DAC, microphone, and webcam.
5. Programming and Debug Interface

Table


InterfaceSignalsConnectorTool
AVR ISPMOSI/PB0, MISO/PB1, SCK/PB2, RESET/PB5, 3V3, GNDJ5USBtinyISP, USBasp, or equivalent AVR ISP
Procedure:
  1. Disconnect J1, J2, and J3 before programming.
  2. Connect programmer to J5.
  3. Confirm programmer sees the ATtiny85 target at 3.3 V.
  4. Flash the firmware starter image.
  5. After flashing, verify SW1 causes U1 ~OE and U1 S to sequence correctly.
6. Functional Validation

Table


TestComponents InvolvedInputExpected OutputPass Criteria
Initial Host A connectionU1, U2, J1, J3Power on with hub connected to J3 and host on J1Hub enumerates on Host AHost sees hub and simple USB device
Host B connectionU1, U2, J2, J3Toggle SW1Hub enumerates on Host BHost B sees hub and devices
Break-before-makeU1, U2Press SW1~OE high before S changesNo momentary short/cross-connect
Hub VBUS controlU2, U4, J3Firmware toggles HUB_VBUS_ENVBUS_HUB turns off/onVBUS_HUB follows U4 EN without 5V_EXT brownout
DAC transitionU1, U2, U4, hub, DACToggle between hostsDAC re-enumerates high-speed/working audioNo low-speed distorted-audio failure
7. Expected Measurements Reference

Table


MeasurementLocationExpected ValueToleranceInstrument
5V_EXTU3 IN / U4 IN5.0 V±5%DMM
3V3U3 OUT / U2 VCC3.3 V±3% targetDMM
CC RdJ1/J2/J4 CC pins to GND5.1 kΩ±1% resistor toleranceDMM
CC RpJ3 CC pins to 5V_EXT56 kΩ±1% resistor toleranceDMM
VBUS_HUB offU4 OUT before firmware enable0 Vnear 0 VDMM
VBUS_HUB onU4 OUT after firmware enable~5.0 V±5%DMM
USB D+/D− pairJ1/J2/J3 to U1Continuity, no shortsNo D+/D− shortDMM; scope optional
Known Prototype Caveats
  • J3 is intended only for the self-powered hub upstream/UFP connection. Do not plug J3 into a computer, charger, or power bank.
  • J1 and J2 both present USB-C sink Rd resistors; connected hosts may source VBUS even when not selected.
  • The first revision does not include a full USB-C port controller or attach detection.
  • TPD3S014 is a 500 mA USB switch, but fault current can be higher than 500 mA before current limiting/thermal protection.
  • USB 2.0 high-speed performance depends strongly on 4-layer layout, short differential routing, and correct ESD placement.
Pass/Fail Summary

Table


Test SectionResultNotes
Visual Inspection[ ] Pass / [ ] Fail
Power Rails[ ] Pass / [ ] Fail
Critical Signals[ ] Pass / [ ] Fail
Connectors[ ] Pass / [ ] Fail
Programming[ ] Pass / [ ] Fail
Functional Validation[ ] Pass / [ ] Fail
Board Status: [ ] Ready for extended testing / [ ] Requires rework
  • Prerequisites

  • 1. Visual Inspection

  • 2. Power Rail Verification

  • 3. Critical Signal Verification

  • 4. Connector and Interface Tests

  • 5. Programming and Debug Interface

  • 6. Functional Validation

  • 7. Expected Measurements Reference

  • Known Prototype Caveats

  • Pass/Fail Summary

USB 2.0 Host Switch

USB 2.0 Host Switch thumbnail
Externally powered USB 2.0 high-speed switch that toggles one downstream self-powered hub between two USB-C host computers with stable break-before-make switching for USB audio reliability.

Properties

Properties describe core aspects of the project.

Pricing & Availability

Distributor

Qty 1

Arrow

$1.67–$3.12

Digi-Key

$4.02–$4.25

HQonline

$5.41–$5.61

LCSC

$8.39–$8.64

Mouser

$6.80

TME

$5.20

Verical

$4.07–$6.75

Controls