What looks like an ordinary desk telephone is actually part of a museum exhibit at BBCM that lets kids practice dialing 911. When they pick up the receiver they hear a dial tone, and can then dial “911” (which plays the proper DTMF tones) they then hear the line ringing, and then an operator answers and says “911, what is your emergency?”
Inside the phone I’ve replaced the guts with a Teensy 3.2 and Teensy Audio Adaptor board. This combination handles the phone receiver being lifted, the keypad being pressed, and the playing of audio.
After consulting the docs for the Teensy Audio Adaptor board I knew which pins were used for the adaptor board, and which I could use for the receiver switch and the keypad. From what I could tell 11 pins were available (0, 1, 2, 3, 4, 5, 8, 16, 17, 20, 21) and I needed seven for the keypad and one more for the receiver switch. Plenty of pins!
I chose to go with a (perhaps slightly odd) method of having some pins point up instead of down so that I could attache female jumper wires to them. I’m not 100% happy with this solution, but it worked for this.
The female jumper wire headers are nearly as tall as the Teeny + Audio board combined. You can also see a potentiometer used for controlling the volume, and a 1/8″ audio jack which goes to the speaker in the handset.
I re-used the existing receiver switch and wired it into the Teensy. The switch is NC (Normally Closed) instead of NO (Normally Open) so I just reversed the logic in the code when looking for the switch to trigger. When the receiver is lifted the dial tone sound plays. (Also, if you leave it off the hook too long, it will play the annoying off-hook tone. (I aim for realism with this stuff!)
The keypad was also re-purposed (once I figured out the wiring) and wires were soldered onto the tiny thin wires, and the heat shrink tubing was added. The keypad runs to a small piece of perfboard which is used to connect to the Teensy, along with a few resistors in the mix.
Notes on how to wire up the keypad. I originally used a SparkFun Keypad for testing and development before I had a (broken) phone to tear apart.
Here’s a quick wiring diagram showing how it’s all put together. (I try to match wire colors in diagrams with the real-world wire colors, at least before any maintenance/repairs happen.)
The connector board allows for easily removing the Teensy if that’s ever required, or replacing the keypad if it goes bad. It also adds in the resistors necessary for the keypad to function properly.
For mounting the Teensy into the phone I opted to use an old hard drive magnet with a piece of wood attached. The Teensy is screwed to the wood (which is a good insulator) and the magnet is also screwed to the piece of wood, and then attaches strongly to the steel base of the phone. (There’s also gaff tape on the base of the phone, as extra protection between electricity and metal surface.)
I found this diagram for the speaker wiring from the handset, and wired the appropriate lines to a 1/8″ audio plug that goes into the adaptor board.
One other thing I did was add code that only accepts “properly dialed/formatted” phone numbers. So if you pick up the receiver and dial “4738911”, you didn’t dial “911”. You need to hang up and try again, with a proper “911”. There’s a buffer that looks for 3 digits (or 7 digits) and if you can’t get that right, it doesn’t work. As I said, I aim for realism with these things…
(Note: I may have left in a few numbers from testing. I’ll have to ask Jenny or Hannibal for the details.)