Simple tester for network cables with RJ45 connectors

Introduction

This simple tester uses an Atmel 90S2313 (or a tiny2313) to test each of the eight wires on a RJ45/Cat5e cable. The tester will indicate open circuit wires (a led doesn't light), a short circuit between two or more wires (more than one led lights simultaneously or there is a wiring error where wires are out of order (the leds do not light in a running sequence. The tester will work with both normal/straight through wiring and with cross patch cables.

Wiring to sockets can be tested by plugging the tester into the socket using a known good patch cable.


The Transmitter

The tester consists of two boards: a battery operated "transmitter" and an unpowered "receiver". The transmitter and receiver are on separate boards to allow cables between remote locations to be tested. The transmitter uses a microcontroller to pulse one data wire at a time. A led provides a flashing indication of activity so that you know the board is correctly powered. JP1 when open produces the correct pulse sequence to test a straight through cable and when shorted the sequence for a cross cable.

Finally, SV1 is for the programmer to be connected and can be omitted if the microcontroller is preprogrammed. Q1, C4 and C5 are needed if the 90S2313 is used but can be omitted if a tiny2313 is used provided its internal RC oscillator is used as the clock source.


Software

The software for the 90S2313 version can be downloaded below. It is trivially simple:

#include <90s2313.h> #include <delay.h> #define ACTIVITY_LED PORTD.6 // LED on Tx board to flash #define X_JUMPER PIND.5 // Jumper to select normal or cross cable #define TX_PORT PORTB // 8 bits to test one line at a time // Arrays of output bytes - low bit turns on the LED on the Rx board // One of the arrays are selected for either straight (normal) cable or a cross-over cable // These values test lines in the order 8 down to 1 - but this makes no difference flash char normal [] = {0x7f, 0xbf, 0xdf, 0xef, 0xf7, 0xfb, 0xfd, 0xfe}; flash char cross [] = {0x7f, 0xbf, 0xfd, 0xef, 0xf7, 0xfe, 0xdf, 0xfb}; char loop; void main(void) { ACSR = 0x80; // analogue comparator off DDRB = 0xff; // PORT B all outputs DDRD = 0x40; // PORTD 6 output (activity LED) PORTD = 0x20; // pullup on PIN 5 (X patch jumper on):low=cross, high=straight PORTB = 0xff; // Tx port high (all LEDs off) for (;;) // cycle forever { for (loop = 0; loop < 8; loop++) // cycle 0 - 7 { TX_PORT = X_JUMPER ? normal [loop] : cross [loop]; // select bit to pull low // abit array jumper select ACTIVITY_LED = !ACTIVITY_LED; // toggle activty LED delay_ms (250); // wait a while... } } }


The software was compiled using the CodeVisionAVR version 2 compiler. This application is small enough to be compliled with the free/trial version.


The Receiver

The receiver is much simpler...


PCBs

The schematics and PCB layouts can be downloaded - see below.


Downloads

You should look in the "/Workshop Projects/RJ45 Tester" folder.