Go Down

Topic: Newb but have a problem (Read 703 times) previous topic - next topic


Oct 21, 2019, 02:47 pm Last Edit: Oct 21, 2019, 02:58 pm by guirein
Good Morning (at least here)

Im starting a new project to my boss, we have a automotive wiring harness factory and our eletrical test is very unefective.

so i started to think how to automate the test, i started thinking to something like a lot of micro relays and a check (conector 1 pin 1 to conector 3 pin 25 and conector 2 pin 3 etc... )

today is tested manually and we have had a lot of problems.. (broken pcbs shorted eletronics)

so i have never ever touched an arduino, is it the right answer to my problem? is difficult to program something like that?

what i have to buy if we decide to start this project?

Thanks in advance

Guilherme Reinheimer


you could try this google search phrase:

cable tester site:https://forum.arduino.cc

You get a number of hits.


i think i have expressed myself badly.

my idea is to make a arduino connect to a good wiring make it "read" the connections and save (like the example one) and plug the other ones and make it say like (no this pin is not making contact or whathever)

and i want to know if its hard to program or i need some very expansive hardware to do it

thanks :]


OK. But that is, as I understand it,  a classic cable tester, where the cable consists of multiple individual cores. May be special in your case of a wiring harness is that some conductors may be intentionally connected together.

So you want to connect an Arduino to all the conductors of a known good wiring harness and it should "learn" the connections by itself. If it later connected (in exactly the same manner) to another similar harness, it can check if it is OK or not with respect shorts and open circuits.

Is that it ?
How many individual cores do these wiring harnesses have (maximum) ?
How many varieties of wiring harnesses do you deal with ?


good afternoon

yes it is exactely what we need!

we have like 30-40 models right now, but we are growing very very fast so it would be cool to have more "memories" (don't know how do you call a hdd memory on arduino world)

about the conections we have some wirings whith 100+ terminals like 30-40 connectors and 3-6 terminals each

thanks in advance


You'd probably have to assume the worst case and have an a connection to a microcontroller port for each exposed terminal. You'd need a number of port expanders.
Then the program would go systematically through each permutation of connenctions and build a map of the wiring harness.
You'd almost certainly need external storage for the collection of maps, say an SD card or maybe an external eeprom.
The testing would be the same with a report if there is a mismatch to the stored map.
If you have a huge number of the same harness, it may be worth while making a dedicated set of connectors for it, otherwise some form of temporary connector to each wiring harness terminal. Obviously the wiring order would have to be the same as when the map for a particular harness was created.


Oct 21, 2019, 08:52 pm Last Edit: Oct 21, 2019, 09:15 pm by guirein
thanks a lot, i will talk to my boss so we can start buying all the stuff necessary.

for the conection area we think to do the connectors counterpart so we dont need to be pluggin in to the pcb itself and have the risk to break it.

any suggestion of hardware to buy?


for the connection area we think to do the connectors counterpart so we don't need to be plugging in to the PCB itself and have the risk to break it.
Correct.  You will have to construct a test harness with all the connectors for your "tested"  harnesses, but with the cabling anchored solidly to an equipment box in which you build the Arduino system.

any suggestion of hardware to buy?
Forget a "UNO" - very inconvenient to use.

You will want a display - and learn to program that first.

Some sort of keyboard to control it - and learn to program that first.

A number of "port expanders" - you need to research that a little, I do not have time just now.

As 6v6gt points out, you will probably want SD card storage or similar.

In general, a Nano would likely handle it.

Considering it all in summary, I think you need three specific hardware elements.
  • An Arduino Nano.
  • A number of port expanders to connect to your test harness.
  • A cheap/ second-hand PC - readily available, no shortage of these - with its monitor and keyboard, running a Linux operating system such as Mint which is reliable and designed for this sort of development.  This fulfils the display, control and storage functions described, perfectly.
Whichever way you go, there is a lot of learning and work involved, no way to avoid any of it.  :smiley-eek:


I would probably not have a "learn" mode - fine but what happens if your sample cable gets lost or develops a problem?

I would have a config file for each cable then a way to select the proper file with your user interface - maybe even some LEDs to indicate where to plug into if you have different cables - same connectors - but wired differently


Oct 22, 2019, 10:31 am Last Edit: Oct 22, 2019, 10:44 am by 6v6gt Reason: added picture
For a maximum total of 128 connections, maybe you just need a Nano and SD card reader/writer as already suggested and 8 MCP23017 bus expanders and, say, 128 flying leads.
You may not even need a display if the MCU is always attached to the PC and can display on the serial monitor.
The program would have a learn mode and a test mode.
To use learn mode, you'd need first a drawing of the harness on you would annotate the cable connectors with connections to your cable tester.
This is so that in test mode, you can connect the harness in exactly the same way to the tester.

The learn mode would be essentially this:
User annotates drawing.
User makes all connections between harness and cable tester.
User enters an ID for the harness and maybe the total number of connections made to it so it does not have to assume the maximum of 128.
The cable tester systematically sets a port LOW and all others as Inputs pulled HIGH and builds a map in an array (2 dimensional say 256 x 2 bytes).
At the end, it writes the map to the SD card with a file name derived from the harness ID.

The test mode is very similar, except that it is now simply verifying that the harness matches its map on the SD card and printing a report.

Sample harness:

I would probably not have a "learn" mode - fine but what happens if your sample cable gets lost or develops a problem?
. . .
The learn mode is a basic requirement. The "sample" cable can be given to a customer because it is of no further use in this. What remains is a cable map on an SD card and a drawing so the future harness under test can be connected in exactly the same way that the sample cable originally was.


I would probably not have a "learn" mode - fine but what happens if your sample cable gets lost or develops a problem?
100% agree
set up a 'library' of known-good cables, then you'll avoid learning a bad.connection or cable.
Experienced responders have a nose for laziness, (they were beginners once)... Sure, there are trolls, chest-beaters, and pretenders - but the help you'll get here is about as good as it gets - if you try to help youself!.


Uno or Nano, TPIC6C595 open drain shift registers, 74HC165 shift registers with pullup resistors on the inputs. Connect  both via SPI to the processor.

As many shift registers as needed for the outputs and inputs.

Connect up shift registers with DB25 connectors or similar on input and output.

Wire up adapters to go from cable under test to the DB25 outputs, and to the DB25 inputs.  Maybe mix them up, DB37 for outputs from TPIC6BC595, DB25 to inputs of 74HC165 so the ends can't be connected backwards.

Connect up cables & adapters. Select the cable name via the LCD screen or similar.

Assume 1:1 connection for now: Read all inputs, make sure none are low to start. If a low shows up, something is miswired.  Code outputs 1 low, and reads all the inputs. If the low shows up at the correct input , that connection is good. If not, that connection is open. If it shows up at the wrong input, it is miswired. If it shows up at more than one input it is miswired.
All that can be reported via the LCD, or send serial messages to the PC.  Might be easier can send more details: cable name, pin under test, good/bad, how so, etc.
Repeat for the next output.

TPIC6C595 is good as it is open drain. It can only pull low, so if an output is shorted to Gnd it will not hurt it. Outputs cannot be shorted to +5V as the signals are pulled up via resistor.

Port Expanders, not needed.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.


Maybe I have misunderstood this solution:

Uno or Nano, TPIC6C595 open drain shift registers, 74HC165 shift registers with pullup resistors on the inputs. Connect  both via SPI to the processor.

As many shift registers as needed for the outputs and inputs.
. . .
In the case of a simple wiring loom, I can see how it would work, because you have 2 ends and can simply connect all the connectors at one end to 74HC165 shift registers with pullups and all the connectors at the other end to TPIC6C59 shift registers and programmatically check the connections.

However, I can't see it working for a complex loom where there are not 2 clean "ends" and some wires may be internally connected or may never appear at the other "end". Or maybe i have misunderstood something.

Take for example the wiring loom in post #9.  If you connected both con1/4 and con2/2 to the ports of a TPIC6C595 you could not see that these are interconnected. Similarly if you connected both con1/4 and con2/2 to the ports of a 74HC165 (pulled high) you could also not see that these are interconnected.

That is the advantage of using port expanders. You can dynamically switch the function of individual ports from output strong low to input pulled high and systematically test all permutations. Also, you don't need external pull up resistors.


What you will have to do is make the expander port input/output assignments dynamic.
That is, in the code void loop(), change an input to an output and vice versa so you can do ALL the necessary tests.

Not set the I/O in setup as a written in stone declaration for the entire code.

Tom... :)
Everything runs on smoke, let the smoke out, it stops running....


The port expanders - the PCF8574/ PCF8575 at least - do not have an input/output assignment.

If you write a pin LOW, it is an output and will read as low unless you overload it - which you should not do!

If you write it HIGH, it will read as whatever level an attached circuit sets it to.

Its pull-up is very weak - you probably would want to provide an external pull-up when connected to external wiring.

Open-drain logic in essence.

Go Up