Touch Screen Cable Tracer / Cable Tester




Introduction: Touch Screen Cable Tracer / Cable Tester

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…

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!!


Step 1: Gather the Materials

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

Step 2: Prepare the Arduino

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 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 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

Step 3: Print the 3d Case

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.

Step 4: Building Your Own Cable Tracer Shield

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.

Step 5: Assemble the Cable Tracer

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.

Step 6: Get to Work Testing Cables!

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!

Be the First to Share


    • Game Design: Student Design Challenge

      Game Design: Student Design Challenge
    • Make it Glow Contest

      Make it Glow Contest
    • Block Code Contest

      Block Code Contest



    Question 6 weeks ago on Step 2


    to your very nice device. I will now build my own part. Now I have on my
    workbench an Arduino Mega with TFT-Display. All worked together. I checked it
    out in the manual mode only for USBA to USB Micro. It worked nice. But
    something troubled me.

    • 1.Changed wire are shown as good(green
      line). I can only during reading the Pin Numbers on the icons detect that they
      are wrong.
    • 2.Broken wire or not connected wire are
      simply not shown( e.g. for 4 wire it will be in case USBA only shown 3 wire).
      There is no notice or warning about missing wire. Of course, by 4 wire it is easily
      to discover, but in case USB C it would be more difficult.

    My used sketch
    is: Touch Screen Cable Testing Tool By TechKiwiGadgets Oct 2021. Perhaps it is
    an update availability?

    Thank you

    Question 4 months ago

    My friend, congratulations on this excellent project. Could there be a model for the fixed ethernet cable? I am doing network setup. I'm pulling cables to remote locations. It is very difficult to bring both ends together. What can we do?


    Reply 4 months ago

    Hi you could put a loop back connector on one end of the cable then put the unit in manual mode. This would test connectivity of the UTP pairs


    Question 5 months ago on Step 5

    Why there are 4 directory files ? (see attached Picture copy)
    And Wich directory I have to televerse in Mega 2560 v3E (see attached card information)
    Best regards


    8 months ago

    Hi !
    Fun project. I'm thinking about similar project...
    Anyway... I've just one question about pins uses ILI9341. Following pins from ILI9341.
    There 's mistake somewhere... Are you used really ILI9341?
    Pins on ILI9341 j4 are :
    on your PCB is:
    RST, 3V3,5V,GND, GND, Vin
    Some mistaken ?
    Thanks !

    Anjin Meili
    Anjin Meili

    Tip 1 year ago on Introduction

    I see a lot of comments about the LCD. I dug in my junk drawer and found a couple unknown, but fit kinda left overs from years go past. But when I built and ran 'diagnose_TFT_support', it discovered both LCD panels and provided the ID. It also instructed me to look that up in the 'MCUFRIEND_kbv/extras/mcufriend_how_to.txt'. From there, I learned my next step was to insure the two ID's had macros defined. As well, build and run 'MCUFRIEND_kbv/tools/TouchScreen_Calibr_native.ino'. Which found my display, did a touch screen setup, and then spit back at me with info like:

    XP=6,XM=A2,YP=A1,YM=7; ID=0x7783

    Which I went back to the Touch Screen Cable tracer source, and used to setup the defines at the top. TS_LEFT=TS_MINX, TS_RT=TS_MAXX, etc.

    And finally, after testing, I had to set 'tft.setRotation' to 3. The touch screen buttons were mapped to the wrong side of the display.

    Good luck and have fun.. Might also note that at the end of the library readme, it notes:

    'Adafruit_Touchscreen might need: typedef volatile uint32_t RwReg;'



    1 year ago

    I am looking for the 2.8 inch touch screen display for the 3-D case shield. Without a readable schematic one has no way of knowing what signals the display must have for headers H1, H2, H3, and H4. The one is Touch-Screen-Cable-Tracer.pdf it too pixelated. I think the ELEGOO EL-SM-004 might work, but I am not sure.


    Reply 1 year ago

    Yes, that is the one I used. Had to set rotation to 3, but it plugged right in, and worked!


    Reply 1 year ago

    I'll put a link in the parts description to the model I have successfully used. Ill also put a pdf of the schematic in the instructable.


    1 year ago on Step 6

    This is great. I have 2 suggestions:
    1) add a connector (or solder pads, vias) for 13, RST, GND so it would be easy to add an arduino reset button, and external LED (for the built-in) to check the arduino is running or to reset the arduino (rather than pulling the plug)
    2) Have "decals" so I can label the ports without staring into the connector. They could be 3D printed in a contrasting color and super glued on,


    Reply 1 year ago

    I got my TFT today - I got and it used an il9341 and rotation 3 (it has the pins at the top and bottom, and not one side). My project is complete - I have already found a few bad "data" cables. I also bought the completed shield from TechKiwiGadgets.


    Question 1 year ago

    Hi, is there any chance to add a shield to test HDMI cables?


    Answer 1 year ago

    Yes for passive HDMI I will look at including that in the next batch. Thanks for the feedback.


    1 year ago

    I think this would make a great crowd funded project. I have so many cables with flags on the saying power only, but that process is currently trial and error.


    Reply 1 year ago

    Yes same here, was one of the inspirations for this project :)


    1 year ago

    I purchased the 3-D case and it arrived pre-assembled. What type and size are the three mounting screws? I need to remove to install Mega2560.


    Reply 1 year ago

    Hi, they are M3 Allen Button Head Screws which can be removed with a 2mm Allen Key. You can use a Torx screwdriver or as a last resort a flat head screwdriver to get out as they should not be tight. I think next time I use Philips I just use these as they look cool and are common in 3d printing mechanisms. Email me if you have any issues and good luck with the assembly. Doug (


    Reply 1 year ago

    I was able to use a 2mm Alen Key to remove sheild and mount Mega 2560. Thank you.

    Hi, looks nice, butz I have a problem: in my maker box I have an ILI9341 display, this display is only illuminated with no signs on the screen. Do I have to change something in the code? Can you give me advice, please?


    Reply 1 year ago

    Hi, please check that the correct libraries are loaded as above as they are specific to getting this screen working with the Mega. If it continues to be a problem it might be the controller type in the screen (it's hard to tell even with screens side by side) and I have another code base I will post for you to use. let me know how you get on.