Dial-A-Verse
Project:
Repurpose an old rotary dial telephone to make an interesting and nostalgic item.
The Dial-A-Verse project was originally created for a school arts fair to present students' poetry creations to the attendees. The user dials telephone numbers to select audio tracks which are then played through the phone’s receiver. It is designed to mimic the operation of the standard wired phone system using vintage dial telephone sets. Accurate dial-tone, ring-tone, busy and error signals are emitted at appropriate situations.
Dial-A-Verse is an adaptation of the MicroPi electronic fileserver project. The server remains operational inside the unit. Users can listen to audio material that they select using the telephone dial. They can also download the same material by connecting their modern smartphone, tablet or computer to the WiFi signal emanating from the device and visiting its internal website. It's a truly unique merging of old and new technology.
It is designed to be plug-n-play compatible with old telephones without any electrical modifications. However in the present form, it does not use the telephone's bell. This can optionally be removed to make room for the Raspberry Pi and interface electronics inside the phone's shell. This was done with one unit in order to make it more compact.
Audio tracks can be added by copying them to a specific folder on the device's memory card. The phone number must be part of the file's name. The file will then be playable by dialing its number.
I've seen other projects which combine a dial phone with a microcomputer. They all require electrically modifying the phone in some way by removing the network or hacking into the dial mechanism. This project permits the use of an unmodified telephone via an RJ-11 jack.
Features:
- Dial a number to select an audio track.
- Dialing "900" calls a voice clock which tells the present time.
- The "operator" speaks either English or Spanish. The language is selectable by dialing a number.
- The device can be administered via a built-in website.
- The image file contains all software needed.
Successful builders will have some electronics experience and soldering capability. The entire project's software is provided in an image file. No other software is required.
Supplies
- Dial telephone set.
- DTMF or "Touch-tone" phones are not currently supported.
- Note that some push button phones include a "pulse dial compatibility mode". This was usually a switch under the phone. This type of push button phone should work as a Dial-a-Verse phone.
- Raspberry Pi Zero W or 2 W microcomputer. (Rasp Pi 2, 3 or 4 could be used as well.)
- 40 pin header for Raspberry Pi (optional)
- Custom comparator circuit (LM324), schematic included.
- USB Audio dongle. (not needed for Rasp-Pi 2, 3 or 4)
- Micro-SD Memory Card - must be Speed Class 10 or better, 16GB-512GB.
- Various cables and adapters.
- MicroUSB male to USB A female
- MicroUSB male to USB A male cable (power cable).
- RJ-11 breakout terminal (optional depending on mounting of circuit board).
- Power supply for Raspberry Pi. Could be old phone charger or USB charging block.
- Computer with SD slot or USB SD writer dongle.
- Balena Etcher program.
- SFTP file transfer program such as WinSCP or Filemonkey, FileZilla, etc.
Build Comparator Circuit
The theory of this circuit:
When the phone is on-hook, the line is connected across a capacitively coupled ringer circuit appearing as an open DC circuit. When the phone goes off-hook, it draws current through its internal network, receiver and transmitter. This reduces its resistance from infinity to about 100 ohms causing the line voltage to drop to about 2.5 volts depending on the value of R1. This condition is detected by the first comparator (Hookpin). When the dial is pulled back, the line is shorted. When it is released the line is momentarily opened and shorted (pulsed) by the dial mechanism. This is detected by the second comparator (Dialpin). So, the two comparators detect the three states,
- On-hook
- Off-hook
- Dial pull-back and dial pulses
The trimpots enable setting the comparators so they trip at the appropriate voltages. They should be adjusted so as to not allow audio on the phone line to trip them. POTS (Plain Old Telephone System) telephones are current devices, thus even very loud audio does not appreciably change the line voltage.
The other parts in the circuit couple audio onto the line. There are two LEDs indicated. The software uses them to show Ready/On-Hook and Dial timing. They are useful to adjust the trimpots to get the detection of the states working, but are really not required for the function of the device.
I used an LM324 because I had one in my junk box, but any comparator could be used. Feel free to add a feed-back resistor to the comparator circuits to increase the hysteresis of the circuit. I tried this, but found it wasn't necessary.
I originally tried to use the PWM audio output from the Pi to pass audio, but found I needed to amplify it after the required low-pass filter or use a transformer to couple it into the line. Clever folks might be able to use one of the extra op-amps in the 324 to boost the audio levels, but audio dongles are cheaper than audio transformers and easy to use. If you use a Pi 2, 3 or 4, you can use the audio output from the Pi itself and won't need a dongle.
Comparator Waveforms
These traces show:
- The relationship between the phone line and the first comparator output. (Hookpin)
- The relationship between the phone line and the second comparator output. (Dialpin) This trace also shows a complete sequence:
- On Hook
- Off Hook
- Pullback dial
- Dial 5
Circuit Mounting
Image shows completed circuit in 3D printed enclosure. Another option would be to remove the telephone's bell to make room to mount the circuit inside the telephone's shell.
The custom circuit is hand wired and soldered onto the pins of a Raspberry Pi Zero W (top). There are only a few wires used and this could be done without the pins using a cable or individual wires.
The USB audio dongle (left with red LED) is connected to the Raspberry Pi via a micro USB to USB A cable adapter.
The Western Electric 302 telephone had been updated in the past with an RJ-11 cable. The circuitboard includes a RJ-11 breakout device (lower right) to allow connection without opening the phone.
Set Up SD Card
- Download the zipped firmware image from this link.
- The file may be tested for download accuracy (before unzipping) by comparing it to this MD5 Sum.
- Unzip the file.
- Put the SD card in the reader/writer.
- The next step will erase everything on the card, so copy any needed files off.
- Using Balena Etcher, or another SD card image writer, write the image file to the card.
- It is not necessary to install the Raspberry Pi OS on the card as the image includes it.
- Do not format the card (no matter what Windows tells you).
Put It All Together
When everything is assembled, the device should behave very much like a normal wired telephone.
- Install microSD in Pi. Beware, never insert or remove SD card when power is applied to the Pi.
- Connect telephone.
- Power up the system using a USB port, or 5V USB phone charger.
- System boots in about 60 seconds.
- The red LED illuminates
- Pick up the telephone receiver:
- Red LED extinguishes
- Hear a dial-tone. The first time after boot this takes a moment. Subsequently, it will be immediate.
- Pull back dial - Green LED illuminates
- Release dial - Green LED extinguishes half a second after dial reaches home position.
- Dial 111 or 222 or 333 or 444 or 555 or 666 or 777, all are valid on supplied memory image.
- Listen for Ring tone and then program (valid number)
- Hear "We're sorry, your call could not be completed as dialed please check the number..." (invalid number)
- This is preceeded by voice annunciation of the number perceived by the system.
- Hang up at any time to try again.
- Dial 900 to hear the time of day.
- The time may be set from the admin page on the website.
- It will be set automatically when the device is connected to the internet via a local WiFi signal. (see below).
Connect Wirelessly to the DAV Device
- Wait 2-3 minutes after power on for a WiFi signal to be emitted. SSID: "Dial-A-Verse"
- Using a computer, connect to the signal. No password will be required.
- Open the administration pages, http://dav.local/control in a web browser.
- login: pi
- password: bbox100
- The SD image is reduced in size to make it easy to download. Very little audio will fit in the reduced partition. There is a button on the administration page which permits expanding the partition to the full size of the SD card. Push the button and wait for reboot.
- Connect to the device again by WiFi.
- It can be connected to your LAN via the Net menu item on the admin page.
- See the Net admin page of the MicroPi website.
- Connecting to a WLAN makes the device available to any other device connected to the same WLAN.
- Load new audio on the device using SFTP.
- Using WinSCP (on Windows) or another SFTP program, connect to the device.
- user: pi
- password: bbox100
- Write Audio files to the /home/pi/www/Shared/audio folder.
- The file must include the desired phone number in its name.
- Beware of other files having numerals as part of their name. The search algorithm is indiscriminate, and will discover and detect any numerals in a filename. It plays the first it finds having the right numerical sequence.
- The new files should be available immediately from the telephone. If they are not, try the "Fix Permissions" button on the Administrations page.
- Check the "Text" category to download a PDF Telephone Directory valid for the supplied image.
- Many of these steps are outlined on the website for the MicroPi project of which Dial-a-Verse is an adaptation.
Python Program
The device runs a Python program to monitor and respond to the phone's signals, play audio and operational tones. This is an edited version of the program which appears on the device.
The program implements the state machine shown above. The details are slightly different, but the diagram is more or less accurate.
Downloads
Other Options
This was the original version used in the arts fair. The program was later adapted to play Scripture audio in over 150 indigenous Mexican languages. The user dialed a number to select the language and another to select the Scripture verse.
Here are some ideas I have for modifications in the future:
- Make the Voice Clock operate more like these systems used to work. "At the tone, the time will be: XX hours XX minutes xx seconds...... beeeeep."
- By connecting the phone line to the mic input on the audio dongle, and adding appropriate software, the processor could interpret DTMF (Touch-Tone) signalling, which would enable the use of more modern, push button phones.
If you like this project please let me know.