rivethead
Posts: 15
Joined: Fri Nov 30, 2018 6:54 pm

Pi car music player advice

Fri Nov 30, 2018 7:04 pm

Hi pi enthusiasts,

I've been bouncing this idea in my head for quite a while and hours of searching around for car player examples has given me more ideas but for now I was looking for some advice on where to start for building this:

For right now my ideal music player for the car would be raspberry pi music player of some sort with as much storage to rip as much of my CD library as possible for good quality playback on the car. Thinking about software though I was imagining some type of simple voice activation for searching and playing titles. Probably more complicated than it sounds. Of course power shut down has always been an issue and I don't quite get what I can do there.

To simplify without voice activation I would ideally love to be able to store most of my music in high quality and be able to play even as a possible headless system.

I've read many posts and sites with different solutions but some seem way outdated or incomplete so I'm asking here really in search of anything that's in use now that people seem to think works well.

Any info would be greatly appreciated. Thanks!

P.S. I have one of the first pi's running as a server but I would be willing to purchase a newer one if needed.

peppy.player
Posts: 127
Joined: Mon Mar 07, 2016 6:10 am

Re: Pi car music player advice

Wed Dec 05, 2018 4:23 pm

You can try to read through this thread about Peppy player:
viewtopic.php?f=35&t=139983&sid=c06235e ... 3644ee197c
and follow the links in the thread for more info.

The player has voice assistant though you need the Internet connection for that. It leverages Google Assistant and
you need Google account for this service. I'm planning to make it autonomous in the future. Here is the whole wish list:
https://github.com/project-owner/PeppyP ... /Wish-List

The player can also work in a headless mode. In this case it can be controlled from web browser running in any
device. But you need network for that.

You can try the player by installing one of the disk images:
https://github.com/project-owner/PeppyP ... isk-Images
If you have any special requirement just let me know and if it's doable I can include that to the next release.

Good luck.

rivethead
Posts: 15
Joined: Fri Nov 30, 2018 6:54 pm

Re: Pi car music player advice

Wed Dec 19, 2018 4:03 pm

This is great thanks.

rivethead
Posts: 15
Joined: Fri Nov 30, 2018 6:54 pm

Re: Pi car music player advice

Thu Dec 20, 2018 3:28 pm

peppy.player wrote:
Wed Dec 05, 2018 4:23 pm
The player has voice assistant though you need the Internet connection for that. It leverages Google Assistant and
you need Google account for this service. I'm planning to make it autonomous in the future. Here is the whole wish list:
https://github.com/project-owner/PeppyP ... /Wish-List
This would need the pi itself to have internet connection and not the smartphone controlling it correct?
The player can also work in a headless mode. In this case it can be controlled from web browser running in any
device. But you need network for that.
In headless mode would it just need a lan setup so the pi has a wireless transmitter that the smart phone accesses. Sort of like setting up the pi as a web server.
You can try the player by installing one of the disk images:
https://github.com/project-owner/PeppyP ... isk-Images
If you have any special requirement just let me know and if it's doable I can include that to the next release.

Good luck.
Thank you for this. I am struggling to get started but really wanted to get the hardware set up like how to build the pi with a sound card.

This is very helpful as it's making me think about all of the components, Thanks!

User avatar
thagrol
Posts: 1077
Joined: Fri Jan 13, 2012 4:41 pm
Location: Darkest Somerset, UK
Contact: Website

Re: Pi car music player advice

Thu Dec 20, 2018 5:50 pm

This is what I have running in my car: https://github.com/thagrol/ice-pi

Docs in libreoffice/openoffice format only at the moment. Sorry.
Note to self: don't feed the trolls
If you believe "L'enfer, c'est les autres" (Hell is other people) have you considered that it may be of your own making?

rivethead
Posts: 15
Joined: Fri Nov 30, 2018 6:54 pm

Re: Pi car music player advice

Thu Dec 20, 2018 8:15 pm

thagrol wrote:
Thu Dec 20, 2018 5:50 pm
This is what I have running in my car: https://github.com/thagrol/ice-pi

Docs in libreoffice/openoffice format only at the moment. Sorry.
Thanks for this! I wonder why I can't convert these .odt files to be viewed in a doc or pdf hmm.

peppy.player
Posts: 127
Joined: Mon Mar 07, 2016 6:10 am

Re: Pi car music player advice

Thu Dec 20, 2018 8:23 pm

You correctly answered all your questions :)
The web server can be enabled in the player and it can be used to control the player from the network either wired or wireless.

The player's wiki pages have some examples of using different hardware components including HiFiBerry amplifier:
https://github.com/project-owner/Peppy. ... i/Hardware

rivethead
Posts: 15
Joined: Fri Nov 30, 2018 6:54 pm

Re: Pi car music player advice

Thu Dec 20, 2018 8:44 pm

peppy.player wrote:
Thu Dec 20, 2018 8:23 pm
You correctly answered all your questions :)
The web server can be enabled in the player and it can be used to control the player from the network either wired or wireless.

The player's wiki pages have some examples of using different hardware components including HiFiBerry amplifier:
https://github.com/project-owner/Peppy. ... i/Hardware
So there is really no way to have the voice activation in the car if the player won't have internet access. Maybe a natively installed voice application? I'm going to look at building something but it's very intimidating!

User avatar
thagrol
Posts: 1077
Joined: Fri Jan 13, 2012 4:41 pm
Location: Darkest Somerset, UK
Contact: Website

Re: Pi car music player advice

Thu Dec 20, 2018 10:28 pm

rivethead wrote:
Thu Dec 20, 2018 8:15 pm
thagrol wrote:
Thu Dec 20, 2018 5:50 pm
This is what I have running in my car: https://github.com/thagrol/ice-pi

Docs in libreoffice/openoffice format only at the moment. Sorry.
Thanks for this! I wonder why I can't convert these .odt files to be viewed in a doc or pdf hmm.
Dunno. But give me an hour and I'll have pdf versions up.
Note to self: don't feed the trolls
If you believe "L'enfer, c'est les autres" (Hell is other people) have you considered that it may be of your own making?

User avatar
thagrol
Posts: 1077
Joined: Fri Jan 13, 2012 4:41 pm
Location: Darkest Somerset, UK
Contact: Website

Re: Pi car music player advice

Thu Dec 20, 2018 10:42 pm

thagrol wrote:
Thu Dec 20, 2018 10:28 pm
rivethead wrote:
Thu Dec 20, 2018 8:15 pm
thagrol wrote:
Thu Dec 20, 2018 5:50 pm
This is what I have running in my car: https://github.com/thagrol/ice-pi

Docs in libreoffice/openoffice format only at the moment. Sorry.
Thanks for this! I wonder why I can't convert these .odt files to be viewed in a doc or pdf hmm.
Dunno. But give me an hour and I'll have pdf versions up.
And done.
Note to self: don't feed the trolls
If you believe "L'enfer, c'est les autres" (Hell is other people) have you considered that it may be of your own making?

User avatar
Imperf3kt
Posts: 1637
Joined: Tue Jun 20, 2017 12:16 am
Location: Australia

Re: Pi car music player advice

Thu Dec 20, 2018 10:44 pm

rivethead wrote:
Thu Dec 20, 2018 8:44 pm
peppy.player wrote:
Thu Dec 20, 2018 8:23 pm
You correctly answered all your questions :)
The web server can be enabled in the player and it can be used to control the player from the network either wired or wireless.

The player's wiki pages have some examples of using different hardware components including HiFiBerry amplifier:
https://github.com/project-owner/Peppy. ... i/Hardware
So there is really no way to have the voice activation in the car if the player won't have internet access. Maybe a natively installed voice application? I'm going to look at building something but it's very intimidating!
Stick a mobile phone in your car and tether your Pi to its internet via either Bluetooth, WiFi Hotspot or usb cable.
Stop plugging your fan directly into the GPIO 5v
https://www.electronics-tutorials.ws/power/transient-suppression.html

peppy.player
Posts: 127
Joined: Mon Mar 07, 2016 6:10 am

Re: Pi car music player advice

Fri Dec 21, 2018 12:42 am

rivethead wrote:
Thu Dec 20, 2018 8:44 pm
So there is really no way to have the voice activation in the car if the player won't have internet access. Maybe a natively installed voice application? I'm going to look at building something but it's very intimidating!
You correctly answered your question again. It looks like you know all answers, no need to ask :)
There is indeed the app which can work stand-alone without accessing the Internet, it's called PocketSphinx.
I'm planning to use it in one of the next releases. Google Assistant needs Internet access and Amazon Alexa
as well.

rivethead
Posts: 15
Joined: Fri Nov 30, 2018 6:54 pm

Re: Pi car music player advice

Fri Dec 21, 2018 3:17 am

thagrol wrote:
Thu Dec 20, 2018 10:42 pm
thagrol wrote:
Thu Dec 20, 2018 10:28 pm
rivethead wrote:
Thu Dec 20, 2018 8:15 pm


Thanks for this! I wonder why I can't convert these .odt files to be viewed in a doc or pdf hmm.
Dunno. But give me an hour and I'll have pdf versions up.
And done.
Thanks again. Not sure why I couldn't view them even with open office. I'm going to get reading!

rivethead
Posts: 15
Joined: Fri Nov 30, 2018 6:54 pm

Re: Pi car music player advice

Fri Dec 21, 2018 3:22 am

peppy.player wrote:
Fri Dec 21, 2018 12:42 am
rivethead wrote:
Thu Dec 20, 2018 8:44 pm
So there is really no way to have the voice activation in the car if the player won't have internet access. Maybe a natively installed voice application? I'm going to look at building something but it's very intimidating!
You correctly answered your question again. It looks like you know all answers, no need to ask :)
There is indeed the app which can work stand-alone without accessing the Internet, it's called PocketSphinx.
I'm planning to use it in one of the next releases. Google Assistant needs Internet access and Amazon Alexa
as well.
Nice, looking forward to seeing what you come up with. Maybe a voice controlled player isn't such a fantasy after all!

rivethead
Posts: 15
Joined: Fri Nov 30, 2018 6:54 pm

Re: Pi car music player advice

Fri Dec 21, 2018 3:10 pm

thagrol wrote:
Thu Dec 20, 2018 5:50 pm
This is what I have running in my car: https://github.com/thagrol/ice-pi
Is the sound card for this in order to use the rca jacks and 3.5" on the other to plug into an AUX? Just looking to see if I could handle installing it on a pi zero or maybe look to get both assembled.

rivethead
Posts: 15
Joined: Fri Nov 30, 2018 6:54 pm

Re: Pi car music player advice

Fri Dec 21, 2018 3:14 pm

I hope you guys aren't getting annoyed by all my questions but I am actually planning on building both of your solutions, one for a basic player with the pi zero thagrol's idea and also a more elaborate peppy player. I apologize in advance if I bug you with further questions. peppy.player hopefully ones that I can answer myself :D

User avatar
thagrol
Posts: 1077
Joined: Fri Jan 13, 2012 4:41 pm
Location: Darkest Somerset, UK
Contact: Website

Re: Pi car music player advice

Fri Dec 21, 2018 5:59 pm

rivethead wrote:
Fri Dec 21, 2018 3:10 pm
thagrol wrote:
Thu Dec 20, 2018 5:50 pm
This is what I have running in my car: https://github.com/thagrol/ice-pi
Is the sound card for this in order to use the rca jacks and 3.5" on the other to plug into an AUX? Just looking to see if I could handle installing it on a pi zero or maybe look to get both assembled.
It's primarily because the zero has no onboard sound of its own. Though when testing with an A+ and no sound card there was significant noise on the audio which wasn't present with the sound card.

And yes, I'm using the 3.5mm jack as that's what the aux on my factory head unit it.
Note to self: don't feed the trolls
If you believe "L'enfer, c'est les autres" (Hell is other people) have you considered that it may be of your own making?

rivethead
Posts: 15
Joined: Fri Nov 30, 2018 6:54 pm

Re: Pi car music player advice

Sat Dec 22, 2018 12:39 am

thagrol wrote:
Fri Dec 21, 2018 5:59 pm
rivethead wrote:
Fri Dec 21, 2018 3:10 pm
thagrol wrote:
Thu Dec 20, 2018 5:50 pm
This is what I have running in my car: https://github.com/thagrol/ice-pi
Is the sound card for this in order to use the rca jacks and 3.5" on the other to plug into an AUX? Just looking to see if I could handle installing it on a pi zero or maybe look to get both assembled.
It's primarily because the zero has no onboard sound of its own. Though when testing with an A+ and no sound card there was significant noise on the audio which wasn't present with the sound card.

And yes, I'm using the 3.5mm jack as that's what the aux on my factory head unit it.
Did you need to do anything special to attach the phatdac like soldering it on? Trying to find out if I can handle doing it.

User avatar
thagrol
Posts: 1077
Joined: Fri Jan 13, 2012 4:41 pm
Location: Darkest Somerset, UK
Contact: Website

Re: Pi car music player advice

Sat Dec 22, 2018 12:03 pm

rivethead wrote:
Sat Dec 22, 2018 12:39 am
Did you need to do anything special to attach the phatdac like soldering it on? Trying to find out if I can handle doing it.
If memory serves, I had to solder on the 40 pin headers to both the phat dac and the zero but if you don't want to solder the zero is now available with a pre-soldered header and pimorni do sodler free headers too: https://shop.pimoroni.com/products/gpio ... 5643318026

You don't have to use a phatdac but you'll have to handle configuration yourself if you go with something else.
Note to self: don't feed the trolls
If you believe "L'enfer, c'est les autres" (Hell is other people) have you considered that it may be of your own making?

rivethead
Posts: 15
Joined: Fri Nov 30, 2018 6:54 pm

Re: Pi car music player advice

Tue Dec 25, 2018 2:13 am

thagrol wrote:
Sat Dec 22, 2018 12:03 pm
rivethead wrote:
Sat Dec 22, 2018 12:39 am
Did you need to do anything special to attach the phatdac like soldering it on? Trying to find out if I can handle doing it.
If memory serves, I had to solder on the 40 pin headers to both the phat dac and the zero but if you don't want to solder the zero is now available with a pre-soldered header and pimorni do sodler free headers too: https://shop.pimoroni.com/products/gpio ... 5643318026

You don't have to use a phatdac but you'll have to handle configuration yourself if you go with something else.
.
I ended up trying it. I set it up and the only part that didn't seem to work for me was to connect it like USB mass storage to copy the files over. My system wouldn't recognize it so I ended up copying the music files while connected to the pi zero locally. Not sure why. Once it booted up though it started playing! I just need to find a way to connect it as storage for the transferring of files.

Is it only meant to play random tracks or can this be configured to allow customizing a playlist, or change the track orders?

Just adding an update. Works great but I am unable to stop it or able to run any commands. I am unable to change root to read only because the keyboard won't work and it there is no way to acess the server. Any ideas?

User avatar
thagrol
Posts: 1077
Joined: Fri Jan 13, 2012 4:41 pm
Location: Darkest Somerset, UK
Contact: Website

Re: Pi car music player advice

Tue Dec 25, 2018 12:24 pm

rivethead wrote:
Tue Dec 25, 2018 2:13 am
.
I ended up trying it. I set it up and the only part that didn't seem to work for me was to connect it like USB mass storage to copy the files over. My system wouldn't recognize it so I ended up copying the music files while connected to the pi zero locally. Not sure why. Once it booted up though it started playing! I just need to find a way to connect it as storage for the transferring of files.
I'm not sure why that would be the case. What OS are you using, what message(s) did it give you? You could also pull the SD card and use a card reader to add music.
Is it only meant to play random tracks or can this be configured to allow customizing a playlist, or change the track orders?
Yep, that's the use case I have. Mostly short journeys. That said, you could modify the initmpd.sh script to change the commands sent to mpd at startup. Have a look at the documentation for "mpc" and see the block of "mpc" commands at the end of the script.
Just adding an update. Works great but I am unable to stop it or able to run any commands. I am unable to change root to read only because the keyboard won't work and it there is no way to acess the server. Any ideas?
Yeah, again that's my use case. See Appendix One in build.pdf for one way to enable remote control when using a Pi ZeroW. May also work by adding a USB wifi dongle but you'll need to find one that's supported by hostapd. Set that up, install an mpd client on your phone, conect it to the zero's access point, run your mpd client and connect it to the mpd server.

I've no idea why you keyboard isn't recognised, unless you've forced dwc2 into device only mode. You did connect to the correct USB port with an OTG adaptor? If using both a wired ethernet dongle and a keyboard, you'll need a USB hub.

The SD card should boot in any Pi though the USB gadget mode stuff won't be functional in a B/B+ model, so if you have another Pi try it in that. It'll still boot even if the phatdac isn't present.
Note to self: don't feed the trolls
If you believe "L'enfer, c'est les autres" (Hell is other people) have you considered that it may be of your own making?

rivethead
Posts: 15
Joined: Fri Nov 30, 2018 6:54 pm

Re: Pi car music player advice

Mon Dec 31, 2018 6:18 pm

On the step for adding the mount point for the /music directory which drive am I actually specifying the boot drive? I have /dev/mmcblk0p1 there for /boot. Or is this something in /dev/root? Or is mmcblk0p3 something I can assign it to?

UPDATE: I actually completed everything and works once again. I went through the setting up remote access using access point with hostapd and dnsmasq. I thought I got through all the steps perfectly but now I have no idea how to actually connect to it. I lost all access to it :S

User avatar
thagrol
Posts: 1077
Joined: Fri Jan 13, 2012 4:41 pm
Location: Darkest Somerset, UK
Contact: Website

Re: Pi car music player advice

Mon Dec 31, 2018 11:47 pm

rivethead wrote:
Mon Dec 31, 2018 6:18 pm
On the step for adding the mount point for the /music directory which drive am I actually specifying the boot drive? I have /dev/mmcblk0p1 there for /boot.
That depends on how you have partitioned and formatted you SD card.

As written you should have 3 partitions:
  • /dev/mmcblk0p1 mounted on /boot. This is the normal boot partition
  • /dev/mmcblk0p2 mounted on /. This is the root file system
  • /dev/mmcblk0p3 mounted on /music. For storing your music. It's also exported via the USB mass storage gadget.
If you've done something different there isn't much I can do for you without seeing what you've done.
Or is this something in /dev/root? Or is mmcblk0p3 something I can assign it to?
mmcblk0p? is the block device for the partition. You can't assign to it. You can control where it appears in the file tree.
UPDATE: I actually completed everything and works once again. I went through the setting up remote access using access point with hostapd and dnsmasq. I thought I got through all the steps perfectly but now I have no idea how to actually connect to it. I lost all access to it :S
There are several things you can try but some will need extra hardware and some are more complicated than others:
    • Find a PC with wifi
    • Connect to the AP created by the zeroW
    • Login over ssh
    • Connect a keyboard and monitor
    • Login
    • Stick the SD card into a Pi with an onboard ethernet connector
    • Connect it to your network via an ethernet cable
    • Login via ssh
    • Get yourself a 3.3v USB to serial cable
    • Connect the USB end to a PC
    • Connect the other end to the serial pins on the Pi (you'll probably have to disconnect the phat dac)
    • Login over the serial link
    • Get another Pi
    • Get 3 female to female jumper wires
    • Connect the Pi via the serial pins on the gpio header(ground to ground, TX to RX, RX to TX)
    • Disable the login/getty on the serial port of the second Pi but leave the serial port enabled
    • Login over the serial link from the second Pi
    • Get an OTG cable and USB ethernet dongle
    • Connect to zeroW and your network
    • login by ssh
    • Poweroff the zeroW
    • Pull the SD card
    • Using a USB card reader, connect the SD card to another Pi/PC
    • Mount it
    • Make your modifications there or lookup the settings you can't remember.
Note to self: don't feed the trolls
If you believe "L'enfer, c'est les autres" (Hell is other people) have you considered that it may be of your own making?

rivethead
Posts: 15
Joined: Fri Nov 30, 2018 6:54 pm

Re: Pi car music player advice

Wed Jan 02, 2019 4:39 pm

So I finally was able to set it up after days of screwing it up somehow. I learned so much about it though so not all is lost. My last problem was that I couldn't boot it up as usb storage and then realized I wasn't using a data cable! Doh! Anyway now I can focus on configuring the client. Still a little clunky but getting there. Thanks for all the help.

rivethead
Posts: 15
Joined: Fri Nov 30, 2018 6:54 pm

Re: Pi car music player advice

Wed Jan 09, 2019 9:32 pm

I am using mpdroid when connected to the pi wirelessly. I understand the mpc commands in the config file and is set to random play which is done to fire up the playlist once booted up and playing in shuffle mode. I am trying to figure out if at any point I want to switch to playing an album in sequence can I do it through mpdroid or some other client without having to ssh and run the mpc command, or edit the config?

Return to “Media centres”