Newb but have a problem

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.

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?

guirein:
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.

guirein:
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. :astonished:

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

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:

saildude:
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.

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.

Maybe I have misunderstood this solution:

CrossRoads:
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.

Hi,
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... :slight_smile:

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.

Paul__B:
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.
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. :astonished:

Hello! thanks for the answer, we have loots of computers laying around on the factory, not a problem to install linux on one of them.

about the nano, looks like a good idea (i think will make all what i need)

about programing i have only the basics so i called a guy that worked whith me a long time ago and he is coming friday (he's a very good programmer). i will keep this tread updated whith the difficults i am facing :smiley:

thanks in advance.

6v6gt:
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:

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 like not to need to have to draw all the cables, it will be massive work and i'm doing it to make things easyer.

i toth to make like connect all the cables the map would make all the pins negative and lith up one by one, but i was thinking if when the program was testing after and a non connected terminal was mistaken put a cable when the program will test it, it will break the arduino (like two positives will be connected togeder ) or a loop going back to the same pin (it happens sometimes)

for all the other guys that are helping whith boards and expander im so glad (its like you all are talking german but my friend will help me figure out what are you talking about)

if my very bad english is not understandable i'm sorry is not my first lenguage.

thanks a lot it will boost my research a LOT.

thanks

Guilherme Reinheimer

guirein:
. . .
i would like not to need to have to draw all the cables, it will be massive work and i'm doing it to make things easyer.
. . .

It does not have to be a detailed drawing. It can also be a simple connection list. But you must have some way to ensure that you always connect the same cable type in the same way to the new cable tester. If you don't ensure this, then clearly the cable will not match the map which the program created during the "learn" mode.

guirein:
. . .

i toth to make like connect all the cables the map would make all the pins negative and lith up one by one, but i was thinking if when the program was testing after and a non connected terminal was mistaken put a cable when the program will test it, it will break the arduino (like two positives will be connected togeder ) or a loop going back to the same pin (it happens sometimes)
. . .

If you use the suggested port expanders, for example MCP23017, the outputs are either 0 volts or 5 volts through a 30K ohm resistor, depending on the state of the testing. There is no risk of a short circuit or electrical fault no matter how the cables are interconnected.

guirein:
Hello! thanks for the answer, we have lots of computers laying around on the factory, not a problem to install Linux on one of them.

I thought you would!

Linux does not suffer from the "planned obsolescence" of Windoze and handles the hardware (such as serial and USB ports) better so Arduino is much easier to work with.

guirein:
about the Nano, looks like a good idea (I think will make all what I need)

The Nano is a practical form factor - easier to make the connections for an industrial device. Rather than expecting to make all the test connections on one board, a number of port expanders can be connected (and there are tricks to connect more than 8 so you could if it was ever required, have more than 128 connections) so the terminations are more spread out. It also makes repair easier should some accident occur. :astonished:

6v6gt:
It does not have to be a detailed drawing. It can also be a simple connection list. But you must have some way to ensure that you always connect the same cable type in the same way to the new cable tester. If you don't ensure this, then clearly the cable will not match the map which the program created during the "learn" mode.

If you use the suggested port expanders, for example MCP23017, the outputs are either 0 volts or 5 volts through a 30K ohm resistor, depending on the state of the testing. There is no risk of a short circuit or electrical fault no matter how the cables are interconnected.

about the drawing, the cables will always have the same "adaptors" for the connections, so they can only be connected in one way, i will try to get a picture of our manual testing here.

http://imgurl.me/image/Pwiul

this connectors will have adapters to the actual wiring itself, and i'm thinking of using only 21 position connectors and adapters betwen them to every wiring so i can hide the arduino itself.

maybe i can program the arduino to do the map itself? i don't know now, my friend is coming today 17:00pm (gtm -3) and he will help me figure it out this programing part.

about the shorts, i think i have like 5000 resistors of a kind on the manual test bench, so i will see if they are the right ones :smiley:

Paul__B:
I thought you would!

Linux does not suffer from the "planned obsolescence" of Windoze and handles the hardware (such as serial and USB ports) better so Arduino is much easier to work with.
The Nano is a practical form factor - easier to make the connections for an industrial device. Rather than expecting to make all the test connections on one board, a number of port expanders can be connected (and there are tricks to connect more than 8 so you could if it was ever required, have more than 128 connections) so the terminations are more spread out. It also makes repair easier should some accident occur. :astonished:

i'm very likely to get to linux world, but here we have windows 10 file sharing by the server and lots of drawings in autocad... maybe i will need to buy a new pc just for that... but for testing i can borrow one just fine.

about the expanders i think 128 will be just fine, worst case cenario i can split the wiring testing in halfs and test it like that, or maybe get a bigger arduino?

i was looking on one of my supplyers and it has the arduino UNO and Mega very cheap (for brazil standards) maybe i can get one a little more expansive and have a lot more terminals to work with.

thanks again :smiley:

guirein:
. . .
about the drawing, the cables will always have the same "adaptors" for the connections, so they can only be connected in one way, i will try to get a picture of our manual testing here.

http://imgurl.me/image/Pwiul . . .

this connectors will have adapters to the actual wiring itself, and i'm thinking of using only 21 position connectors and adapters betwen them to every wiring so i can hide the arduino itself.

maybe i can program the arduino to do the map itself? i don't know now, my friend is coming today 17:00pm (gtm -3) and he will help me figure it out this programing part.

about the shorts, i think i have like 5000 resistors of a kind on the manual test bench, so i will see if they are the right ones
. . .

You have shown a picture illustrating 5 connectors. This collection of 5 connectors is all that is required for all the wiring harnesses you wish to test ?

Anyway, even if you are connecting the new Arduino cable tester indirectly to the these connectors, maybe through some sort of patch panel and/or using adapters, you will have to ensure that the same wiring harness is always connected in exactly the same way to the cable tester.

The proposed Arduino cable tester will build the connection map itself. If will systematically test each possible combination of connections during the learn mode, build a map, and write it to some storage (SD card).

You don't need any external resistors if you use the suggested port adapters because these include switchable resistors for exactly that purpose.