Introduction: Rotary Emotiphone
Second Prize in the
Adafruit Make It Tweet Challenge
The Rotary Emotiphone is a vintage rotary phone that tweets mood emoticons. It has a predefined list of 10 emoticons, each assigned to a digit, so that when you are happy / sad / drunk / etc., you pick up the handset and dial a mood. Could've gone for more complex messages using 2-digit code convention, but eventually decided to keep it simple.
The idea was conceived while I was preparing portfolio for my Industrial Design school. I had a rotary phone that used to belong to my late grandmother, which I wanted to mod for a long time. So, as soon as I read the guidelines that said I needed take an outdated product and revive it, make it relevant to our times, I knew this was one great opportunity to do something with that phone. Originally, I wanted to turn it into a full-fledged Twitter client that rings when someone replies on your tweets, but eventually I decided to go for a one-way communication device, with no reply-signaling functionality. Anyway, the idea of taking a full duplex communication device and converting it to half-duplex was cool enough concept to get me started. And hey, I got accepted! perhaps they liked the idea, too :)
Luckily, everything worked just fine almost at first take. The Arduino Wifly library saved me a lot of work and needed just one minor modification to connect to unknown open wireless network; the code, after proof-of-concept stage, had been perfected with invaluable help of Tomer, my old time high-school pal and Arduino fellow hacker, who had turned my spaghetti into a well orchestrated state machine. So, even if not mine, this code is something I'm very happy about and proud of. Another obstacle was the number of colors of LEDs that I had: I wanted to have 10 distinct colors, one behind each number dialed, but I had only 7 different colors. Instead of repeating three colors, I chose to use three bi-color LEDs and to switch between their colors until I find a ratio that produced a color I didn't already have. That took some bitwise logic, but nothing too complicated, at the end of the day.
Having said all that, I hope that from now on everything should be fairly straightforward...
A Rotary Phone
Mine, as mentioned, used to belong to my grandmother.
Vintage shops and markets usually have them, probably e-bay and such, too.
I usually use the RBBB from ModernDevice, but for this project I wanted a board onto which I could stack the WiFly shield - therefore, I used a standard Arduino Uno.
Sparkfun has them: http://www.sparkfun.com/products/9367.
These aren't particularly cheap to buy, but I really wanted it to be wireless. If you want, you can switch it for the Ethernet shield: http://www.ladyada.net/make/eshield/. Only minor code modifications, if any, should be needed, as the Wifly library was meant to be a drop-in replacement for the ethernet library.
MCP23017 I/O Expander
Not necessary if you have 10 different color LEDs or you are willing to compromise on same color - Arduino pins will suffice (exactly). However, I really recommend getting some experience with a port expander; I found them pretty darn useful in so many projects. I got mine from futurelec, but many carry them: http://www.futurlec.com/SFMicrochip/MCP23017.shtml
Perf Board or Strip Board (my preference) for wiring the MCP23017
I got mine at the local electronic supply store; you can find them in may places online, for example: http://www.futurlec.com/ProtoBoards.shtml
7 different color 3mm LEDs + 3 dual-color 3mm LEDs
Web's full of them. I got mine at futurelec, in packs of 100s.
- Appx. 20 x 100 Ohm resistors
Any switch will do, really. Do note, that if your switch doesn't have a round 12mm profile, you will need something else than the 12mm drill bit appearing in the tools section.
Some electric wire - any kind will do. I tried picking a flexible one, to help me squeeze everything in.
4 x AA battery holder
DC power connector that connects to the Arduino - outer diameter should be around 5mm
3mm drill bit for the LEDs
12mm drill bit for the switch
Solder and Soldering Iron
Hot Glue Gun
Making Some Space Inside the Phone
Before starting, disassemble and take out of the phone anything that is not needed for the project. I mean solenoids, bells (I thought of using them for signaling Tweet replies but gave up on the idea), large capacitors, metal brackets, and the rest, if anything else exists in your phone.
Step 1: Installing the LEDs
Start by disassembling the round dialer, the one that has holes for the fingers in it. Below it, if your phone is the same as mine, you will find a flat, opaque disc. Gently take it out, too, as it is fragile and tends to crack when drilling close to it. I did not know that when I started drilling holes for the LEDs, and it did crack. Not to worry, I've cut a piece of plastic sheet to the right size and used it instead, could not tell the difference after constructed.
Temporarily put the dialer back on, just so that you can drill holes for the LEDs onto the plastic behind it at the right places, just behind the finger holes. Then, gently drill 10 3mm holes into the plastic behind the dialer, trying to get them as close to the surface as possible, but no more than that. Easy does it, this stage requires accuracy and a somewhat steady hand.
Connect a common ground wire to all of the single-color LEDs' cathodes (short leg). Connect the wire as close as possible to the LED itself, cut the excess metal of the leg and finally, bend the leg so that it does not stand in the way when re-assembling the dialer and the case. Leave some wire at the end to connect to the Arduino. For the bi-color LEDs, first check whether they are common anode or cathode. If common anode, as mine, solder another common wire to their anodes (long leg), this time this wire will go to the VCC of the Arduino. If common cathode, use the same common ground wire you used the rest of the single-color LEDs and connect it to their cathodes (short leg).
Now, solder wires to the remaining LED legs - one wire for the single color LEDs, two for the bi-color. The other end of these wires will soon get connected to the MCP23017 (or the Arduino, in case you've made the modification suggested in the Intro).
Test your connections, making sure that all LEDs are mounted firmly and light up when connected to 3V power.
Put back the opaque disc and the dialer and re-test, paying special notice to the light each LED makes through the disc. Make gentle modifications if needed, for example if the disc blocks too much of the LED light, try to get the LED closer to the outer layer of the plastic by drilling, to improve luminance.
Solder the MCP23017 onto the Perfboard or Stripboard and connect it to the LEDs on one side and the Arduino on the other, according to the electronic scheme (see in images). To test everything so far, you can upload the sketch onto the Arduino (see Step 5) and make sure that all LEDs are lit on reset.
Congratulate yourself! The hard part is behind you. From now on, everything should be a breeze.
Step 2: Interfacing With the Phone Hardware
Take a single 1.5V battery and try electrifying the contacts coming from the flexible ("curly") handset wire into the phone. Not before long you will notice that there are 2 contacts that generate clicking sounds on the handset speaker. Connect wires to these terminals. Than, connect these wires to the Arduino's GND and pin 9 terminals.
On/Off hook:You will notice, that picking and returning the handset activates one or more small switches. Using the multimeter, find 2 contacts that conduct when the handset is up and are disconnected when it is down. Now, connect wires to these terminals and wire them to the Arduino's GND and pin 2 terminals.
Keep sniffing around the phone terminals with the multimeter, now looking for 2 contacts that "jump" (i.e. change conductivity rapidly) when the dial is being wound and released. As you've already connected most of the phone terminals, that should not prove too hard neither take too much time. Connect wires to these terminals and wire them to the Arduino's GND and pin 3 terminals.
Now, go to your C.V. and add "Rotary Phone Hacking" under list of skills!
Step 3: Installing the Power Supply
The Emotiphone works on batteries which, when connected to a wireless internet connection, tend to run out pretty quickly. Therefore, it is necessary to add an on-off switch to the device to help us conserve electricity and be nice to the environment. Usually, phones get their power from their wall connection, but not in our case...
So, start by drilling a 12mm hole (or, as much as the diameter of your switch) in the back of the phone. make sure that the back part of the switch that is inside the phone will not prevent the phone cover from closing.
Next, hook up the positive (red) wire coming from the 4 x 1.5V battery holder to the switch, and connect another wire to the other terminal of the switch. Take this last wire and the black wire coming from the battery holder, and solder them to the dc power connector. Notice that the black should be connected to the outer connector ring and the red - to the inner contact. Now plug the connector to the Arduino. Test drive the power supply by switching it on and off.
Step 4: Hooking Up the WiFly Shield
Construct the WiFly if you have not done so already, following instructions from SparkFun.
Download my modified version of Wifly Arduino library and copy it to Arduino IDE's "libraries" directory, usually located under the sketches directory. If you already have a "Wifly" directory there, replace it. Worry not: my version does not change any functionality, only adds one new call, join() accepting no arguments, that allows connecting to open wireless networks whose SSID isn't know at compile time.
Connect WiFly to the Arduino (without the phone, if possible) and load one of WiFly's sample sketches, just to make sure that WiFly is working. WiFly_WebClient, for example, is a good sketch to run that takes no setup. Run it and make sure you get a response from Google, as you're supposed to.
Into the WiFly shiled, now connect the MCP23017, the 2 sensors (dialer, hook) and the speaker, in whatever method you find mot convenient. I used a prepared male header dongle, you can use whatever you are comfortable with.
Step 5: Setting a Twitter Proxy Account
In order to send tweets, one needs to be authenticated against Twitter using the OAuth API first. Since it is somewhat tricky to implement on the Arduino itself, a better solution is using a Twitter Proxy, such as the one here: http://arduino-tweet.appspot.com.
In order to start working, you'd need to punch in your Twitter account details into the site as per the instructions and in return, get an authentication token from the site. Embed this token into the Arduino sketch, using the TWITTER_OAUTH_TOKEN constant and load the modified sketch onto the Arduino.
Step 6: Firing It Up!
Time for a test drive!
1. Make sure there is an open network with good reception around. Alternatively, you may use a closed network; in that case, you'll need to modify the call to WiFly.join() and pass in the SSID and password (See WiFly library examples).
2. Turn the power on and lift the handset.
3. Wait for an ascending series of tones followed by a "dial" tone, signaling that internet connection was made.
4. Dial a number and wait for a cheerful melody signaling that the sending had succeeded
5. Go to your Twitter account and check for update! Note, that for every tweet there is a random number in round brackets accompanying the tweet. This was done because Twitter seem to delete what they perceive as duplicate tweets (needless to say they did not have a tweeting Emotiphone with a limited vocabulary in mind when designing this feature!)
hope you've enjoyed this Instructable!
We have a be nice policy.
Please be positive and constructive.