At New Relic, we have some fantastically named conference rooms. To name a few, there’s the Batcave, Hall of Justice, and Technodrome. With our recent expansion onto another floor of Portland’s Big Pink office building, we had even more places to name. While we were building out a new, Simpsons-inspired drink station called Moe’s (sadly, not stocked with Duff beer), I was inspired to help add an “interactive” touch to its decoration. I dreamed of modifying a ‘90s era phone so that it would play Bart Simpson’s prank phone calls each time the receiver was lifted.

Luckily for me, we have a strong culture of hacking at New Relic, whether it’s of the software or hardware variety. (Just take a look at some of the usefuhacks I’ve pulled off with simple scripts, or see how our IT department got VMs running on repurposed Mac Minis.) Needless to say, my dream was soon a reality, as you can see here:

Picture of retro red phone

Do not be deceived by the retro phone exterior. Inside this mundane plastic housing is an Arduino-like Teensy embedded development board, an audio daughter board, and a a few hundred lines of code. All this makes it capable of generating a dial tone, DTMF (touch tone) tones, and playing random prank phone calls grabbed from .wav files from The Simpsons. Read on to see how I pulled it off.

Version 1: Proof of concept

I am very much on the software side of computers, and only about a year ago did I put together my first successful hardware kit that involved soldering. With that in mind, I wanted to find a solution for the “prank call” concept that played to my strengths, was simple to implement, and used as few components as possible. In this stage of the project, I faced three main challenges.

1. Playing the audio clips

The crux of the project involved playing phone calls from Bart Simpson to Moe’s through the receiver, just like hearing another caller on the line. This turned out to be easily solved: I found an MP3 Trigger board that was easy to power using USB, had a microSD slot that I could store the prank phone call MP3s on, and supported random play. The triggers used internal pull up resistors (I had to go read about those), so I needed only to short them to kick off playing, no extra resistors required! Here’s what the guts of the phone looked like after adding these:

inside of phone with mp3 player board

1. Getting a usable hook signal

To create a sense of realism, I wanted to have the clips play whenever the receiver was lifted from the phone base. The switch for this is commonly called the “hook.” For this step, I found a couple of simple modern phones and disassembled them to get a feel for whether the hook switch was normally open (like an “off” light switch), or normally closed (like an “on” light switch). Although these phones used double-throw switches, which would be easy to tap into, the ‘90s era red phone I wanted to use had some diodes near the hook switch that made tapping into it a little more challenging. I needed to desolder more components from it than I would have liked, but was eventually successful.

1. Powering the phone discreetly

The last thing I wanted was an obvious power cord breaking the illusion. I expected powering the phone discreetly to be a challenge, but I found that things fell into place easily with the right parts. I repurposed the existing RJ11 jack on the phone to connect internally to the power input of the mp3 trigger, then used a micro USB wall wart and a micro USB breakout board to connect power to the far end of the phone’s matching red phone cord. True to a ‘90s phone, it has an excessively long cord.

Here’s a look at the cord being connected to a USB power module:

usb breakout board connected to rj11 breadout board

The end result of this was passable, but flawed. The receiver being off the hook (an implicit hardware flaw) would maintain an active trigger, so clip after clip after clip would play. Also, hanging up the phone wouldn’t stop the clip from playing. Having learned so much in creating this version, I felt I was better prepared to try a more bespoke system that would fix those problems.

Version 2: Bespoke

Weeks before the first version of the prank phone was even conceived, New Relic hosted an internal hardware hacking talk given by resident inventor Ward Cunningham as an encore to his talk at OSCON. At the talk Ward gave out some Teensy 3.0s, which are an Arduino-like development platform with IO pins of all favors: digital, analog, SPI, I2C, and more. It was inspiring to see what Ward and others had accomplished with the device, and while working on the first version of the prank phone, my own Teensy was burning a hole in my pocket. Finishing the prank phone and looking at V1’s flaws, I saw an opportunity to make a second, better revision with Teensy.

The soldering:

The biggest challenge of the second version of the prank phone was soldering. I had the Teensy itself, and to simplify the project this time around I also found an audio board with a micro SD that would allow me to write software to operate it. I added headers to the Teensy (~28), and used Arduino header pins (another 28; extra long, plus a female connector) for the audio board, so I could access unused pins for the hook switch. Here’s how it turned out:

close up of teensy development board within phone

The power

I repeated my use of the RJ11 jack in a second phone to bring in power; then used a male micro USB break out to supply power to the Teensy.

The code

The code for the prank phone is quite straightforward, and available on GitHub. Thanks to the audio library, it includes the ability to produce dial tone and DTMF tones. I also added in dialpad support, but the physical wiring wasn’t completed to fully allow it.

The results

This new version was a significant improvement. Picking up the receiver plays a dial tone, followed by the dialing of the phone number for Moe’s (it sounds like someone hit the ‘redial’ button). Finally, a random clip starts playing. You can hang up at any time to stop the clip, and the line goes dead when the clip finishes. Small touches like that added a lot to the experience.

Putting Moe’s phone to good use

The new drink station was completed and open for business a few weeks ago, and the phone will soon find its place there, ready for all Relics and visitors who want a small taste of nostalgia.

Until then, we’ve already been using it for some laughs. Here’s Gabe Castro of our APM team listening to a call from “Hugh Jass.”

Gabriel Castro with phone receiving against ear