Coghack #26: Repurposing an analogue rotary telephone for the digital era

Jon White
cogapp
Published in
5 min readFeb 21, 2024

--

Partially dismantled rotary phone, sharpie, masking tape, rasperry pi pico connected to the some terminals within the phone, and a laptop plugged into the pico strewn across a desk

I’m old enough to remember rotary telephones — but too young to ever have owned one myself (Fischer-price model with wheels notwithstanding). However, regardless if you’ve even seen one of these phones before, all you need to know is there’s something eminently satisfying about the clicking, winding tactile mechanism of the rotary dial.

That’s the first thing I thought of when pondering the brief for this Hackday; the only requirement being it must include something you can physically touch.

The Plan

I had a clear vision quite early on that the phone should be some kind of Zoom meeting controller. Initially my hope was that I would be able to do everything I needed on a Raspberry Pi. I thought this would be great, and that I could maybe even hide the Pi in the phone case (more on why this might prove problematic later). However, I abandoned this idea fairly quickly when I realised:

  1. Zoom wouldn’t run on natively on the Raspberry Pi
  2. Getting the mic and speaker in the handset to work would probably require an amp/more power

These both seemed like things I could sidestep if I could just interface the phone with my laptop (one which happens to have its own speakers and mic already), which led to my plan looking something like this:

A crude flow diagram showing a green box labelled “Rotary telephone” with an arrow coming out of the right and into a grey box labelled “Microcontroller”, with an arrow coming out of the right into a shape labelled (and resembling a) “Laptop”.
The phone would have various terminals connected to a microcontroller, which would be able to interpret them as an event, and send a signal (via serial over USB), to my laptop which would be listening dispatch some action in response

MVP

  • Can detect if phone is picked up
  • Can detect if (and which?) number was dialled
  • Can respond to these events by executing a script on my laptop

The Approach

Green rotary telephone, masking tape, flat-head screwdriver, sharpie, rasperry pi pico, and multimeter arranged neatly on a desk
Most of the bits and pieces I needed

Microcontroller

I used a Raspberry Pi Pico (MicroPython), and Thonny to program the controller. Just having this connected by USB to my laptop is enough to power this, and any text printed from the controller is sent to the laptop.

On the laptop I had a separate Python script running listening for messages from the Pico, which would run a third Python script with different commands like “join_meeting” or “toggle_mute”. Rather than using the Zoom API (which would have been better, but more involved), this just did things like used the command line to start a meeting, and sent keyboard shortcuts.

Handset up / down

Once I’d taken the phone apart I was able to use a multimeter to find which terminals in the phone created a closed circuit when the handset is lifted, very easy but also very satisfying.

Once connected to the Pico GPIO pins it was really simple to detect this and print a message that could be picked up on my laptop.

The dial mechanism

The dial was a bit trickier, but I was lucky enough not to be the first person to try and do something like this, and a video on YouTube from a person with the same telephone as me helped me identify which wires I should be looking at. It took a bit longer to do something useful in code with this with my Python being a bit rusty and lack of familiarity with the Pico. The example I mentioned earlier was a bit of a help, but not directly applicable to the Pico.
The general idea is that the dial generates pulses, which when counted can be mapped to numbers. I found this more or less to be true, with an occasional deviation that could be accounted for.

Interference

I noticed one of the ground connections from the dial was on the same terminal as the ground from the handset. I didn’t think much of this at the time, but it gave me problems when I rigged up the handset and the dial at the same time. Both worked beautifully in isolation, but I wasted a lot of time figuring out what might be going on here.
There might have been a hardware based solution to this that escaped me, but eventually I just coded my way around this by making conditions on the microcontroller like, “If a dial event happens less than one second after a handset event, ignore it” for both the dial and the handset to try and limit cross firing.

In a similar vain, entirely for vanity's sake I tried and shove the whole microcontoller inside the case and found interference was a big problem here too. Fortunately I tested that idea before screwing the lid back on because the pulses I was counting from the dials became completely unreliable.

It took some messing around with tin foil in various positions before I compromised and ran my crocodile clips out of the case so at least the lid would fit back on even if the controller had to live outside.

Closing thoughts

I came pretty close to the wire in terms of being able to demo this working as intended. I was keen to be one of the first to demo as I’d had some consistency issues after running for a while. There still seemed to be a few reliability issues coming from interference, but handset up would join our daily standup zoom and unmute the mic, handset down would toggle mute again, and dialing any number would toggle the video on and off.

I never got around to implementing a “leave meeting” command, but I thought it would be cool if a rapid handset “down, up, down” triggered that, a bit like how people would make sure the call was over back in the old days.

Jon is a Developer at Cogapp, a digital agency specialising in the cultural sector. Please get in touch if you’d like to hear more about our work.

If you’re interested in joining us for a hack day, there’s more information on our website.

We’re on Twitter or you can contact us via our website.

--

--

Developer working with museums. Passionate about design, code, green tea, a good biscuit etc.