CYB//NODE LIVE 34.05N 118.24W --:--:--Z

Таксофон

PROJECT active build
hardware3d-printingraspberry-piaudiorestoration
status In progress. I’m still working on this, but wanted to document the progress so far.
My brother came home with a payphone. It’s an AMT-69, a Soviet model out of Kazakhstan, brought over by a friend of his who used to live there. Steel body, enamel finish, rotary dial. Everything you’d imagine a late-60s Soviet payphone would look like. He asked me how hard it would be to fix it up so he could install it at the bar he owns in Minnesota, The Black Hart of St. Paul. The idea was to put some electronics inside and turn it into an amusement, a curiosity. Put a coin in, dial a number, hear something you weren’t expecting.
The front of the AMT-69: pebbled grey enamel, a rotary dial with Cyrillic-era numbering, a black handset hanging on the left, and a metal plate listing the free emergency numbers — fire 01, police 02, ambulance 03, gas service 04.
// as received. the plate lists the calls that were always free: 01 fire, 02 police, 03 ambulance, 04 gas

The mistake I made first

The coin mechanism was the main problem, and I spent the first few days solving the wrong version of it. The phone was built for kopecks. We wanted it to take quarters, which are bigger. My first instinct was to modify the existing mechanism to accept the larger coin, so I started sketching metal parts and figuring out which original components I could shim or alter without destroying them. After a few days I realized I was asking the wrong question. The original mechanism exists to satisfy an electromechanical telephone exchange. It handled billing and signaling to a central office. That infrastructure is gone, so none of those functions matter anymore. Strip all that away and the phone only needs to report three things:
  • A coin went in
  • The handset is up or down
  • The numbers being dialed
Once I wrote the requirement down that way, it stopped being a restoration problem. I wasn’t modifying the old mechanism. I was building a new one that only had to do one job.
A worn Soviet kopeck coin resting on the grey enamel of the phone, its face showing the USSR state emblem — a hammer and sickle over a globe, framed by wheat ears — and the letters СССР.
// the coin it was built for
The open back of the payphone, showing the original coin mechanism bolted in on the left and a porcelain terminal block on the right, its terminals labelled in Cyrillic and wired with cloth-jacketed cable.
// inside, before anything came out. the terminal block is labelled for a telephone exchange that no longer exists

If at first you don’t succeed…

It took six printed versions before the coin path worked. The hard part is measurement. You put calipers on a sixty-year-old steel casting, transfer the numbers into 3D modeling software, and then have to hold a fraction of a millimeter on a part that drops into a space you can’t redesign. Every version was close, but close wasn’t good enough here. A coin either falls through the path cleanly or it hangs up, and the difference is smaller than the error you introduce moving a physical object into 3D space. The loop was: measure, print, doesn’t fit. Measure again, find where I was half a millimeter off, print again, doesn’t fit for a different reason. The sixth version worked. Coin in, coin through, switch clicks, coin lands in the bucket. I stood there feeding the same quarter through over and over just to watch it happen. I also had to file down the coin slot on the face of the phone, since it’s cut for a kopeck and a quarter won’t physically fit. So there’s now a hand-filed slot on the front of a Soviet payphone. Call it vandalism or call it restoration, but nobody was going to feed it kopecks in Saint Paul.
Six 3D-printed versions of the coin mechanism fanned out on a printer bed, five of them hand-labelled in marker V1 through V5, and the sixth carrying the embossed word Таксофон instead of a number.
// V1 through V5, and the one that stopped needing a number
Close-up of the coin slot on the face of the phone. The cast plate is stamped 15 КОП and 2 КОП, and the slot itself has been filed wider, leaving bright bare metal against the weathered surface.
// filed out for a quarter. the bright metal is the new width
The finished 3D-printed coin mechanism installed inside the phone, a flat grey panel with the word Таксофон embossed on its face and a microswitch wired to it. The original 2-kopeck coin bracket is visible above.
// version six, installed — with the microswitch that reports a coin. the original bracket above it still reads 2 КОП

How the Pi reads the dial

This is my favorite part of the build. A rotary dial has no electronics in it. There’s nothing to interface with. What it has is a spring and a cam. You pull the finger hole around to a number and let go. The spring drags the dial back, and on the return, a cam taps a switch open and shut once per number. Dial a 3 and the switch clicks three times. Dial a 7, seven clicks. Dial 0 and it clicks ten times, which is why 0 sits at the end of the dial instead of the start. So the Pi just counts pulses on a wire. The dial switch goes to GPIO17. The Pi holds that line high with an internal pull-up, and every time the switch breaks the connection, an interrupt fires. The handler increments a counter and records the timestamp.
Macro view of the rotary dial mechanism removed from the phone: a brass gear train, a governor, coiled springs and a set of contact points mounted on a circular alloy plate, all lightly tarnished.
// the spring, the gear train and the governor. no electronics anywhere in it
Two details make the counting reliable. Debounce. A mechanical switch chatters for a few milliseconds on each click, so a naive counter reads one physical click as several. Any edge within 5ms of the last one gets ignored. The gap. The Pi has no way to know when a digit ends. The pulses in a 7 are identical to the pulses in a 3 followed by a 4. Same wire, same switch, same seven clicks. The only difference is timing. Pulses within a digit arrive at about ten per second, because that’s how fast the spring returns the dial. Between digits there’s a pause while your finger travels back. So the rule is a timeout: once 250ms passes with no new clicks, whatever’s been counted is the digit.
// seven pulses on the wire. drag the pause: over 250ms the Pi sees 3 then 4, under it sees a single 7.
Seven pulses is a 7. Ten or more is a 0. Digits stack into a buffer, and when the buffer matches the length of a target number, the code compares them. A match plays the recording. A miss plays an error tone and resets. The other two pins work the same way with less arithmetic. GPIO22 is the hook switch, up or down, nothing to count. GPIO23 is the coin switch, where one click equals one quarter. That’s the whole system: count electrical pulses, and use a pause to decide where one digit ends and the next begins. It’s the same logic a telephone exchange ran in 1950, except that took a room full of relays and this is about forty lines of Python.

The brain

A Raspberry Pi Zero, on a mounting plate I printed to fit the cavity the original electronics left behind. Audio goes out through a MAX98357, an I2S class-D amplifier, and into the original handset earpiece. That choice matters. The voice comes through a 1969 receiver with all the bandwidth limits and coloration that implies. A clean modern speaker would have been easier to install and would have sounded worse for this. The narrow, boxy handset sound is the effect. I printed a coin bucket too, since the coins have to land somewhere.
The payphone lying on its side with a white 3D-printed coin bucket sliding out of the base, next to the original cast-metal coin chute.
// the printed coin bucket, where the donations land
A small blue I2C OLED module held up in front of the open phone, its screen reading Таксофон above the address 10.10.10.139.
// a maintenance display inside the case — it reports the phone’s name and its address on the network
photo pending  ·  Pi Zero and MAX98357 on the printed mounting plate
// the new brain, in the old cavity

What it does

You pick up the handset, put in a quarter, and dial a number. Someone talks to you. The recordings are messages from celebrities and notable people, each behind a number you have to know, guess, or hear about from someone else at the bar. The only interface is the dial and word of mouth. The coins go to a local charity. That was the plan from the first sketch, and it’s why the coin mechanism had to actually work instead of just clicking convincingly. If the coin slot were fake, the donation would be too.

What I’m still chewing on

The idea I keep coming back to: letting people leave messages. Dial a number, hear a tone, record something, and it sits there for whoever dials that number next. That’s a very different machine from the one I’m building now. It turns a jukebox into a place where strangers talk to each other across time, unsupervised, in a bar. It might be the best idea I’ve had this year, or a moderation problem with a rotary dial attached. Probably both. I’m not deciding until the first version is on the wall and I’ve watched people use it.

Next

Finalize the wiring and troubleshoot a few mechanical issues so the rotary dial is solid and reliable. After that, it ships from my studio workshop in Texas back up to Minnesota to go on the wall at the bar.
Terminal Frame