- Raspberry Pi Powered Android Auto Head Unit for my 15yo Car.
- 07 Jun 2022 08:15:41 pm
- Last edited by TheLastMillennial on 08 Jun 2022 02:36:38 pm; edited 1 time in total
Ever since I started driving in heavy traffic to places I'm often unfamiliar with, I've realized how dangerous it is to glance down at Google maps running on my phone which I always put in a cup holder. It's so low it completely takes my eyes off the road and the phone is just is obnoxious to use doing basic tasks like skipping a song.
Now a normal person would just spend $10 on a phone holder that clips to a vent and be done with it. But that's not good enough for me! That would block air from the vent making it useless. Besides, I'm a computer scientist, I basically have a degree in over complicating things! So I've spent the past few weeks engineering a head unit that should work in any car that has even a little bit of free space on the dash. Apparently it's much trickier than I anticipated (as per usual) but I managed to make something I'm pretty happy with!
I originally planned on taking out my stereo and replacing it with an after market one that had Android Auto built in. That is until I realized the new stereo wouldn't have any knobs or physical buttons, yuck! Also After some more research, I discovered I could install Android Auto onto a Raspberry Pi with a custom OS called Crankshaft. I had a spare 3b laying around so I tested the software with a bog standard monitor. Thankfully the OS could be controlled with a mouse despite being designed for touch screens. It didn't look all that pretty but seemed very functional and customizable. It immediately started Android Auto when I plugged my phone in via usb a to c cable so I wouldn't have to mess with the default UI anyways. Apparently there's a wireless mode using WiFi but I was unable to get that working. The only downside was the boot times. It took 30 seconds to boot but it immediately launched into Android Auto when it was done so I wasn't too concerned about it.
With the proof of concept complete, I started searching for LCD displays. I knew I wanted a display that
1. Looked good. This meant TN/TFT panels were off the list. They have terrible viewing angles and I really didn't want the main feature of the project to look bad or be difficult to see on bright days. I specifically looked for IPS panels.
2. Had a capacitive touch screen. I would have settled for a resistive touch screen if I needed to, but I don't plan on wearing gloves in my car and capacitive screens just feel and respond so much better in my experience.
3. Was at least 7" and roughly 16:9 aspect ratio. My phone screen is already 6" but it's 21:9 aspect ratio so it's not great to use in landscape mode. I wanted something larger and more usable horizontally.
4. Was at least 720p. Most infotainment displays in cars are 480p and I never really liked how soft they looked so I wanted something better.
I cut out different screen sizes to figure out which would fit best in my car
Turns out Android Auto only supports 480p by default and requires you to go into the developer settings to enable 720p or 1080p mode. Unfortunately, small 720p touch screens don't really exist for the Raspberry Pi so I settled on this 7 inch Waveshare 1024x600. It's not 720p so the scaling won't be perfect but it has both an IPS panel and a capacitive touch screens so my two big points were covered. Also, it was guaranteed by the Crankshaft developer to require minimal setup.
I got the display and verified it worked simply by plugging it in! I had all the hardware proven to work, now I needed to attach it to my dash. There's a small, oddly shaped area just above my vents I figured I could use. I sketched out the area with paper then cut a block of MDF to fit it.
I also made the mount for the display out of the same wood, cutting out areas for the tall parts of the circuit board and heat generating components. It took several hours and quite a lot of jig sawing but the result wasn’t too bad. It was a little crooked but I had to take it off and paint it anyways so I wasn't concerned. I plugged everything in just to test it. In order to get the wires coming out the left side, I turned the display upside down. No problem, there was a software setting that would rotate the display. Easy right?
I took the parts down and painted it all, even creating some trim pieces so it'd look a bit better!
I stuck it in my car, putting the Raspberry Pi in the console space (where the AUX input is oddly enough) and left thinking my work was almost done.
But no, since my display was a non-standard resolution, I had to add an hdmi_cvt command to force the resolution in the config file. This meant that display rotation wasn't as simple as clicking a button or just adding 'lcd_rotate 2' (nor all the alternatives of lcd_rotate). I had to look up the manual on the manufacturer's website. I ended up switching from EGL to X11 so I could rotate the display, however the touch input was not rotated. This meant I needed to edit the a conf file for X11 (after remounting the file system as read-write) and manually change the calibration matrix. As a Linux noob it was doable, but very frustrating since it took most of the day to troubleshoot and fix. Finally, I had the rotation of the display and the touch input correct, but there was another, much bigger issue.
The heat. I did some prior research and knew it'd probably get up to 150 degrees Fahrenheit in the car which is, within spec of the display and other electronic ratings. I don't live in a very hot area so I didn't expect it to reach much higher than that. When I measured my car in the middle of a sunny day, the dashboard was 180 degrees! The head unit itself was around 165 degrees. The double sided tape I used to attach it to the dash was barely holding on, but much worse, the display had peeled off the circuit board and was hanging by just the ribbon cable. Even the layers in the LCD itself were separating! I immediately took it inside to cool down but there was already damage to the backlight diffuser so there's a bright patch in the top right corner. It honestly could have been much worse but I was pretty disappointed.
Thankfully it's only super noticeable when the screen is all one color
It was time to redesign the project with heat shielding as the main focus. First, I got my hands on a windscreen sunshield which dropped the dash temperature to a mere (sarcasm) 150 degrees. I then focused on the tape. I figured it was having trouble holding on because the wood was too heavy (1 pound/458 grams) and sticking out too far from the dash creating a lot of torque. I picked up some Lexan polycarbonate (because it was cheaper than acrylic) and copied the shape of the wood. It saved over 150 grams total and brought the display a full inch closer to the dash.
Next I needed a way to reduce the heat impact of direct sunlight. I just took some aluminum foil and covered the back with a few layers of kapton tape. This covered the electronics on the back, and the new bezels I made in the front so even if the display gets too hot, it can't separate and damage itself any more.
I think it looks… unique. Definitely not what I had in mind at the start of this project but if it works then it's not stupid.
I haven't had the chance to drive with it yet, but I left it out on a hot day again (regularly checking it). The tape held and the display wasn't too hot or damaged so I considered it a success! It's a bit askew (again) but I'll be fixing that once I get the newer cables that should fit better. I'm currently powering it from my 12v outlet but I plan on switching to an always on fuse box adapter (with low battery voltage detection of course) if it continues to hold up. I tested the current draw peaks at 1.2A (when booting) but is typically more around 1A and drops to .4A when sleeping.
I'm pretty pleased with how it ended up. It took over 2 weeks of research and building but I ended up with a much safer way to glance at Google Maps, skip a song, and I also still get the full functionality of my vent along with the stereo's knobs and buttons to use!
I think it's pretty cool that I could adapt this project to just about any car I get in the future. I'll update you guys when I finally get to drive with it!
Now a normal person would just spend $10 on a phone holder that clips to a vent and be done with it. But that's not good enough for me! That would block air from the vent making it useless. Besides, I'm a computer scientist, I basically have a degree in over complicating things! So I've spent the past few weeks engineering a head unit that should work in any car that has even a little bit of free space on the dash. Apparently it's much trickier than I anticipated (as per usual) but I managed to make something I'm pretty happy with!
I originally planned on taking out my stereo and replacing it with an after market one that had Android Auto built in. That is until I realized the new stereo wouldn't have any knobs or physical buttons, yuck! Also After some more research, I discovered I could install Android Auto onto a Raspberry Pi with a custom OS called Crankshaft. I had a spare 3b laying around so I tested the software with a bog standard monitor. Thankfully the OS could be controlled with a mouse despite being designed for touch screens. It didn't look all that pretty but seemed very functional and customizable. It immediately started Android Auto when I plugged my phone in via usb a to c cable so I wouldn't have to mess with the default UI anyways. Apparently there's a wireless mode using WiFi but I was unable to get that working. The only downside was the boot times. It took 30 seconds to boot but it immediately launched into Android Auto when it was done so I wasn't too concerned about it.
With the proof of concept complete, I started searching for LCD displays. I knew I wanted a display that
1. Looked good. This meant TN/TFT panels were off the list. They have terrible viewing angles and I really didn't want the main feature of the project to look bad or be difficult to see on bright days. I specifically looked for IPS panels.
2. Had a capacitive touch screen. I would have settled for a resistive touch screen if I needed to, but I don't plan on wearing gloves in my car and capacitive screens just feel and respond so much better in my experience.
3. Was at least 7" and roughly 16:9 aspect ratio. My phone screen is already 6" but it's 21:9 aspect ratio so it's not great to use in landscape mode. I wanted something larger and more usable horizontally.
4. Was at least 720p. Most infotainment displays in cars are 480p and I never really liked how soft they looked so I wanted something better.
I cut out different screen sizes to figure out which would fit best in my car
Turns out Android Auto only supports 480p by default and requires you to go into the developer settings to enable 720p or 1080p mode. Unfortunately, small 720p touch screens don't really exist for the Raspberry Pi so I settled on this 7 inch Waveshare 1024x600. It's not 720p so the scaling won't be perfect but it has both an IPS panel and a capacitive touch screens so my two big points were covered. Also, it was guaranteed by the Crankshaft developer to require minimal setup.
I got the display and verified it worked simply by plugging it in! I had all the hardware proven to work, now I needed to attach it to my dash. There's a small, oddly shaped area just above my vents I figured I could use. I sketched out the area with paper then cut a block of MDF to fit it.
I also made the mount for the display out of the same wood, cutting out areas for the tall parts of the circuit board and heat generating components. It took several hours and quite a lot of jig sawing but the result wasn’t too bad. It was a little crooked but I had to take it off and paint it anyways so I wasn't concerned. I plugged everything in just to test it. In order to get the wires coming out the left side, I turned the display upside down. No problem, there was a software setting that would rotate the display. Easy right?
I took the parts down and painted it all, even creating some trim pieces so it'd look a bit better!
I stuck it in my car, putting the Raspberry Pi in the console space (where the AUX input is oddly enough) and left thinking my work was almost done.
But no, since my display was a non-standard resolution, I had to add an hdmi_cvt command to force the resolution in the config file. This meant that display rotation wasn't as simple as clicking a button or just adding 'lcd_rotate 2' (nor all the alternatives of lcd_rotate). I had to look up the manual on the manufacturer's website. I ended up switching from EGL to X11 so I could rotate the display, however the touch input was not rotated. This meant I needed to edit the a conf file for X11 (after remounting the file system as read-write) and manually change the calibration matrix. As a Linux noob it was doable, but very frustrating since it took most of the day to troubleshoot and fix. Finally, I had the rotation of the display and the touch input correct, but there was another, much bigger issue.
The heat. I did some prior research and knew it'd probably get up to 150 degrees Fahrenheit in the car which is, within spec of the display and other electronic ratings. I don't live in a very hot area so I didn't expect it to reach much higher than that. When I measured my car in the middle of a sunny day, the dashboard was 180 degrees! The head unit itself was around 165 degrees. The double sided tape I used to attach it to the dash was barely holding on, but much worse, the display had peeled off the circuit board and was hanging by just the ribbon cable. Even the layers in the LCD itself were separating! I immediately took it inside to cool down but there was already damage to the backlight diffuser so there's a bright patch in the top right corner. It honestly could have been much worse but I was pretty disappointed.
Thankfully it's only super noticeable when the screen is all one color
It was time to redesign the project with heat shielding as the main focus. First, I got my hands on a windscreen sunshield which dropped the dash temperature to a mere (sarcasm) 150 degrees. I then focused on the tape. I figured it was having trouble holding on because the wood was too heavy (1 pound/458 grams) and sticking out too far from the dash creating a lot of torque. I picked up some Lexan polycarbonate (because it was cheaper than acrylic) and copied the shape of the wood. It saved over 150 grams total and brought the display a full inch closer to the dash.
Next I needed a way to reduce the heat impact of direct sunlight. I just took some aluminum foil and covered the back with a few layers of kapton tape. This covered the electronics on the back, and the new bezels I made in the front so even if the display gets too hot, it can't separate and damage itself any more.
I think it looks… unique. Definitely not what I had in mind at the start of this project but if it works then it's not stupid.
I haven't had the chance to drive with it yet, but I left it out on a hot day again (regularly checking it). The tape held and the display wasn't too hot or damaged so I considered it a success! It's a bit askew (again) but I'll be fixing that once I get the newer cables that should fit better. I'm currently powering it from my 12v outlet but I plan on switching to an always on fuse box adapter (with low battery voltage detection of course) if it continues to hold up. I tested the current draw peaks at 1.2A (when booting) but is typically more around 1A and drops to .4A when sleeping.
I'm pretty pleased with how it ended up. It took over 2 weeks of research and building but I ended up with a much safer way to glance at Google Maps, skip a song, and I also still get the full functionality of my vent along with the stereo's knobs and buttons to use!
I think it's pretty cool that I could adapt this project to just about any car I get in the future. I'll update you guys when I finally get to drive with it!