Community project

LAN Cable Tester with OLED Display

Photo of LAN Cable Tester with OLED Display
Generated with AI

Gilbert Reazon

Published November 24, 2026

This guide builds a LAN cable tester that measures continuity and resistance across all eight conductors of an Ethernet cable using an ESP32, Arduino Nano remote, dual multiplexers, and an OLED display. The tester uses a precision resistor-divider network to detect open circuits, shorts, and out-of-spec wire resistance, then displays results on a 128×64 screen navigable with a rotary encoder.

Builders will receive a complete wiring diagram, parts list with resistor color codes, firmware ready to upload, and step-by-step assembly instructions covering the Nano remote construction, multiplexer configuration, shift-register wiring, and calibration procedure. The guide includes verification steps on known-good cables and explains the measurement limits and accuracy trade-offs of the design.

Wiring diagram

Wiring diagram for LAN Cable Tester with OLED Display
Loading diagram…

Gather all the parts

QtyComponent
1

Plain numbered 8P8C RJ45 screw-terminal breakout (no magnetics)

Direct numbered contacts, no transformers or Ethernet electronics.

1

SSD1306 OLED

0.96-inch 128 x 64 white monochrome OLED display module driven by an SSD1306 controller over I2C (address 0x3C). It runs from 3 V to 5 V and connects through a 4-pin 2.54 mm header (GND, VCC, SCL, SDA); the self-emitting pixels need no backlight.

1

KY-040 Rotary Encoder Module

5-pin incremental rotary encoder breakout with integrated momentary push switch. CLK and DT are the quadrature outputs; SW is the built-in push-button output and should not be modelled as a separate Push Button component.

1

Plain numbered 8P8C RJ45 screw-terminal breakout (no magnetics)

Direct numbered contacts, no transformers or Ethernet electronics.

1

Insulated single-pole screw terminal

Separate terminal for ninth conductor, NOT ground.

1

Insulated single-pole screw terminal

Separate terminal for ninth conductor, NOT ground.

1

CD74HC4067 16-channel breakout (HC, not HCT)

TI CD74HC4067 pinout; EN LOW enabled; 3.3 V supply. C9-C15 physically unconnected. Independent address bus for each module.

1

Ceramic Capacitor

100 nF ceramic

Through-hole ceramic capacitor bought by value, such as 22 pF, 10 nF or 100 nF (0.1 µF). It is non-polarised, so either lead can go to either net. Its most common job is decoupling: a 100 nF capacitor between an IC's supply pin and ground, placed as close to the chip as possible.

1

CD74HC4067 16-channel breakout (HC, not HCT)

TI CD74HC4067 pinout; EN LOW enabled; 3.3 V supply. C9-C15 physically unconnected. Independent address bus for each module.

1

Ceramic Capacitor

100 nF ceramic

Through-hole ceramic capacitor bought by value, such as 22 pF, 10 nF or 100 nF (0.1 µF). It is non-polarised, so either lead can go to either net. Its most common job is decoupling: a 100 nF capacitor between an IC's supply pin and ground, placed as close to the chip as possible.

1

Resistor

1 kohm 1%

Through-hole resistor (current-limiting in series with an LED)

1

Resistor

1.5 kohm 1%

Through-hole resistor (current-limiting in series with an LED)

1

Resistor

2.2 kohm 1%

Through-hole resistor (current-limiting in series with an LED)

1

Resistor

3.3 kohm 1%

Through-hole resistor (current-limiting in series with an LED)

1

Resistor

4.7 kohm 1%

Through-hole resistor (current-limiting in series with an LED)

1

Resistor

6.8 kohm 1%

Through-hole resistor (current-limiting in series with an LED)

1

Resistor

10 kohm 1%

Through-hole resistor (current-limiting in series with an LED)

1

Resistor

15 kohm 1%

Through-hole resistor (current-limiting in series with an LED)

1

Resistor

22 kohm 1%

Through-hole resistor (current-limiting in series with an LED)

1

Resistor

1 kohm 1%

Through-hole resistor (current-limiting in series with an LED)

1

Resistor

1 kohm 1%

Through-hole resistor (current-limiting in series with an LED)

1

Resistor

10 kohm 1%

Through-hole resistor (current-limiting in series with an LED)

1

74HC595 Shift Register (individual Q0–Q7 pins)

SN74HC595 DIP16, 3.3 V; OE LOW enabled, MR HIGH normal. Individual output pins expanded from catalog grouped Q0-Q7.

1

Ceramic Capacitor

100 nF ceramic

Through-hole ceramic capacitor bought by value, such as 22 pF, 10 nF or 100 nF (0.1 µF). It is non-polarised, so either lead can go to either net. Its most common job is decoupling: a 100 nF capacitor between an IC's supply pin and ground, placed as close to the chip as possible.

1

Arduino Nano ATmega328P 5 V remote

Separately USB-powered Nano. D2-D10 are LOW-only resistor-arm switches. Never drive HIGH or enable pull-ups. No ground or supply wire to main unit.

Assemble it in 8 steps

1. Remove the old circuit

Power off. Disconnect the Nano while rewiring; remove all old 1 kohm series resistors and 10 kohm input pull-ups from the test sockets. Remove the permanent GND-to-GND link. The remote uses its own USB supply; do not connect its GND or 5V to the main unit. This is a replacement circuit, not an addition to the old one.

  • Never connect to live Ethernet, PoE, mains, or powered equipment. This circuit has no overvoltage protection.

2. Build the Nano resistor remote

Remote contacts 1–8 connect through separate 1% resistors of 1k, 1.5k, 2.2k, 3.3k, 4.7k, 6.8k, 10k and 15k ohms. The ninth terminal connects through 22k ohms. Do NOT join the other resistor ends. Connect them individually to Nano D2–D10, in contact order: contact 1 resistor to D2, contact 2 resistor to D3, through contact 9 resistor to D10. The new Nano firmware holds all nine pins LOW to form a common return inside the separately powered Nano. Never use the old pulse firmware or drive these pins HIGH. Check each resistor with a meter before assembly.

  • Never connect to live Ethernet, PoE, mains, or powered equipment. This circuit has no overvoltage protection.

3. Connect both multiplexers

Use two CD74HC4067 HC-type breakouts at 3.3 V, NOT HCT. Each VCC goes to 3V3, GND and EN to GND. Place 100 nF across each module supply. On BOTH modules C0–C7 connect to main RJ45 contacts 1–8; C8 to the ninth terminal. Leave C9–C15 unconnected. The modules are addressed by the separate 74HC595 selector, not direct GPIO wires.

  • Never connect to live Ethernet, PoE, mains, or powered equipment. This circuit has no overvoltage protection.

4. Wire the 74HC595 selector

Use a 74HC595 (not HCT) at 3.3 V. DIP chip pin numbers: 16 VCC to 3V3, 8 GND and 13 OE to GND, 10 MR to 3V3. Pin 14 DS to GPIO15, 11 SH_CP to GPIO16, 12 ST_CP to GPIO17. Q0–Q3 (pins 15,1,2,3) go to high-module S0–S3. Q4–Q7 (pins 4,5,6,7) go to low-module S0–S3. Pin 9 serial output is unused. Add 100 nF across VCC/GND. No libraries are needed for this selector.

5. Build the measurement reference

Connect 1k refupper from 3V3 to the reference junction and 1k reflower from that junction to GND. Connect the 10k feed resistor from the junction to high-module SIG. High SIG also goes to GPIO1 (measurement). Low SIG goes to GND. Use 1% resistors. No cable conductor directly connects to GND.

  • Never connect to live Ethernet, PoE, mains, or powered equipment. This circuit has no overvoltage protection.

6. Connect screen and knob

Screen VCC and knob VCC go to 3V3; their grounds to GND. Screen SDA to GPIO40, SCL to GPIO41. Knob CLK to GPIO42, DT to GPIO47, SW to GPIO2. Keep the camera disconnected; do not use GPIO33–37. Leave onboard Ethernet unused.

  • Never connect to live Ethernet, PoE, mains, or powered equipment. This circuit has no overvoltage protection.

7. Verify on a known-good cable

Use only disconnected unpowered cables and plain numbered RJ45 breakouts with no transformers. Join main contacts 1–8 to remote contacts 1–8 through the cable, and join the ninth terminals through the extra conductor. That conductor is tested like the other eight, NOT a ground reference. Power ESP32 and Nano from separate USB supplies or separate power banks; allow the Nano two seconds to start before testing. Do not use a shared computer or shared USB hub for isolated operation. Disconnect the cable during programming. Press knob, wait for results, turn for pages. First confirm all nine straight with a short known-good assembly, then open each wire in turn and swap two wires to confirm detection.

  • Never connect to live Ethernet, PoE, mains, or powered equipment. This circuit has no overvoltage protection.

8. Understand the limits

OPEN* means no measurable pair path, not proof of the physical break location. Reliable numbered mapping needs at least three intact independent conductors and the powered Nano resistor remote. Fewer paths, multiple complex faults, excessive leakage, wrong resistors, or resistance outside tolerances give INCONCLUSIVE. A short is detected but is not always located or mapped. This is not a cable certifier, split-pair, speed or length tester. Ninth conductor continuity is included; it is not safety-earth testing.

  • Never connect to live Ethernet, PoE, mains, or powered equipment. This circuit has no overvoltage protection.

Review all connections

1. Connections between "hi" and "ESP32"

FunctionhiESP32
powerVCC3V3
groundGNDGND
groundENGND
analogSIGGPIO 1

2. Connections between "dechi" and "ESP32"

FunctiondechiESP32
analog1 → CD74HC4067 16-channel breakout (HC, not HCT) VCCEXT
ground2GND

3. Connections between "lo" and "ESP32"

FunctionloESP32
powerVCC3V3
groundGNDGND
groundENGND
groundSIGGND

4. Connections between "declo" and "ESP32"

FunctiondecloESP32
analog1 → CD74HC4067 16-channel breakout (HC, not HCT) VCCEXT
ground2GND

5. Connections between "mainjack" and "ESP32"

FunctionmainjackESP32
digital1 → CD74HC4067 16-channel breakout (HC, not HCT) C0EXT
digital1 → CD74HC4067 16-channel breakout (HC, not HCT) C0EXT
digital2 → CD74HC4067 16-channel breakout (HC, not HCT) C1EXT
digital2 → CD74HC4067 16-channel breakout (HC, not HCT) C1EXT
digital3 → CD74HC4067 16-channel breakout (HC, not HCT) C2EXT
digital3 → CD74HC4067 16-channel breakout (HC, not HCT) C2EXT
digital4 → CD74HC4067 16-channel breakout (HC, not HCT) C3EXT
digital4 → CD74HC4067 16-channel breakout (HC, not HCT) C3EXT
digital5 → CD74HC4067 16-channel breakout (HC, not HCT) C4EXT
digital5 → CD74HC4067 16-channel breakout (HC, not HCT) C4EXT
digital6 → CD74HC4067 16-channel breakout (HC, not HCT) C5EXT
digital6 → CD74HC4067 16-channel breakout (HC, not HCT) C5EXT
digital7 → CD74HC4067 16-channel breakout (HC, not HCT) C6EXT
digital7 → CD74HC4067 16-channel breakout (HC, not HCT) C6EXT
digital8 → CD74HC4067 16-channel breakout (HC, not HCT) C7EXT
digital8 → CD74HC4067 16-channel breakout (HC, not HCT) C7EXT

6. Connections between "remotejack" and "ESP32"

FunctionremotejackESP32
digital1 → Resistor P1EXT
digital2 → Resistor P1EXT
digital3 → Resistor P1EXT
digital4 → Resistor P1EXT
digital5 → Resistor P1EXT
digital6 → Resistor P1EXT
digital7 → Resistor P1EXT
digital8 → Resistor P1EXT

7. Connections between "main9" and "ESP32"

Functionmain9ESP32
digitalWIRE → CD74HC4067 16-channel breakout (HC, not HCT) C8EXT
digitalWIRE → CD74HC4067 16-channel breakout (HC, not HCT) C8EXT

8. Connections between "remote9" and "ESP32"

Functionremote9ESP32
digitalWIRE → Resistor P1EXT

9. Connections between "refupper" and "ESP32"

FunctionrefupperESP32
powerP13V3
digitalP2 → Resistor P1EXT

10. Connections between "reflower" and "ESP32"

FunctionreflowerESP32
groundP2GND

11. Connections between "feed" and "ESP32"

FunctionfeedESP32
digitalP1 → Resistor P2EXT
digitalP2 → CD74HC4067 16-channel breakout (HC, not HCT) SIGEXT

12. Connections between "oled" and "ESP32"

FunctionoledESP32
powerVCC3V3
groundGNDGND
i2cSDAGPIO 40
i2cSCLGPIO 41

13. Connections between "knob" and "ESP32"

FunctionknobESP32
powerVCC3V3
groundGNDGND
digitalCLKGPIO 42
digitalDTGPIO 47
digitalSWGPIO 2

14. Connections between "select" and "ESP32"

FunctionselectESP32
powerVCC3V3
groundGNDGND
groundOEGND
powerMR3V3
digitalDSGPIO 15
digitalSH_CPGPIO 16
digitalST_CPGPIO 17
dataQ0 → CD74HC4067 16-channel breakout (HC, not HCT) S0EXT
dataQ4 → CD74HC4067 16-channel breakout (HC, not HCT) S0EXT
dataQ1 → CD74HC4067 16-channel breakout (HC, not HCT) S1EXT
dataQ5 → CD74HC4067 16-channel breakout (HC, not HCT) S1EXT
dataQ2 → CD74HC4067 16-channel breakout (HC, not HCT) S2EXT
dataQ6 → CD74HC4067 16-channel breakout (HC, not HCT) S2EXT
dataQ3 → CD74HC4067 16-channel breakout (HC, not HCT) S3EXT
dataQ7 → CD74HC4067 16-channel breakout (HC, not HCT) S3EXT

15. Connections between "decselect" and "ESP32"

FunctiondecselectESP32
analog1 → 74HC595 Shift Register (individual Q0–Q7 pins) VCCEXT
ground2GND

16. Connections between "code1" and "ESP32"

Functioncode1ESP32
digitalP2 → Arduino Nano ATmega328P 5 V remote D2EXT

17. Connections between "code2" and "ESP32"

Functioncode2ESP32
digitalP2 → Arduino Nano ATmega328P 5 V remote D3EXT

18. Connections between "code3" and "ESP32"

Functioncode3ESP32
digitalP2 → Arduino Nano ATmega328P 5 V remote D4EXT

19. Connections between "code4" and "ESP32"

Functioncode4ESP32
digitalP2 → Arduino Nano ATmega328P 5 V remote D5EXT

20. Connections between "code5" and "ESP32"

Functioncode5ESP32
digitalP2 → Arduino Nano ATmega328P 5 V remote D6EXT

21. Connections between "code6" and "ESP32"

Functioncode6ESP32
digitalP2 → Arduino Nano ATmega328P 5 V remote D7EXT

22. Connections between "code7" and "ESP32"

Functioncode7ESP32
digitalP2 → Arduino Nano ATmega328P 5 V remote D8EXT

23. Connections between "code8" and "ESP32"

Functioncode8ESP32
digitalP2 → Arduino Nano ATmega328P 5 V remote D9EXT

24. Connections between "code9" and "ESP32"

Functioncode9ESP32
digitalP2 → Arduino Nano ATmega328P 5 V remote D10EXT

Deploy the firmware

#include <Arduino.h>
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#include <math.h>
// Powered Nano LOW-only resistor-arm remote; no shared ground wire.
// Nano D2-D10 each sink one coded resistor. Never drive those pins HIGH.
// Q0-Q3 address high mux; Q4-Q7 address low mux, via 74HC595.
// Each pair is measured in both directions through independently addressed muxes.
const uint8_t DATA_PIN=15, CLOCK_PIN=16, LATCH_PIN=17;
uint8_t addressByte=255;
const uint8_t highAddr[1]={0}, lowAddr[1]={4};
const uint8_t ADC_PIN=1, CLK=42, DT=47, SW=2;
const float codes[9]={1000,1500,2200,3300,4700,6800,10000,15000,22000};
Adafruit_SSD1306 oled(128,64,&Wire,-1,100000UL,100000UL);
bool screen=false,dirty=true,testing=false;
uint8_t page=0,oldAB;int8_t rotation=0;
int8_t mapping[9];float pairR[9][9],baseline[9],arms[9];
const char* status="Press to test";
float openMv=0;uint8_t scanA=0,scanB=0;
void selectMux(const uint8_t *pins,uint8_t ch){
 uint8_t sh=pins[0]; addressByte=(addressByte & ~(15<<sh))|((ch&15)<<sh);
 digitalWrite(LATCH_PIN,LOW);shiftOut(DATA_PIN,CLOCK_PIN,MSBFIRST,addressByte);digitalWrite(LATCH_PIN,HIGH);
}
float volts(){delay(12);analogReadMilliVolts(ADC_PIN);uint32_t sum=0;for(int n=0;n<32;n++){sum+=analogReadMilliVolts(ADC_PIN);delayMicroseconds(200);}return sum/32.0f;}
float resistance(uint8_t a,uint8_t b){
 selectMux(highAddr,a);selectMux(lowAddr,b);float v=volts();
 if(openMv-v<25)return 1000000;
 return 10500.0f*v/(openMv-v); // 10k feed + (1k || 1k) source resistance
}
void park(){selectMux(highAddr,15);selectMux(lowAddr,15);}
void draw(){
 if(!screen)return;
 oled.clearDisplay();oled.setCursor(0,0);oled.println("9-WIRE NANO REMOTE");oled.println(status);
 for(uint8_t i=page*3;i<page*3+3;i++){
  oled.print(i+1);oled.print(" > ");
  if(mapping[i]>=0)oled.print(mapping[i]+1);else oled.print(mapping[i]==-1?"OPEN*":"?");
  oled.println();
 }
 oled.println("Turn:page Press:test");oled.print("Page ");oled.print(page+1);oled.println("/3  *see guide");oled.display();
}
void analyse(){
 bool active[9]={};uint8_t n=0;bool shorted=false;
 for(int i=0;i<9;i++)for(int j=i+1;j<9;j++){
  float r=(pairR[i][j]+pairR[j][i])/2-(baseline[i]+baseline[j])/2;
  r=fmaxf(0,r);pairR[i][j]=pairR[j][i]=r;
  if(r<150000){active[i]=active[j]=true;if(r<600)shorted=true;}
 }
 for(bool a:active)if(a)n++;
 for(int i=0;i<9;i++)mapping[i]=active[i]?-2:-1;
 if(shorted){status="SHORT / joined wires";return;}
 if(n<3){status="INCONCLUSIVE (<3)";return;}
 float total=0;
 for(int i=0;i<9;i++)if(active[i])for(int j=i+1;j<9;j++)if(active[j]){
  if(pairR[i][j]>=150000){status="FAULT / inconclusive";return;}total+=pairR[i][j];
 }
 float sumArms=total/(n-1);
 bool valid=true;uint16_t used=0;
 for(int i=0;i<9;i++)if(active[i]){
  float row=0;for(int j=0;j<9;j++)if(active[j]&&i!=j)row+=pairR[i][j];
  arms[i]=(row-sumArms)/(n-2);
  int found=-1;
  for(int k=0;k<9;k++)if(fabsf(arms[i]-codes[k])<codes[k]*0.12f){if(found!=-1){found=-2;break;}found=k;}
  if(found<0){valid=false;continue;}
  mapping[i]=found;if(used&(1<<found))valid=false;used|=1<<found;
 }
 for(int i=0;i<9;i++)if(active[i])for(int j=i+1;j<9;j++)if(active[j])
  if(fabsf(pairR[i][j]-arms[i]-arms[j])>fmaxf(200,pairR[i][j]*0.08f))valid=false;
 if(!valid){for(int i=0;i<9;i++)if(active[i])mapping[i]=-2;status="FAULT / inconclusive";return;}
 bool straight=true;for(int i=0;i<9;i++)if(mapping[i]!=i)straight=false;
 status=straight?"PASS: all 9 straight":n<9?"OPEN* / map below":"CROSSED: map below";
}
void startTest(){
 memset(mapping,-2,sizeof(mapping));park();openMv=volts();
 if(openMv<1350||openMv>1900){status="Check reference circuit";testing=false;dirty=true;return;}
 testing=true;scanA=scanB=0;status="Testing all pairs...";dirty=true;
}
void scanStep(){
 if(scanA==scanB)baseline[scanA]=resistance(scanA,scanB);
 else pairR[scanA][scanB]=resistance(scanA,scanB);
 if(++scanB==9){scanB=0;++scanA;}
 if(scanA==9){park();testing=false;analyse();dirty=true;
 }
}
void setup(){
 pinMode(DATA_PIN,OUTPUT);pinMode(CLOCK_PIN,OUTPUT);pinMode(LATCH_PIN,OUTPUT);park();
 pinMode(ADC_PIN,INPUT);analogReadResolution(12);analogSetPinAttenuation(ADC_PIN,ADC_6db);
 pinMode(CLK,INPUT_PULLUP);pinMode(DT,INPUT_PULLUP);pinMode(SW,INPUT_PULLUP);oldAB=(digitalRead(CLK)<<1)|digitalRead(DT);
 Wire.begin(40,41);screen=oled.begin(SSD1306_SWITCHCAPVCC,0x3C);
 if(screen){oled.setTextColor(SSD1306_WHITE);oled.setTextSize(1);}memset(mapping,-2,sizeof(mapping));park();
}
void loop(){
 static const int8_t table[]={0,-1,1,0,1,0,0,-1,-1,0,0,1,0,1,-1,0};
 uint8_t ab=(digitalRead(CLK)<<1)|digitalRead(DT);
 if(ab!=oldAB){rotation+=table[(oldAB<<2)|ab];oldAB=ab;if(rotation>=4||rotation<=-4){page=(page+(rotation>0?1:2))%3;rotation=0;dirty=true;}}
 static bool raw=true,stable=true;static uint32_t changed=0;bool b=digitalRead(SW);
 if(b!=raw){raw=b;changed=millis();}if(b!=stable&&millis()-changed>=30){stable=b;if(!b&&!testing)startTest();}
 if(testing)scanStep();if(dirty){dirty=false;draw();}delay(1);
}

Remix this project

Make it yours in one click

Open a full copy of this project in your own Schematik workspace, diagram, code, parts, and assembly steps included. Swap the sensor, add features, or redesign the whole thing with AI. The author's original stays untouched.

Open in Schematik