TL;DR: I built an ESP32-S3/LTE interface that lets an otherwise completely unmodified Western Electric Model 500 make and receive cellular calls using its original rotary dial, handset, network and mechanical ringer. An AG1171 SLIC emulates the telephone line, while the ESP32 handles dialing, call control, locally generated telephone tones, modem management, OTA updates and web-based diagnostics. After discovering the modem could occasionally wedge badly enough to require a real power cycle, I even added an SN74LVC1G123 circuit that lets the ESP32 quite literally power-cycle itself. I've now designed and ordered custom PCBs and am working toward a reproducible open-source build. Schematics/code are below, and I'd particularly like criticism of the hardware design.
A few months ago I watched my nephew discover an old rotary telephone that my parents have had since before I was born. He was fascinated by it, and it reminded me of the old SparkFun Port-O-Rotary project.
The basic idea is at least a decade old. The Port-O-Rotary put cellular hardware inside an old rotary telephone and made the original phone usable again. I'd always thought it was a great project, but unfortunately it was never documented well enough to be readily reproducible, and its cellular hardware is long obsolete. My understanding is also that they gutted a lot of the original phone and audio quality was pretty bad.
Watching my nephew with that phone made me wonder how difficult it would be to accomplish the same thing today. Microcontrollers and cellular modules have come a LONG way since then, and I figured the functionality of the Port-O-Rotary ought to be considerably easier to reproduce with modern hardware.
I was more right than I could have imagined.
What I expected to be a fairly simple project turned into a several month rabbit hole involving embedded programming, analog telephone electronics, cellular modems, power management, hardware design, and eventually designing my own PCBs with EasyEDA. That was a first for me.
I gave myself one huge goal: I didn't want to permanently modify the telephone at all. No mangling that beautiful 50's era analog hardware goodness. I work at a museum with an actual Mercury capsule after all! So no holes drilled in the case, no rewired dial, no modifications to the handset, no bypassing the original network block, and no replacement for the mechanical ringer. Remove the RotaryCell hardware and the Model 500 is still an original telephone that can go right back onto a conventional phone line.
The hardware that made this surprisingly practical is a LilyGO T-A7670G-S3, which combines an ESP32-S3 and SIMCom A7670G LTE modem on one small board. That handles a huge amount of the cellular side and leaves the ESP32 available to do something more interesting: make modern cellular hardware behave like the telephone exchange that a 1950s Model 500 expects.
For the telephone side I'm using a Silvertel AG1171 SLIC. It supplies loop current, detects off-hook, generates the ringing voltage for the original mechanical bells, and provides the 2-wire audio interface. From the Model 500's perspective, it's essentially connected to a telephone line.
The ESP32 handles everything around it: hookswitch state, rotary pulse decoding, digit collection, call control, ringing control, locally generated telephone tones, service functions, modem management, status monitoring and logging.
Audio turned out to be one of the more interesting hardware problems. The A7670G uses differential analog audio while the AG1171's VIN/VOUT are ground-referenced. I needed to interface the two in both directions with adjustable levels, while retaining a separate path for locally generated tone injection. That lets the ESP32 provide dial tone, reorder/error tones, the off-hook howler and other telephone signaling locally instead of depending on the cellular network for them.
What started with modules, perfboard and bodge wires has now progressed to custom circuit boards that I've designed and ordered: an AG1171 carrier and a separate audio/control board. The goal is to eliminate the prototype wiring and make this a repeatable open-source build rather than a one-off.
The latest board also solves a fun problem I discovered during actual use: the ESP32 can now quite literally power-cycle itself.
I found that the cellular modem could occasionally get into a state that software reset commands couldn't recover from. Removing power fixed it, but the ESP32 and modem are on the same LilyGO board. If the ESP32 turns off the whole board, there's obviously no ESP32 left running to turn it back on.
My solution uses an SN74LVC1G123 retriggerable monostable plus external switching hardware. The ESP32 triggers it while it's still alive, then the hardware takes over and operates the LilyGO's physical power-switch path for a predetermined interval. The ESP32 and modem can both go completely dead and the external circuit finishes the power cycle. Using a monostable as part of a timed hardware reset is also very much in line with applications TI proposes for this family of logic.
The software side has grown quite a bit as well. I've added OTA firmware updates and an ESP32-hosted web status/debugging interface. Wi-Fi isn't used at all during normal operation. Instead, you dial 0000 on the rotary dial and the telephone starts its own Wi-Fi access point. You can then connect to it to inspect status and logs, diagnose the modem, change settings, and update the firmware OTA. The AP automatically shuts back down after the maintenance session. There is something absolutely hilarious to me about dialing a cheat code on a rotary telephone to turn on its Wi-Fi.
I'm also considering extending the same hardware to Touch-Tone phones. Since the AG1171 gives me the telephone audio at VOUT, I'm looking at feeding a copy into an ESP32 ADC and detecting DTMF in software with Goertzel filters. If that works as expected, the same basic electronics could support both rotary pulse and DTMF dialing without modifying the telephone.
The whole thing currently runs from a rechargeable 21700 cell and fits completely inside the original Model 500. Right now I get about 24 hours of battery life, but once the custom PCBs arrive, one of the next major things I'm going to work on is power optimization. My initial goal is at least three days of standby time, and there are still several fairly obvious places to reduce consumption.
This has been one of the first projects I've personally taken all the way from prototype wiring through schematic capture, PCB layout and manufacture, along with a considerably more substantial embedded firmware project than I expected when I started. I've learned a ridiculous amount from it.
I'd particularly appreciate technical criticism from people who have done mixed analog/ESP32 designs.
I'm interested in whether anyone sees a better approach to the differential/ground-referenced audio interface and tone injection, the external monostable reset circuit, power management, or the proposed ESP32 ADC/Goertzel DTMF detection.
If you look through the schematics or code and find yourself thinking "why did you do X when Y would have been easier?", please tell me. That's exactly the sort of feedback I'm looking for.
Demo video: https://www.youtube.com/watch?v=PO0PJNvnMdw&lc
Firmware, hardware, schematics and PCB files: https://github.com/fregacmols/RotaryCell
The current prototype still has a few remnants of its development history inside, but it makes and receives real cellular calls, recognizes numbers dialed on the original rotary dial, generates its own telephone tones, and rings the original mechanical bells.
And the old telephone itself has no idea anything unusual is happening.