Way to measure three discrete resistances simultaneously

arduinomeasurementresistanceresistors

I'm working on a test box for fencing body cords. These cords are always 3 wires, and will plug into a box that I'm still designing. The test box I currently use connects to a multimeter and has a switch to change from line to line to test each individually. I'd like to build a circuit that can test all three simultaneously using an Arduino. So far, I've been able to use a set of voltage dividers in parallel to measure the resistances, however in the case that one of the plugs has been mis-wired (A wired to B pin, etc) this circuit will not know the difference. Is there any way to isolate each of the circuits, so that I both know that pin A is wired to pin A (B to B, C to C) and can also measure the resistance across the wire?

For reference, here's the current bread board layout that I'm playing with (as well as some code that I've borrowed for making an Arduino ohmmeter) http://123d.circuits.io/circuits/755318-basic-fencing-wire-test-box/embed#breadboard The three resistors near the top are the 3 I'm interested in testing.

Best Answer

Firstly, does it really need to measure resistance? As far as I can tell, it will be a case of a contact either being open circuit or short circuit - nothing inbetween?

The advantage of microcontrollers, Arduinos and so on is they can perform operations in very quick succession, such that they appear simultaneous to the human eye.

So make the Arduino test one part at a time, in quick succession. Thus it will appear as if it has tested all 3 simultaneously.

I cannot work out what your fencing body "cord" does exactly. If you give more information on how it works, perhaps someone can design the circuit for you.

Also, what you say about the mis-wiring problem is not clear: do you want the circuit to some how know if you have mis-wired it? I can't see that being possible.

Edit:

I think I know roughly what you want now. At the least, I can give you a circuit which you can adapt.

The principle will be as per Spehro Pefhany's comment: use 6 pins from the Arduino- three digital to drive and three analog to read. So this is how that would look:

schematic

simulate this circuit – Schematic created using CircuitLab

Ok, it looks like CircuitLab is giving me errors. I will come back to that circuit when it's back up. In the meantime, this is how your pseudocode for the above would look:

  1. Set digital outputs DO1,DO2,DO3 as 1,0,0,0
  2. Now read Analogue input A2.
  3. If Analog input A2 is high, then both A wires are connected. Higher value = lower resistance between wires A and other A.
  4. Now read Analogue input A3.
  5. If Analog input A3 is high, then wires A and B are connected. Higher value = lower resistance between wires A and B.
  6. Now read Analogue input A4.
  7. If Analog input A4 is high, then wires A and C are connected. Higher value = lower resistance between wires A and C.
  8. Set digital outputs DO1,DO2,DO3, D04 as 0,0,1,0
  9. Now read Analogue input A4.
  10. If Analog input A4 is high, then wires B and C are connected. Higher value = lower resistance between wires B and C.

The above will firstly allow you to confirm that the plug is connected the right way. (If the first A is connected to the other A). Then it will let you measure the resistance between all three wires. If you want, you could expand the above to test between all three wires on both ends. The above circuit has some redundancy, you might have noticed. With the above pseudocode, you wouldn't need DO4, D4, R1, A1. So if for example you wanted to test resistane/continuity between 6 wires, you would just need 5 digital ouputs, 5 digital inputs, 5 resistors and 5 diodes.

So you do not need to read the resistances simultaneously. Steps 1-8 above can be completed within a very tiny fraction of a second - in the order of 100 microseconds. (one ten-thousandth of a second).