WildWalker
Posts: 43
Joined: Sat Mar 03, 2012 3:49 pm
Contact: Website

Re: Subsonic R-Pi Car Media Server - Check the Vid

Sun Mar 11, 2012 4:19 pm

Okay, no doubt a few people have mentioned this already, and with good reason, it's a great project. For me the biggest problem is the screen, for two main reasons:

1. Screens are expensive.

2. Screens are not easy to fit to cars, especially if you don't have a double DIN space.

So I had a brainwave, and this is what I am here to discuss. You can check out the video (it's less than 3 mins) to see a non Pi version



In a nutshell, I plan to use a mobile phone as a 'remote' and put the R-Pi and Wireless board behind the dash, wiring it in to the existing head unit. Then I do not have to worry about a screen, simples

So, this raises some questions for me, mainly about the OS.

How will the R-Pi versions of Linux cope in an auto environment where they are being powered up and down a lot? Would a battery backup be required to give the Pi time to shut-down when it senses a loss of power (ala Powerchute)?

What is the best way to collaborate on a project like this? I think posts like this will get lost over time as they get demoted to page xxxx.

Thanks for listening,

Alan.

kaostheory
Posts: 1
Joined: Sun Mar 11, 2012 9:58 pm

Re: Subsonic R-Pi Car Media Server - Check the Vid

Sun Mar 11, 2012 10:09 pm

This is something I have played with for other technologies ( o2 joggler, old android phone ).

This however makes a lot of sense, especially as It can be run off 4 x AA batteries. ( which could in turn be charged whilst the car is running.

Personally I would be using xbmc as it has been proven and could double as a video output for the kids on long journeys.

Add 3G and you have a cool little in car media and connectivity solution ( think mifi + media centre )

The Challenges:

Setting up the Raspberry Pi as a Wifi AP for remote control.

- Not a huge issue as long as the OS supports it

Amplifying and integrating the audio into your existing car audio system.

- An implementation detail but I would be interested in hearing how people would do this

Any others?

I will definitely be doing this... When I can get my hands on one!

JustinPM
Posts: 6
Joined: Fri Feb 03, 2012 3:47 am

Re: Subsonic R-Pi Car Media Server - Check the Vid

Mon Mar 12, 2012 2:42 pm

I've been using Subsonic on an ARM system for a bit now, with an underpowered GoFlex Net.  The first thing to do is to get Java from Oracle, don't try the open source one.  It's not been efficient enough to run it.  I also had to tweak some settings to keep it running.  First, RAM allocation was a problem (mind you, it's a 128MB system I'm using it on).  Secondly, random crashes.  Through a tutorial on the ArchLinuxARM page I had utilized a service for it instead, and had a way of checking whether it was running or not.  It works pretty well, and I expect the RasPi to work even better.  As far as power, I've got to get a RasPi first before I can experiment with that,

Just wanted to say how possible (and honestly easy) this project is for encouragement.  Let me know if you have any questions or so.

User avatar
rurwin
Forum Moderator
Forum Moderator
Posts: 4258
Joined: Mon Jan 09, 2012 3:16 pm
Contact: Website

Re: Subsonic R-Pi Car Media Server - Check the Vid

Mon Mar 12, 2012 3:07 pm

WildWalker said:


How will the R-Pi versions of Linux cope in an auto environment where they are being powered up and down a lot? Would a battery backup be required to give the Pi time to shut-down when it senses a loss of power (ala Powerchute)?


It's a problem. See: http://www.raspberrypi.org/for.....ower-onoff

WildWalker
Posts: 43
Joined: Sat Mar 03, 2012 3:49 pm
Contact: Website

Re: Subsonic R-Pi Car Media Server - Check the Vid

Tue Mar 13, 2012 12:06 am

Hey Justin,

Glad to see you got Subsonic working on Arm, that does give me some encouragement.

I also had a play with XBMC today, and you can download apps from Android Marketplace to do pretty much the same. So at least I have a two pronged attack to get something working

Will update you on any progress.

Alan.

WildWalker
Posts: 43
Joined: Sat Mar 03, 2012 3:49 pm
Contact: Website

Re: Subsonic R-Pi Car Media Server - Check the Vid

Tue Mar 13, 2012 12:13 am

rurwin said:


WildWalker said:


How will the R-Pi versions of Linux cope in an auto environment where they are being powered up and down a lot? Would a battery backup be required to give the Pi time to shut-down when it senses a loss of power (ala Powerchute)?


It's a problem. See: http://www.raspberrypi.org/for.....ower-onoff


Thanks rurwin,

It doesn't seem to much of a problem, a small bit of circuitry, but nothing too difficult.

If I'm lucky, I could persuade the writers of the respective apps to build in shutdown functions, as the R-Pi is going to be popular, some kind of support might make their apps more desirable ;)

Alan.

the_burk
Posts: 6
Joined: Tue Mar 13, 2012 9:18 am

Re: Subsonic R-Pi Car Media Server - Check the Vid

Tue Mar 13, 2012 9:54 am

Hallo

First time writer..

I too have been thinking in similar ways..

If you use xbmc theres quite a few diffrent android apps that you can use

also if you want to use banshee or an x based media player that too is easy..

I used another remote for my htpc earlier that controlled X based media programs via ssh.. and you could probably use something similar to control mpd ..

in that case the only thing you need to start is mpd and an sshd ..

there is some android apps for mpd aswell .. but none that i can see that have shutdown or power control built in ..

so we might need to talk to some of the developers for an android app .. to make a ssh or similar remote app with shutdown..

i was thinking something in the line of ups aswell ... basicly 12 volt straight into a battery pack.. then when car is shutdown it takes the power from the battery instead...

or .. make a switch straight from th battery via a switch to the R PI ... when your done with music .. turn it off .. let it shutdown properly and then flick the powerswitch..

theres many diffrent ways to do it..

/Burk

WildWalker
Posts: 43
Joined: Sat Mar 03, 2012 3:49 pm
Contact: Website

Re: Subsonic R-Pi Car Media Server - Check the Vid

Tue Mar 13, 2012 11:41 am

the_burk said:


or .. make a switch straight from th battery via a switch to the R PI ... when your done with music .. turn it off .. let it shutdown properly and then flick the powerswitch..

theres many diffrent ways to do it..

/Burk


That there are, I just had a brainwave. if some drivers are written for the GPI pins, then I guess a simple watchdog that polls the pins every 'x' minutes/seconds would initiate a shutdown depending on the GPI state.

I want to run mine from my car battery, but be sure that it will shutdown after a period of time. I was thinking of 3 hours, this way I would not have to wait for a boot on days where I am hoping in and out of the car, and when it is in my garage, I have 3 hours to sync any new music before the Pi goes to sleep

poplap
Posts: 28
Joined: Thu Feb 23, 2012 12:48 am

Re: Subsonic R-Pi Car Media Server - Check the Vid

Tue Mar 13, 2012 1:23 pm

If your not using a screen you could use something like Music Player Daemon, it has no GUI and runs on a different level then normal music player, it relies on networked User Interfaces to control it, its a little confusing to setup but when you do it will be very light weight.

If you have something like 3g, you could connect over VPN and access a network share, no syncing, or you could just rsync over ssh to a HDD attached to the RPi, or even the SD if there is enough space.

I am planing to do whole house audio with this kind of setup, but it could easily be transferred to a car environment.

the_burk
Posts: 6
Joined: Tue Mar 13, 2012 9:18 am

Re: Subsonic R-Pi Car Media Server - Check the Vid

Tue Mar 13, 2012 2:40 pm

WildWalker said:


That there are, I just had a brainwave. if some drivers are written for the GPI pins, then I guess a simple watchdog that polls the pins every 'x' minutes/seconds would initiate a shutdown depending on the GPI state.

I want to run mine from my car battery, but be sure that it will shutdown after a period of time. I was thinking of 3 hours, this way I would not have to wait for a boot on days where I am hoping in and out of the car, and when it is in my garage, I have 3 hours to sync any new music before the Pi goes to sleep


i too would run it from car battery ..

the watchdog idea is a good one .. you could use a 9volt battery or 4 rechargable AA batteries .. and build some small version of a ups .. with one cable going high when using battery ... and at the same time start a timer for shutdown when your using the batterypack .. maybe have a look at the m2atx.. its an atx powersupply for car use ... we could use the ups part of it or just have to figure out some way to charge battery and stop charging it when its full.. i dont really want to run it of the battery charger...

what about discreet

basicly  ..

if ignition + battery charged/ charging  gpio1 low

if !ignition +battery charged gpio1 high

if !ignition + battery low gpio2 high

if gpio1 shutdown -h -t 300

if gpio2 shutdown -h now

or something similar..

dont know how to measure voltage on a batterypack tho .. :/ not off the top of my head..

Poplab:

thats what i tried to say before .. maybe i was unclear sorry

/Burk

WildWalker
Posts: 43
Joined: Sat Mar 03, 2012 3:49 pm
Contact: Website

Re: Subsonic R-Pi Car Media Server - Check the Vid

Thu Mar 15, 2012 7:42 am

So I have been having a think about the shutting down of Linux after the ignition goes off in the car.

My thoughts have concentrated around the GPIO pins, but we need GPIO drivers for this. What about the USB Port, I bet that can be polled already. So 12v from the ignition in to a 7805 (5v regulator) and in to one of the USB ports. The its just a small piece of code to initiate a shutdown if the 5v rail goes low.

Of course, if you need both USBs then what about the NIC (as most people will start with model 'B' anyway) can this be utilised in such a crude way?

Alan.

User avatar
rurwin
Forum Moderator
Forum Moderator
Posts: 4258
Joined: Mon Jan 09, 2012 3:16 pm
Contact: Website

Re: Subsonic R-Pi Car Media Server - Check the Vid

Thu Mar 15, 2012 8:51 am

It is about ten times easier to use the GPIO. Drivers are provided.

It seems to me that all you need are two relays, (one 12V and one 3V) and two power lines: persistent power and ignition. Persistent power is converted to 5V with a suitable power supply.

Both relays switch the persistent power 5V and provide power to the RaspPi in parallel.

Relay 1 also switches 0V from the GPIO connector to a GPIO input pin. (The input pin has an internal pull-up to 3.3V)

Relay 1 is controlled by the ignition. When the ignition is on then power is supplied to the RaspPi through Relay 1, and 0V is supplied to the GPIO input pin.

Relay 2 is controlled by a GPIO output. When the output is high then power is supplied to the RaspPi through Relay 2.

Ignition is switched on, powering relay 1 and the RaspPi starts to boot.

On boot, the RaspPi sets the GPIO output high. (ie relay 2 is now powered.)

Every few minutes, or even every few hours, the RaspPi checks the GPIO input pin. If it is high, (ie ignition has been switched off, and relay1 is unpowered) then the RaspPi initiates a shutdown.

The last task of the shutdown procedure is to clear the GPIO output pin. (ie un-power relay 2, after which no power is reaching the RaspPi.)

All of that can be done using command scripts and scheduled execution. No "programming" required.

the_burk
Posts: 6
Joined: Tue Mar 13, 2012 9:18 am

Re: Subsonic R-Pi Car Media Server - Check the Vid

Thu Mar 15, 2012 10:05 am

Wicked idea with the relays!!

so in that case we could just build a 12v -> 5 v psu with two relays in it.. basicly 12 v in 2 gpio + micro usb out .. battery and relays inside the psu .. and if you get a micro usb car charger .. its not that hard to rebuild into that.. cost ... £10 all toghether including charger + two relays.. no soldering even .. too easy..

//Burk

Cramerjd
Posts: 1
Joined: Sat Jun 02, 2012 12:07 am

Re: Subsonic R-Pi Car Media Server - Check the Vid

Sat Jun 02, 2012 12:09 am

Peak makes a large screen backup camera system that goes for less then $60 on Amazon from time to time. It has a RCA video input as well as the camera feed. Works great as a GUI screen for your Pi in your car.


User avatar
SN
Posts: 1014
Joined: Mon Feb 13, 2012 8:06 pm
Location: Romiley, UK
Contact: Website

Re: Subsonic R-Pi Car Media Server - Check the Vid

Wed Jun 13, 2012 10:32 pm

You don't a screen - use an Android Phone with Wireless AP turned on. The pi can have a wireless adaptor which attaches to it and then just use the android browser as the gui on to the pi (I just read the squeeze plug thread)
Steve N – binatone mk4->intellivision->zx81->spectrum->cbm64->cpc6128->520stfm->pc->raspi ?

Return to “Other projects”