Posts: 18
Joined: Sun Jul 29, 2012 12:01 pm

Options for a car setup with music and Android interface (esp. Google Assistant interaction)

Sat Dec 23, 2017 2:25 am

One thing I've been considering is I'd really like to setup something simple and cheap using a RPi Zero W I ultimately never had a use for to do the things my currently rather old (but still fairly good quality) car head unit can't do rather than buying a $150+ unit capable of what, realistically speaking, this simple device could do (with potential to be able to do more even than many of those even do.) Most of what I want to do with it is fairly simple, but when you combine them it gets much tougher. Music playback, of course, is easy -- there are plenty of tools for this. But then if all it did was music there would be absolutely no reason at all for me to do this beyond just the interest of setting it up.

In particular, what I really want is something that can not only do music playback, but I'd really like it to connect to my phone and be able to work with the Google Assistant so I can ask directions using its GPS, deal with texts hands-free (my phone stays in my pocket at all times when driving and this is not going to change, so currently I can't handle texts at all,) etc etc. As a bonus maybe it could show some sort of homescreen type thing with weather/etc on it or something. I do want to be able to control play/pause, forward/back, and a button to talk to the Google Assistant when needed from whatever interface I use and if it can't actually show anything useful on a screen a few simple momentary toggle buttons would be fine for this anyway, but obviously a touchscreen would be orders of magnitude nicer and RPi-oriented screens are really cheap these days. Super extra bonus points if it could also act as a dashcam since I'm thinking of replacing my current not so great one. (But I really kind of need to find something with enough quality and resolution where you can actually get tag numbers and I doubt the RPi is going to manage that even if I upgraded to a RPi3, right? Resolution alone isn't enough -- most of these dashcams support at least 1080p -- it needs visual clarity both in the original imaging and of course the compression and most dashcams don't seem to have this with, I suspect, the RPi's camera ending up in the same sort of category. While they may technically output 1080p, the actual visual quality is -- all too often -- closer in visual quality to 480p at best in my experience. Just too unclear to even be 100% sure in the videos that they even have a tag at all, much less get a single digit from it.) That would probably require the same pins the screen would use (or at least block off) though.

The hardware basics are that I'm thinking I will of course connect it to USB power, I would use a cheap USB adapter for audio (the RPi's analog audio sucks, but the Zero lacks analog anyway and no RPi model has a microphone connection,) and I'm considering getting a cheap ~3.5"-4.5" touchscreen (SPI type.) I'm leaning towards this one, but am open to suggestion of something fairly cheap with it in mind that I won't be using it for anything where quality is a huge concern. I've thought of connecting it through a USB battery pack, but I think maybe it won't help to do so -- I do have one I can use for it however. The plan is to connect it to the head unit via an analog connection. Of note, the head unit does support some very basic BlueTooth connections and even has a hands-free microphone connection, it just can't do any sort of app stuff and when I try to force it to do any sort of Google Assistant stuff (which isn't working with the screen off anyway so I'd have to have the phone out and use it which I don't want to do -- I have a mount and can use it, but don't want to for a number of reasons I don't want to go into right now) it actually messes everything up. (Officially the manual says it only works with iPhones, so it may not use the proper interface stuff.) It would be nicest if I can have it independent of the head unit though and just working via analog output solves this nicely. (I say that would be nicest because it would mean that if I ever need to use it in, say, a rental I can just for instance. All I'd have to do is unplug the power and audio connections and carry it over to wherever needed.)

My biggest problem is I wouldn't even know where to start with the software. There are two particular problems to address here and this is the biggest reason I'm posting here:

First, the power situation. I don't want it running from the car's battery 24/7. Yes, it uses very very little power, but this still represents an extra drain that adds up over time and it's not such a new car and for that matter the current battery is maybe halfway through its life at best now, probably much worse (I forget off the top of my head when I got it, but it has been quite a few years.) There can be times I don't drive for several days in a row and I don't want a constant drain on the battery during this time. Especially since there is no real purpose in it staying on all the time anyway. This does make for a problem in dealing with power however. Turning on is easy -- it can just turn on when the power supply comes on. But if I connect it directly to a USB power source it will shut off when the car shuts off. Instantly. I mentioned I considered a battery pack which could create a buffer giving it tons of time to shut down properly and safely, but how does it know when to shut down? If it just keeps running until the battery dies then cuts off it's simply delaying the consequences with the same net effect as if it were an immediate shutdown. The only benefit then would be if I gave it enough power to keep running for potentially whole days in a row. (And I'll admit its power usage should be pretty low when it's completely idle, but between extreme temperature changes and etc I suspect it still will ultimately end up dying pretty quickly and any battery pack should only be counted upon to be a very short term buffer.) The only thing I can think of is if the base operating system software runs on something read-only with only the absolutely necessary stuff in read-write mode such that there effectively should be almost no incomplete write operations important enough to really worry about. (And yes, even EXT3/4 filesystems can fail significantly enough to prevent booting if power is cut on a running system frequently enough -- I've found this out the hard way multiple times in the past -- and when I'm leaving for work I sure as heck don't want to have to plug in a keyboard and deal with filesystem problems or even having to entirely reload the whole system.) If it ran from a battery or something it would need some method of knowing when to shut down and I have no clue how it might do that since I've yet to see one that supports having any sort of "UPS" like connection. I'm not buying something expensive like a real UPS backup or whatever for this.

The other thing is of course the actual software setup. I'm no stranger to Linux in general, but I'm no programmer and things like setting up my own custom live distro or something of that sort are beyond me as well. So while I can set things up, I'd need to use software that's already developed that can at least be adapted in some way or something. The interface in particular is probably the trickiest. Obviously I'm not going to be typing into a console here. While a keyboard is fine for initial setup, when I'm driving I'm not going to be typing things. And a mouse would be utterly impossible by any stretch of the imagination. Hence my hopes of using a simple touchscreen. But I have no idea what (if any?) software could do this besides maybe something like Kodi (which can't do any of the rest of what I want, so once again I might as well just stick with my current setup. Plus it too would run afoul of the aforementioned power problem.) This is the biggest reason of all that I have to ask here because if there's anything out there that's already suitable for what I want I just haven't run across it.

Posts: 215
Joined: Sun Aug 11, 2013 3:25 pm

Re: Options for a car setup with music and Android interface (esp. Google Assistant interaction)

Sat Dec 23, 2017 6:50 pm

I don't think the zero can handle what you want. I use a 2 but told that the 3 is far better.

If you want ideas then you need to look up the A/V and media sections of the forums.
Back in the old days, we were smarter then the technology.
Nowadays technology makes us look like villages fools in front of the children!

Return to “Other projects”