• If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • Stop wasting time looking for files and revisions. Connect your Gmail, DriveDropbox, and Slack accounts and in less than 2 minutes, Dokkio will automatically organize all your file attachments. Learn more and claim your free account.


Final Project - Kyle Moore

Page history last edited by Kyle Moore 9 years, 3 months ago

Final Project - Rotary MP3 Player


The Idea:

As I was listening to the founder of SparkFun talk about how they put a cell phone module inside of a rotary telephone so that it could make cell phone calls, I decided that I could do a similar thing with an MP3 player. I figured a phone would be well suited for this because it already has a speaker that I can hijack to play the music over, and it has built-in controls for dialing and hanging up that I can use to control my device. I decided to use a rotary telephone because I figured it would be easier to interface with (older technology is generally bigger because they didn't have the complex manufacturing processes we have today, and therefore simpler to understand) and just generally cooler than using a modern touch-tone telephone. For the interface I decided to take advantage of the built in speaker to play my music, and map different number combinations on the rotary dialer to different actions (play, pause, fast forward, rewind, volume control, etc.). The final product is completely self-contained (I managed to fit an Arduino and MP3 circuit inside the original case) and powered by a single AA battery.


Verplank Diagrams:

This particular project didn't lend itself to a Verplank diagram particularly well because it wasn't solving a specific error and didn't conform to a metaphor, instead it was merely a cool project that is a bit of a novelty.


Design Point of View:

When I was designing this, I wanted to make something that would elicit a "wow" response from people when they saw/used it. Putting the MP3 player inside a phone did just that. Now that it's done, whenever people see it, they always go through a progression of confusion, disbelief, and finally awe when they learn and experience what the phone can do. I like this project because it takes something otherwise useless (an old telephone) and makes it a novelty piece and a conversation starter. This ordinary-looking phone is actually a unique device, and I like that.


Paper Prototype:

There was no paper prototype for this because I planned on housing the player in the phone the whole time, so I knew from the beginning exactly what the final case would look like.



  • Arduino Nano - $35
  • VS1053 MP3/MIDI decoder - $25
  • 2 Level Shifters (Jameco Part #: CD4050BC) - $0.50
  • Rotary Telephone (eBay) - $12
  • Total Cost - $72.50 



Final Project Code - Kyle Moore


The MP3 player part of this code has been updated to not use EEPROM but store the list of files in a RAM buffer. Also, instead of using a blocking loop in setup() to send data to the decoder, it sends data each iteration of loop(). This allows it to process other things in loop() (such as checking if the user is done dialing). Play/pause is handled by setting a volatile boolean flag in an interrupt (triggered when the phone is taken off/placed on the hook). This variable is checked before data is sent to the decoder and data is only sent (and new data read) if the variable is set to true. Fast forward and rewind are handled by changing the global variable that stores the index of the current song file in the directory and then making the read/write loop think it's reached the end of its data stream. This causes it to open a new one at the file specified by the new index.


Thoughts as I Went:

  • The dial on the telephone is essentially a rotary encoder with an additional switch to tell if a number is being dialed. The way the switches work is like this:
    • Switch A is normally open and switch B is normally closed.
    • When the dial is moved from it's resting position, switch A closes, indicating that dialing is in progress.
    • When the person releases the dial and it turns back to the resting position, every time it passes a number, switch B opens and closes once (e.g. if the person turned it to a 4, the switch would open and close 4 times).
    • When the dial gets back to the resting position, switch A opens again, indicating that dialing is finished.
  • To interface the Arduino with the dial, I used interrupts. At first I had the interrupt fire whenever the pin (which was connected to ground through a resistor and 5V through switch B) went from HIGH to LOW (the FALLING constant in the Arduino language). However, due to button bouncing, this interrupt was getting called tens to hundreds of times every time a number was dialed. This was causing too much execution time to be spent in the interrupt handlers and was making the music skip while dialing was happening. I tried adding debouncing circuits to the switches, but they weren't effective enough. When I changed it to fire an interrupt whenever the pin changed, however, this issue went away. I don't know why this was, but it was the case.
  • Play/pause is dictated by the phone hook (on the hook is paused, off the hook is playing). This is handled by interrupts that are triggered whenever the value on the pin (which is pulled up by the internal resistor when the phone is off the hook and grounded when it's on the hook) change. At first, I just had the interrupt negate the value of a boolean variable and then act on this new value, however, sometimes, if you pressed and released the hook too quickly, both changes would register and the behavior would get flipped (so on was playing and off was paused). To fix this, I just read the value of the hook pin in the interrupt handler and acted on this value.
  • I should have spent more time laying out my circuit board with the space constraints of my phone in mind, because when it came time to put the PCB board in the telephone, I had to shave every last possible inch off to get it to fit (I even had to cut away some of the metal inside the phone). Had I spent a little time before hand, I could have avoided the couple of hours it took me to shimmy the board into the telephone.


Final Thoughts:

Overall, I am very happy with how everything turned out. Besides a few desired additions, the phone/MP3 player works very well. The only problems I have with it are some reliability problems when I take the case off or shake the phone. Sometimes this will cause the controls to stop working or the music to stop playing. This likely means I have a bad connection or a short somewhere. If I went back over my circuit with a soldering iron and shrink wrap and strengthened/insulated my connections I think the problems would largely go away.


Desired Additions:

  • An LCD screen to display song metadata, there is enough space in the back of the phone case to put in the LCD screen we used in class. I would have to also use a multiplexer though, because all of the pins on the Arduino are in use.
  • Searching for songs. I would like to make it so the user can filter songs by dialing in letters in "phone code." It wouldn't take too much code to implement the filtering itself, but it would require an LCD screen for display and the ability to read song metadata, which I didn't implement yet.
  • A miniplug jack for plugging in headphones or external speakers. I would like to make it so when you have something plugged into the headphone jack it disables the speaker in the headset. I think I could use an audio multiplexer for this.


How to Use It:

  • Switch on the left side turns it on and off, turn off when not in use to prolong battery life.
  • Hanging the phone up pauses the music and picking it up off of the hook starts it playing again.
  • Music controls:
    • Dial a 1 to skip to the next song.
    • Dial a 2 to skip back to the beginning of the current song.
    • Dial a 2 twice in quick succession (or dial one 2 near the beginning of a song) to skip to the previous song.
    • Dial a 3 and then dial any other number to set the volume to the second number, 1 being quiet and  0 being loud.


Photos (click for larger versions):

Prototype MP3 player, on breadboard. Uses voltage dividers instead of level shifters.


Original phone, before modification.


Inside of phone, with rotary dial still attached.


Inside of phone, with rotary dial removed.


Underside of rotary dial. Switch A is on the top and switch B is on the bottom.


Circuit laid out on a PCB board, uses level shifters.


Final product wired together with the case open.



Fliqz has shut down their service. To access this video, email support with this video id: 0cf4a49eee5940fb98ccaa7bc688b32d

Comments (0)

You don't have permission to comment on this page.