It all started when I became fed up with how antiquated my 2008 Subaru’s stereo felt. Automotive electronics are almost always at least 5 years behind the curve. Fortunately, we live in a time where fixing this particular problem just takes a little bit of know-how. The following describes how I integrated an Android tablet into my Subaru Legacy.
The choice of tablet: HTC Evo View 4G
This was governed by cost, reliability, size, and hardware.
- Bluetooth, GPS, WiFi, 1GHz
- Size: The tablet had to fit between the two center vents.
- Vehicle Modifications: I wanted to be able to easily replace the setup with the factory equipment if necessary (for instance: if, when I sell the car at some point, the buyer didn’t want this contraption.) In other words, minimal modification to the car.
- GPS Navigation
- OBDII display (show real-time data: RPMs, MPG, MPH, etc.) via Torque
- Music (stored on sdcard as well as from services like Pandora)
- Internet access (obviously)
In the picture above, I had not installed the plastic pieces that route the air from the common rail/tube beneath the dash to the vents. Once I attempted to install them, I realized I had no room to plug in a USB cable on one end and an audio cable into the headphone jack on the other end. This is where the project required some more thought. Would the tablet I chose even work within these size constraints? Would I have to hack up the factory routing to the A/C (this would surely break the constraint of minimal vehicle modifications)?
Fortunately, after disassembling the tablet, I discovered that the USB and headphone jack were each on their own separate circuit boards. There’s plenty of room behind the tablet due to its thin nature. Below is the solution I came up with.
The audio jack was pretty simple. It already had a bracket that I was able to put a 90* bend in to have it face away from the screen. The USB board had no such bracket, so I had to make my own. I went into my parts bin and found a part that had small steel brackets that would work with the small screws from the tablet as well as some spare screws I’d need to attach the other end of the bracket. The only problem is that I couldn’t find nuts to fit the tiny screws. I decided to go super simple by making small blocks out of epoxy stick that the screws would fasten into.
Here they are installed
Also visible in the image above is the modification I made to the tablet to end of the tablet. I had to cut it down a bit for the sake of better fitment.
Now it was time to start making the custom bezel that would be bolted to the factory vent trim. The best way I could come up with to get a nice, comfy fit to the tablet’s form was to use it as an inner mold for the fiberglass. The first step was to wrap the tablet in cling-wrap to protect it from the sticky fiberglass resin.
And so, the first layer of fiberglass went on.
While I let the resin cure, I started creating the pieces that would give shape to the bezel between the tablet and the factory trim. I’ve had decent luck with thin pieces of cardboard in the past, so I used a cereal box as the source and got to work. I needed to match the curvature of the trim which I did by tracing the curvature onto the a strip cut from the cereal box.
After adding another layer of fiberglass mat and resin and letting things cure, I positioned the cardboard pieces on the newly created base and secured their position with a few drops of superglue.
It was finally starting to look like something! It’s such a great feeling to see things coming together; to create something from essentially nothing but an idea.
Of course, cardboard won’t really cut it, so on went the fiberglass mat and resin.
Once again, another layer was added for strength. Things are continuing to come together, but it’s still very rough and nowhere near the final product. After a lot of sanding to smooth out the interior of the bezel, I had to work on getting straight edges along the perimeter of the tablet’s screen.
Trying to sand the fiberglass and get a straight line along the edges was nearly impossible. It was also very difficult to get 90* corners by sanding. How? Then it hit me, just use a frame for the fiberglass resin. So I bought some square balsa rod and did just that.
Looks pretty good. Time to test it out with the screen on to make sure we can see (and touch) everything along the edges.
Now that the front had taken shape, it was time to put some effort into the back, particularly how the bezel would be affixed to the factory plastic. I decided to extend the fiberglass of the bezel to form brackets as shown.
Once the brackets cured, a lot of sanding took place to get a smooth finish on the front area of the bezel to make things look as close to factory as possible. One of my concerns with the permanent design choice (as opposed to a design that would allow the tablet to easily be removed) was accessing necessary inputs in case of failure. The most important of these inputs is the power button. The power button turns the screen on and off in addition to turning the device on and initiating device shutdown. Since the original power button would be inaccessible, I tapped into the appropriate pins (discovered by testing for continuity with my multimeter) and ran wires to another push button.
After paint and installing the auxiliary power button, it was time to introduce the tablet to its new home. In order to integrate the tablet’s audio with the stereo in my car, I tapped into the factory radio harness’s aux input wires by splicing in one end of a set of headphones. The 3.5mm plug remained on the other end and was inserted into the headphone jack of the tablet. My other integration concern was power. Fortunately, I was able to get 12v from the harness that connected to a clock/display that was removed to make room for the tablet. The tablet obviously does not take 12v, so I toyed around with some 12v to USB adapters. Initially I used one of those adapters for power, but after receiving my IOIO (more on that in a bit), I found that it’s happy to take in 12v and convert it power the tablet over the USB connection. Anyway, here she is!
IOIO for Android
The IOIO is a board that gives Android devices the ability to interface with a microcontroller. It supports “Digital Input/Output, PWM, Analog Input, I2C, SPI, and UART control” and even has its own voltage regulator built in to relieve you of worrying about that aspect of things. It’s ~$50, but I thought I read about a new version coming out that would be ~$30.
For this project I have initially used the IOIO for its voltage regulator and digital input capabilities. In order to have the screen switched on and off with the ignition, I found that one of the pins on the clock harness I was using for power also contained pins that went high (12v) at different points in the ignition switch (ACC/ON/OFF). I decided to use a simple voltage divider to get 5v from the 12v ACC pin and use that 5v as a digital input on the IOIO. When it sees 5v, it turns the screen on. Once the 5v is removed, the screen is turned off.
My future plans for the IOIO are a bit more ambitious. I’d like to use its SPI capability to communicate with an SPI-to-CAN board in order to talk to the CAN-bus of the car. Integrating with the CAN-bus of the car can potentially give access to unlocking doors, rolling down windows, or even starting the car. Allowing the tablet to communicate with the car’s CAN-bus means wirelessly extending control of the CAN-bus (yes, there are security risks that need to be considered here). Imagine unlocking the doors or starting the car with some WiFi packets from your phone. Additionally, the CAN-bus also contains messages for buttons in the car. Presses of those buttons can passively be listened for by the IOIO/tablet and invoke actions consequently.
This part of the project is on hold since I have ADD when it comes to projects (among everything else) and have moved on to a couple other things. However, I did attempt to communicate with the SPI-to-CAN board with my Bus Pirate. Unfortunately, I couldn’t seem to get things working consistently. This is most likely due to my experience. I’m sure the board works fine.