Simple electronics project - cable tester

Hello all,

I’m looking for advice on how to build a simple electronics project for my shop – a tester for a custom 3-conductor cable. I’ve already built a first version which looks something like this:




+9V
 |
 |
 +-------(L+R)-------O A        a O-----+
 |                                      |
 |                                      |
 +-------(L+R)-------O B        b O-----+
 |                                      |
 |                                      |
 +-------(L+R)-------O C        c O-----+
                                        |
                                        |
                                       ---
                                        -
					0V

(L+R) = LED + current limiting resistor


One end of the cable plugs into the terminals A,B,C; the other end plugs into a,b,c. If any of the wires are broken, the corresponding LED will fail to light. So far, so good.

However, this one doesn’t test for the cable being wired incorrectly – if A goes to b, B to c, or something like that, the LEDs will still light. So I’d like to build a slightly more sophisticated apparatus that can detect whether any wires are crossed. And I can’t for the life of me figure out how to do it. (Part of the problem is that I don’t really intuitively understand electronic circuits!)

I would like the tester to meet the following criteria:
[ul]
[li]LEDs which light when A connects to a, B to b, C to c.[/li][li]Other LEDs to indicate wires connected the wrong place would be nice.[/li][li]Ideally the device would be completely passive – if nothing is connected to it, no current is flowing. (If it has a power switch, I’ll forget and leave it switched on, and drain the battery.)[/li][/ul]I can do at least the first and third parts if it’s a 2-conductor cable – just have the current run opposite directions, A to a and b to B. But I can’t figure out how to do it with three.

Of course, I’ve come up with at least three other solutions that would get the job done, but they’re not elegant. Separate circuit (and battery) for each wire? Ick. A switch to test just one wire at a time? Eh. A simple jig to make it easy to hook up an ohmmeter to each wire in turn? Where’s the fun in that?

There’s got to be a relatively simple solution to this. Any suggestions, or ideas for resources to consult?

Don’t be afraid to use small words. I’m a software guy.

Here’s a simple Go / NO-GO tester which will show if the cable is wired correctly, but won’t show WHY it’s mis-wired (if it is):



9v+
|
A        B-->|--C
o        o         o

o        o         o
a-->|--b        c-->|-------9v-


It’s a lousy diagram, I know.
Here’s the deal: put LEDs in series with the test points. If the cable is wired correctly, current will flow from A, through the first wire, through the first diode, then through the second wire and second diode, then through the third wire and diode, completing the circuit, and lighting the LEDs. If any of the wires are crossed, the current will try to flow in the wrong direction, and will be blocked by the reverse-biased LEDs. Remember to use current limiting resistors.

So if the LEDs light, the cable is correct. If they don’t light, the cable is bad (but you may not know why). If the cable is shorted internally, some LEDs will still light, so you might need to test for that case. A shorted cable will light one or more LEDs brighter than usual.

This works for all misconnections where A, B, C only connect to a, b, c. But if the cable has connections A-B, C-a, and b-c, both diodes will still light up happily. (Also with connections A-a-B and b-C-c, lighting the diodes in parallel.) If this can happen you can check for it with another diode, something like this:


+9V
 |
 |   R1    A         a
 +--^^^^---o         o---+
                         |
                         -
                         v LED1
                         -
           B         b   |
       +---o---|>|---o---+
       |      LED3
       -
  LED2 v
       -
       |   C         c
       +---o         o---+
                         |
                        ---
                         -

Here LED3, which should not light, has a lower forward voltage than the diodes LED1 and LED2, which should both light (you could make LED1 and LED2 green, and LED3 red; or just use a 0.7V silicon diode in place of LED3); now connecting LED1 and LED2 in reverse order fails because LED3 shorts them out (no green, one red), and connecting them in parallel shorts LED1 through LED3 instead (one green, one red). If the only possible connections among A,B,C,a,b,c are either short circuits or open circuits, then LED1 and LED2 can (I think) only both light for a correctly-wired circuit. LED3, which only wires for some incorrectly-wired circuits, gives a few more diagnostics on a miswired circuit, but there are a lot of ways to wire the circuit, and 3 bits of information is not enough to tell them all apart.

R1 should accept the power dissipation resulting from shorting to ground (A-c); its value should be chosen based on the smallest maximum current of the three diodes (for the three circuits “9V–R1–LEDn–GND”).

Oops, this is wrong. Both of these misconnections turn both LED1 and LED2 off, so only LED3 is lit.

I came up with an even better idea. I’m not going to try to draw it, so hopefully this will make sense:
Use 2 9v batteries. Connect The + of battery 1 to “A”, the - of battery 1 to “B”, along with the + of battery 2, and then the - of battery 2 to “C”

Use three LEDs and resistors. Connect the K of LED 1 to “c” along with the K of LED 2.
Connect the A of LED 1 to “a” along with the A of LED 3.
Connect the A of LED 2 and the K of LED 3 to “b”

I believe that the only time all three lights light up is when the cable is perfect - no sorts, opens, or mis-wiring.

I have an 8-wire tester for network patch cables. Store bought, not homemade.

The circuit is very similar to the OP’s diagram,but with an additional set of LEDs. e.g. from the + side of the power supply there is an LED, then the pin 1 output, then the cable under test, then the pin 1 input, then another LED, then back to ground. Repeat 8 times, just like the OP’s diagram.

The difference is you don’t power all 8 circuits at once. My tester uses a sequencer, but you could do the same thing with NO pushputtons in between B+ & the first LED in each leg of the circuit.

To use: Push button 1, observe LED1 on the input side & if the cable is wired correctly, only LED1 on the output side. If the cable is bad, some other combination of LEDs, including none, will light on the output side. Repeat test for pins 2 thorugh n. This will find opens, miswires, and cross connects.
The tester I have has a single big button. When first pushed, it powers pin 1. Push again, pin 2. Push again, pin 3, Etc. Push again after pin 8, it switches off. You need a simple counter IC for that; it’d be a PITA to build from discrete components.

As to power consumption, as long as the cable under test has to be plugged in to complete the circuits, you’ve got your zero standby consumption made. I don’t know the exact innards of the tester I have, but I do know it’ll sit idle for years without using up it’s 9v battery. So any standby current is microscopic.

Late ETA: I should have read the OP more closely. I proposed a practical solution & he was looking for elegant. Sorry.

OTOH, for anything more that 2 conductors, it gets hard for the tester to unambiguously tell you all the ways the cable might be bad. i.e. how to signal “pins 1 & 3 shorted, pin 2 open.” versus “pins 1 & 2 shorted, pin 3 OK”. If you just want a single go/no-go that’s not too hard. But if somebody’s gonna have to fix the cable, not just pitch it, it will be useful to know what’s actually wrong.

Wow, great replies so far.

To clarify what this thing needs to do: The most likely failures are open circuit (broken wire or loose connection), or wires connected to the wrong terminals (probably because I crimped the RJ12 jack on one end the wrong way round). Wires shorted together are pretty unlikely, so I don’t think that’s a high priority.

Omphaloskeptic/beowulff: That sort of design looks like about the level of sophistication I’m after for a first try, though being able to tell which wire is broken (for example) would be handy.

beowulff: Not sure I understand your second suggestion. Are the two batteries in series? If so, it sounds like crossed wires could still lead to a LED lighting (albeit at either twice or half its normal brightness). Am I misunderstanding something?

LSLGuy: When I did a Google search, I turned up a plan for a tester similar to what you describe. It used a timer to iterate through the different pins, but I can imagine a manual switch doing the job as well. And you’re right, it’s a very practical design because it provides lots of information – for each wire, is it connected to anything, to the right thing, or to one or more wrong things. The iteration is the only inconvenient thing.

I’ll probably build Omphaloskeptic’s design first. Maybe with two-way red/green LEDs to indicate correct vs. incorrect direction? Hmmm. Then maybe I’ll try putting together the iterator version.

I’m still after the “elegant, complete solution”, mostly out of sheer bloody-mindedness. It still seems like it should be possible to do the electronic equivalent of a few “if…else” statements without the whole thing turning into a goddamn graph-theory problem. :slight_smile:

I also made it about halfway through a truly baroque design involving a voltage divider (putting A at +9V, B at +4.5V, and C at 0V) and using transistor logic for each of the a,b,c pins. If I finish it and get it to work, I’ll post it as an example of When Programmers Design Hardware (coming this fall on FOX).

Thanks for all the replies!

hello
i want to build cable test from rs232(RX,TX,GND) to conn 3 pin
This tester need to test short between the wire
when the LED is turn on you receiver short between the wire
else the LED is not turn on
Do you have circuit drawing?
thank you

Nick
Do you have a sketch of this

Nick, this is an old thread, but my idea for a cable tester is as follows - take the OP’s circuit and move the LEDs at the other end, and add pushbutton switches to each line, so you can individually test each line by pressing buttons; this will test for opens as well as shorts between any wires:


+9V
 |
 |
 +---Switch---O A      a O---LED---1k---+
 |                                      |
 |                                      |
 +---Switch---O B      b O---LED---1k---+
 |                                      |
 |                                      |
 +---Switch---O C      c O---LED---1k---+
                                        |
                                        |
                                       ---
                                        -
                                       0V

When a switch is closed, only the corresponding LED should light (mount the LEDs next to the switches so you can easily tell which is which)); an open will result in the LED not lighting, a miswiring will cause a different LED to light, and a short will cause two LEDs to light.

Is it possible to have an LED give three distinct colors, given three distinct voltages?

What I’m thinking is this:
ABC being one end of the three-conductor wire, abc being the other.
Have one tester component with a 9-V battery, and a voltage divider, giving 9V into A, 6V into B, and 3V into C.
Assuming (LED colors of) green for 3V, yellow for 6V, and red for 9V (+or-1V), a properly connected wire should give green, yellow, red, in that order, corresponding to abc.
If you get any variation on that order, you know you miswired it, and know which one is miswired.

I suppose this could be done with 9 LEDs, instead of 3, if one can’t get LEDs that can do what I’m proposing.

Missed my edit window.

Another option would involve the LEDs chasing, a, b, c, all three (to indicate the start of the cycle), a, b, c, all three, a, b, c, all three.
If they chase out of order (a, c, b, all three), you know which is miswired – wires b and c are crossed.

edit: zombie thread:smack:

(My first zombie. I’m so proud! Look at him, shambling about…)

In case anyone cares, in true software usability fashion I realized I had two separate applications. One, did I just assemble a cable with the connections correct? Two, has a previously correctly-assembled cable developed any breaks? So I have two test boxes.

For the first case, I ended up building LSLGuy’s version, with a manual 4-position switch (the three in the cable plus the one in the RJ11 jack that’s not supposed to be used) to power each pair of LEDs in turn. If they light up in parallel, it’s wired correctly. If no light or non-matching LEDs light, incorrectly wired.

For the second application, detecting breaks, I use the diagram in my OP, since it shows the go/no-go state of all three lines at the same time. This is important because the cables are rather long and intermittent breaks are only detected by stretching the wire at various points.

nicknick123, can’t help you unless you can think of a way to connect your cable to a web server and I can bang out a PHP script to test it for you.

(And I called FOX about When Programmers Design Hardware, but they’re not doing gothic horror these days.)