I must admit to feeling bad ever since I posted this, because I have to confess to being deliberately misleading.
The reason I used quotes when talking about "input" A and "input" B and "output" Y is that the whole concept of inputs and outputs is a bit nebulous (or perhaps we should say "subjective") when it comes to working with relays.
There, you see, I'm not being too mean... I'm giving you a clue (well, a hint of a sniff of a clue LOL)
You can get the functionality of the relay with a 2:1 bus switch such as the Fairchild Semi NC7SB3257. Like the relay, you get bidirectional flow between the common terminal Y and the NC/NO terminals A and B.
I remember playing with relay boxes in high school. Lots of noise, loads of fun. I took another look at relay logic when I studied VLSI design, since pass transistors let you do things like the controlling a single light from any number of DPDT switches instead of a bunch of TTL gates. If anyone wants to cheat, the theory behind relay logic is contained in Claude Shannon's 1937 Master's Thesis A Symbolic Analysis of Relay and Switching Circuits, also published in a 1938 issue of Transactions of the AIEE.
You can do a very nice XOR using just two of those Mock Relays. First a ladder diagram:
|---[ A]----[/B]--+--( )----|
We get conduction if A & !B or !A & B. Next, we use the fact that the relay can conduct in either direction through the NO and NC connections and use one set of SPDT contacts for both A and !A (connect COM to the terminal on the left) and one set of SPDT contacts for B and !B (connect COM to the relay coil on the right). Then you just wire the NO/NC contacts of the two relays to each other. You can swap the NO/NC wires to get XNOR.
This is the same switching you use for an electric light that's controlled from two locations. If you want more than two locations, you need DPDT switches for the middle switches which require pairs of the Mock Relays. This gives you the odd or even parity function, depending on how you hook it up.
When I first got my training part of it covered Strowger telephone exchanges. Which are nothing more than huge collections of relay logic. They used the old GPO 3000 type relays - probably 2 or 3 times as large as the one you show here Max. They had specialist tools like tension gauges and what we called "goalposts" - two small pins sticking up from a thin flat bar that were used for precisely bending and adjusting the tension on the contact springs. Lots of fun, and noisy too when you had a few thousand of them in an exchange.
More recently I have collected some latching relays from some chucked out equipment. You put 12V on the coil one way and it sets the contacts one way (even when you remove the 12V). You put the 12V the other way and it pushes the contacts the other way. I'm not sure what I can do with them, I recall a solar panel charge controller which used one - hence no constant drain on the battery when it was charging, and no diode voltage drop - but I haven't found the diagram for it yet.
I also have some small relays with no less than 8 changeover contacts. Problem is the coils are 48V.....
Relays in many ways are great things. If you don't abuse the contacts they last nearly for ever and they are almost totally immune to spikes and surges. For simple switching they are hard to beat.
BTW if anyone is interested in or can use any of the above, I'll gladly part with them - I work on the principle that if I can see a use for something I'll grab it, and if anyone else can put it to use they can have it. Works well, except I need a bigger shed :-)
January 2016 Cartoon Caption ContestBob's punishment for missing his deadline was to be tied to his chair tantalizingly close to a disconnected cable, with one hand superglued to his desk and another to his chin, while the pages from his wall calendar were slowly torn away.122 comments