Can I use an Arduino to check I/O without addition hardware?

Hi all :slight_smile: ,

Im new to this and pretty unexperienced with an Arduino having only used one for some pretty basic projects in the past.

I have been given a difficult project at University where I have to design a test rig to be used on a wire harness for a car engine. The test rig needs to be able to ensure that the wire harness is working correctly, before it is fitted onto the engine.

Basically, it needs to be able to check that the correct signal is going from one place to another within the harness when the wire harness is attached to the rig. There are ALOT of different signals being sent place to place on the harness, and some signals are being sent to more than one place at a time.

My idea is that I can somehow program an Arduino to be an interface, that can read all the inputs and outputs from the harness and check that they are running correctly and being sent to the correct place, and then display the information on some sort of display module.

Firstly, do you think that this is possible?

If it is possible, what would be the first steps I would need to take to go about designing this, and will I need to buy additional hardware beyond a basic Arduino kit?

NB - The signals from the harness can all be sent into a USB so could plug straight into an Arduino.

Thanks very much,
DH :slight_smile:

It is surely possible. Check the number of available inputs/outputs and choose a controller that matches. Using various end connectors in the other end of the harnes less I/O would do.
Check Forum! This question was asked a short time ago.

Google and/or search this forum for "arduino cable tester". Like Railroader says, the subject comes up once in a while.

There is a common method called a "walking ones test". It refers to binary ones (high = 5V) and zeros (low = 0V).

So as a simple example, let's say you have 4 conductors with one end connected to 4-outputs and the other end connected to 4-inputs. The binary data looks like this as you write one pin high at a time with the other pins all written low:

0001
0010
0100
1000

If you don't read what you write, you've got an open or a short. It takes a little more programming/analysis if you need to identify exactly what the problem is but if everything starts-out OK and then you read two inputs high at the same time, that's a short, etc.

It also gets more complicated if you have a wire that terminates at more than one place (which is common with harnesses).

without addition hardware?

At a minimum, you will need to add current-limiting resistors. If you have a short, you can have two (or more) Arduino outputs shorted together with one writing high and one writing low, and that can potentially damage the Arduino with the outputs drawing excess current as the outputs "fight" each other. (Shorted inputs won't damage anything so you don't need resistors on the inputs.)

….Speaking of inputs, enable the internal pull-ups so that an open-unconnected input will always read high. That way you won't accidently read the correct state with an open connection.

Where I work, we have a port test (not a cable test) that tests a pair of 8-bit ports by counting from 0 to 255 (0-FF hex). It works the same way, just making sure you read what you write. (A walking-one's test would work just as well and it would be faster... We've got another test that does walking-ones and then walking zeros, and it's very fast.)

Thank you all very much!

Il have a look at what you have suggested and let you know how it goes.

If there are lots of connections it may be simpler to have an Arduino Mega at each end and use one to send data down the lines and the other to detect the data. Then they can compare notes with a simple Serial connection between them.

If this is a college project there will probably be extra brownie points for making a modular system that can be easily adapted to test different wiring harnesses.

...R

DHASWELL:
NB - The signals from the harness can all be sent into a USB so could plug straight into an Arduino.

If so, why using an Arduino rather than a PC?

What do you really want to test?
Everyone seems to assume it's the wiring - whether it's connected.
Or is it the logic - that the correct signal is on the correct wire? If so the nature of the signals matters: analog or digital, voltage levels, if digital: protocol, etc.
Or is it the signals themselves? As you mention USB it feels like that is what you want - in that case it's probably easier to use a PC and some software there that compares received data to what is expected.

wvmarle:
What do you really want to test?
Everyone seems to assume it's the wiring - whether it's connected.

Just to be clear, that is what I assumed when I wrote Reply #5.

Of course I may have assumed wrong.

...R

The logic of the signals doesn’t matter, it is just that the wires are connected in the right places and ensuring that there are no cross connections causing connections where they are unwanted.

Originally I wanted to use excel and use a PC as suggested, but I’m not sure how to get excel to send signals. Basically unsure how to interface between the harness and the computer, which is why I thought and Arduino might be easier.

The signals from the harness can all be sent into a USB so could plug straight into an Arduino.

If that is the case and the USB is designed to be plugged into a PC then you can’t plug it into an Arduino without a USB host shield.

Working for many years designing the main computer and its code for moving, heavy vehicles I know very well the trouble in the assembly line when a faulty harness occured. Almost anything could happend and all the time it could take to find the fault……
Descide how many cables You want Your test system to handle. A test system built on one sending controller and one receiving gives a lot of flexibilty but calls for quite some more work to create.
One single controller having enough number of I/O is of cource the best. Using multiplexers and demultiplexers can make almost any micro controller useful.

Railroader:
A test system built on one sending controller and one receiving gives a lot of flexibilty but calls for quite some more work to create.

I was thinking of controller A asserting a particular pattern on its I/O pins and controller B sending a simple message back to A saying "This is what I got". Then A can compare that with the pattern it had set.

...R