Produced by Big Data Digest
Author: Caleb
The rotary phone is something that many of us have seen in classic Hollywood films.
As a kid, I thought rotary phones were way cooler than the regular phones we have now; I wished I could have one.

Guess the movie: Which film is this from?
This luck fell upon a blogger named Gardines.
While cleaning the attic one day, he discovered an old rotary phone that seemed to be in working condition.
Considering that he didn’t really need a phone at home, he had a brilliant idea: he decided to install a Raspberry Pi inside it, transforming the phone into a MP3 player.
His goal was to retain the phone’s original appearance as much as possible, so you can see that the main change in appearance is on the back where the port was modified from the modular phone jack to a micro USB.

He also added a switch to the handle, mainly to control the power of the Raspberry Pi. However, in terms of the final result, this switch actually became a drawback in terms of user comfort.
In keeping with the idea of retaining the appearance as much as possible, the speaker of the MP3 was also installed in the receiver.
The finished product is shown in the image below:

Isn’t it a little heartwarming?
Next, let’s take a look together with Big Data Digest to see how this process was completed~

Then, without further ado, let’s get started!
First, clear all components from inside the phone, thencut a piece of polycarbonate board and install the Raspberry Pi in a place away from the metal base.The blogger used a utility knife for cutting and made a score halfway through before cutting at the incision.The cutting template is shown in the image below:

The image below shows the actual board used. You can see that there were some mistakes, such as the label in the upper right corner getting damaged, and there were also some errors in the hole positions.

Then, use screws to fix the Raspberry Pi to the board and install it in the phone’s base:

Basically, the hook, rotation, and dialing can be seen as independent switches. When the receiver is on the hook, the hook switch is open; when the receiver is lifted, the hook switch closes. When the dial is in the default position, the dial switch is open; when the dial is moved from the default position, it closes. The rotary switch stops in the off position, and the number of times it opens and closes corresponds to the number dialed.
So, connect each switch to a GPIO pin using jumper wires. Each switch includes a 10k ohm resistor.

At the same time, to facilitate connecting and disconnecting the wires, glue the jumper wire terminals together to make a “rainbow cable”.
Here, select a row of GPIO pins that are all in a line. Specifically, they are connected to pins 9, 11, 13, 15, and 17, which include one ground (pin 9) and one 3.3V (pin 17), along with three GPIO pins in between.
Thus, we have the connection for the rotary pin 11, dialing pin 13, and hook pin 15, as shown in the image:

Next, remove the speaker and microphone from the receiver and replace them with a new speaker, tying them to the stereo speaker with twisted wire.
However, in hindsight, keeping the microphone and only using mono audio might be more interesting.
After installing the new speaker,the receiver became lighter and could not keep the hook fixed on the stand because the spring would push it back. So here, some ballast needs to be added to the receiver.

The most challenging part of the entire project was soldering the power lines.
Two plugs are needed to carry power, so they are installed at the back of the entire device. The plug is relatively smaller but still usable.
Then, download the Arch OS available for Raspberry Pi from archlinuxarm.org.
Next, execute all subsequent steps on a Linux machine.
Here are the commands on Linux:
wget http://archlinuxarm.org/os/ArchLinuxARM-rpi-latest.zipwget http://archlinuxarm.org/os/ArchLinuxARM-rpi-latest.zip.md5cat ArchLinuxARM-rpi-latest.zip.md5md5sum ArchLinuxARM-rpi-latest.zip
md5sum ArchLinuxARM-rpi-latest.zip
The last two commands should output a matching 32 characters; otherwise, some strange things may happen.
Write the image to the SD card using:
unzip ArchLinuxARM-rpi-latest.zip
dd bs=1M if=./ArchLinuxARM*.img of=/dev/sdX # replace X with location of SD card
This will take a little while.
Since the image written to the SD card is only 2GB, to utilize the extra space, you can also resize the partition.
At this point, place the SD card in the Raspberry Pi, connect the network cable, and power it on.
You should see some lights flashing on the Raspberry Pi.
However, since there is no monitor/keyboard connected to the Raspberry Pi, you need to connect remotely via ssh:
ssh [email protected]
pacman -Syu nodejs rsync parallel mpc mpd espeak alsa-utils git
The system will prompt you to press “Y” or Enter to continue, then it will download and install several packages.
When this command is finished, configure the software that is now available:
bash /usr/lib/node_modules/piphone/config_mpd.shbash /usr/lib/node_modules/piphone/install_crontab.sh
Then restart, but do not close the ssh session.
As long as you have MP3 files on your Linux machine, you can use the following command to place them on the Raspberry Pi:
On Pi: mkdir -p /var/lib/mpd/musicOn Linux machine: rsync -av /path/to/music/* [email protected]:/var/lib/mpd/music/
Once this command is complete, run the following command:
refresh_mpd
When the command is complete, you can shut down the Raspberry Pi:
halt
At this point, if you see the flashing lights gradually decrease until only one light remains, it indicates that the power has been disconnected.
Then, disconnect the power and network cable connections.Connect the GPIO pins, plug the headphones into the audio jack, and connect the power line from the chassis to the Raspberry Pi.
Then close the chassis, and at this point, you should be able to plug the micro USB cable into the back of the phone, and in a moment, everything will be ready.
In the default settings, shutting down can be done by dialing “1178”, but due to some bugs in the software, you may need to dial multiple times.
Other commands are as follows:
1: Play the current song softly
2: Play the current song loudly
3: Play the next song softly
4: Play the next song loudly
5: Play the previous song softly
6: Play the previous song loudly
7,8,9,0: Search for songs by title and play.
After finishing one song, the phone will stop and wait for further instructions.
So, the already cool rotary phone has now become even cooler. Do you have similar experiences? Feel free to share with Big Data Digest in the comments~
