Build This DIY Touchscreen Music Player for Your Car

All you need is a Raspberry Pi and a dream

Ryan Lowry

By
Eric Kester

Have you ever been stuck in traffic and pulled up next to some maniac singing along with the radio to an audience of no one, index fingers drumming out a spastic beat on the steering wheel? That's me. As a married man living in Manhattan, I have a special ­affinity for my car's cloistered interior. It's a rare womb of privacy, a work-and-email-free bubble where I can reflect ­quietly or rock out as the day requires.

Advertisement - Continue Reading Below

A few months ago I realized my haven was losing its appeal, and I sensed it was connected to my radio's anachronistic scan button. In a world filled with customized on-demand entertainment, the clunky AM/FM radio in my 2008 Ford Taurus is embarrassingly dated. I can pretend I'm Jay-Z all I want, but his ride has to feature a media center with more than six FM presets.

The clunky AM/FM radio in my 2008 Ford Taurus is embarrassingly dated

So I decided to see if I could build a touchscreen dash personalized with thousands of my favorite songs using a Raspberry Pi, a computer board barely larger than a credit card. If you haven't heard of Raspberry Pi yet, remember the name—this easy-to-use microcomputer is taking over the programming world. Lauded by amateurs for its accessibility and by experts for its versatility, the Pi has been the catalyst for all sorts of cool projects: voice-activated coffeepots, self-watering plants . . . even touchscreen car dashboards.

You can find a Raspberry Pi online for less than $50, and I ordered mine from the tech website adafruit.com. Setting it up for this project was fairly straightforward. The Pi is basically a Swiss Army Knife of inputs that you're already familiar with: HDMI and Ethernet connects, four USB ports, an audio and analog video port, and an SD card slot. This last input is the most important because the Pi runs its operating system (known, a tad confusingly, as its "image") from an SD card.

Advertisement - Continue Reading Below

Ryan Lowry

There's a bustling online community of Raspberry Pi coders who make pre-programmed images available for download. When I searched for images that would run a homemade media center, a site called xbian.org had the most popular version: software for a media hub akin to what you see on an Apple TV. It can play music and movies, display pictures, and run other media apps such as Pandora—it can even stream content from Apple devices using AirPlay. Most conveniently, XBian can be played on any screen with an HDMI input, including the touchscreen I planned to build. I popped an 8-gigabyte SD card into my laptop, and by following the step-by-step directions of the free installer I downloaded from the XBian website, I copied the image directly onto my card. Then I ejected the card, slid it into my Raspberry Pi, and congratulated myself on becoming a genuine programmer.

Assembling the actual touchscreen—a Tontec seven-inch HD screen I found on Amazon for $75—was a bit trickier. The touchscreen comes with a primary control board that looks strikingly similar to the Raspberry Pi, plus two smaller control boards, all of which help communicate data to the Pi. The LCD screen and the glass touchscreen, meanwhile, don't come attached to each other because I guess that would make too much sense, so I had to connect them myself. There's a rough guide online to making a touchscreen dashboard in which the author, a mysterious wise man identified only as Zaqq, explains how to do this with masking tape. I simply aligned the touchscreen atop the LCD screen, then ran tape along the centimeter-thick edges of the two stacked screens. For security I used five layers of tape, and I folded any excess neatly onto the back of the LCD screen.

Advertisement - Continue Reading Below

To work properly, the touchscreen needs to be connected to its three control boards via three cables. Tontec does not include instructions, but each wire snaps exclusively into a specific corresponding jack, so I managed to connect everything using trial and error. Next I linked the touchscreen to my Raspberry Pi through HDMI and USB cables. I plugged the Pi into an outlet with its included power adapter. The touchscreen didn't come with one, so I plugged it into the wall with a twelve-volt AC/DC adapter I bought separately.

Here is where things turn into a computer-hacking scene from a mid-nineties movie

Both the Raspberry Pi and touchscreen turned on automatically. Then I had to get the XBian operating system synced with the touchscreen, and that required installing some drivers directly to the Raspberry Pi from the Internet. To do this I plugged the Pi into my modem with an Ethernet cable, and, using the arrow buttons of a computer keyboard to control XBian (I connected the keyboard via USB), I highlighted the power icon in the menu screen and selected Exit. This closed the software and opened up the command terminal for the Pi.

Advertisement - Continue Reading Below

Here is where things turn into a computer-hacking scene from a mid-nineties movie. The command terminal asked for a username and password. I entered "xbian" and "raspberry," respectively, then typed in a few -gibberish-looking prompts recommended by Master Zaqq from that online guide. I'll spell them out here in case you're following along, but I strongly recommend supplementing these steps with your own Internet research.

In the terminal I entered wget https://github.com/brantje/xbian-touch/raw/master/..., which downloaded the touchscreen driver, followed by sudo sh install.sh, which installed it to the Pi. After I complied with some onscreen prompts to orient the touchscreen, I was good to go. The calibration of the touchscreen wasn't as precise as I would've liked, but some tinkering would probably fix that. In the meantime I now had a slick media center that could play my entire MP3 library, which I had stored on a 32-gigabyte flash drive that was plugged into the Pi's second USB slot.

Ryan Lowry

At last: the hard part. I suppose I should have assumed that installing the touchscreen in a real car wouldn't be as easy as programming the Pi. Without some practice I was hesitant to disassemble my personal chariot, so I reached out to Brooklyn Automotive High School to see if they'd let me potentially ruin one of their practice cars. Always happy to assist a mechanical neophyte, the school, and in particular, a Mr. Renato Rosales of the school's electronics class, let me mess around with a 2009 Pontiac G6 they'd been taking apart and putting back together for years.

Advertisement - Continue Reading Below

My first step was to remove the car's built-in radio, which was easy enough: With the help of Rosales, I popped off the plastic dashboard panel, unscrewed the radio, and yanked it out. Next I had to hook up my new media center to the car's sound system. This step varies from car to car, but in general you'll need to connect the car's speakers to the 3.5-millimeter audio jack in the Raspberry Pi. The simplest solution is to use a standard auxiliary cable to link the Pi to the car's auxiliary input, but this involves keeping the original radio connected (since it will be functioning as an amp). You can stash the radio in your glove compartment or under a seat, though the latter will likely require you to extend the radio harness (the collection of wires that work the radio). For this step Rosales suggests you "get a stock harness adapter that will plug into the vehicle's existing wiring harness and splice into the audio outputs from there." You can find harness adapters at most electronics stores. If your car doesn't have an auxiliary input, the easiest fix is to move the radio as described above, then use a cassette-player auxiliary adapter. It's very last decade, but it should work.

I threw on some Jay-Z (okay, fine, it was Adele), and basked in the elation of DIY success

Both the Raspberry Pi and the touchscreen need their own power sources. For this I'd recommend getting an external battery that's 5,000 milliampere-hours or higher, with multiple USB ports. Raspberry Pi users seem to like Anker external batteries. Connect the battery to the Pi with a micro USB cord. Connect the touchscreen with a USB-to--barrel plug.

Advertisement - Continue Reading Below

Once everything was connected and powered up, I took the Raspberry Pi, the control boards, and the wires and performed a fancy mechanical maneuver known by us programmers as "stuffing all of it into the empty radio cavity." Finally I duct-taped the back of the touchscreen to a black foam board and secured that to the inside of the plastic dashboard panel.

When I snapped the panel back into place, the touchscreen sat flush with the dashboard and looked naturally integrated. The Pontiac had become 100 percent cooler. After class some of Mr. Rosales's students even admitted that the dashboard looked "pretty swag."

It wasn't until they scattered that I actually fired up the system, threw on some Jay-Z (okay, fine, it was Adele), and basked in the elation of DIY success. Was it easy? Not exactly. Is it possible? Yes, and I'm here singing to prove it.