Rotary phones are great for beginner hackers.
They're not very complicated: for the most part, you can just look at the wires and guess what most of them control.
Slip a microcontroller in, and you can use all its components as modern I/O devices while still keeping that nice vintage look.
Here's how to take the best part - the rotary dial - and read the numbers off of it, so it can be used to control other electronics.
You will need:
- An old rotary phone you don't mind taking apart
- A microcontroller (I use a Teensy 3.0)
- A computer with the Arduino environment (or similar program to match your controller)
Wire and soldering kit
Screwdrivers to take phone apart
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: Open the Phone.
This one had a single screw holding the plastic in place. Just get it opened enough to be able to touch the wires; we'll leave most of it intact.
Step 2: Poke Around With a Multimeter.
Maybe yours came with a manual.
Take a multimeter and poke around to learn about it.Step 3: Record your findings.
Set it to check for continuity to see which wires are connected, and if anything changes if you dial a number or pull the hook up or down.
Step 3: Record Your Findings.
As you go, write down stuff.
Which wires connect which devices, which contact points beep when the phone is "on" the hook and which beep when it's off.
Some of it will be important later, depending on how much of the phone you want to continue using.
Some of it is just fun for learning's sake.
Step 4: Take It All Apart.
Since we'll be taking this whole thing apart and sticking it into an Arduino, you disassemble it down to individual components.
Keep taking notes as you go.
Here, I've got the headset, the bell, and the dial all taken off. The hook I'm going to leave connected, because it's rather complex, and it'll work just fine through the connector board. DON'T cut any wires off; we'll need them for later.
Step 5: The Rotary Bit.
Remove the dial from the body of the phone.
It should have two pairs of wires attached.
One acts like a switch: it's 'OFF' if the dial is in the resting position, and 'ON' if the dial is moving.
The second pair gives a pulse based on the number dialed.
Step 6: Attach It to Your Microcontroller.
I'm using a Teensy 3.0, but you can pretty much use any input-output microcontroller.
Grab one wire of each pair and connect it to GND. Take the other two and attach each to an input pin.
Here, I use pins 11 and 12 in DIGITAL mode.
Technically, it's an analog signal, but really we only want to know if it's ON or OFF at a given point.
Step 7: Read the Values.
You can find my code for reading the dial numbers to serial here: https://github.com/agentcupcake/rotary-hack/blob/master/dial_reader
If you want to write your own, remember this:
- Your Arduino (etc) can read a LOT faster than the dial can pulse, you'll want to count changes between HIGH and LOW readings.
- Since it's an analog signal, it won't be perfectly clean. You will have to debounce the signal by adding in a small delay function.
- Don't forget that 0 will actually read as 10 pulses; make sure to write in a special case for it.
Step 8: Attach It to Something!
You have an input device! What will you connect it to? Add some LEDs. Make it change the speed of a motor. Make it dial your cell phone. Re-attach it to the phone and have it choose music to play through the headset.
And post/send me a photo if you do!
More Instructables for the rest of the phone bits coming soon.