As part of this talk, which is planned for the evening of July 29, I want to give the students some real "hands-on" experience -- seeing and touching things like relays and vacuum tubes and so forth. Now, I do have a couple of relays lying around here in my office (who doesn't?), but these little scamps tend to be relatively modern -- being presented in transparent plastic packages, for example -- which doesnít convey quite the sort of impression I'm hoping to achieve.

If truth be told, I'm happy for any excuse to visit the folks at Mock Electronics to discover any new antique delights with which they invariably tempt me. When I explained what I was planning with regard to my talk and asked if they happened to have any old relays lying around, I certainly wasn't surprised when they whipped out the little beauty you see below.

First of all we have the coil, which is wound around a soft iron core, and which can be energized using the two contacts "C1" and C2" (when I returned to my office, my chum Ivan immediately hooked this little beauty up to his power supply and we discovered that it switches at around 4V and consumes only 20mA; based on this, we assume it was actually intended for 5V operation). Next, we have an iron yoke, which provides a low reluctance path for the magnetic flux.

Then we have the armature, which pivots around the left-hand side of the yoke. When no voltage is applied to the coil, a spring pulls the armature such that it is held against contact "A." This means that whatever voltage value is being presented to "input" contact "A" is conducted through the armature to "output" contact "Y."

When the coil is energized, it attracts the end of the armature in the upper portion of this image, pulling it to the right. Since the armature pivots around the yoke, this causes the end of the armature in the lower portion of this image to move to the left, thereby disengaging from contact "A" and pressing against contact "B." Now, whatever voltage value is being presented to "input" contact "B" is conducted through the armature to "output" contact "Y."

The wonderful thing about the relay in the image above is that it offers such a beautiful combination of simplicity (of function) and sophistication (of implementation). Observe how everything can be quickly and easily adjusted, such as the positions of the contacts and the tension on the spring.

Depending on how you wire this up, it could act as a simple isolating buffer, where output "Y" = 0V (logic 0) if the coil is not energized or 5V (logic 1) if the coil is energized; or as an inverter, where output "Y" = 5V (logic 1) if the coil is not energized or 0V (logic 0) if the coil is energized. From this, we could construct AND, OR, NAND, and NOR gates; then XOR and NXOR gates; and then registers and so forth.

Yes, of course, you know me so well... now I'm being carried away with dreams of getting several thousand of these little beauties and using them to construct something like a simple 4-bit processor, but that's something we can talk about on a future occasion...

Let's return to the problem of implementing logic gates and registers using only the type of relay shown in the image above. If you havenít worked with relays before, I bet your knee-jerk reaction is to think of using them in much the same way you might use transistor switches, but -- generally speaking -- it's not quite that simple. As you will soon discover, constructing logical functions using relays can involve a weird and wonderful mixture of simplicity and complexity; if nothing else, it encourages a lot of "out-of-the-box" thinking.

Now, rather than me just waffling on and explaining everything in excruciating, let's have some fun with this. As a starting point, can you come up with a circuit symbol and truth table that clearly and concisely represents the operation of this relay? (Please feel free to change the names of the various contacts I called "A," "B,", "Y," "C1," and "C2" to whatever you like if it better suits your purpose.) Based on this, can you create a circuit diagram for a single buffer and then for three of these buffers connected in series? Next, can you create a circuit diagram for a single inverter and then for three of these inverters connected in series.

How about creating a circuit diagram for 2-input AND, NAND, OR and NOR gates (a) in isolation, (b) driving one of your buffer gates, and (c) driving one of your inverter gates?

Let's leave things here for the moment. If you rise to this challenge, then we'll move on to consider how we might set about implementing register and memory elements.

@Max....I have possibly 30 or 40 relays, with DPDT (ie 2 changeovers) BUT they have 48 volt coils. They are not as old looking as yours above, standard looking relay with a transparent case. If they'd be of interest I'll root them out and give you more details. I might be able to find a 48V power supply as well (oh, hang on, that'd be for our 240V AC mains.... :-( )

@SteveDAus...most of those nice relays are probably slowl leaching heavy metals into our water table, in a landfill somewhere....

Strowger exhanges were lovely to listen to, The guys who worked in them could pick up sticky relays and malfunctioning selectors just by the sound. When I lived in a very small town in Zimbabwe about 11 years ago, we still had a 1000 line Strowger exhange for our town. I told the techs I'd trained on that stuff and they let me look around. Nostalgia par excellence.... you had to remember to put ATDP commands in your modem strings (for pulse dialling) or nothing happened...

Don't we all.....I think I will chuck them eventually, no use to man or beast.

You're certainly ambitious....I was thinking about how to do (say) a full adder with relays....or maybe a 4-digit counter....but it rapidly gets bigger than Ben Hur ( almost literally....) thank god for TTL and CMOS....

@David: I was thinking about how to do (say) a full adder with relays....or maybe a 4-digit counter....

I must admit that I'm starting to rein myself in -- I don;t want to spend years doing this -- I just want to get a relay "thing" that's doing something vaguely useful and clicking away while doing it -- I'll be asking for suggestions in a future blog -- one think might be generating the value of Pi to an infinite number of digits (well, a large number) -- maybe outputting the values on a Teletype?

There were two types of open wire telephone lines in the '60's and 70's.Steel wire was used for local service,but long distance required copper wires.

Most poles for long distance had 10 crossarms, with 10 wires on each, and a transposition bracket every so often(can't remember exact spacing intervals).The transpositon brackets prevented noise and induction from the earth's magnetic field.

These wires ran for hundreds of miles,from office to office across the country.

The wires were left up long after they were obsoleted, then someone realized that there were millions of dollars worth of copper on the poles,and started having them removed.If they had stored the wire until today, it would have been a better investment than just about anything else.

the relay I see is a balance relay. The 20 mA current is probably correct because the telephone company uses this as a max current spec on their lines. Balance relays were used in burgalar alarms for those who could afford the telephone company leased line charge. you had a battery usually 24 or 48 volts subrtract the relay voltage of 5 volts the rest of the voltage is dropped across the telephone line and series "burden" resistors placed at each end of the telephone line at the central office and the "bank".

Any disturbance in the resistance of the loop causes a change in current and when that change becomes large enough the alarm is tripped. as long as the burden resistors at each end are large compared to the telephone line resistance normal changes due to climate conditions will not trip the circuit. Anyone seeking to circumvent the circuit must keep the current constant in the loop so cutting or shorting the wires is out of the question. The A and B contacts are adjustable to set sensitivity and the spring is adjustable to set loop current balance point.

If you really want to do logic with relays, you'll be happier making mux-based logic. You can think of a SPDT relay as a mux with the coil as the control input, the common as the output and each throw as an input. From that you can build all your common logic gates. I was writing about that a few months ago: http://www.drdobbs.com/embedded-systems/making-contacts/240152060

This is much denser than just using parallel and series switching circuits.