A simple, safe, and effective tool to verify USB cable continuity and validate soldering work on USB breakout boards using a Raspberry Pi.
This project solves the problem of testing "home-soldered" USB breakout boards without risking damage to a computer's USB port. It uses a Passive Loopback configuration where the Raspberry Pi sends safe 3.3V logic signals through the cable to test all four lines (VBUS, D-, D+, GND) independently.
Key Features:
- Safety First: Does not use the 5V USB rail; all testing is done at 3.3V GPIO logic levels.
- Cable Type Detection: Distinguishes between full "Data Cables" and cheap "Charge-Only" cables.
- Soldering Verification: Identifies specific pins (e.g., D+ or D-) that may have cold solder joints or bridges.
- Raspberry Pi 3 Model B (or compatible Model 3B+/4B/Zero)
- 1x USB Type-A Female Breakout Board
- 1x USB Micro-B Female Breakout Board (or Type-C/Mini depending on cable)
- Breadboard & Jumper Wires
- The USB cable you want to test
Connect the breakout boards to the Raspberry Pi GPIO header as follows.
| USB Signal | Wire Color | Sender (Type-A) | Receiver (Micro-B) |
|---|---|---|---|
| VBUS | Red | GPIO 17 (Pin 11) | GPIO 27 (Pin 13) |
| D- | White | GPIO 22 (Pin 15) | GPIO 23 (Pin 16) |
| D+ | Green | GPIO 24 (Pin 18) | GPIO 25 (Pin 22) |
| GND | Black | GPIO 5 (Pin 29) | GPIO 6 (Pin 31) |
- Clone this repository to your Raspberry Pi.
- Connect your hardware according to the diagram.
- Plug the USB cable you want to test into both breakout boards.
- Run the test script:
python3 test_cable.py - ✅ All PASS: The cable is a Data Cable, and your soldering is perfect.
- ❌ D+/D- FAIL (but VBUS/GND Pass): You have a "Charge-Only" cable (no data wires inside).
- ❌ All FAIL: Check your breadboard wiring or check for major soldering errors.
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
Copyright (c) 2026 Foad Sojoodi Farimani.
