Skip to main content
Revive an Old Payphone with a Raspberry Pi Zero 2W

Revive an Old Payphone with a Raspberry Pi Zero 2W

$18 SBC, ~$60 in phone hardware, and a weekend — the payphone-to-VoIP conversion is genuinely satisfying.

Revive an old payphone with a Raspberry Pi Zero 2W: full wiring, DTMF decoding, Asterisk vs. Python state machine, and the gotchas that turn a weekend into two.

Short answer: A Raspberry Pi Zero 2W handles a payphone-revival build with room to spare. You wire the payphone's handset to a USB sound card, drive the hookswitch through a GPIO input, listen to the DTMF keypad via a second GPIO line or a decoder chip, and run Asterisk or a simple Python state machine to place SIP calls over Wi-Fi. Total parts cost lands around $60-100 depending on payphone source.

Why this project keeps coming back

Every year another Reddit thread hits /r/raspberry_pi with someone reviving a 1990s bell-style payphone. The build is beloved for a reason: real telecom hardware has satisfying weight, satisfying sounds, and just enough electrical weirdness to make the software side interesting without being punishing. And the Raspberry Pi Zero 2 W is now cheap enough and capable enough that the SBC side of the project is almost free.

This synthesis walks the whole build — parts, wiring, software, and the gotchas that turn a weekend project into a two-weekend project.

Key takeaways

  • Pi Zero 2W is enough. No need for a Pi 4/5 unless you want video or a local voice assistant.
  • USB sound card is required. The Pi Zero 2W has no analog audio out — pick a $5 USB-A CM108 dongle.
  • Handset audio is line-level, not mic-level. Attenuate the mic path, boost the earpiece path.
  • Hookswitch is a mechanical switch. Debounce in software (10 ms low-pass).
  • DTMF: two approaches. Software decode from mic-in, or dedicated MT8870 IC. Both work; hardware is simpler.

Parts list

PartPurposeApprox. cost
Vintage payphone (Western Electric / Northern Telecom)Enclosure + handset + keypad$20-60 (eBay)
Raspberry Pi Zero 2 WSBC$18
microSD 16GB+OS$8
USB sound card (CM108 chipset)Handset audio I/O$5
MT8870 DTMF decoder moduleKeypad decoding$5
Small buck converter (12V → 5V/2A)Payphone power → Pi power$6
GPIO wire + resistors + transistor + diodeSignaling$3
12V power brickWall power$8
Total~$75-110

For the payphone itself, eBay listings of Western Electric single-slot or GTE Automatic Electric are common under $50. Working phones (with intact handset, hook, and keypad) are the sweet spot — you do not need dial tone or the original coin mech.

Wiring the handset

The handset in a payphone has four wires that matter:

  • Two for the earpiece (speaker).
  • Two for the microphone (carbon element or electret with bias).

Old carbon-microphone handsets need a small DC bias (~4-6V through ~200Ω). Newer electret handsets need proper mic-in bias from a modern audio card. The safe path: rip out the carbon mic, drop in a modern electret capsule with a matching amp. Alternately, buy a USB sound card with dedicated mic-in and let it provide bias.

Wire the earpiece to the USB sound card's headphone-out. A series resistor (~100Ω) prevents blowing the earpiece.

Hookswitch

The hookswitch is a mechanical SPST switch that closes when the handset is lifted (or opens — check your phone). Wire it as a pull-down on a GPIO pin:

Handset lifted: GPIO reads HIGH
Handset on hook: GPIO reads LOW

Add a 10kΩ pull-up to 3.3V and debounce in software (poll every 5 ms, register state change after 3 consecutive same-state reads).

Keypad — hardware decode with MT8870

The Mitel MT8870 is the classic DTMF decoder. Give it your microphone input, and it produces a 4-bit binary output on 4 pins plus a StD (data valid) pin. Wire those 5 pins to 5 GPIO inputs on the Pi. When StD goes HIGH, read the 4-bit value and map to a digit.

Alternative: pipe the mic to the Pi's ALSA input and run software DTMF decoding (Python numpy + Goertzel algorithm). Simpler wiring, more CPU load.

Software stack

Minimal Python state machine:

python
import RPi.GPIO as GPIO, time, subprocess

HOOK = 17
DTMF_STD = 22
DTMF_Q = [23, 24, 25, 12] # 4-bit data

def get_digit():
 val = sum(GPIO.input(p) << i for i, p in enumerate(DTMF_Q))
 return "1234567890*#ABCD"[val]

state = "on_hook"
number = ""

while True:
 if state == "on_hook" and GPIO.input(HOOK):
 state = "off_hook"
 number = ""
 subprocess.Popen(["aplay", "dial-tone.wav"])
 elif state == "off_hook" and GPIO.input(DTMF_STD):
 digit = get_digit()
 number += digit
 if len(number) == 10:
 place_call(number)
 state = "in_call"
 elif state != "on_hook" and not GPIO.input(HOOK):
 state = "on_hook"
 time.sleep(0.005)

Full-fat option: Asterisk. Install Asterisk on Raspberry Pi OS, configure a SIP account with a VoIP provider (Twilio, Voip.ms, etc.), map the Pi's ALSA sound card as a chan_alsa endpoint, and route hook + DTMF through a dialplan. More setup, but you get proper SIP calls, call waiting, and voicemail. Great for makers who want to learn Asterisk.

Middle ground: Baresip or PJSIP. Lighter than Asterisk, more capable than a bare Python state machine.

Powering the phone from wall power

Original payphones expect -48VDC on the phone line to power the ringer and DC-holding circuit. You do not need that for a revival — the ringer probably lives in the base and can be driven with a small 90VAC generator IC (SN75067) if you want mechanical ring, or you can replace it with a small speaker and play a WAV file for ring.

Power path: 12VDC wall brick → buck converter → 5V/2A rail for the Pi → USB power to the Pi Zero 2W. Add a 4700μF capacitor near the buck output to hold up the rail during ringer surges.

Common pitfalls

  1. Wiring the earpiece to line-level directly. You will fry the earpiece. Use a series resistor.
  2. Not debouncing the hook. You will register phantom off-hook events. Debounce in software.
  3. DC bias on old carbon mics. Modern audio cards do not provide it. Replace the mic capsule.
  4. Skipping the buck converter. The Pi Zero 2W runs unstable on unregulated 5V. Give it clean, regulated power.
  5. Assuming the ringer works. It probably needs 90VAC 20Hz — replace with a speaker + WAV unless you love AC hazards.

Companion accessories

Extensions

Once the base build works, obvious upgrades:

  • Rotary-phone version. Same electrical pattern with a rotary dial pulse decoder instead of DTMF.
  • Answering machine. Record incoming calls to wav, play back on a "messages" DTMF button.
  • Local voice assistant. Wire a Pi 4 8GB and run a local Whisper + Llama-3-8B loop. Now your payphone answers questions.
  • Emergency-mode failover. If Wi-Fi drops, fall back to a USB LTE dongle.

Bottom line

A payphone-to-VoIP conversion on a Raspberry Pi Zero 2 W is a satisfying weekend build. The Pi handles the SBC side for ~$18; the payphone itself is the character piece. Wire the handset carefully, debounce the hook, decode DTMF in hardware for simplicity, and land on Asterisk if you want production SIP or a Python state machine if you want to just make the thing ring your phone.

Related guides

Citations and sources

This piece is editorial synthesis based on publicly available information. No independent first-party benchmarking is reported.

Products mentioned in this article

Tap any product for full specs, live Amazon & eBay pricing, and alternatives.

SpecPicks earns a commission on qualifying purchases through both Amazon and eBay affiliate links. Prices and stock update independently.

Frequently asked questions

Why use a Pi Zero 2W instead of a full-size Raspberry Pi?
The Zero 2W's small footprint fits inside a payphone chassis where a full board might not, while its quad-core Cortex-A53 gives enough headroom for VoIP audio processing — a big jump over the original single-core Zero. If your build needs more USB ports or heavier processing, a Raspberry Pi 4 8GB is the roomier alternative at higher power draw.
What VoIP software runs the phone side of the project?
A lightweight SIP client or a small Asterisk/FreePBX-style stack on the Pi handles call routing, letting the payphone place and receive calls over your network or a SIP provider. You map the hook switch to on/off-hook events and generate a dial tone locally. Community payphone-conversion writeups document specific configs, which we link in the sources section.
How do I wire the original handset and keypad?
The hook switch becomes a GPIO input signaling on/off-hook, the keypad maps to DTMF or GPIO matrix input, and the handset's speaker and microphone connect through a USB or I2S audio interface since the Pi has no analog audio input. Getting audio levels right is the most-missed step — plan for a small amp or codec board and test before final assembly.
How much storage does this project need?
Very little for the OS and SIP stack — a modest microSD or the SanDisk SSD Plus over USB is ample, and using an SSD improves reliability over cheap SD cards for an always-on device. If you add call recording or a local voicemail store, size up accordingly. For a basic dial-and-receive payphone, a small, reliable boot medium is all you need.
Will the Pi Zero 2W be powered reliably inside a payphone?
Power stability is the main risk — use a quality 5V supply that can handle the Pi plus any audio board and amplifier without voltage sag, since brownouts cause SD corruption and audio glitches. Budget headroom above the Pi's rated draw. If your build adds displays, LEDs, or amplifiers, a Pi 4-class supply or a dedicated regulated rail is the safer choice.

Sources

— SpecPicks Editorial · Last verified 2026-07-10

More guides & deep dives from the SpecPicks archive

Browse all articles & guides →

More reviews from the SpecPicks archive

Browse all reviews →

More buying guides from SpecPicks

Browse all buying guides →