Hard Fault Life
HFL
Desktop Telco, Part 1
Phones. I like them, and I don’t mean cell phones.
This is Beige. I’ll be referring to my phones by their colors, by the way.
Beige is an incredibly crusty Southwestern Bell FC 2500 that I rescued from UW Milwaukee’s surplus warehouse. This was my first phone. I bought it because I thought it’d make a fun piece of living room décor. I was right! It’s an improv prop that fits on a side table.
The 229 number on the front confirms that this phone was used somewhere on the UW Milwaukee campus, though I can’t be sure what its purpose was. What I do know is that it was revolting when I got it. The key pad was completely frozen. I have no idea how a phone this old, and this nasty, managed to hang around the UWM campus until someone finally disposed of it in 2024.
I took the entire thing apart (much easier than it sounds), thoroughly cleaned it, and put it back together again. The keys move now, but they’re still very sticky. Although it didn’t clean up as well as I had hoped, the disassembly process endeared me to this phone. It’s a beefcake, but it’s not just heavy for the sake of being heavy. It’s extraordinarily well-built inside. The plastics haven’t degraded at all, which surprised me - my vintage cameras of the same era all have brittle Bakelite syndrome.
These are Brown and Black. They’re twins.
These phones are ITT model 2500 phones that I got from my local surplus shop (Sciplus ❤️). They cost two dollars, total. There were several more brown ones on the shelf, also a dollar a piece.
Unlike Beige, these phones have no story from before I bought them. There are no markings, no phone number scribbled down on a sticker, nothing. Black’s cord is still tightly coiled and shiny, suggesting it was treated very nicely in its past life.
They’re a bit grubby right now, but that’s because I just bought them yesterday. They’ll be cleaned before you see them again.
This is Blue. Blue is a Northwestern Bell Roommate, model #58000. It’s new. A few months ago, my mother-in-law found it in her basement, sealed in its original box. I like the color, so I put it up on the wall behind my desk.
Blue has never placed a call before. Soon, that will change.
The Problem
I want my phones to be able to call each other. If I just wanted to talk over the phone, that would be easy. Just wire them together, and stick a 9V battery and a resistor across them. Ta-daa, intercom system. But, that’s not good enough. I want to dial numbers, and I want the phones to ring.
I also want my computers to talk to each other. If they were all PCs, I could just connect their serial ports together through a null modem, and I’d be good to go. But, they aren’t all PCs, and null modems only get me a point-to-point connection. There is only one networking interface all my old computers have in common: they have modems.
There are various half-solutions to this problem. There’s a class of products known as “phone line simulators” which allow you to connect several analog phones to each other. But, every model I’ve found has some kind of deal-breaking flaw. Many of them do some digital processing in lieu of connecting the analog lines together directly. This interferes with fragile modem signals, so all of those are off the table automatically.
There are a handful of truly analog line simulators. I believe they were made for travelling salespeople so they could do product demos without fiddling with the customer’s phone lines. These are really cool, but they have their own flaws. Most models only offer two lines, but I want the option to have several devices wired up at once. A few models offer four lines, but they’re rare and hideously expensive.
I could also get a PBX, but… no.
My Solution
I am going to make a phone company that fits on my desk. It shall be expandable, such that I can start with only a couple lines and add more as I see fit. It shall be as simple as it can possibly be while still meeting my requirements. It will consist of the following parts:
- Line conditioning circuits, to make sure the phones interface cleanly with the device.
- KS0835F modules, which convert plain ol’ 3.3V or 5V logic inputs to the 48-70V signals the phone expects to see.
- Ring signal generators, which produce the 20Hz pulse the KS0835F module uses to make the phone ring.
- Tone generators, which generate the various beeps and brrrrs you expect your phone to make when you pick up the phone, when a caller is busy, etc.
- Key-press decoders (aka DTMF decoders), which decode the beeps your phone makes when you press a number key.
- Relays to connect phone lines together.
- Relays to connect the KS0835F modules to the tone generators and key-press decoders.
Thankfully, I don’t have to start from scratch. YouTuber Gadget Reboot has done a ton of the legwork for me (you can see his design here). His design accomplishes almost everything I am looking for:
- You can dial other phones just as you would if the phone were connected to a real phone company.
- It establishes proper analog connections between phones, allowing modem signals to pass through unharmed.
- It presents all the correct tones, including dial tone, busy signals, off-hook tone, and such.
But, there are some problems with his design:
- As far as I can tell, it can only connect two phones together. Each board can only connect to one other board.
- Every phone needs its own board, and every board has its own ESP32 microcontroller and key-press decoder (aka: DTMF decoder). Even if you could connect more than two phones together, it would start to get very expensive.
My solution will borrow heavily from Gadget Reboot’s design in some places, and be completely different in others. It’ll work something like this:
My line cards are conceptually similar to Gadget Reboot’s SLIM board. My diagram shows 3 line cards, but I’ll design it so that you can connect up to 8 (maybe 16?) line cards. Each card serves one phone.
Differences
In Gadget Reboot’s design, each board has all the necessary hardware to place and receive calls. In my design, a single microcontroller will run the whole show. That way, if there’s a bug, I only have to update firmware on one microcontroller instead of several.
The line cards will also share other key resources, such as tone generators and key-press decoders. If I’m the only person using this thing, then only one phone at a time would ever be dialing. So, I can get away with just one key-press decoder. That’s good news, because dedicated DTMF decoder chips are getting hard to come by.**
For what it’s worth, the same intuitions apply to real telephone networks. It’s inconceivable that every single person in your area code would all pick up their phones and start trying to dial a number at the exact same instant. You might need more than one decoder, but you won’t need anything close to one per customer.
A similar idea applies to tone generators. You only need one tone generator to go “brrr… brrr…” for each simultaneous call your network supports. That’s far less than one tone generator per phone.
Things likely to change
This design can be reduced even further. The drawing above shows one ringer circuit on each line card, but you really only need one ringer per simultaneous call. If you can only connect one call at a time, you’ll only ever need to ring one phone at a time. The ringer circuit is simple and cheap (I already designed it), so it’s not a disaster if every line card has its own. That said, I still want to explore some ways to move the ringer circuits off the line cards.
Also, using relays to connect the low-voltage audio channels to the tone generators and decoders feels stupid. There must be a better way to do that. A peek at the datasheet for the TX1308 analog multiplexer/demultiplexer suggests it might be a perfect fit for the job, but I’m going to test it first to make sure it works the way I hope.
One more thing: my diagram shows a discrete, dedicated tone generator circuit. This probably isn’t going to be the way it pans out. Searching for “call progress tone generator IC” brings up only one chip: M-991, which seems to have been made by half a dozen different companies over the years. There are a few people selling them on eBay, and every seller either has bad reviews, or they’re gouging their. Great stuff. Gadget Reboot generates call progress tones using an Arduino library, and I’ll probably end up going that route, too.
Asterisk
Earlier, I said this:
That’s good news, because dedicated DTMF decoder chips are getting hard to come by.
Turns out, on the same surplus shopping trip where I bought Black and Brown, I also found this:
That’s an MT8888. To quote the datasheet, it’s a “central office quality DTMF transmitter/receiver.” I have incredible luck with surplus shops, I guess. Not only can this chip decode the key presses from the phones, It can generate the same tones the phones generate. I don’t know why I’d need that, but it’s cool that I can do it.
The Journey Begins
If I actually manage to pull this off, it’ll be my biggest project ever. Thankfully, analog telephony is incredibly well-documented, and there are some great projects I can borrow from, too. This should be a fun one.