Touch Screen Cable Tracer / Cable Tester

by TechKiwiGadgets in Circuits > Arduino

28000 Views, 304 Favorites, 0 Comments

Touch Screen Cable Tracer / Cable Tester

new front cover.jpeg
Instructables Cable Tracer Gif.gif
IMG_20210921_231604.jpg
IMG_20210922_174528.jpg
IMG_20210922_174259.jpg
IMG_20210912_164027.jpg
IMG_20210912_164009.jpg
IMG_20210912_164019.jpg
IMG_20210922_174902.jpg
Old vs new.jpeg

Diagnose the type and integrity of USB and RJ45 cables with this Touchscreen Cable Tracer. Identify the exact wiring configuration, diagnose broken wiring, and plug pin connections.

  • Test over 10 cables types using RJ45, USB B/B3, USB A/A3, USB C, USB Mini, USB Micro/Micro3
  • Touch screen menu Auto Detect Mode and Manual Mode for a deeper diagnosis
  • Displays Loop-back of pins on any of the input and output ports in use

Based on a previous TechKiwiGadgets project this Touch Screen Cable Tracer is 70% smaller, uses an Arduino Shield that eliminates over 20 hours of meticulous soldering, and uses snap-together parts with minimal soldering.

_______________

Latest Update!!!: Touch Screen Cable Tracer kit-set is now available here. If you are wanting to build your own then check this out!!

_______________

Gather the Materials

IMG_20210921_230640.jpg
IMG_20210913_221610.jpeg
IMG_20210913_221648.jpeg

I have tried to minimise the number of parts to make this more accessible to makers of all skill levels

  1. Arduino Mega 2560 Board or Arduino Due
  2. Cable Tracer Arduino Mega Shield - Two options
  3. ILI9341 2.8" TFT Touch Screen x 1(Note: ILI9341 is required is you use Arduino Due)
  4. Case - 3d Printed model with 3 parts provided in instructable
  5. 1m length USB A cable x 1 - used to connect USB charger to Cable Tracer unit
  6. USB A charger - used to power the unit
  7. OPTIONAL - USB power boost line DC 5V to DC 9V
  8. 3 x M3 diameter 8mm length screws
  9. 3 x 3mm washers - 3d printed model provided
  10. Double Row Header Connector Strip 2.54mm - 1 of 18x2
  11. Single Row Header Connector Strip 2.54mm - 5 of 8x1 and 1 of 6x1

Prepare the Arduino

IMG_20210925_123554.jpg
IMG_20210925_123427.jpg
IMG_20210925_123531.jpg
IMG_20210925_123541.jpg
IMG_20210925_123808.jpg
IMG_20210925_123751.jpg
Screenshot 2021-09-25 3.17.46 PM.png

It's important to step through these instructions to ensure each of the components are progressively tested.

Load the Code into Arduino Mega

Place the Arduino Mega on a hard flat, non-conductive surface.

Load the Arduino IDE into your Windows/Mac machine following the instructions outlined here on the Arduino.cc site here

Connect the Arduino Mega to your USB port using the USB A to B cable provided by the manufacturer of the board. Ensure the board is on a non-conductive surface so there will be no electrical shorts.

In order to get the Screen to work with the Arduino Mega, there need to be very specific libraries loaded in the Arduino IDE. I have included these in a ZIP folder below for convenience.

Start by removing the following libraries from the /Arduino/Libraries folder on your PC/Mac

  • SPI.h
  • Adafruit_GFX.h
  • MCUFRIEND_kbv.h
  • TouchScreen.h

Then download the CableTracerLibraries.zip from here.

Extract the files into the /Arduino/Libraries folder on your PC/Mac

Load the code provided here. There is also a utility provided to help identify LCD type if you have issues. Press the upload button and once the code is loaded successfully disconnect the USB cable from power.

Test the 2.8" TFT screen on the Arduino Mega

With the USB cable or power cable disconnected from the Arduino Mega insert the Screen carefully into the Mega ensuring the pins are aligned.

Apply power to the USB port and check that the Splash Screen is displayed correctly and the touch screen menu works correctly.

NOTE: If you get a White screen after loading the code you may find your screen uses a different controller. I have provided two variations of the code which should address the issue.

Attach the external Power to the Arduino Mega

There are 3 options open to you on this. I recommend Option 2 or 1 to avoid soldering.

1. Procure a standard 9v DC power adapter for the Arduino Mega similar to this here.

2. Procure a USB A to 9v adaptor plug like this to avoid the need for soldering

3. Solder a USB cable directly to the base of the Arduino Mega. NOTE: Not recommended if you are new to soldering!! Take a 1m USB A plug connector cut off the other end giving you approx 1m of cable. Strip the cable back to expose the 4 wires - Red, Black, Green and White. Use a soldering iron to carefully attach the wires to the back of the Arduino Mega

Print the 3d Case

IMG_20210926_193820.jpeg
IMG_20210921_230319.jpg

The Case has four component pieces to print as can be seen in the pictures above

  • Case Lid
  • Case Base
  • Lid Decal
  • Washers x3

I used PLA and chose a combination of Blue and Green however it is over to you on colour combinations.

The files can be found here on Thingiverse.

Note: Due to popular request a new option for a deeper base unit to accommodate batteries has been added and a new PCB rim added to make the PCB sit more snuggly in case.

Building Your Own Cable Tracer Shield

IMG_20210913_221655.jpeg
IMG_20210913_221648.jpg
Screen Shot 2021-09-25 at 7.35.28 PM.png
Screenshot 2021-09-25 5.51.44 PM.png
Screenshot 2021-09-25 5.51.00 PM.png
Screenshot 2021-09-25 5.59.44 PM.png
Screen Shot 2021-09-25 at 7.31.41 PM.png
Screen Shot 2021-09-25 at 7.32.01 PM.png
Screen Shot 2021-09-25 at 7.34.38 PM.png
Screen Shot 2021-09-25 at 7.35.22 PM.png

This section is for you if you choose to build your own Cable Trace Shield. It outlines how you can order a prefabricated PCB and have most of the components pre-installed on one side of the PCB. Interestingly the whole process from time from order to delivery by DHL from JLPCB to New Zealand took less than 7 days which was impressive considering this was during a COVID L4 lockdown!

I have provided the schematic so you can choose to design and order your own Cable Tracer Shield PCB from JLPCB or use the files provided to just order to my design specification.

When ordering you can also choose to have just the PCB manufactured and then install your own components or you can employ JLPCB to provide and install most of the parts on one side only at manufacture.

Option 1 - Order PCB using my design

  1. Navigate to the JLPCB site and create a new account. The overall process is painless requiring you to upload the PCB design, Parts, and Placement files then you are presented with a Quote with freight.
  2. Go to the "Order Now" section of the site
  3. Download the TechKiwiGadgets files located here.
  4. Use the "Add Gerber File" button to upload the Gerber File. This will import the design and give you a view of the PCB and its attributes. Scroll down to the bottom of the page and review the settings. As this is a tested design I recommend leaving the parameters and just focus how many boards you want to be ordered.
  5. If you want components installed you need to turn on the switch for "SMT Assembly" which will bring up additional fields. You will be asked to upload two further files which again have been provided below.
    • Upload the component BOM file
    • Upload the Pick and Place file provided
  6. Points worth noting before finalizing the order
    1. "SMT Assembly" can only be added to one side of the PCB in the manufacturing process. For this reason, I manually soldered in the Header Pins for the Arduino Mega.
    2. Some components may be unavailable due to stock variability. In some cases, there are alternatives that can be selected. If not available then it becomes a component you need to source and add manually.
  7. If you want to solder the boards yourself I recommend you order a solder mask that can be ordered with the PCBs which allows you to easily apply solder paste onto the PCB before using a heated bed or air gun to finish the process.
  8. Follow the process and place the order for your PCB!

Option 2 - Design your own PCB

  1. Firstly, navigate to the JLPCB site here and create a new account.
  2. Once logged in Navigate to EasyEDA designer tool here
  3. Tutorials for EasyEDA can be found here and there are multiple YouTube tutorials available so I will not go into a blow-by-blow description of how to design a PCB.
  4. However, I have provided you with a schematic circuit diagram above that you can copy and select your own components and board layout.

Assemble the Cable Tracer

IMG_20210921_230827.jpg
IMG_20210921_230847.jpg
IMG_20210921_231131.jpg
IMG_20210921_231145.jpg
IMG_20210921_231159.jpg
IMG_20210921_231343.jpg
IMG_20210913_173010.jpg
IMG_20210921_231523.jpg
IMG_20210921_231500.jpg
IMG_20210921_231515.jpg

Assembly at this point is very simple!

  1. Preparation - Using a firm non-conductive surface, carefully separate the LCD from Arduino Board ensuring you do not flex the LCD or put pressure on the orange ribbon cable.
  2. Attach the LCD - Gently press the LCD into the Cable Tracer Sheild ensuring the pins are aligned to the header sockets. Once in place double-check all pins are in the correct position.
  3. Attach the Arduino - Take the Arduino and carefully press into the header pins provided on the underside of the Cable Tracer Sheild.
  4. Perform a Quick Test - At this point, it is worth plugging the unit into a USB power source to do a quick functional test and to ensure there are no issues. With no external cables attached, there should be no connections counted at the bottom left of the screen and the touch screen should be operating.
  5. Mount Shield in Lower Case - Orient the lower case and Cable Tracer Sheild so that they close together. Carefully thread the USB A cable through the "Chord Grip" taking care that when the unit sits in the base uninhibited by the cable. See the photo provided.
  6. Screw Shield into the Lower Case - I have provided a 3d model to print 3 x washers. These protect the upper circuit track from metal screw damage when they are screwed into the base. So carefully put those in place ensuring not to over tighten.
  7. Secure the Decal into the Lid - Take the Colourful Decal and press this into the Lid so that it clicks into place. It will only fit one way. Once pushed into place put a small dab of hot glue in each corner to avoid movement.
  8. Attach the Lid - The lid and base have been specifically designed and printed to fit the Cable Tracer Base unit snuggly. If there are any issues message me and I will send you the source files so you can adjust the model. Do not glue the lid and base together until testing is completed.

Get to Work Testing Cables!

IMG_20210922_174506.jpg
IMG_20210922_174528.jpg
IMG_20210922_174639.jpg
IMG_20210922_174953.jpg
IMG_2786.jpeg
IMG_20210922_174225.jpg
IMG_20210922_174259.jpg
IMG_20210922_174853.jpg
IMG_20210921_191612.jpeg
IMG_20210922_175115.jpg
IMG_20210922_175134.jpg
IMG_20210922_174943.jpg
IMG_20210922_175208.jpg
IMG_20210922_174117.jpg
IMG_20210922_174154.jpg
IMG_20210922_175245.jpg
IMG_20210922_175310.jpg
IMG_20210922_175401.jpg
IMG_20210922_175429.jpg
IMG_20210922_175519.jpg
IMG_20210922_175549.jpg
IMG_20210922_174752.jpg
IMG_20210922_174812.jpg
IMG_20210922_174359.jpg
IMG_20210922_174022.jpg
IMG_20210922_175021.jpg
IMG_20210922_175042.jpg
Not all USB Cables are the same !! Example of USB A to USB C comparison using cable tracer

Now the exciting part. Hopefully, you now have a fully functioning unit. The Cable Tester is designed to Test over 10 cables types using RJ45, USB B/B3, USB A/A3, USB C, USB Mini, USB Micro/Micro3.

The Cable Tracer has two modes - AUTO and Manual

Auto Mode

This mode is the default mode and uses predetermined cable conditions to identify and then display input and output cable configurations.

You will notice that there are two counters in the bottom LHS of the screen. "Pre" and Post" are used to trigger a redraw of the screen configuration. If there is a change in cable connectivity then this will be triggered.

Manual Mode

In order to use manual mode, you need to disconnect any cables under test. Then at the home screen touch the "Manual" Button

You will now be presented with a menu of cable options that you can choose from. These options force the cable tracer to display the Cable Connectors selected. Plug one end in at a time to see the effect of doing this. You will be able to see which pins are looped back at the end of the cable before connecting to the other end. This is useful to identify shorted cables, open pins, damaged or loose plugs.

Using the Tester

My advice is to start with Auto Mode when first testing cables. If the test cable is unusual or sufficiently damaged that the Auto Mode is not identifying the cable then switch to manual mode.

I have found many examples of where the unit has identified underlying problems

  • USB C cables missing 2 or 3 ground or VCC pins when they should have 4 of each
  • USB C cables that won't charge some devices because the device requires data pins to be looped back (see earbud example in first picture above)
  • USB cables with shorted pins or open pins that will change but not transfer data between devices
  • USB B V2 Cables used attempted to be used when USB B V3 required
  • RJ45 crossover cables mixed up with straight-through patch panel cables

Not All Cables are the same - Despite their appearance!!

There are other instances of USB A to USB C cables that look identical to the eye however are using V2 and V3 USB standards which can be seen in the video above.

Now you have your own cable tracer you can use this to diagnose charging issues for friends and also clean out the house of all of those faulty or unusable cables that are sitting in various draws around the house - happy hunting!