Step #1: Get a phonePrevNext
I used a Western Electric 500 D model phone. Rotary phones are easy enough to find on eBay, but know that unusual colors or styles may require some patience to find and extra cost.
Step #2: Get a Rugged Circuits Audio ShieldPrevNext
- This is an impressive full-featured audio shield, allowing for recording and playback of .wav audio on a microSD card.
- The included software library makes interfacing with an Arudino fairly quick.
- Pay attention to the documentation for the board for details on audio formatting and filename requirements.
Step #3: Wiring the phone and ArduinoPrevNext
- I set up a simple test circuit on a breadboard to confirm that you have chosen the correct wires and that they can be read properly by the Arduino.
- Once I had done that, it was possible to start coding and working toward basic functionality. I started with a simple dial tone sound and getting the hook switch of the phone to trigger the playing and stopping of this sound.
- Coding the rotary wheel was more challenging, especially since the number of digits entered and the time it takes all have an effect on the output sound.
Step #4: Conversation mechanicsPrevNext
- The next task was creating the interactive conversation functionality. The microphone on the telephone needs to be connected to the audio shield input via a 1/8" audio cable, and the earpiece must likewise be connected to the shields output.
- My program randomly chooses among recording the users input, playing back previous recordings, or streaming the input directly to the output with added distortion.
- The function changes every 10 seconds or so, allowing a disorienting conversation between the phone and the user.
Step #5: Ring the BellPrevNext
- The electromagnet should be connected to the phone using a simple relay circuit.
- The magnet switches on and off very rapidly, causing the bell's striker to move back and forth.
- In my code, the conversation and ringing were handled by individual functions
Step #6: Conceptualizing the sketchPrevNext
- It helped me greatly to draw up a logic diagram for the phone.
- Doing so allowed me to visualize the various components of the Arduino program that would be needed, and I was able to implement the pieces one by one until the overall system worked well enough to demonstrate.