Skip to main content

Hardware experiments and creating an AirPlay server - Carpi Project pt. 2

I think it is quite important to realize that this project is not unique, so it would be a good idea to learn not only from the mistakes of others, but to find out the methodology they approached this sort of project from in order to find solutions that I may not have thought of. A Google search of ‘carputer’ brings of the Instructables guide called ‘Building a Carputer’ as well as the YouTube video ‘Raspberry Pi Java Carputer.’ The Instructables guide uses a barebones computer running Windows XP in order to achieve this feat, something that I am not interested in. However, his hardware section mentions a few things that I think are worth going over, because without reading through this guide I may very well would have forgotten them myself.

June 13th, 2018.

There are a few products that I might be interested in buying in order to enhance the functionality of the Carpi project. On Amazon, I found this Global Satellite USB receiver for about $15. Since the Raspberry Pi does not have built in GPS, this would be useful for including GPS on the Raspberry Pi if I were to build my own interface for Android Auto or I wanted a faster connection to GPS than the one offered by my current, slow, Android phone. I also found this power inverter for about $50, which may offer an option for me to power the entire system via the cigarette lighter rather than hardwire the system to the battery or the internal 12V connector, both of which pose a higher risk of causing the entire car to short circuit and fail. Finally, I looked at the X400 Expansion Board from Suptronics because it offered GPIO breakout to high quality audio, and I was thinking that this may be a good way to connect audio up to the car.

The next thing that I want to look at is an OBD-II reader. OBD is an acronym for On-Board Diagnostics, which refers to an automobile (in this case, my car) and its ability to report diagnostics of the sensors on the car and other data through a special OBD port. There are several common diagnostic ports, one of which was the OBD-I and standardized by the state of California (the state in which I reside) for many cars. However, the OBD-II was an iteration on the OBD-I and my car supports the said port. Since this diagnostic connection sends codes that can be interpreted via a cable of error codes, the data can be used to calculate gas efficiency, see what parts of the car may need servicing, among other data. This may be useful for building a complete “car-computer” solution, so I decided to delve into the possibility of this idea. It appears that this user on Reddit via this Reddit post was able to achieve such a project. Aside from the project as well as the discussion on Reddit, he published his code on GitHub at this repository and wrote corresponding documentation for his project. This may make it relatively easy to interface with the OBD-II reader.

Obviously, in order to interface with the OBD port on a car, we need a such adapter, reader, scanner or some other device that allows us to read diagnostic codes from the car. This Bluetooth adapter from Amazon is only just below nine dollars at the time of writing, making it a relatively affordable option for delving into the world of car projects.

However, we need to test working components first. We need to make sure that before any investment is made, that at least some basic concepts and components work. One of the first projects I would like to try out is AirPlay audio. I own an iPhone as my main communication tool, and the ability to play music from it, wirelessly or not, would be really nice. Since I know that third-party AirPlay servers are possible, this seems to make sense.

I will be testing this feature over my home network and making the assumption that it will have the same effect over an ad-hoc network created by the Raspberry Pi, or a hotspot created by the iPhone. This Make: project details in super fine detail exactly how to set up a Raspberry Pi, and all of its related features. However, as a veteran to the Linux world, I do not think such hand-holding is needed. What’s interesting is project step #17, which details that they will be using the Shairport project from GitHub user hendrikw82. However, this project has not been updated since 2011, so maybe it is still usable, but it does not support AirPlay 2.

Another project, the Airplay project from Adafruit explains that we can actually use the Shairport Sync project, the predecessor to Shairport, as well as metadata reading. The guide on HiFiBerry and the guide from Pimp My Life Up detail similar steps.

The guide in is what I did to install the server on the Raspberry Pi. I’ve included in a future blog post the correct information as well as the steps I took.

Until next time,

Gideon Tong