There’s so much electronics and computers and control units inside that car… So why not add one more?
I’ve been playing around with the RaspberryPi for a while now, doing numerous projects targetting basically anything. I then figured: Why not put one into my car?
The main reason for this was to have a music box. Previously, I had to connect/disconnect the AUX cable with my phone everytime I entered/left the car. This got annoying so I assumed it would be easier to just put some music on the RaspberryPi and plug in the AUX-input there.
Countless hours, which most definitely add up to a whole week already have proven me wrong, though. Obviously all this time wasn’t just spent on the music matter. I’ll tag all corresponding entries with ‘carputer’.
Below project not only contains the music box but also involves locating my car using an UMTS stick plus unwiredlabs which enables me to locate the car based on nearby WiFi networks. This was actually pretty accurate.
Going along with below images is a description I’ve written for unwiredlabs’ blog (which to my knowledge, however, never was published):
On the first picture you’ll see the power supply for my Pi.
I get the power from the glove compartment where a bunch of the car’s fuses are located.
There I installed a modified fuse which is attached to a usb cigarette lighter. From there an usual usb-cable powers the Pi.
The second picture shows the actual device:
A Raspberry Pi 3 Model B with a Huawei surfstick (E353) attached. This is used to connect to the internet via a usual sim-card with internet flat and also has a microSD-card slot where I store my music.
The music is played via the AUX-cable which I installed a few months ago already and was attached to my phone before the Pi came into play.
On the next picture you see where the Pi is actually located (I took it out for the previous photo).
Since I usually do not need to access it it’s stored behind the front passenger seat’s dashboard.
Picture 4 shows how it looks after the cover is back in place. Below one may still see the power source which is directly below.
Next picture simply shows that there is a cover for the fuses too. It spares the place where usually the cd-changer is. I took it out since I do not use it.
Also I get mass for the power supply from there so it wouldn’t fit anymore.
Now to how I actually locate my car:
Every two minutes (will maybe update to every minute – depending on the traffic this needs) I’ll scan the Pi’s surroundings for Wifi using the builtin Wifi-chip.
I then send this info to unwiredlabs and process the response to my requirements.
The position together with accuracy and a timestamp is sent every 15 minutes to my Pi at home which displays a map of the current location.
I wrote a bash script for retrieving the WiFi-signals, sending them to unwiredlabs and process the response. A second script I wrote displays the recieved data on Google Maps.
I also configured a Whatsapp client on my Pi at home so I can fetch the location and/or address via Whatsapp from anywhere.
To access the Pi remotely while it is not at home in my wifi I had to do a little bit of tweaking:
Since my local carrier does not give out individual IP-addresses for mobile devices there is now way of accessing the Pi just via the SIM-card.
To achieve this anyway I setup OpenVPN on a server of mine to which the Pi in the car connects to.
After this I can “tunnel back” from the server and by this also from anywhere else to the Pi.