Audio cable tester

Introduction

Someone asked me to design an audio cable tester with the simplest possible user interface, preferably with a green and red LED to indicate that the cable is either OK or not OK.  The tester should be able to test 3 pin XLR to XLR, 3 pin XLR to jack (both mono and stereo jack) and jack to jack (both mono and stereo) cables.  It should indicate that the cable is either good or bad. Bad means that there is one or more missing connections, one or more short circuits or one or more crossed connections. The tester should  be battery powered so it can be used anywhere without the need of mains power and  should have a maximum battery life. Sounds like a good and practical specification, so lets see what we can  come up with.
First I started researching  the web for audio cable tester projects to check what methods  are used for cable testing. Below I describe a few of these methods:

Method 1

A simple method to test a cable is to use a rotary switch to alternatively connect a voltage source to each connector pin at one end of the cable and check if the voltage is seen at the other end of the cable. LEDs connected between all connector pins at both ends of the cable and ground indicate if the selected wire is OK. When the IN LED is on but the corresponding OUT LED is OFF, this means there that there is an open. When multiple IN LEDs and OUT LEDs light, this means there is a short circuit. When a OUT LED lights that does not correspond with the IN LED, this means the cable has a wrong (crossed) connection.

Method 2

Another simple method is to connect a constant current source to one connector pin at one end of the cable and route the current back and forth through the individual wires via LEDs. The last LED of the chain is connected to ground.
When all connections are OK, all 3 LEDs will light up. When all LEDs stay off, there is missing connection or a wrong (crossed) connection. When only a few LEDs light up, there is a short circuit or a wrong (crossed) connection.

Method 3

Yet another method is using a rotary switch to alternatively connect a voltage source to each individual connector pin at one end of the cable. At the other end of the cable, the connector pins are connected to resistors that form a resistive divider.  The voltage at the junction between the resistors is checked using a window comparator. The window comparator has 3 outputs: too high, too low and OK, which can be indicated by 3 LEDs (not shown in the figure below).
When the selected connection is OK, the voltage at the input of the window comparator will be within the range of the window comparator. When the selected connection is missing, the voltage at the input of the window comparator will be too low. When there is a short circuit, the voltage at the input of the window comparator will be too high. This circuit will not detect wrong (crossed) connections.

Method 4

Method 1 and 3 can also be implemented with a microcontroller where the rotary switch is replaced by digital outputs of the microcontroller that can  be set high and low to select connector pins at one end of the cable. Using digital inputs, the connector pins at the other end of the cable can be checked. The microcontroller will walk through all the connector pins at one end of the cable and check if the corresponding pins at the other end of the cable to see if all cable wires are OK.
To implement method 3 on a microcontroller, an ADC input can be used to evaluate the voltage in software, replacing the window comparator. Digital outputs can be used to replace the rotary switch.

Method used

The method I will use is a combination of method 2 and method 3. I decided not to use a microcontroller, because I think it is a bit of overkill for a tester of the 3 connections of an XLR or a jack cable.
A voltage source (9V battery) is connected to XLR connector pin (2) at one end of the cable. The current goes over the cable connection to pin (2') and R2 (we will discuss the diodes later) routes the current from pin (2')  to pin (3'). From there the current goes over the cable connection to pin (3) and R1 routes the current from pin (3) to pin (1). From there the current goes over the cable connection to pin (1') where R3 terminates the current to ground.
The voltage over R3 is evaluated with a window comparator.

Below the different situations are shown with the corresponding  output voltages that will be evaluated by the window comparator. When the  cable is OK, the  voltage will be within the range of the window comparator. When  there is a missing connection, the voltage will zero volts, so too low. When there is a short circuit  between  pins, the voltage will be too high.
The diodes (D1 and D2) are added because this method would otherwise not be able to detect all wrong (crossed) connections, f.e. when pin (2) would be connected to pin (3') and pin (3) would be connected to pin (2').  When the cable connections are OK,  the diodes will not conduct because the current flows through the resistors in the reverse direction of the diodes. But when there is a crossed connection causing the current to flow through R2 or R1 in the forward direction of the diodes,  the voltage over these resistors will be the forward voltage of the diodes (ca. 0.6V). In that case the voltage over R3 will be too high, just like when there would be a short circuit in the cable. This way we can detect all possible problems with the cable.

Under construction