# Detect wire connections (was: I have a puzzle for me)

**URL:** <https://lookmumnocomputer.discourse.group/t/detect-wire-connections-was-i-have-a-puzzle-for-me/7514>\
**Category:** DIY STUFF\
**Created:** [September 8, 2024, 5:50pm UTC](https://lookmumnocomputer.discourse.group/t/detect-wire-connections-was-i-have-a-puzzle-for-me/7514 "2024-09-08T17:50:31Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![zorch](https://yyz2.discourse-cdn.com/free1/user_avatar/lookmumnocomputer.discourse.group/zorch/32/5586_2.png) [@zorch](https://lookmumnocomputer.discourse.group/u/zorch)\
**Post date:** [September 8, 2024, 5:50pm UTC](https://lookmumnocomputer.discourse.group/t/detect-wire-connections-was-i-have-a-puzzle-for-me/7514/1 "2024-09-08T17:50:31Z")

</div>

I’ve been working on a puzzle and I was wondering if anyone here might have suggestions.

Its basically two groups of four wires: A B C D and 1 2 3 4. The objective is to connect the proper pairs: A must go to 1, B to 2, C to 3, and D to 4. Correct pairs should light individual LEDs and any incorrect connections should have no result (or, even better - some sort of negative result, like lighting a 5th “incorrect” indicator). It would be nice too if there is some way to give incorrect results if someone is cheeky and attempts to connect multiples together at the same time.

I have an arduino uno handy as well as a DMX shield. Having it send out triggers for DMX when connected correctly would be the next level of useful.

---

<div class="post-metadata">

**Author:** ![analogoutput](https://yyz2.discourse-cdn.com/free1/user_avatar/lookmumnocomputer.discourse.group/analogoutput/32/29663_2.png) [@analogoutput](https://lookmumnocomputer.discourse.group/u/analogoutput)\
**Post date:** [September 8, 2024, 9:29pm UTC](https://lookmumnocomputer.discourse.group/t/detect-wire-connections-was-i-have-a-puzzle-for-me/7514/2 "2024-09-08T21:29:09Z")

</div>

An analog strategy: Put different voltages on A, B, C, and D. Put window comparators on 1, 2, 3, and 4, with an LED on each that lights up if the voltage is within the window. Set up the windows to be in a narrow range around each of the voltages used on A–D. Put resistors on A–D so they will passively mix their voltages if two or more are connected. By choosing suitable voltages, window limits, and resistance values you can make it so any combination of two or more of A–D will produce a voltage falling outside any of the windows. You could use logic (maybe even just diodes and a transistor) to light up a fifth LED if none of the 1–4 LEDs is lit.

---

<div class="post-metadata">

**Author:** ![zorch](https://yyz2.discourse-cdn.com/free1/user_avatar/lookmumnocomputer.discourse.group/zorch/32/5586_2.png) [@zorch](https://lookmumnocomputer.discourse.group/u/zorch)\
**Post date:** [September 8, 2024, 11:38pm UTC](https://lookmumnocomputer.discourse.group/t/detect-wire-connections-was-i-have-a-puzzle-for-me/7514/3 "2024-09-08T23:38:57Z")

</div>

I might give this a try on breadboard!

---

<div class="post-metadata">

**Author:** ![Farabide](https://avatars.discourse-cdn.com/v4/letter/f/ecc23a/32.png) [@Farabide](https://lookmumnocomputer.discourse.group/u/Farabide)\
**Post date:** [September 9, 2024, 11:01am UTC](https://lookmumnocomputer.discourse.group/t/detect-wire-connections-was-i-have-a-puzzle-for-me/7514/4 "2024-09-09T11:01:15Z")

</div>

If memory serves there is an ethernet cable tester strategy that does what you need for 4 pairs of wires. Keep me posted.

---

<div class="post-metadata">

**Author:** ![analogoutput](https://yyz2.discourse-cdn.com/free1/user_avatar/lookmumnocomputer.discourse.group/analogoutput/32/29663_2.png) [@analogoutput](https://lookmumnocomputer.discourse.group/u/analogoutput)\
**Post date:** [September 9, 2024, 11:09am UTC](https://lookmumnocomputer.discourse.group/t/detect-wire-connections-was-i-have-a-puzzle-for-me/7514/5 "2024-09-09T11:09:04Z")

</div>

There’s also this

> [@Simple euro rack cable tester](https://lookmumnocomputer.discourse.group/t/simple-euro-rack-cable-tester/3309):
>
> This seems to be an elegant and simple solution to the problem of checking for continuity and shorts in a self made euro rack cable. You need only a few passive components: It uses only passive components. You connect the DUT (device under test i.e. your self made cable) between SV2 and SV3 (SV1 is for powering the circuit). Given that all LEDs will form a long chain, their summed forward voltages must not exceed the supply’s voltage (he recommends to not use white or b…

though it doesn’t quite do (my interpretation of) what you asked: “If there is a break in any of the conductors none of the LEDs will light. If there is a short between conductors the LED between those conductors will not light.”

---

<div class="post-metadata">

**Author:** ![TimMJN](https://yyz2.discourse-cdn.com/free1/user_avatar/lookmumnocomputer.discourse.group/timmjn/32/15227_2.png) [@TimMJN](https://lookmumnocomputer.discourse.group/u/TimMJN)\
**Post date:** [September 9, 2024, 6:53pm UTC](https://lookmumnocomputer.discourse.group/t/detect-wire-connections-was-i-have-a-puzzle-for-me/7514/6 "2024-09-09T18:53:28Z")

</div>

As much as I appreciate the beauty of doing things with analog or logic circuits, if the ultimate goal it to send DMX, I don’t a reason not to just implement it on an Arduino. Simply scan the connections and check against the correct solution. Then light up LEDs accordingly. I have quite some experience sending and receiving DMX via Arduino, and it works a charm.

---

<div class="post-metadata">

**Author:** ![twinturbo](https://avatars.discourse-cdn.com/v4/letter/t/8baadc/32.png) [@twinturbo](https://lookmumnocomputer.discourse.group/u/twinturbo)\
**Post date:** [September 10, 2024, 4:10am UTC](https://lookmumnocomputer.discourse.group/t/detect-wire-connections-was-i-have-a-puzzle-for-me/7514/7 "2024-09-10T04:10:29Z")

</div>

With Arduino 4 out put and 4 input digital pins

in sequene set a output high and read all 4 inputs.

or am i missing something?

---

<div class="post-metadata">

**Author:** ![analogoutput](https://yyz2.discourse-cdn.com/free1/user_avatar/lookmumnocomputer.discourse.group/analogoutput/32/29663_2.png) [@analogoutput](https://lookmumnocomputer.discourse.group/u/analogoutput)\
**Post date:** [September 10, 2024, 3:28pm UTC](https://lookmumnocomputer.discourse.group/t/detect-wire-connections-was-i-have-a-puzzle-for-me/7514/8 "2024-09-10T15:28:31Z")

</div>

Yeah but sometimes it’s fun to be able to say “look mum, no Arduino”.

---

<div class="post-metadata">

**Author:** ![zorch](https://yyz2.discourse-cdn.com/free1/user_avatar/lookmumnocomputer.discourse.group/zorch/32/5586_2.png) [@zorch](https://lookmumnocomputer.discourse.group/u/zorch)\
**Post date:** [September 10, 2024, 3:43pm UTC](https://lookmumnocomputer.discourse.group/t/detect-wire-connections-was-i-have-a-puzzle-for-me/7514/9 "2024-09-10T15:43:46Z")

</div>

Also, please keep in mind that I cant really code.

I can change values and copy and paste all day long - but when it comes to actually generating new code I am useless.

---

<div class="post-metadata">

**Author:** ![Farabide](https://avatars.discourse-cdn.com/v4/letter/f/ecc23a/32.png) [@Farabide](https://lookmumnocomputer.discourse.group/u/Farabide)\
**Post date:** [September 10, 2024, 5:15pm UTC](https://lookmumnocomputer.discourse.group/t/detect-wire-connections-was-i-have-a-puzzle-for-me/7514/10 "2024-09-10T17:15:00Z")

</div>

I am a hoarder of useful code, macros and batch type files and trickery, most pasted into ‘autocorrect’ substitutions (some dynamic in vscode Changing some shortcut label to ‘paste in’ code I know works. I don’t think I’ve written original code since my Borland days in the 80’s

Just remember it’s not plagerism, it’s research! {ref. Lobochevsky.V arr. Lehrer.T}

---

<div class="post-metadata">

**Author:** ![twinturbo](https://avatars.discourse-cdn.com/v4/letter/t/8baadc/32.png) [@twinturbo](https://lookmumnocomputer.discourse.group/u/twinturbo)\
**Post date:** [September 10, 2024, 5:32pm UTC](https://lookmumnocomputer.discourse.group/t/detect-wire-connections-was-i-have-a-puzzle-for-me/7514/11 "2024-09-10T17:32:26Z")

</div>

Something like this should sort of work  
Pair 1 being pins 2-6  
Pair 2 being pins 3-7  
Pair 3 being pins 4-8  
Pair 4 being pins 5-9

```auto
void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);
  pinMode(2,OUTPUT);
  pinMode(3,OUTPUT);
  pinMode(4,OUTPUT);
  pinMode(5,OUTPUT);
  pinMode(6,INPUT);
  pinMode(7,INPUT);
  pinMode(8,INPUT);
  pinMode(9,INPUT);
  digitalWrite(2, LOW );
  digitalWrite(3, LOW );
  digitalWrite(4, LOW );
  digitalWrite(5, LOW );
  
  
}

void loop() {
  // put your main code here, to run repeatedly:
  digitalWrite(2, HIGH );
  if (digitalRead(6 == HIGH )) { Serial.println("Pair 1 conneted");}
  if (digitalRead(6 == LOW )) { Serial.println("Pair 1 Not conneted");}
  if (digitalRead(7 == HIGH )) { Serial.println("Pair 1 missconnected to pair 2");}
  if (digitalRead(8 == HIGH )) { Serial.println("Pair 1 missconnected to pair 3");}
  if (digitalRead(9 == HIGH )) { Serial.println("Pair 1 missconnected to pair 4");}
  digitalWrite(2, LOW );

  digitalWrite(3, HIGH );
  if (digitalRead(6 == HIGH )) { Serial.println("Pair 2 missconnected to pair 1" );}
  if (digitalRead(6 == HIGH )) { Serial.println("Pair 2 connected" );}
  if (digitalRead(7 == LOW )) { Serial.println("Pair 2 Not conneted");}
  if (digitalRead(8 == HIGH )) { Serial.println("Pair 2 missconnected to pair 3");}
  if (digitalRead(9 == HIGH )) { Serial.println("Pair 2 missconnected to pair 4");}
  digitalWrite(3, LOW );

  digitalWrite(4, HIGH );
  if (digitalRead(6 == HIGH )) { Serial.println("Pair 3 missconnected to pair 1");}
  if (digitalRead(7 == HIGH )) { Serial.println("Pair 3 missconnected to pair 2");}
  if (digitalRead(8 == HIGH )) { Serial.println("Pair 3 connected"); }
  if (digitalRead(8 == LOW )) { Serial.println("Pair 3 Not conneted");}
  if (digitalRead(9 == HIGH )) { Serial.println("Pair 3 missconnected to pair 4");}
  digitalWrite(4, LOW );

  digitalWrite(5, HIGH );
  if (digitalRead(6 == HIGH )) { Serial.println("Pair 4 missconnected to pair 1");}
  if (digitalRead(7 == HIGH )) { Serial.println("Pair 4 missconnected to pair 2");}
  if (digitalRead(8 == HIGH )) { Serial.println("Pair 4 missconnected to pair 3");}
  if (digitalRead(9 == HIGH )) { Serial.println("Pair 4 connected");}
  if (digitalRead(9 == LOW )) { Serial.println("Pair 2 Not conneted");}
  
  digitalWrite(5, LOW );

  delay(10000);

  
}

```

---

<div class="post-metadata">

**Author:** ![TimMJN](https://yyz2.discourse-cdn.com/free1/user_avatar/lookmumnocomputer.discourse.group/timmjn/32/15227_2.png) [@TimMJN](https://lookmumnocomputer.discourse.group/u/TimMJN)\
**Post date:** [September 10, 2024, 7:21pm UTC](https://lookmumnocomputer.discourse.group/t/detect-wire-connections-was-i-have-a-puzzle-for-me/7514/12 "2024-09-10T19:21:02Z")

</div>

In this case, I would add a 1k series resistor to the output pins, and a 10k pull down resistor to the input pins

---

<div class="post-metadata">

**Author:** ![twinturbo](https://avatars.discourse-cdn.com/v4/letter/t/8baadc/32.png) [@twinturbo](https://lookmumnocomputer.discourse.group/u/twinturbo)\
**Post date:** [September 10, 2024, 7:43pm UTC](https://lookmumnocomputer.discourse.group/t/detect-wire-connections-was-i-have-a-puzzle-for-me/7514/13 "2024-09-10T19:43:25Z")

</div>

Yeah, was thinking the pull downs just to ensure a floating input does not cause oddity.

---

<div class="post-metadata">

**Author:** ![zorch](https://yyz2.discourse-cdn.com/free1/user_avatar/lookmumnocomputer.discourse.group/zorch/32/5586_2.png) [@zorch](https://lookmumnocomputer.discourse.group/u/zorch)\
**Post date:** [September 12, 2024, 5:20pm UTC](https://lookmumnocomputer.discourse.group/t/detect-wire-connections-was-i-have-a-puzzle-for-me/7514/14 "2024-09-12T17:20:53Z")

</div>

I appreciate the responses - I have just been busy repairing drywall the last few days. In the mean time I have been diving into QLC+ to learn the ins and outs of setting up and controlling a fairly complex custom lighting & effects rig. My project leader has big aspirations and I’m crazy enough to attempt to come up with ways of executing them.

---

<div class="post-metadata">

**Author:** ![twinturbo](https://avatars.discourse-cdn.com/v4/letter/t/8baadc/32.png) [@twinturbo](https://lookmumnocomputer.discourse.group/u/twinturbo)\
**Post date:** [September 13, 2024, 3:21am UTC](https://lookmumnocomputer.discourse.group/t/detect-wire-connections-was-i-have-a-puzzle-for-me/7514/15 "2024-09-13T03:21:01Z")

</div>

Which QLC, I found 5 to be less easy to use than 4 and gave up… that was a while back mind.

---

<div class="post-metadata">

**Author:** ![thomen](https://avatars.discourse-cdn.com/v4/letter/t/9fc29f/32.png) [@thomen](https://lookmumnocomputer.discourse.group/u/thomen)\
**Post date:** [September 13, 2024, 4:14am UTC](https://lookmumnocomputer.discourse.group/t/detect-wire-connections-was-i-have-a-puzzle-for-me/7514/16 "2024-09-13T04:14:30Z")

</div>

@twinturbo Sorry to hijack your thread! I was wondering if you happened to have the kicad footprint/schematics you did for the PB86 buttons

---

<div class="post-metadata">

**Author:** ![zorch](https://yyz2.discourse-cdn.com/free1/user_avatar/lookmumnocomputer.discourse.group/zorch/32/5586_2.png) [@zorch](https://lookmumnocomputer.discourse.group/u/zorch)\
**Post date:** [September 13, 2024, 12:35pm UTC](https://lookmumnocomputer.discourse.group/t/detect-wire-connections-was-i-have-a-puzzle-for-me/7514/17 "2024-09-13T12:35:22Z")

</div>

So far QLC seems pretty straightforward. Its like a new language since I am learning DMX in parallel. I am afraid I’ll soon be asking it to do things that it isn’t capable of.

---

<div class="post-metadata">

**Author:** ![analogoutput](https://yyz2.discourse-cdn.com/free1/user_avatar/lookmumnocomputer.discourse.group/analogoutput/32/29663_2.png) [@analogoutput](https://lookmumnocomputer.discourse.group/u/analogoutput)\
**Post date:** [September 13, 2024, 12:43pm UTC](https://lookmumnocomputer.discourse.group/t/detect-wire-connections-was-i-have-a-puzzle-for-me/7514/18 "2024-09-13T12:43:49Z")

</div>

Having no idea what DMX is I tried googling it. LOL. Can’t be done.

---

<div class="post-metadata">

**Author:** ![zorch](https://yyz2.discourse-cdn.com/free1/user_avatar/lookmumnocomputer.discourse.group/zorch/32/5586_2.png) [@zorch](https://lookmumnocomputer.discourse.group/u/zorch)\
**Post date:** [September 13, 2024, 12:47pm UTC](https://lookmumnocomputer.discourse.group/t/detect-wire-connections-was-i-have-a-puzzle-for-me/7514/19 "2024-09-13T12:47:11Z")

</div>

In my uninformed opinion it seems like “budget MIDI”.

---

<div class="post-metadata">

**Author:** ![analogoutput](https://yyz2.discourse-cdn.com/free1/user_avatar/lookmumnocomputer.discourse.group/analogoutput/32/29663_2.png) [@analogoutput](https://lookmumnocomputer.discourse.group/u/analogoutput)\
**Post date:** [September 13, 2024, 12:49pm UTC](https://lookmumnocomputer.discourse.group/t/detect-wire-connections-was-i-have-a-puzzle-for-me/7514/20 "2024-09-13T12:49:14Z")

</div>

Yeah, I looked it up on Wikipedia.

[Next page](https://lookmumnocomputer.discourse.group/t/detect-wire-connections-was-i-have-a-puzzle-for-me/7514.md?page=2)
