Custom USB Switch Design
Table
| Rail | Source | Expected Voltage | Tolerance | Measure At | Current Limit | Pass Criteria |
|---|---|---|---|---|---|---|
| 5V_EXT | J4 USB-C power input | 5.0 V | ±5% | J4 VBUS, U3 IN, U4 IN | Start 50-100 mA | Board powers without overcurrent |
| 3V3 | U3 MIC5205 OUT | 3.3 V | ±3% initial target | U3 OUT, U1 VCC, U2 VCC | Included in 5V_EXT limit | 3.2-3.4 V |
| VBUS_HUB | U4 OUT, MCU-enabled | 0 V before firmware; ~5 V after firmware enables | ±5% | U4 OUT, J3 VBUS | 500 mA continuous target | Off during reset, on after firmware |
| HOST_A_VBUS | J1 host | ~5 V only when Host A connected | Host-dependent | J1 VBUS, D1 VBUS | No board load intended | Isolated from 5V_EXT/HOST_B_VBUS |
| HOST_B_VBUS | J2 host | ~5 V only when Host B connected | Host-dependent | J2 VBUS, D2 VBUS | No board load intended | Isolated from 5V_EXT/HOST_A_VBUS |
Table
| Signal | Net Name | Expected State | Measure At | Notes |
|---|---|---|---|---|
| USB mux select | MUX_SEL_MOSI | LOW for Host A, HIGH for Host B | U1 S / U2 PB0 | Shared with AVR ISP MOSI |
| USB mux disconnect | MUX_OE_MISO | HIGH = disconnected, LOW = connected | U1 ~OE / U2 PB1 | R11 pulls high during reset |
| Hub VBUS enable | HUB_VBUS_EN | LOW during reset, HIGH when hub VBUS enabled | U4 EN / U2 PB4 | R13 pulls low during reset |
| Reset | AVR_RESET | Pulled HIGH to 3V3 | U2 RESET / J5 RST | Pulled up by R9 |
| Switch input | SWITCH_REQUEST | HIGH idle, LOW pressed | U2 PB3 / SW1 | Pulled up by R10 |
Table
| Connector | Type | Pins to Verify | Test Method |
|---|---|---|---|
| J1 | USB-C Host A UFP-facing | CC1/CC2 Rd, D+/D−, isolated VBUS, GND | Resistance and continuity; then sacrificial host enumeration |
| J2 | USB-C Host B UFP-facing | CC1/CC2 Rd, D+/D−, isolated VBUS, GND | Resistance and continuity; then sacrificial host enumeration |
| J3 | USB-C hub DFP-facing | CC1/CC2 Rp, VBUS_HUB, D+/D−, GND | Verify with hub only; never connect to a source/host |
| J4 | USB-C power input | CC1/CC2 Rd, VBUS, GND | Verify 5 V input and CC pull-downs |
| J5 | AVR ISP | MISO, MOSI, SCK, RST, VCC, GND | Programmer target-detect and flash test |
Table
| Interface | Signals | Connector | Tool |
|---|---|---|---|
| AVR ISP | MOSI/PB0, MISO/PB1, SCK/PB2, RESET/PB5, 3V3, GND | J5 | USBtinyISP, USBasp, or equivalent AVR ISP |
Table
| Test | Components Involved | Input | Expected Output | Pass Criteria |
|---|---|---|---|---|
| Initial Host A connection | U1, U2, J1, J3 | Power on with hub connected to J3 and host on J1 | Hub enumerates on Host A | Host sees hub and simple USB device |
| Host B connection | U1, U2, J2, J3 | Toggle SW1 | Hub enumerates on Host B | Host B sees hub and devices |
| Break-before-make | U1, U2 | Press SW1 | ~OE high before S changes | No momentary short/cross-connect |
| Hub VBUS control | U2, U4, J3 | Firmware toggles HUB_VBUS_EN | VBUS_HUB turns off/on | VBUS_HUB follows U4 EN without 5V_EXT brownout |
| DAC transition | U1, U2, U4, hub, DAC | Toggle between hosts | DAC re-enumerates high-speed/working audio | No low-speed distorted-audio failure |
Table
| Measurement | Location | Expected Value | Tolerance | Instrument |
|---|---|---|---|---|
| 5V_EXT | U3 IN / U4 IN | 5.0 V | ±5% | DMM |
| 3V3 | U3 OUT / U2 VCC | 3.3 V | ±3% target | DMM |
| CC Rd | J1/J2/J4 CC pins to GND | 5.1 kΩ | ±1% resistor tolerance | DMM |
| CC Rp | J3 CC pins to 5V_EXT | 56 kΩ | ±1% resistor tolerance | DMM |
| VBUS_HUB off | U4 OUT before firmware enable | 0 V | near 0 V | DMM |
| VBUS_HUB on | U4 OUT after firmware enable | ~5.0 V | ±5% | DMM |
| USB D+/D− pair | J1/J2/J3 to U1 | Continuity, no shorts | No D+/D− short | DMM; scope optional |
Table
| Test Section | Result | Notes |
|---|---|---|
| Visual Inspection | [ ] Pass / [ ] Fail | |
| Power Rails | [ ] Pass / [ ] Fail | |
| Critical Signals | [ ] Pass / [ ] Fail | |
| Connectors | [ ] Pass / [ ] Fail | |
| Programming | [ ] Pass / [ ] Fail | |
| Functional Validation | [ ] Pass / [ ] Fail |
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