Author Topic: Wires in pairs  (Read 5769 times)

0 Members and 1 Guest are viewing this topic.

Offline ErxTopic starter

  • Newbie
  • Posts: 4
Wires in pairs
« on: May 16, 2015, 05:19:24 am »
Hi,

I am trying to build a system where connecting 10 wires in specific pairs activates the relay. Other combinations would do nothing.
12V DC  is available to power the schematics.

This "bare wire ends puzzle" is part of the larger puzzle, and bare wire ends must be safe to be touched with hands.

I've been able to build a working system where specific wires need to be connected to the ground and others must be clear of the ground in order the relay to activate. This kind of works for this application, but  what I really need is specific pairs to be formed to engage the relay.

Appreciate any hints on this.

Thanks
Eric

 

Offline Mr.B

  • Supporter
  • ****
  • Posts: 1237
  • Country: nz
Re: Wires in pairs
« Reply #1 on: May 16, 2015, 05:54:57 am »
Sounds to me like the perfect application for a small cheap micro.
That would also make it very easy to change the valid combinations in code if you wanted that flexibility.
If you have no experience with using micros directly, go for something like an Arduino or similar ready to go platform.
I approach the thinking of all of my posts using AI in the first instance. (Awkward Irregularity)
 

Offline VK5RC

  • Supporter
  • ****
  • Posts: 2672
  • Country: au
Re: Wires in pairs
« Reply #2 on: May 16, 2015, 05:55:40 am »
Isn't by definition 'ground'  mean that all 5 'earthy'  wires are common,  don't you need 5 floating power supplies?
Whoah! Watch where that landed we might need it later.
 

Offline kolonelkadat

  • Regular Contributor
  • *
  • Posts: 202
  • Country: us
  • Obviously, windows are central to Windows.
    • Force Project X
Re: Wires in pairs
« Reply #3 on: May 16, 2015, 06:02:28 am »
I would start with a micro controller with 5 analog inputs; 1 for each wire pair and 10 resistors of different values; 1 for each wire ...

But im not especially imaginative
 

Offline Delta

  • Super Contributor
  • ***
  • Posts: 1221
  • Country: gb
Re: Wires in pairs
« Reply #4 on: May 16, 2015, 11:52:29 am »
28pin PIC Microcontroller. 10 GPIO pins as input with pulldowns, 10 as output.
Drive JUST ONE output high, and check if its paired input goes high. Then scan through all in sequence.

Et violin, as the French say!
« Last Edit: May 16, 2015, 11:54:18 am by Delta »
 

Offline atferrari

  • Frequent Contributor
  • **
  • Posts: 314
  • Country: ar
Re: Wires in pairs
« Reply #5 on: May 16, 2015, 12:21:25 pm »
Those wires, do they have any identifiable signal permanently applied to them, are they (some) permanently grounded and the rest a certain voltage? Otherwise, how do you intend identify each component of each pair.

Could you show a drawing?

What if any pair is reversed as AB going BA?
Agustín Tomás
In theory, there is no difference between theory and practice. In practice, however, there is.
 

Offline Psi

  • Super Contributor
  • ***
  • Posts: 9939
  • Country: nz
Re: Wires in pairs
« Reply #6 on: May 16, 2015, 12:21:44 pm »
If you don't want to use a MCU you can always use multiple isolated power feeds to drive 1 relay per pair.
Use a contact from each relay in series to get your pass/fail.

if power is isolated and negative from each power source only goes to its own relay then the relays will only engage when their correct positive is connected to them.
« Last Edit: May 16, 2015, 12:25:12 pm by Psi »
Greek letter 'Psi' (not Pounds per Square Inch)
 

Offline ErxTopic starter

  • Newbie
  • Posts: 4
Re: Wires in pairs
« Reply #7 on: May 16, 2015, 06:05:04 pm »
Thanks for the ideas!

I will dig into the Arduino to see if this is doable for me.

There is no signal in the wires, there can be if needed.. What is important that it triggers action (open lock) only when correct pairs are connected. But not when all the wires are connected together for example.

Using 5 power sources and relays could be the way forward. Question is what happens if all the wires are connected together. This would trigger an action right?

This is what I have so far

 

It is basically 3 NO relays and 1 NC relay.

Wires 8,9,10 are ground
connecting wires 1,2 and 3 to the ground triggers action.
Wires 4,5,6,7 will trigger NC relay and break the circuit if connected to ground. So breaking the circuit when all wires are connected together.

This is not ideal, because just playing around with bunch of wires it is highly likely to trigger action. So I am still looking for simplest way to tackle it.
 

Offline dom0

  • Super Contributor
  • ***
  • Posts: 1483
  • Country: 00
Re: Wires in pairs
« Reply #8 on: May 16, 2015, 06:08:33 pm »
Discrete logic:

One side of each pair goes to a ring counter and one input of a NAND gate. The other goes to the other input of the NAND.
Then it depends what you need -> latching action until explicit reset? Then just feed the output of the NAND to an async flip flop and connect the reset button to the reset inputs of all flip flops.
The counter can be clocked by any rudimentary clock source.
,
 

Offline jeroen79

  • Frequent Contributor
  • **
  • Posts: 529
Re: Wires in pairs
« Reply #9 on: May 16, 2015, 10:49:25 pm »
Using relays and isolated PSUs allows for the possibility of wiring up a chain of unrelated PSUs/relays which would then all turn on.

You could use a decade counter like a 4017 to put vcc on one socket and at the same time make a transistor conduct on the matching socket.
If there is a wire between the pair there will be vcc (minus a bit) at the emitter.
If the pair is not connected with a wire a pull down resistor will pull the emitter to ground.

Then you add a set/reset logic gate that will begin as high.
As soon as it reads low on the input it will output low until it is reset.
 

Offline atferrari

  • Frequent Contributor
  • **
  • Posts: 314
  • Country: ar
Re: Wires in pairs
« Reply #10 on: May 16, 2015, 11:20:11 pm »
Not clear to me what the OP intends to achieve.

I cannot make sense of your drawing. Sorry.
Agustín Tomás
In theory, there is no difference between theory and practice. In practice, however, there is.
 

Offline edy

  • Super Contributor
  • ***
  • Posts: 2385
  • Country: ca
    • DevHackMod Channel
Re: Wires in pairs
« Reply #11 on: May 17, 2015, 01:27:47 am »
From what I understand it is a kind of combination lock puzzle. You have 10 wires sitting in front of you. You must connect up pairs and only one combination of 5 pairs works. If you try to join all wires together, or any other combination of 2, 3 or more wires it shouldn't work. That means you have to somehow test for other combos.

The easiest thing I can think of is to use a micro and send different signals along 5 wires and listen to those signals in the other 5 sense wires. You could send 5 different square waves but at different frequencies. You scan the sense wires for them to match the frequency that should be on the correct combination. If you try to combine them in the wrong order or all together it will mess up your sense wires, you definitely won't get a pass in your code.

Instead of frequencies you can also use voltage steps. For example, they could represent a 5 bit level.... each step is a different bit. Let's say 00000 to 11111. Each output wire represents one bit.

The first wire 00000 or 00001 gives 0 or 1 volt.
The second wire 00010 gives 0 or 2 volt.
Third wire 00100 gives 4 volt.
Fourth wire 01000 gives 8 volt.
Fifth wire 10000 gives 16 volt.

Now if you can sum the voltages when you combine the wires you will know exactly which wires are being used because they will represent a discrete value that can only be created a special way. For example to get say 7 volts you must have 00111 or wires 1,2,3 touching.

You would then have 5 of these source voltage wires and 5 sense wires.

Another trick is to simply have one long wire looped like a shoelace through a board 5 times.... It represents a compete circuit from the start to finish.... Or think of a coil with 5 turns. Now cut the coil along one side and hide the other. Now you have 10 free ends sticking out of your board. You have no idea how to connect them but if you do it wrong you will not complete the circuit. Each correct step though through the path can add another voltage step (as mentioned) so unless you join them all correctly you won't get up to 16 volts. For example, if you try to join all ends together you will short the start and end and not get any voltage series addition. If you connect the wires in the wrong order you will also short one or more loops and won't get a voltage step.

Alternatively you could do the same with resistors, so instead of additive it is subtractive. You just need to select values or use trim pots that also let you dial in a binary-like resistance to "code" for it so you know what resistors your series circuit should be. If you connect the wires any wrong way you don't get the same series resistance.
YouTube: www.devhackmod.com LBRY: https://lbry.tv/@winegaming:b Bandcamp Music Link
"Ye cannae change the laws of physics, captain" - Scotty
 

Offline edy

  • Super Contributor
  • ***
  • Posts: 2385
  • Country: ca
    • DevHackMod Channel
Re: Wires in pairs
« Reply #12 on: May 17, 2015, 01:30:21 am »
I will upload a drawing for the resistor version.... I think that is the simplest, and then you can critique it for possible bugs.
YouTube: www.devhackmod.com LBRY: https://lbry.tv/@winegaming:b Bandcamp Music Link
"Ye cannae change the laws of physics, captain" - Scotty
 

Offline edy

  • Super Contributor
  • ***
  • Posts: 2385
  • Country: ca
    • DevHackMod Channel
Re: Wires in pairs
« Reply #13 on: May 17, 2015, 01:55:27 am »
Here is the resistor version. The values don't matter as long as when you add them they must give unique values that can only be deciphered by knowing what unique combinations they give. For example, if you use resistors like this:

1, 10, 100, 1000, 10000 and your circuit has a resistance value of 11001 you will know you have connected which 3 resistors.

In this puzzle it probably doesn't even matter as long as you add up to the total. So you could have 5 x 1000 resistors and as long as you get 5000 ohms you must have correctly connected all wires the correct way to run them all in series. Any other combo or shorting of ends (or of all wires) will get you zero or something less than 5000.

That is probably the simplest way to do it and without any programming or logic.
YouTube: www.devhackmod.com LBRY: https://lbry.tv/@winegaming:b Bandcamp Music Link
"Ye cannae change the laws of physics, captain" - Scotty
 

Offline edy

  • Super Contributor
  • ***
  • Posts: 2385
  • Country: ca
    • DevHackMod Channel
Re: Wires in pairs
« Reply #14 on: May 17, 2015, 02:12:19 am »
Actually while the number of combos goes down, I detected a flaw in this design. You can still accidentally complete the circuit if you just jump loops the right way and end up connecting it to the end points. Basically it is still hard to get but there is no single unique combo... there are several.

The addition of diodes will narrow it down some more because it will ensure directionality but there will still be more than one combo.

I need to think about it but I'm sure this can be done without much more needed. I still think you should be able to test resistances across the junctions you know are the correct solution using unique resistance values... and that will ensure you need to bridge matching pairs. I'll get back to you on this one... I can almost taste the solution.
« Last Edit: May 17, 2015, 02:20:54 am by edy »
YouTube: www.devhackmod.com LBRY: https://lbry.tv/@winegaming:b Bandcamp Music Link
"Ye cannae change the laws of physics, captain" - Scotty
 

Offline Psi

  • Super Contributor
  • ***
  • Posts: 9939
  • Country: nz
Re: Wires in pairs
« Reply #15 on: May 17, 2015, 02:53:38 am »
Yeah, this problem really does suit a MCU.  When using relays its hard to get a fail when all wires are shorted togeher
Greek letter 'Psi' (not Pounds per Square Inch)
 

Offline ErxTopic starter

  • Newbie
  • Posts: 4
Re: Wires in pairs
« Reply #16 on: May 18, 2015, 09:05:54 am »
Hi,

thanks for the ideas again! Edy, building on your idea, it is not actually critical for me not to have alternative combos, it would just be good to keep them in minimum.  The odds that Edys idea gives are ok within this application.

Based on the idea I  made the following drawing.  Basically I would just need a switch to activate on specific resistance that is equal to R1+R2+R3+R4.  Actually R1 to R4 could be the same because only the sum counts right?



So  how do I make a switch that only changes state at specific resistance?  I know the switch part in the drawing is probably not gone do it, because I need the switch to stay off when there is no connection through the wires (open ends) but also when the resistance is smaller than R1+R2+R3+R4.
 

Offline Mr.B

  • Supporter
  • ****
  • Posts: 1237
  • Country: nz
Re: Wires in pairs
« Reply #17 on: May 18, 2015, 07:43:54 pm »
No offence, but you seem to be making a simple problem more complex.
This truly is a simple MCU project.
$5 Arduino clone and 30 minutes (or less) coding.
I approach the thinking of all of my posts using AI in the first instance. (Awkward Irregularity)
 

Offline kolbep

  • Frequent Contributor
  • **
  • Posts: 598
  • Country: za
    • ShoutingElectronics.com
Re: Wires in pairs
« Reply #18 on: May 18, 2015, 08:49:50 pm »
You need some sort of comparator.

Let me fire up Eagle quickly

So  how do I make a switch that only changes state at specific resistance?  I know the switch part in the drawing is probably not gone do it, because I need the switch to stay off when there is no connection through the wires (open ends) but also when the resistance is smaller than R1+R2+R3+R4.
====================================
www.ShoutingElectronics.com Don't just talk about Electronics, SHOUT ABOUT IT! Electronics Blog Site and Youtube Channel
 

Offline kolbep

  • Frequent Contributor
  • **
  • Posts: 598
  • Country: za
    • ShoutingElectronics.com
Re: Wires in pairs
« Reply #19 on: May 18, 2015, 09:11:29 pm »
Ok
Here is the input to the comparator (See PIC).
Basically the resistance on the lower leg on the user side must match the resistance on the other leg internally.

If it does, then both the legs will be at the same voltage (potential divider).
The comparator sees that they are the same (somebody else will have to help with that part of it, I am not too clued up on it).

If the voltages on those 2 legs are the same (because of the same resistances) the comparator will give an output.
If the voltages are different (if they short out the wrong pins, then the resistance for the lower leg on the user side will be less, and that means that the voltage going into Input B on the comparator will be less than the 'control' voltage set on the right (input B).

Either situation will cause the comparator to switch off its output.
Only by matching the user settable resistances with the built in resistance, will they be able to activate the system.
(Then they get clever, and can also measure the pins with a dmm to figure out which is the power (through R1) and ground. Then they put a POT across those two pins, and just turn the pot until the comparator sees a balance, and then activates). But they will probably have to know how you are doing it to be able to figure out how to do that...

Alarm systems do something similar by having a certain value resistor (I think 33r or 330r) in the last sensor on the line. If somebody cuts the line, the high resistance unbalances the comparator, and the system indicates that there is a Fault or a violated sensor (and sets off the alarm if armed). If somebody shorts out the line, then it lowers the resistance, and it falls out of the comparators window, then the system indicates that there is a definate fault, and then reports a tamper, and also sets off the alarm (if aremed)

P
====================================
www.ShoutingElectronics.com Don't just talk about Electronics, SHOUT ABOUT IT! Electronics Blog Site and Youtube Channel
 

Offline ErxTopic starter

  • Newbie
  • Posts: 4
Re: Wires in pairs
« Reply #20 on: May 19, 2015, 01:55:17 pm »
Thanks kolbep!

based on the feedback I came to this. Would this work with 12v or is there something I am misunderstanding?  The idea is to use the two 5K pots to set the limits  for activation.


Feedback and critics are welcome.


Thanks
Eric
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf