Building a tester for a special cable.

I would like to check the feasability of this project.
We have an 8 pin cable we use at work for a piece of machinery that is expensive to replace, but unfortunately it has to be carried around quite a bit in an industrial environment as it is connected to a diagnostic device. The problem is finding the intermittent cables that work maybe 95% of the time but fail 5% of the time. We think this is because an intermittent connection inside the cable or in the soldering or crimping at the plug at the end. Unfortunately the plugs are factory sealed and can't be inspected without cutting them open which ruins them.

I have the concept of my tester.

Have 8 Red/Green LEDS
1 switch to toggle testing modes

We'll plug both ends of the cable into the tester and in testing mode 1 all the lights will stay green but will flicker back to red if there's an interruption. (The plan is connect the cable and shake it around vigourously)

Testing mode 2 would be when it detects a momentary interruption in the cable, it holds the light red indefinitely and keeps polling the other lines until the unit is reset.

I could see the possibility of toggling the red/green being a problem without adding additional hardware, if that's not easily doable I'd consider just blanking out the LED.

I'm new to Arduino but have watched many tutorial videos, the code looks simple to write up. Do you think that it will have enough pins with an UNO? If the prototype is good and we decide to make another one. That time I'd think I'd go ahread and forgo the board and run the chip directly which also looks simple enough.

Any caveats or dragons ahead?

Well you only have 20 pins in the UNO, and you want to use 25 pins (8 pins for the lights, 8 input pins for reading the cable value, 8 output pins for emitting the output value, plus 1 pin for your switch to toggle modes). In addition, if you wanted to measure the voltage loss, you only have 6 analog input pins. You will also need to make sure the current will not overload the UNO, and that the wire you are testing is compatible with the current the UNO uses.

Now, there are ways around this to save pins.

You could a common input for all of the cable leads, rather than having a separate pin for each cable.

You could use a shift register/i2c/spi to group all of the LEDs into fewer pins.

You could also move the reading of the wires to a shift register/i2c/spi, but it depends on how fast you need to do the measurements.

An alternative approach is to use an oscilloscope to measure the 8 inputs and show you a graph of when you have cable breaks. Here is a cheap one that I bookmarked some time ago: http://www.ebay.com/itm/330583988832?ssPageName=STRK:MESINDXX:IT&_trksid=p3984.m1436.l2649.

Here is a page on building your own oscilloscope: http://www.practicalarduino.com/projects/scope-logic-analyzer.

If this is a simple pin-to-pin cable, you can do a "walking ones test". One end of the cable is connected to 8-outputs, and the other end connects to 8-inputs. As long as you read-back what you write, the cable is OK.

You write a pattern that looks like this in binary:
0000 0001
0000 0010
0000 0100
0000 1000
0001 0000...

With 8 reads & writes, you can check all 8 connections for opens or shorts. (You'll want to add some resistors to the ouputs to prevent shorts from damaging the Arduino.)

To catch intermittant failures, you can run a loop and latch or count the errors.

Then, all you really need is one LED to indicate "good". If you want to diagnose exactly what's wrong, you can add a header or some kind of break-out pins to hook-up a multimeter. Or, you can upt an additional LED on each digital input. If you run it slowly enough, you can watch the LEDs and if one doesn't come-on, or if two come on at a time, you'll know exactly wht the problem is... Or, you slow-down the loop only when you detect an error.

Or if you're not worried about shorts, just hook-up 8 LEDs with no "brain chip". If one LED doesn't light-up, or if it flickers when the cable is flexed, you've got a failure.

(This is in reply to Michael, I hadn't read the other post yet)

Ok, some slight changes based upon your information.

How about (if this is possible) running the LED inline with the cable and then cutting the power to the LED if an interruption is detected in mode 2.

So basically bring 8 pins high to complete the circuit and light all the LEDS and if by shaking the cable a circuit is interrupted, take that pin low until the device is reset and continue scanning the other pins.

Would I be able to detect a circuit interruption? Or can the pins only be input or output?

The cable itself will be anywhere from 1 foot to 1 meter. 300V rated 24AWG shielded twisted pair marked 2464. The shield is braided on the inside and is plastic or vinyl coated on the outside.

The cable will not be powered by anything other than the tester. In practice the cable runs from 12 to 24v in its normal environment.

The tester will have connectors corresponding to both sides of the cable, and the cable will simply complete the circuit.

This is a very interesting idea as well. The protocol used on the cable I believe is capable of 500kbps so at 1 to 3 feet, I think should be capable of the fastest speed the arduino can send to it.

DVDdoug:
If this is a simple pin-to-pin cable, you can do a "walking ones test". One end of the cable is connected to 8-outputs, and the other end connects to 8-inputs. As long as you read-back what you write, the cable is OK.

You write a pattern that looks like this in binary:
0000 0001
0000 0010
0000 0100
0000 1000
0001 0000...

With 8 reads & writes, you can check all 8 connections for opens or shorts. (You'll want to add some resistors to the ouputs to prevent shorts from damaging the Arduino.)

To catch intermittant failures, you can run a loop and latch or count the errors.

Then, all you really need is one LED to indicate "good". If you want to diagnose exactly what's wrong, you can add a header or some kind of break-out pins to hook-up a multimeter.

Or if you're not worried about shorts, just hook-up 8 LEDs with no "brain chip". If one LED doesn't light-up, or if it flickers when the cable is flexed, you've got a failure.

I don't have an official pinout of the cable but from continutity testing, no pins are cross connected. It does appear to be a 1 to 1 connection.

The side of the cable that goes to the device being tested has a known pinout. Theres, power (12 to 24v), ground, Bus 1 data+, Bus 1 data-, Bus 1 common, Bus 2 data+, Bus 2 data-

The final pin has no listed function, but it does correspond with a pin on the other side of the cable.

stonent:
I don't have an official pinout of the cable but from continutity testing, no pins are cross connected. It does appear to be a 1 to 1 connection.

The side of the cable that goes to the device being tested has a known pinout. Theres, power (12 to 24v), ground, Bus 1 data+, Bus 1 data-, Bus 1 common, Bus 2 data+, Bus 2 data-

The final pin has no listed function, but it does correspond with a pin on the other side of the cable.

Not having the electronics background, I would suspect if the cable normally gets 12-24v, you would want to test it with 12-24v, otherwise you might miss problems that don't show up with smaller voltages, but does show when you are using the cable as expected. Obviously with the Arduino, you can't drive it at that voltage directly, and would need an opto-isolator, relay, or similar to drive the voltage.

Well assuming you just want a quick go/no go test on the cable as you twist it about trying to force a intermittent open there is a real short cut method that would require minimum external circuitry. Just plug the two ends into matching connectors and on the connector wire cross connections such as pin 1 on a connector wires to it's pin 2 and at the other end pin 2 wires to pin 3 and back at the other end pin 3 wires to pins 4, etc, etc.
So you end up with one long series path that starts at pin 1 at one connector and ends on pin 25 at the other end connector. Now wire pin 1 to an arduino output pin and pin 25 of the other end to a arduino input pin. Now have a sketch send say 100 millisecond highs and lows, checking the input pin matching the output pin after every change in output sent. Now wiggle, step on, spit on, etc the cable seeing if you can generate a condition where the input doesn't match the output sent, and if so you have identified a 'flacky' cable.

So while it won't help actually identify where the intermittent connection is at, it does give you a quick way to check out a group of cables quickly to cull out the intermittent ones.

Lefty

MichaelMeissner:

stonent:
I don't have an official pinout of the cable but from continutity testing, no pins are cross connected. It does appear to be a 1 to 1 connection.

The side of the cable that goes to the device being tested has a known pinout. Theres, power (12 to 24v), ground, Bus 1 data+, Bus 1 data-, Bus 1 common, Bus 2 data+, Bus 2 data-

The final pin has no listed function, but it does correspond with a pin on the other side of the cable.

Not having the electronics background, I would suspect if the cable normally gets 12-24v, you would want to test it with 12-24v, otherwise you might miss problems that don't show up with smaller voltages, but does show when you are using the cable as expected. Obviously with the Arduino, you can't drive it at that voltage directly, and would need an opto-isolator, relay, or similar to drive the voltage.

Yeah but it's low current. The diagnostic tool can also be powered from a USB port. So shouldn't be more than 2.5W drawn on the cable.

The cable itself when cut apart looks like ethernet with a woven sheath over it and then dipped in the same stuff the black coating on a computer power cord appears to be.

I think for intermittent cable breaks I've got a good idea now about what I'd like to try.