Fairytale Phone

39K26122

Intro: Fairytale Phone

The Fairytale Phone is one of my first Raspberry Pi Projects I have made. I had already published this on my Blog makerblog.ch, but now this will be a more in depth instruction to build the Phone.

The finished phone will be able to play 10 different MP3 Files (In my case fairytales) with every number chosen from the dial.

You will need the following items to create the phone:

  • An old Rotary Dialer Phone
  • Raspberry Pi (A, A+, B, B+.. are all OK)
  • 5Volt 1Ampere USB Power Supply
  • SD Card with Raspbian
  • Soldering Equipment
  • Some Wires

In Step 1 we will disassemble the Phone first.

STEP 1: Scrap the Parts From Your Old Phone

Disassemble your old phone until you get all the Parts shown in the pictures. Make sure you don't cut the wires from the rotary dialer. With the Raspberry Pi, the Power Supply and the SD Card that makes all the main parts you will need.

STEP 2: Solder the Telephone Earcap to the Headphone Jack

Unscrew the telephone earcap protection in order to find the two wires from the earcap and solder these directly to the under side of the Headphone Jack from the Raspberry Pi as shown in the picture. Be sure to test the audio after the soldering.

STEP 3: Solder the Rotary Dialer to the GPIO Outputs.

First find the wires wich close the dialer cirquit and do not click (In my case that where the yellow and the blue wire) Solder one of each pairs to the Ground Pin (14) in my case this is the yellow and the pink wire and one of each circuit to the Pins 12 and 16

STEP 4: Mount the Raspberry Pi

Mount the Raspberry Pi in the phone. Since there are many ways to mount the phone I suggest you find your best choice for yourself. I used some distance bolts and screws.

STEP 5: Install the Software

Boot up the RaspberryPi and login. First update your Repositories:

sudo apt-get update && apt-get upgrade -y

Install Python3, Python GPIO and mpg123

sudo apt-get install python3 python3-gpio mpg123

Create a file in /usr/bin

sudo nano /usr/bin/phone

Copy the following code from this Gist to /usr/bin/phone:

https://gist.github.com/simonjenny/8d6c29db8b8a995a4d89

Make /usr/bin/phone executable:

sudo chmod a+x /usr/bin/phone

Copy your MP3 Files to /media, rename them to 1.mp3, 2.mp3 ... 10.mp3

Test your phone first :

/usr/bin/./phone

Update /etc/rc.local

sudo nano /etc/rc.local

and insert bevor exit 0;

/usr/bin/./phone &

STEP 6: Aaand Your Done :)

If your phone works put the shell back on and enjoy.

20 Comments

Hello,
I am stuck on a problem which I cannot fathom:
dialing 1 or 2 takes me to the first mp3 file
dialing 3 or 4 takes me to the second mp3 file
dialing 5 or 6 takes me to the third mp3 file
etc.
has anyone had this problem or could you give me an idea as to why this happens?
Thank you for a great idea of turning old phone to jukebox!
I have Raspberry Pi3 Model A+, can I use it?
Which pins should be connected?
Any way this could be done with arduino?

Yep, you can do that with an arduino. I did it. :) You need an mp3 shield though and the bulk of boards and wires inside the phone can be a bit problematic to handle.

You mentioned you had done this with an Arduino. How did you wire the output of the MP3 shield to be played on the phone's handset?

Surprisingly enough, I just connected them directly to the jack output.
The impedance was perfectly fine and worked right away with the phone's speaker. You can try that way and check wether it's working. Your mileage may vary depending on the specifics of the phone. ;)

should be able to using attach_interrupt() and an mp3 or wav shield, or maybe wav directly off SD, maybe.

the way the rotary seems to work, at least for the phone used here, is that when the dial is spinning back to "home" one pin is held low, and the other pin toggles to low for each digit it passes by. when the first pin goes HIGH again, you know it's done and you can process the number of times it pulsed and start playing a file.

I guess this could also be done with an Arduino and the MP3 Shield. Since we use only GPIO this should be portable to Arduino.

My dialer has 2 blue and 2 white wires. How do I test to know exactly which wires go where on the pi? The white wires show continuity when the dial is moved from rest and stay on until the dial returns to it's stop. The blue wires show continuity at rest and when the dial is turned they stop, but then close/open as the dial is slowly allowed to go back to it's rest stop. I am assuming that the whites will go to 14 and the blues to 12 an 16.. is that right? Thanks!

Basically you have 2 Circuits with the Phone. In order to get the power trough the circuits you have to solder one end to 12 and the oder to ground and also with the second circuit one cable to the pin 16 an one to the ground pin.

The phone works this way: When you start to turn the dialer, one circuit closes and stays close until the wheel returnes to the starting position. The other circuit will be open and closed periodically (dialing) We count the amount of time the second circuit opens an closes in the time the first circuit is open.

I hop this will help you a bit. Please excuse my english :)

So to be clear the dialer has two circuits; the high/low dialing switch (which is high when "dialing") and the switch which sends pulses corresponding to number dialed. One wire from each goes to GND, correct? And the others go to BCM 18 and 23, correct?

Great idea! I try to make one for my daughter, but I'm having some issues. My device seems to have difficulties to separate the clicks. It does not count all of them and the number doesn't remain constant... I connected the wires almost as you stated, but I soldered the two ground to two separate ground pins (a bit easier for me, I'm an electronic rookie), could that be the problem? I tried to change the bouncetime-parameter, but it didn't help. Do you have an idea what the problem could be?

Ok I feel stupid now, What exactly does it do?

It maps an MP3(fairytales) to every number on the dial so that kids can choose fairytales to listen on the phone.

Hi.. how long can the sound files be? I'm new and this is the first one I'm trying. Thanks!

Find 10 sound clips of Commissioner Gordon. Paint the phone red. Instant Bat-phone.

I guess I'd let my kids play with it too....

Awesome project - I'm trying to build one with an old British phone but am confused by the wiring instructions from the dial to the pins. Could you add a simple circuit diagram? I know my dial will have different coloured wires. Many thanks.

OMG soooo cool! Thanks for sharing this!

Something so simple yet so awesome!