Touch Screen Cable Tracer

14,184

225

47

Introduction: Touch Screen 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…

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 the popular Arduino Cable Tracer the 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.

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. ILI9325 2.8" TFT Touch Screen x 1 (Note: ILI9325 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. 3 x M3 diameter 8mm length screws
  8. 3 x 3mm washers - 3d printed model provided
  9. Double Row Header Connector Strip 2.54mm - 1 of 18x2
  10. 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 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 below. 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 USB Power Cable to the Arduino Mega - Note: This is not mandatory and if you want to avoid soldering wires to the PCB you can add a standard power supply connector to the Arduino Mega similar to this here.

I have chosen to use a USB A Cable to power and provide the ability to update the code of the unit without the need to disassemble the unit. Retain the 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

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

    Recommendations

    • Halloween Contest

      Halloween Contest
    • Micro:bit Contest

      Micro:bit Contest
    • Audio Challenge

      Audio Challenge

    47 Comments

    0
    grizgrover1
    grizgrover1

    12 hours 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.

    0
    TechKiwiGadgets
    TechKiwiGadgets

    Reply 11 hours 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.

    0
    grizgrover1
    grizgrover1

    2 days 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.

    0
    TechKiwiGadgets
    TechKiwiGadgets

    Reply 1 day 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 (techkiwigadgets@gmail.com)

    0
    grizgrover1
    grizgrover1

    Reply 12 hours ago

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

    0
    ing.friedrich.wilhelm

    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?

    0
    TechKiwiGadgets
    TechKiwiGadgets

    Reply 18 days 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.

    0
    TechKiwiGadgets
    TechKiwiGadgets

    Reply 18 days ago

    Hi, I have now uploaded a second version of the code that may address the white screen problem. If the problem still exists please try the second sketch labeled as "Touch_Screen_Cable_Tracer_InstructablesV1_Legacy_Mega"

    0
    ing.friedrich.wilhelm
    ing.friedrich.wilhelm

    Reply 18 days ago

    Hi, thank you. I think, I have a problem with the display. It shows still nothing, only highlighted. I tried the code from here: https://www.engineersgarage.com/checking-tft-lcd-d... and it shows only "LCD Driver Found = 00" in the serial monitor. I will order another display.
    The libraries are all installed, otherwise the IDE will not compile.

    0
    TechKiwiGadgets
    TechKiwiGadgets

    Reply 17 days ago

    Hi, I have reloaded a fresh IDE on my Mac and tested with two screens and got a white screen, I have found there are a very specific set of libraries required to get the screen working with the Mega. I have updated the instructions and provided a ZIP file of all libraries so can I suggest you follow those closely. This involves removing existing libraries and loading the new ones. I remember now back in V120 of the code changing the libraries to accommodate an Arduino Due and I suspect this was the cause, am now up to V220 so it was a while ago :) . Let me know if this works

    0
    bartsamnick
    bartsamnick

    Reply 22 hours ago

    Adafruit discontinued the ILI9341 and is now shipping model 1651. But it works with the Mega just fine when using the ILI9351 Library in a graphics test. But neither of your two variants work - I just get a white screen. I followed your instructions by replacing the libraries with your zip download. I had bought your preassembled case and board and now I'm not sure what to do. Can I just substitute the TFTLCD.h library with the ILI9351.h library?

    0
    TechKiwiGadgets
    TechKiwiGadgets

    Reply 16 hours ago

    Hi, thanks for raising this as it will be a problem for others.

    On closer inspection, I think the 1651 screen from Adafruit is backward compatible so it could be the identifier code is wrong. So I have loaded another version labeled 9351 so can you please check if that works ok and let me know. Unfortunately I don't have a 1651 to test however based on the fact you have it working with a Mega it should be easy to solve.

    0
    ing.friedrich.wilhelm
    ing.friedrich.wilhelm

    Reply 17 days ago

    Hi, I have tried to do it with the libraries from you. Now the screen is not white, it is striped, every second pixel row is black, and it is flickering irregularly to black for ~1ms.

    0
    TechKiwiGadgets
    TechKiwiGadgets

    Reply 17 days ago

    Ok understood. I have 2 different displays from different manufacturers which is why I produced two sketches labeled "Legacy" and "IL". Let me know if this helps.

    0
    ing.friedrich.wilhelm
    ing.friedrich.wilhelm

    Reply 17 days ago

    Applause, you can feel like i just gave you 10 beers (or more....), with the IL it's working now, thank you very, very, much!

    0
    TechKiwiGadgets
    TechKiwiGadgets

    Reply 16 days ago

    Nice work :)

    0
    Larryclose
    Larryclose

    20 days ago

    Is there room in the base for a LiPo battery?

    0
    TechKiwiGadgets
    TechKiwiGadgets

    Reply 19 days ago

    Good question. Yes I have a Lion battery I placed comfortably under the screen on top of the PCB with dimensions of 48x42x8 mm. This combined with a USB charging board and switch would be an easy addition. I personally use on the bench for testing so didnt include this option.

    IMG_20211006_124235 (1).jpgIMG_20211006_124205.jpg
    0
    ing.friedrich.wilhelm
    ing.friedrich.wilhelm

    Reply 18 days ago

    Is there space for a battery pack 12mm high?

    0
    TechKiwiGadgets
    TechKiwiGadgets

    Reply 14 days ago

    It depends on where in the case. Let me know the full dimensions of the battery and I will check. It would be easy enough to add another 3-5mm depth to the case if you want by modifying the STL. Let me know and I can put another STL on Thingiverse