Close
0%
0%

RJ45 Cable Tester

I don't need this, but couldn't help building it.

Similar projects worth following
A simple circuit that displays the 8x8 connectivity matrix for an 8P8C, aka RJ45 aka ethernet cable on an LED matrix. Shows what's up with those mystery cables at a glance.

I actually needed a 6P4C cable tester, which I haven't assembled yet, but I couldn't help but build this one first, because it seemed like such a perfect use for an 8x8 LED matrix. The idea is simple: the right ends of the cable lines are connected to the bases  of NPN low-side switches, driving common-cathode columns of the LED matrix. You energize one row of the matrix, which is also connected to a conductor on the left end of the cable. This displays zero or more LEDs in the row which are connected to this particular RJ45 pin. If you scan through the rows in this way, you get the full 8x8 connectivity of the cable.

The Eagle files for the schematic and PCB are in the files section of this project, as is a zip file with the gerbers if you want to have your own made. As it stands, it will require a PIC programmer to get working, since I used a PIC16F1705 to scan the rows. If you'd rather make a code-free version, see the notes below. This should work well with a 555 and 74HC4017 instead of the PIC.

Now, let's have a look at some common cables.

Straight Cable

Here's the "normal" ethernet patch cord, aka a straight cable. Pin 1 on one side is connected to pin 1 of the other side, etc.

Crossover Cable

This is a crossover cable, which swaps TX and RX pairs. You used to need this if you wanted to connect two networked devices without a switch. Modern ethernet ports can figure this kind of thing out on their own.

Old 10/100 Cable

This is an ancient cable that I think came in a box with a router maybe 20 years ago. As you can see, it only has two pair connected, so can only be used for 10 or 100 Mbps connections. GigE requires all four pair.

You can see there are only four wires in the thing if you look closely at the ends:

Rollover Cable

This is a rollover cable, in which pins 1-8 are reversed at the far end. You see these sometimes in RS232 applications for RJ45 connectors, but much more often with the smaller modular connectors like RJ11.

The Circuit

As discussed above, the circuit scans common-anode rows of the matrix. A set of eight emitter followers provides enough drive for the row, because it's possible that all eight LEDs need to illuminate. The row lines are also connected to one end of the cable.

The other end of the cable drives some NPN switches. I used pre-biased transistors in SOT23 cases to save space on the PCB, and also because I have a bag full of them. R1-R8 are 49.9 ohms. This yields about 40 mA peak drive for the LEDs, and since they have a 1/8 duty cycle, results in a decent brightness.

I chose a PIC16F1705 to do the scanning, and while you could argue it's overkill for this circuit, it was fast and easy to get working.

I toyed with the idea of using a 555 and 74HC4017 to scan the rows, which might look more at home in this circuit, and would also give the instant gratification of soldering and testing without a firmware cycle interrupting the fun, but decided to stay in the present and just use a microcontroller.

Beyond Connectivity

When scanned at slow speeds -- just high enough so the display doesn't flicker -- the LEDs show the continuity between ends of the cable. If you turn up the scanning speed into the hundreds of kHz or low MHz range, something more interesting happens:

Now, you start to see capacitive effects between the conductors. In this case, a straight cable wired according to T568B is shown. This cable has the green pair on pins 3 and 6, while all the other pairs are on neighboring pins. You can clearly see a coupling between conductors 3 and 6 -- note the bright LEDs at (3,6) and (6.3). This happens because these wires, the green pair in this case, are twisted together and present a capacitance between them. This capacitance is enough to couple signal between them and cause the 3 LED to light when the 6 line is energized and vice versa.

Of course, the intensities of the LEDs in this case are a little random, since the LEDs themselves may not be brightness...

Read more »

RJ45-tester.zip

MPLABX project files for PIC firmware

Zip Archive - 157.26 kB - 12/21/2020 at 22:58

Download

rj45-cable-tester.zip

Gerbers for PCB; these have been uploaded and manufactured at JLCPCB successfully

Zip Archive - 102.96 kB - 12/19/2020 at 21:18

Download

rj45-cable-tester.brd

Eagle Board File

brd - 66.61 kB - 12/19/2020 at 21:18

Download

rj45-cable-tester.sch

Eagle Schematic

x-kicad-schematic - 93.96 kB - 12/19/2020 at 21:17

Download

  • Parts List

    Ted Yapo12/21/2020 at 22:56 0 comments

    I have been asked what the parts are. I haven't prepared an actual BOM, because this isn't that kind of project.

    The microprocessor is a PIC16F1705 in SOIC.

    The 8x8 LED matrix is one I bought on Amazon. Digikey doesn't seem to stock these displays from reputable LED manufacturers that supply actually useful datasheets, so I bought these on Amazon and figured out the pinout. I have no idea if all displays of this shape are electrically interchangeable. Here is the link to the Amazon product.

    This is the pinout I came up with. Of course, it's also embedded in the Eagle component, so you could download the free version of eagle, open the file and look.

    I updated the schematic with resistor values I used: they are all 0603 size. They're based on a 5V supply. R1-R8 are 49.9 ohms, which yields around 40 mA peak for the LEDs.

    Q1-Q8 are listed as MMBT3904 in the schematic. I populated the board with MMBT4401 because I didn't want to wait for the Digikey box. MMBT4401 are arguably better, anyway.

    There are three caps on the board: two 10uF 1206 and one 1uF 0603.

    The pre-biased transistors are DDTD123TC in the schematic, but I populated the board with DDTC143TCA, again because I didn't feel like waiting for the parts box to arrive. And again, these are probably a better choice than the ones in the schematic because the internal pulldown resistor will help them switch off faster, preventing display bleeding.

    The RJ45 jacks are Keystone 949.

    The LED is an 0603 green. I don't have a part number.



    Firmware

    I uploaded a zip file for the PIC16F1705 firmware to the files section. I think you need a PICKit4 to program it, as I'm not sure if any of the older programmers will do it.

    It's mostly bloat generated by MCC, with a few lines of actual code in main.c

View project log

Enjoy this project?

Share

Discussions

Ender wrote 06/06/2023 at 03:49 point

Hey Ted,

I have been wanting to recreate this project but also add a few other features that would make it an all in one cable testing solution. 

I have tried to use digital simulator and some more conventional simulator and they really don't like the circuit for some reason. Did you use a simulator when you designed yours and if you did what did you use?

Thanks,

Ender

  Are you sure? yes | no

Ted Yapo wrote 06/06/2023 at 16:48 point

no, i haven't simulated it. i don't immediately see why it shouldn't simulate, though. what have you tried?

  Are you sure? yes | no

Ender wrote 06/06/2023 at 19:09 point

I am not using the best simulators, Tinker cad, Digital (GitHub), and Everycurcit. They don't like the interplay between the LEDs and BJTs. I switched the low-side BJTs to Nmos and that seems to work better. A lot of problems start when I add my interment detection using Gated SR latches, these simulators behave weirdly. Also, I am using a 555 timer and 4017 IC. 

  Are you sure? yes | no

Jeremy S. Cook wrote 12/24/2020 at 15:50 point

Very nice Ted, love this sort of thing!

  Are you sure? yes | no

phil-barrett wrote 12/24/2020 at 06:22 point

Do you need the diagonal?  1-1, 2-2, ... ? Is there a case where they ever light up?

  Are you sure? yes | no

Ted Yapo wrote 12/24/2020 at 18:27 point

yes, that's actually the normal case for ethernet "straight" cables: pin 1 on the left end connects to pin 1 on the right end, and so on.

they are all capable of lighting, depending on how you make your cables

  Are you sure? yes | no

Elliot Williams wrote 12/22/2020 at 22:11 point

Oh that is sexy what it does at high speeds!

  Are you sure? yes | no

Ted Yapo wrote 12/23/2020 at 22:31 point

it's really a bug, but i'll pretend i intended it to work that way

  Are you sure? yes | no

Sophi Kravitz wrote 12/22/2020 at 00:49 point

New project new useful project!! 

  Are you sure? yes | no

NobodyYouKnow wrote 12/21/2020 at 13:01 point

Definitely nice you have you back. I am already ordering the PCBs. By any chance do you have a BoM for this board? Failing that, I'd take the part number for the RJ-45 connectors you used.

Thanks!

  Are you sure? yes | no

NobodyYouKnow wrote 12/21/2020 at 23:14 point

Thank you. I hope that was not there the entire time, and I just missed it. 

  Are you sure? yes | no

Ted Yapo wrote 12/22/2020 at 03:18 point

@NobodyYouKnow no, lol, it's new

  Are you sure? yes | no

Ken Yap wrote 12/19/2020 at 21:59 point

Very neat way to visualise the topology of the connection! 👍

  Are you sure? yes | no

deʃhipu wrote 12/19/2020 at 21:35 point

It's great to see you back, and with another useful tool!

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates