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

Gather all the parts
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"
2. Connections between "dechi" and "ESP32"
3. Connections between "lo" and "ESP32"
4. Connections between "declo" and "ESP32"
5. Connections between "mainjack" and "ESP32"
6. Connections between "remotejack" and "ESP32"
7. Connections between "main9" and "ESP32"
8. Connections between "remote9" and "ESP32"
9. Connections between "refupper" and "ESP32"
10. Connections between "reflower" and "ESP32"
11. Connections between "feed" and "ESP32"
12. Connections between "oled" and "ESP32"
13. Connections between "knob" and "ESP32"
14. Connections between "select" and "ESP32"
15. Connections between "decselect" and "ESP32"
16. Connections between "code1" and "ESP32"
17. Connections between "code2" and "ESP32"
18. Connections between "code3" and "ESP32"
19. Connections between "code4" and "ESP32"
20. Connections between "code5" and "ESP32"
21. Connections between "code6" and "ESP32"
22. Connections between "code7" and "ESP32"
23. Connections between "code8" and "ESP32"
24. Connections between "code9" and "ESP32"
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.




