An art installation with a modified desk telephone that both facilitates and frustrates communication.
Using custom electronics and some simple microcontroller programming, you can hijack the normal function of a touch-tone phone, giving it a life of its own. The one described here was the central element of an office that was placed the gallery space. Visitors to the office would cause the phone to make two calls- one to the office itself, and one to a randomly selected number elsewhere in the country. The visitor to the gallery would answer the phone believing someone had called the office, often finding herself listening to one of the countless variations of "This number is no longer in service..." In other cases, he would hear a fax attempting to convert images into sound, or an outbound voicemail greeting for a person he did not know. If the visitor were lucky, or persistent, there would be another person on the other end- thinking the same thing as the visitor: "Someone has called me."
This will not be the most comprehensive look at physical computing, electronics, or any of the techniques used. I hope to give a clear enough picture that you would have an easier time pulling this off than I did, and more importantly, give a sense of other possibilities for communicating with the devices we use to communicate with one another.
I recommend Dan O'Sullivan and Tom Igoe's book Phisical Computing as a basic reference. There are also plenty of other great 'ibles here that will get you going on art and electronics.
Step 1: The Things
You'll need the basics for any physical computing project, including but not limited to:
-Hot glue gun
and this non-exhaustive list of:
-Basic components-- resistors, LEDs (cheapo kinds are fine), 22 guage wire, solder, relays, FETs, circuit boards, electrical tape, other things I have forgotten
-Microcontroller (I used a Basic Stamp 2, though if I were doing it again, I'd use an Arduino)
-Old phone(s-- you'll be glad if you have spares to experiment)
-Variac (or other way to create ~90VAC from 110VAC)
-Electronic Ringer (new or scavenged) -- making a mechanical ringer ring separately is a project unto itself
Step 2: Break it Down
To create the appearance that the phone is making two outgoing calls simultaneously, it simply needs to ring while making an outgoing call. And by simply, I mean let's take this phone apart and bend it to our will through a series of hacks.
First, let's break down the things we'll have to change.
1. Sense when someone is around to answer
2. "Pick up" and "hang up" the phone while the receiver is still on the hook
3. Dial without pressing the buttons
4. Make the phone ring without getting a call
If we can do all this while still letting the phone be dialed and called as normal, so much the better.
Strangely, what I imagined to be the simplest part, making it ring, was the hardest to figure out...
Step 3: Sensing the Visitors
No reason to make a phone call if no one is there to answer.
Using the PIR sensor is pretty simple. It is a simple device that trips a relay when there is a sufficiently large change in the ambient light around it. You'll have to read the documentation for the specifics, but in outline, you'll have your PIR's output attached to one pin of your microcontroller. The microcontroller will loop and check that pin for a change (becomes either high or low, depending on your PIR). When it detects motion, your microcontroller will start the phone to dialing...
Place the PIR somewhere at sufficient distance from the phone so that the phone can dial and ring before the visitor gets to the phone itself. If you time it carefully, it will ring about when they reach the desk.
On to dialing the phone.
Step 4: Pick up the Telephone
Before dialing out, the phone needs to be off the hook. We'll also want to be able to hang up if no one answers on the other end.
This will take some exploration on your part with a multimeter and some patience. You are going to insert a relay into the hook circuit that exists on your phone, and mimic that mechanical switch with a relay. I'll take this opportunity to point out that I think Physical Computings treatment of relays is not as strong as it should be. The illustration shows what I believe the correct schematic is (though in the particular phone I was using, the relay's switches are slightly different).
In the phone I was using had a switch that was thrown when the receiver was picked up. It was configured NC, NO, NO. With a little probing with the multimeter, I was able to figure out which wires were which, and I simply inserted the relay circuit inline with the wires. The important thing to note is that I have no idea what the wires do, or what the switch does when it is thrown. I am simply able to mimic the behavior of the mechanical hookswitch with my relay, while preserving the function of the hookswitch itself. I have no idea if the same configuration is used on every phone, but the basic idea should hold.
Hook the relay circuit up to the BS2 so that taking a pin high throws the relay, and we can pick up the phone with the push of a button. Now we're ready to dial.
Step 5: Interlude
Before moving on to the how-tos of dialing by microchip, here are some transcribed excerpts from the installation.
Male Voice: Hello? [Pause] Hello?
Female Voice: You have reached an unassigned number at the Yale School of Medicine. Please hang up and dial again.
Female Voice: Hello?
Female Voice: It's just ringing... uh...
[Ring... Ring... Ring...Ring... Ring... Ring...Ring... Ring... Ring...Ring... Ring... Ring...Ring... Ring... Ring...]
Step 6: Dialing
Dialing uses the same approach as manipulating the hookswitch: we'll take the existing infrastructure and try to slip some relays in between.
In this case, we want to use the existing number pad. Luckily, on my phone and most that I have seen of a certain age, there are solder terminals that expose the particular behavior of the pad. Placing the leads of your multimeter on the terminals and methodically testing the keys, you will discover the layout- each terminal corresponds to a row or a column. Duplicate this layout with 10 SPST NO relay/FETs, and make the output of the circuit that closes go to each terminal you sussed out. This is (schematically, if not physically) laid out as a grid of relays. Each relay's FET is hooked up to an output pin on the BS2, and when the pin is taken high, the number pad terminals seem to close, and send the correct tone.
I won't belabor this one in great detail- like so much in the world of making, it only really makes sense when you try it yourself.
For a more thorough discussion of standard grid switches, see pp.389-391 ofPhysical Computing: Row/Column Scanning.
Now we have the hardware to pick up the phone and dial... let's get the visitors' attention.
Step 7: Make it Ring
While the solution for this step ended up being straightforward, it was hard to find. It turns out that the ring voltage on a standard telephone is essentially only found on telephone lines, and used only there, so there are not many components that convert the voltage specifically. The only transformer I could find of the correct range was a variac, by far the most expensive component in the project: ~$90 with a custom made housing. That said, a cleverer or less deadline-fearing craftsman might come up with a more elegant solution.
Once the voltage conversion is decided upon, it is straightforward to hook up. The ringer circuit will have some power in, two wires. Run the output of the variac through another simple NO relay (make sure this one is rated for 90+ VAC if you do it my way!) and then connect that to the ringer circuit. When the output pin you connect to is high, the ringer will sound.
After hooking the ringer up, however, I discovered that it did not actually ring the way it did with an incoming phone call. It really just buzzed. The problem is that the distinctive "ring" of a phone (and they vary by country...) is a function of its on and off pattern. By trial and error, I discovered that mine sounded most convincing with a pattern of one second on, one and a half seconds off. I am more comfortable with software, so, under pressure, that's where I chose to manage the ring pattern. I imagine that some combination of 5-5-5 chips and capacitors could take care of this in hardware, which might be advisable.
Now all the hardware is in place... let's get things under control.
Step 8: Interlude
Male Voice: Hello
Carmen: Hello, [indecipherable]. This is Carmen.
Male Voice: Uh.. Hi, Carmen. [pauses] So what happens now?
Carmen: [indecipherable] next?
Male Voice: I'm sorry, I didn't catch that.
Carmen: Ok, well, take me off your list, please.
Male Voice: I don't think there is a list.
Carmen: [pauses] You have a good day then.
Male Voice: You, too.
Step 9: Put it together.
I am eliding some key parts of this 'ible: all of these circuits have to be put together, tested, debugged on the breadboard, then hardwired to real circuit boards and placed in the body of the phone itself. I will simply offer a few lessons hard learned:
1. when something doesn't work, apply Occam's Razor- it's probably not an elaborate error in the inner workings of your microchip.
2. Just because the component schematic says that a connection is hardwired closed does not mean you can't fry it open.
3. prepare your repeatable tests before you go far in putting things together. You'll need them. It won't work the first time. I know you think it will. It won't. Be ready to test, and re-test.
Before you seal the phone up, though, don't forget to program the microchip.
I've included my source code (in ugly pBasic) with lots of comments. The logic is simple, but there are a few tricky parts, so here is the outline:
Loop until someone triggers the PIR. Within the initial loop, generate pseudo-random numbers. Since you cannot predict the time a visitor will come by, it is random enough for government work.
When a visitor passes (detected on your PIR) randomly select an area code.
Then dial each digit of the area code, keeping the button "pressed" for long enough to dial it, and with enough space in between each "press" so as not to interfere with the others.
Dial the randomly generated number.
Enter the ring subroutine. This is the tricky part. I used software to create the right ring pattern as described before, but I also had to include a sub-loop that stopped and checked for the receiver's being off the hook many times within each ring- if you don't, a visitor will pick up the phone, but it won't know to stop ringing.
There is also some highly specific code dedicated to dialing from the specific phone system- dialing prefixes and billing suffixes (TAN, they called it). These will be specific to your system.
Now that the phone is hacked, put it somewhere and make connections.
Step 10: Epilogue
My favorite part of the installation was the reaction of the visitors. I was pleasantly surprised to find that few were as shy as I had feared they would be- they answered the phone, and opened drawers. Someone started taking notes on the calls, and others continued throughout the exhibition. Some developed minor addictions, hanging around, waiting for just the right call. They left messages, invited strangers to other parties, and tried to explain the telephone.
If you hear the phone ring, pick it up.
Male Voice: Hello?
Male Voice 2: Hi! Who is this?
Ben: um- This is Ben... Who is this?
Tim: Oh. This is Tim. Are you in New Haven?
Ben: Yes... How did you know that?
Tim: I saw the 203 area code. I grew up in New Haven, so-
Ben: Oh! Awesome, so... I was pretty confused when you called. I'm in the middle of taking down an art installation I put together, which has this phone in it. I modified the phone so it would call people randomly. I mean, so. But, I just turned the ringer off. So it shouldn't have rung-
Tim: But I called back because I saw a missed call. If the ringer was off, how did you hear it?
Ben: It's a little complicated, but the idea is that I would make it ring when it called someone else, so it would seem to both people like the other had called them, right? But the phone still works as normal, too, so when you called, it rang just like it would if I hadn't messed with it.
Tim: That's crazy. I just thought it was one of my friends from back home or something.
Tim: No, it's pretty cool. I'll just give them a call anyway...
Ben: Where are you? You said you grew up in New Haven?
Tim: Yeah- I live in Tucson now.
Ben: [Laughs] I grew up there, myself. I guess this thing works...
Tim: [Laughs] It was nice talking to you. Good luck with the phones.
Ben: Thanks, nice talking to you, too.
And special thanks to two world-class educators without whose help I'd have cried myself to sleep listening to a busy signal. Jeffrey Stuker and Ed Jackson- heroes of art and engineering.