Arduino Cable Tracer

56,452

418

49

Introduction: Arduino Cable Tracer

About: I love the challenge of building unique things. My goal is to make technology fun and help individuals build the skills and the curiosity to experiment with some of the amazing technologies we have available t…

Instantly diagnose the type and integrity of USB cables with this Arduino Cable Tracer. Suitable to trace USB A, Mini, Mico, and USB-C cables this is very useful to identify the exact wiring configuration and also diagnose broken connections.

Step 1: Gather the Materials and Tools

The Arduino Mega board is an excellent option for this project because it can support both a display and provide an additional 48 digital pins to simultaneously trace each of the wires within a cable. For this prototype, I used existing cables with commonly used USB sockets.

Parts list

Tools

  • Access to a 3D printer with a Build Plate of 220mm (i.e Creality Ender 3)
  • Soldering Iron
  • Box cutter knife
  • Metal Ruler
  • Wooden chopping board
  • Heat Shrink insulation
  • Wire Strippers
  • Heat shrink air gun
  • Hot Glue Gun
  • Electronic PCB microscope (optional if you have issues with cable wiring)

Step 2: Print and Assemble the Case

Printing the Components

The 3D Print files and printing instructions are included in a Thingiverse link here for the Lid, Base, left, and right USB socket bezel and a screen mounting bracket.

Cleanup the items

Once the components are printed remove any excess plastic paying particular attention to the mounting holes and also the base unit which has provision for external power to the unit.

Step 3: Prepare the PCB

1. Cut the Vero Board to size

Use a pencil to mark out the dimensions of each Vero board

  • 1 of 16x6 holes
  • 2 of 8x5 holes
  • 2 of 17x5 holes

Ensure the orientation of the track is as described in the photo above.

Using a box cutter knife, metal ruler and a wooden chopping board carefully scour the correct size and carefully snap to the right size.

Cut a careful strip down the Vero with16x6 holes as indicated in the photo above. Use the blade of the box cutter to ensure there is no track between each hole.

2. Solder the Header pins

Carefully break the Arduino dual strip male header pins to fit in the Arduino Mega data sockets. Push the Vero boards into position with the track facing upwards. When satisfied solder the header pins into the Vero board.

3. Solder in the Vero Pins

Carefully push the Vero Pins into each of the Vero boards as indicated in the photo. You may need to use a small drill bit to widen the holes the pins are too tight.

Note that on the socket with dual header pins the Vero pins are spaced in a way to enable the wires to be soldered in with better clearance. See the photo above.

4. Mount the Stackable Header Sockets.

Push the stackable header pins onto the 2.8" TFT LCD screen and use this to position the screen on the Vero board. Carefully solder the Stackable header sockets into place as indicated in the picture above.

5. Alignment of the Screen Mounting Bracket

Now is a good time to position the 2.8" TFT LCD display in the Screen Mounting Bracket. This is best done with the screen turned on before you glue the screen mounting bracket into place. Take care to insert the Screen into the correct pins on the Arduino. When powered on you should be able to see the viewable area of the screen through the front panel. Once in the correct position, you can hot glue the screen mounting bracket into position however take care not to fasten the screen into place until all wiring is complete.

Step 4: Connect the USB Sockets to the Arduino Mega

1. Validate the cable configuration

I have provided a breakdown of color-coded wires to pin connections for the Arduino in a PDF document. Please note that some cables (particularly USB-C) may use different colors so in order to be certain it's best to use a multimeter to test each connection to a pin to be sure of the config. It can be a little difficult to do this because of the USB-C cable turned out to have 16 wires and 24 pins.

Hopefully, you don't have to do this and can follow my diagram above which shows which cable color is aligned. My suggestion is to try these and if there are issues use a multimeter.

If you do end up using a multimeter you will likely need to use a PCB microscope and a needle to strobe all of the pins in a USB C see photo above.

2. Cut and position the USB cables

Firstly using hot glue, position the USB sockets in the correct position. Then carefully position the Arduino and screen in the front panel and then put in place the USB cables. Cut the USB cables to the appropriate length so that they provide enough length to accommodate the position of the Arduino header pins.

3. Strip and Insulate Wires

Strip and insulate the cables with heat shrink so that any exposed shielding or earth wires are not exposed so as to avoid any short circuits occurring.

Strip and tin the ends of each of the wires carefully. You will find the USB-C wires will have aluminum foil shielding so remove this and use heat shrink to cover and hold them away from the chassis.

4. Connect wires to the Arduino

Carefully follow the wiring configuration table provided which shows the Arduino pin numbers, USB sockets and the associated pin numbers. Preload each connection with a piece of heat shrink so you can solder the joint and then slip heat shrink over the joint to hold and insulate the wire.

Do a final inspection with a microscope or magnifying glass and light up close to ensure there are no shorted terminals.

Step 5: Load and Test the Code

1. Load the Arduino Libraries

The standard GFX library does not support a 2.8 TFT screen however this can be addressed by a modified version provided here

Make sure this and other libraries are manually added to your Arduino IDE

  • Adafruit_GFX
  • Adafruit_TFTLCD
  • TouchScreen

2. Upload and Test the code

Upload the code via the Arduino IDE and on completion, you should see a color splash screen appear briefly on the LCD. The splash screen should clear and two arrows indicating port scanning are underway.

Step 6: Putting It All Together

1. Install the Power Source

Carefully position the USB Mini adapter into the base of the case. Take the USB A to USB B Arduino programming cable and connector the USB mini adapter. You are now ready for testing.

2. Final Testing

Attach power to the USB Cabe Tracer and if working correctly the splash screen should clear giving way to the scanning screen as per the video demonstration above.

Take a USB A Micro cable and plug one end into the left of the unit and one on the right. Try various cables to test the cable connections. You should see wires identified as in the video.

3. Your USB Cable Tracer in Action

Take a series of USB cables and try them out.

Diagnosing Faulty Cables - A faulty cable compared to a working cable will show missing wires. In the example above you will see D+ and D- wires disconnect when the cable is flexed.

Identifying the right cable - Some cables are only used for fast charging, have limited or no data wires. These explain why some cables do not work on some devices. You can use the Cable Tracer to compare cables to identify the correct cables to avoid disappointment and frustration.

4. Feedback on this prototype

If you are interested in this project and have a preference for a different type of cable tracing then please message me with your feedback as I will consolidate this feedback and if there is enough interest produce a PCB header that will eliminate the soldering.

Thanks in advance

Arduino Contest

Finalist in the
Arduino Contest

Be the First to Share

    Recommendations

    • Fandom Contest

      Fandom Contest
    • Stone, Concrete, Cement Challenge

      Stone, Concrete, Cement Challenge
    • Summer Fun: Student Design Challenge

      Summer Fun: Student Design Challenge

    49 Comments

    7
    ayavilevich
    ayavilevich

    12 days ago

    I like this project a lot! It would be much more valuable if it could test the resistance of each line. I find that the common problem with no-brand cables today is high resistance and hence voltage drop. This is a bigger issue for me than broken lines.

    1
    ctpearson
    ctpearson

    Reply 3 days ago

    I signed in to post a similar suggestion, but found this thread instead. :)

    I have to agree with @benmcl that this could be as simple as re-ordering the pins, so that the Vcc wires from each cable go to an analog input. Find the difference and you (obviously) have your voltage drop.

    To separate the "good" cables from the "bad", this should be more than enough. That's all that's really needed to quickly decide whether to keep a no-name cable that came with a new device.

    0
    Brian of Fairfield
    Brian of Fairfield

    Reply 11 days ago

    I have been thinking about testing cable resistance for a while on and off. What I'd come up with is a constant current 1 Amp supply with a maximum voltage of 1 Volt. That way an analogue meter movement can be used with Ohms on a linear scale from zero to one. Anything greater than 1 Ohm isn't worth reporting (for GND and VBUS). It may be worthwhile having a 100 mAmp range for testing data wires (in this case the meter would read from zero to ten Ohms).

    1
    benmcl
    benmcl

    Reply 12 days ago

    Agreed - I commonly have all 3 issues with USB cables, the 3rd one being voltage drops as you mentioned. The Arduino Mega has 16 analog inputs, more than enough to measure the voltage drop of all the V+ and GND lines of all 3 cable pairs. See: https://www.circuitbasics.com/arduino-ohm-meter/, where the unknown resistor is your USB cable and the 5v supply is actually the digital IO pin pulled high (the 1k resistor may need to be increased so the digital pin works normally for the connectivity scan).

    1
    ambrose.clarke
    ambrose.clarke

    Reply 12 days ago

    Yes, some cables, either old or just have cheap wiring, only charge with a much reduced current- and so are slower- sometime taking only half or less amps than others.
    If this is down just to the resistance of the wire it would he great to have displayed and make this even more useful.

    2
    GeekyTim
    GeekyTim

    12 days ago on Introduction

    I was planning to do a simpler version of this sort of thing at some time, but now I've seen this I want its awesomeness! Well done, great build.

    0
    TechKiwiGadgets
    TechKiwiGadgets

    Reply 4 days ago

    Thanks for the great feedback

    1
    awawawaw
    awawawaw

    4 days ago

    Nice work! You essentially made a small version of a professional cable tester like a Cirris 4200. They have 128 points and use adapter boards to match any cable. I have always thought of making something like what you have done and as such have done a lot of brainstorming on the idea over the years. You did an excellent job and covering many of the topics that need to be included. Well done!!!

    https://www.cirris.com/products/testers/item/199-4...

    1
    TINKERCAD_ROCKS
    TINKERCAD_ROCKS

    5 days ago on Step 6

    WOW! This project is the most bestest ever I've seen!

    0
    TechKiwiGadgets
    TechKiwiGadgets

    Reply 5 days ago

    Thanks am glad you like 👍

    0
    Gregg E.
    Gregg E.

    5 days ago on Step 4

    Replace the USB 2.0 Micro B with a USB 3.0 Micro B, which also serves for testing USB 2.0 Micro B. The only other one missing is the full size USB 3.0 B connector, that would also work for USB 2.0.

    0
    TechKiwiGadgets
    TechKiwiGadgets

    Reply 5 days ago

    Cool great feedback thanks. Am working on a PCB with these and other ports that means makers don't have to contend with all of the soldering. I Will post a photo of the next iteration when the boards arrive!

    2
    codebeat
    codebeat

    12 days ago

    Absolutely fantastic idea, +1000 kudos. Could be my next project. Maybe you can design adaptor sockets with a resistor that identify the type of socket. This makes a possible to extend the functionality of the testunit. For example to test HDMI cables, VGA cables, power cables, etc.

    1
    TechKiwiGadgets
    TechKiwiGadgets

    Reply 9 days ago

    Thanks great feedback am exploring options for this now

    1
    Wapata
    Wapata

    12 days ago

    Really GREAT ! Note that there is no USB-B socket because... USB-B never fail.

    0
    alexd1759
    alexd1759

    12 days ago

    Great project, thanks for describing it so clearly. It has got me thinking of all the other things that could be tested. In my case, the multitude of different solenoids used in industrial knitting machines. When the get old they start to "slow down" (usually because of small amounts of dirt and oil in the wrong place). The tricky bit is working out which ones need to be cleaned or replaced, the machine I am thinking about has 96 needle selector solenoids. Years ago I built a small strobe LED light to "stop" the "movement", any that are running slow show up nicely. The idea of being able to test parts at their connector without having to dismantle the machine is the exciting bit.

    0
    TechKiwiGadgets
    TechKiwiGadgets

    Reply 9 days ago

    Thanks for the feedback. Glad you liked :)

    2
    GailL34
    GailL34

    Question 12 days ago

    I love the idea but don't have the knowledge or supplies to make it! What's the cost of all this?