Build a DIY touchscreen music player for your car with Raspberry Pi. via popular mechanics
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.
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.
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.
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.
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.
Each Friday is PiDay here at Adafruit! Be sure to check out our posts, tutorials and new Raspberry Pi related products. Adafruit has the largest and best selection of Raspberry Pi accessories and all the code & tutorials to get you up and running in no time!