Bringing Bluetooth/wifi streaming and USB/SD Card music to my auld Fiat Punto via the head unit's CD Changer port
It's been a long time since I've looked at this project; I currently have a DAB Radio/Bluetooth board which I tether to my phone and it seems to do the trick for me for now.
That being said, I'd still like something that could be buried in the glove box and a nice little touchscreen would allow control for music.
In another project (my sample pad controller and electric drum module) ibe changed my plan of attack, and it has left me with a M0-based board from dfrobot and a music playing shield, complete with SD card slot.
Combining this little music player with a small Nextion touchscreen I have (uses software serial to communicate) and an esp8266 to allow a connection to my phone and perhaps an FTP server to drop music onto the SD card and that could leave me with a really handy little player.
If I built a small three channel line mixer I'd be able to have this player, my dab radio (which I use for hands-free calling) and a spare aux in for passengers to use.
This could be fun!
I'm going to eb hopefully getting my teeth back into this project after a while on the shelf.
One thing I was dubious on was how to handle the shutting down of the Pi safely when the car is switched off without causing corruption in the filesystem.
One method I am interested in is making the filesystem read only; If i can setup a read only system nothing will need to be saved during a shitdown sequence and will therefore protect it during sudden powerless.
I've recently set up a bank of Raspberry Pi A+ boards at work to handle playing videos on our foyer screens in our buildings and I am using MP4Museum to do so.
This has nailed the read only filesystem, so would love to build something like this for my project.
Just a quick post to share this link that uses an USB Powerbank as a UPS-style system, using a network switch to simulate the power outage (when the power is cut to the Pi and the Network switch the network connection goes down and the Pi detects it).
I could modify this to trigger a safe shutdown when the car is switched off. If there's a way to do it without the network switch that would be bloody marvellous!
So... I've finally settled on what I'm going to do with this.
I've recently made a music player for my partner as a little home made Christmas present. It's great; runs RuneAudio, has a memory stick full of her favourite albums, has Airplay receiver capabilities, and is generally a great little system.
I'd like to add that to my car; the only thing to sort out now is how to power it and switch it on/off with the car's ignition.
I have been thinking and rethinking my approach to this project for quite some time. I had always thought about using a Pi for it, as it is what I am used to playing around with, can have Bluetooth/WiFi added, could be hidden in the glove box etc.
While that may still be the long term goal I'm thinking about trying a somewhat different aoproach to get a simple system up and running...
I was was recently updating our media devices at home (one Android box and two Amazon Firesticks); we use Kodi, with the Paradox wizard install. Whilst looking through the builds I noticed that there was now a 'Music Build'. The description said it was tailored for in-car and audio streaming etc.
I stuck it on my phone and had a look at it; it seems great, has plenty of music add-ons, but is dependent on a WiFi connection.
It was at this point I started pondering... What if I use this approach? I could get an old handset, add a beefy microSD card for storing music, set it as a hotspot (to allow other devices to connect to it), and enable Airplay and the web interfaces to allow control from the passengers.
I could even go as far as adding a scheduler app to run Kodi on startup and turn the phone on/off when power is applied to the phone (by the car being started).
Definitely a good example to get me started.
So - need to investigate what to use to monitor the state of the power antenna!
While CAN Bus control for my project is nothing but a pipedream at the moment, I need a way to control my Pi and display feedback.
@Arsenijs has a great project (#pyLCI - Linux Control Interface) that uses a 16x2 screen and a few buttons to command and control the Pi via i2c. Arsenijs has said that it still requires some work, so I have decided to make a simple arduino controller as a stop-gap
Using an Arduino Mega and an lcd/button shield I will make a simple little menu to essentially send serial commands to the Pi; a Python script on the other side will interpret the sent commands and act accordingly. This simple approach should let me get my Pi functioning somehow :-)
This little fiend exists on Aliexpress. It is a few dollars/pounds, and I can't see any reason why it shouldn't work with a Pi.
I always thought CAN bus communication would be expensive, but if I can get this to work, then it's game on!
Ideally I would like a Beastie that interfaces to the pi via i2c or serial as they are methods that I use most, but beggars can't be choosers at this price!
I have added some links under the heading of 'Reference'.
These links are some existing projects that I have found after a bit of digging - both feature the Bluetooth and airplay features I am hoping to conquered, so a great starting point for me.
Then I just need to master how to integrate the CAN bus reading :)