Projects / Network and ribbon cable tester

Network and ribbon cable tester

Beginner2 hGuided buildReviewed

Build it step by step

0 of 6 done
  1. NANO74HC59513.8 mA

    Build the driver

    Wire the 74HC595 and Nano as in the table and check it with the LEDs temporarily on its outputs.

  2. NANORJ4513.8 mA

    Build the reader

    Wire the 74HC165 inputs to jack B and the LEDs with resistors to ground.

  3. NANORJ45

    Link the two ends

    Connect 595 outputs to jack A pins 1 to 8.

  4. NANO13.8 mA

    Test a known good straight cable

    The LEDs sweep along and Serial says Cable OK.

  5. NANO

    Test a crossover

    Press the button to switch maps and test a crossover cable.

  6. NANO

    Break one wire

    Pull one wire out of a punch-down or ribbon connector and check the report.

In short

How do you build a network and ribbon cable tester?

Each wire in a cable is tested in turn, and LEDs show which wire arrives at the far end, so you can find open, shorted or crossed wires. You need Arduino Nano, RJ45 jack (PCB) × 2, LED 5 mm green × 8, Resistor 220 Ω × 8, 74HC595 Shift Register, 74HC165 parallel-in shift register, Tactile push button 6 mm, Breadboard 830 Tie Points and Jumper wires male to male (40 pcs, 20 cm). It takes 6 steps and about 120 minutes.

Level
Beginner
Time
About 120 min
Parts
9

Parts list

Tick what you already own. It saves to My Garage, so “Build with what I have” knows.

Wiring

FromToWhy
Nano D4, D5, D674HC595 pins 14 (SER), 12 (RCLK), 11 (SRCLK)Sends the test pattern
74HC595 pins 16, 105VPower and clear high
74HC595 pins 8, 13GNDGround and output enable low
74HC595 Q0 to Q7 (pins 15, 1, 2, 3, 4, 5, 6, 7)RJ45 jack A pins 1 to 8Drives each wire
RJ45 jack B pins 1 to 874HC165 inputs A to H (pins 11, 12, 13, 14, 3, 4, 5, 6)Reads each wire
Each 165 input220 Ω resistor then green LED, to GNDLights when that wire is driven
Nano D7, D8, D974HC165 pins 1 (SH/LD), 2 (CLK), 9 (QH)Reads the pattern
74HC165 pins 165VPower
74HC165 pins 8, 15, 10GNDGround, clock inhibit low, serial input low
ButtonNano D2 and GNDChoose straight or crossover

Code

Arduino IDE, board "Arduino Nano" (processor ATmega328P, or ATmega328P (Old Bootloader) for clones). Plug your cable into the two RJ45 breakout jacks. It tests continuity at 5 V only and is not for cables connected to any equipment. Straight and crossover maps follow the T568A to T568B pairing: pins 1 and 3, and 2 and 6, swap.

Runs on a virtual Arduino Nano in your browser, with sliders for the sensors. Happy with it? Verify and upload to your real board from the same page (Chrome or Edge on a computer).

const byte DATA = 4, LATCH = 5, SCLK = 6;          // 74HC595
const byte LOAD = 7, CLK = 8, QH = 9;                // 74HC165
const byte BTN = 2;
bool crossover = false;

// Expected far-end wire for each near-end wire (0 to 7 = pins 1 to 8)
const byte STRAIGHT[8]  = { 0, 1, 2, 3, 4, 5, 6, 7 };
const byte CROSSOVER[8] = { 2, 5, 0, 3, 4, 1, 6, 7 };   // 1<->3 and 2<->6

byte readFar() {
  digitalWrite(LOAD, LOW); delayMicroseconds(5); digitalWrite(LOAD, HIGH);
  return shiftIn(QH, CLK, MSBFIRST);
}

void drive(byte pattern) {
  digitalWrite(LATCH, LOW);
  shiftOut(DATA, SCLK, MSBFIRST, pattern);
  digitalWrite(LATCH, HIGH);
}

void setup() {
  Serial.begin(9600);
  pinMode(DATA, OUTPUT); pinMode(LATCH, OUTPUT); pinMode(SCLK, OUTPUT);
  pinMode(LOAD, OUTPUT); pinMode(CLK, OUTPUT); pinMode(QH, INPUT);
  digitalWrite(LOAD, HIGH);
  pinMode(BTN, INPUT_PULLUP);
}

void loop() {
  if (digitalRead(BTN) == LOW) { crossover = !crossover; Serial.println(crossover ? "Mode: crossover" : "Mode: straight"); delay(400); }
  const byte* map = crossover ? CROSSOVER : STRAIGHT;
  bool ok = true;
  for (byte i = 0; i < 8; i++) {
    drive(1 << i);                         // one wire at a time
    delay(150);
    byte seen = readFar();
    byte want = 1 << map[i];
    if (seen != want) {
      ok = false;
      Serial.print("Wire "); Serial.print(i + 1);
      if (seen == 0) Serial.println(": open");
      else if (seen & (seen - 1)) Serial.println(": shorted to other wires");
      else { Serial.print(": arrives at pin "); for (byte k = 0; k < 8; k++) if (seen == (1 << k)) Serial.println(k + 1); }
    }
  }
  drive(0);
  Serial.println(ok ? "Cable OK" : "Cable FAULTY");
  delay(1500);
}

What the serial monitor should show

Open the serial monitor at the baud rate in the code. This is what our simulator prints for a virtual Arduino Nano with its sensors at their default values. Your numbers will follow your real readings, but the format should match.

Wire 1: open
Wire 2: open
Wire 3: open
Wire 4: open
Wire 5: open
Wire 6: open

Test checklist

What you should see at each check. If a reading is far off, stop and use the troubleshooting list.

CheckExpected
Good straight cable, straight modeCable OK
Good crossover cable, crossover modeCable OK
Cable with one wire openReports that wire as open
Cable with two wires touchingReports shorted to other wires

If it does not work

Everything reports open

Check the far-end ground reference, the jack pin order and the 165 load pin.

LEDs stay lit

Check the 165 inputs are not floating and the LED resistors go to ground.

Reports wrong pin numbers

Check Q0 to Q7 order and the MSB/LSB direction of the wiring.

Nothing happens

Check 595 pin 10 is high and pin 13 is low.

Still stuck? Find the fault step by step with your multimeter →

Ask Lark AI

Common questions

What parts do I need for the network and ribbon cable tester?

Arduino Nano, RJ45 jack (PCB) × 2, LED 5 mm green × 8, Resistor 220 Ω × 8, 74HC595 Shift Register, 74HC165 parallel-in shift register, Tactile push button 6 mm, Breadboard 830 Tie Points and Jumper wires male to male (40 pcs, 20 cm).

How long does the network and ribbon cable tester take to build?

About 120 minutes for a beginner maker, in 6 steps.

How do I know the network and ribbon cable tester works?

Good straight cable, straight mode: Cable OK. Good crossover cable, crossover mode: Cable OK. Cable with one wire open: Reports that wire as open.

Everything reports open: what should I check?

Check the far-end ground reference, the jack pin order and the 165 load pin.

LEDs stay lit: what should I check?

Check the 165 inputs are not floating and the LED resistors go to ground.

Reports wrong pin numbers: what should I check?

Check Q0 to Q7 order and the MSB/LSB direction of the wiring.

Nothing happens: what should I check?

Check 595 pin 10 is high and pin 13 is low.