Arduino Mega Board – a great option for this project as it can support both a display and provide an additional 48 digital pins to simultaneously track each of the wires in the cable.
Tools and materials: – Arduino Mega 2560 board; – Arduino Mega USB A to USB B programming cable; – 2.8 inch TFT LCD; – Perforated board; – Pin headers (2 out of 8 pins, 2 out of 6 pins); – Pins 48 pcs.; – Two USB-C V3.0 cables; -Two USB-C – USB-C; -Two USB Mini – USB A adapters; -USB-Micro cable ;;
-USB-cable with a connector; -USB-A V3 with a connector; -3D-printer with a mounting plate 220 mm; -Soldering iron; -Build knife; -Metal ruler; -Cutting board; -Thermal insulation; -Wire stripping tool ;
-Pneumatic heat shrink gun;
-Hot glue gun; -Electronic microscope for printed circuit boards (option);
Step one: 3D printing of parts
First you need to print the parts of the case. All files for printing can be downloaded here. After printing, the parts must be cleaned.
Step two: board
Now you need to prepare the board.
First you need to cut the blanks from the perforated copper board.
One – 16×6 holes
Two – 8×5 holes
Two – 17×5 holes
Pins and connectors are soldered to the boards as on Photo. Installs boards on the Arduino module. Sets the screen.
Step three: connecting cables
The wizard provided the color-coded wire breakdown for pin connections for Arduino in the PDF document at the bottom of the step. Some cables (especially USB-C) may have different colors, so it is best to use a multimeter to test each pin connection to be sure.
Then use hot glue to fix the USB connectors in the correct position. Carefully place the Arduino and shield on the front panel, and then reinsert the USB cables. The USB cables must be cut to the desired length, sufficient to connect the pins of the Arduino connector.
The wires must be stripped, tinned and soldered according to the table. Then insulate to prevent short circuits.
USB Cable Tracer.pdf
Step four: software
The GFX standard library does not support 2.8 TFT screen, however this can be solved with a modified version presented here.
The following libraries are needed for the device to work:
After loading code through the Arduino IDE, a color splash screen appears briefly on the LCD. The splash screen should disappear and two arrows will indicate that a port scan is in progress.
The code can be downloaded below.
Connect any USB cable to the left and right sides of the device. The tracer should check the cable and display the results on the screen.
Compared to a working cable, a non-working device will show missing wires. In the video above, you can see the D + and D- wires disconnect when the cable is bent.
Some cables are only used for fast charging, have limited or no data wires. This explains why some cables don't work on some devices.