Yet another project !
I was tired of listening to the local radio on my car, I wanted my own music. So in that case you have 2 possibilities: either you buy an other system or you build yourself a super carputer ! Needless to say that I chose the second option.
In this article I am going to describe the different choices I made to build it, but this is not going to be step by step tutorial to build yours.
I wanted this computer to play my music (from my usb key) but also radio. In order to do this I used the latest Raspberry Pi 3.
I needed a soundcard to connect to my car’s speakers, I decided to use the X400 Expansion Board. Why ? Because it is compatible with the latest Raspberry and can support a lot of different input voltage.
Instead of buying a big expensive touchscreen for the raspberry pi I decided to take an other approach. I used a big expensive touchscreen that I already had : my tablet. Using WiFi to communicate with the raspberry this gives a lot of advantages : this frees the raspberry pi in terms of ressources (no need for any graphical interface on the Pi), the “screen” can be taken away (less risk of theft).
In order to listen to the radio, I used a RTL SDR. The hardest part was to a way to connect it to my car antenna. The socket on my car was “Fakra” and I found no connector Fakra to MCX (the connector on the SDR). I finally found a way by using 2 adapters : Fakra -> SMA -> MCX.
Not only is the SDR module cheap, but it can also receive a lot of type of frequency. For now I can only listen to FM radio (software used SoftFM). But in the future and I also want to listen to airband of course !
- RTL SDR based on a cheap tv tuner
- Adapter MCX <-> SMA
- Adapter Fakra <-> SMA (the only one I found was on a french website)
Powering the Pi with the car is that as easy as you think. Indeed the voltage from the battery is not a constant 12V. Fortunately the X400 takes care of that without any problem because it can handle voltage from 6 to 24V.
On a lot of cars you have two wires : one for permanent +12 and an other one active only when the engine is turning. This wasn’t the case on my Peugeot 207. I simply made a switch that I use to switch on the Pi and switch it off (only when i’ve halted it from the tablet).
Be caution when you connect your wires, if you don’t want to become Claude François I recommend you to remove the appropriate fuse from your fuse box.
The Raspberry Pi is configured as if it was a web server (apache2, php5 …). It is set as a wifi hotspot (this link might help you to configure it properly).
So my tablet is simply connecting to a local website. Request are sent using ajax (Jquery makes the task easy).
I use moc as my music player.
This is what the interface looks like on the tablet
The map displays traffic in real time, and of course as I love and respect the law it does not show the location of automatic radars.
The map only works when connected to Internet, that’s why I plan to add a 3g stick to the Pi.
I also plan to try to access to the CAN network in order to have wheel command (but that seems to be a hard job to do). Update : done here
To be continued …