E46 Fanatics Forum banner
1 - 20 of 337 Posts

·
Registered
Joined
·
544 Posts
Discussion Starter · #1 · (Edited)
[PIBUS] DIY E46/E39 Media Centre: MP3, videos, Digital Radio, Digital TV?

So I bought me one of those Raspberry Pi boards for $25 (actually more like $40 in Australia after shipping/gst etc) and hooked the video-out to my car. It works :)

It won't be easy, but potentially you could do lots of things with this, without ripping out your factory equipment:
1. MP3s with album art, playing from SDCard or USB
2. Videos off USB storage
3. Digital Radio
4. Digital TV? (antenna will be a problem)

Stay tuned, an interface to the headunit buttons is the next step. Information dumped at: http://pibus.info
 

Attachments

·
Registered
Joined
·
544 Posts
Discussion Starter · #7 · (Edited)
Interested in this project.... Great idea! I received my Pi a little while back but haven't had time to play with it yet.

What's your background? Are you into programming?
Yes I know how to program a linux box, so that shouldn't be a problem :)

Started designing a Raspberry PI to BMW interface board. Some features:

1. Can switch video between three sources using a relay: (a) Stock BMW menus (b) Raspberry PI (c) reversing camera.
2. Can read/write ibus while the PI isn't powered or booted up using an 8-bit microcontroller.
3. Provides switch-mode power to the PI and a way to turn it off automatically when you lock your car (don't want it draining your battery).
4. Provides two extra relays to control extra stuff: e.g. Power to your reversing camera (if you use it while not reversing), garage opener.
5. No need to rip out or wreck any factory equipment - except maybe the CD changer.

Hopefully will get a board fabricated soon. I need to quit my day job to have more time to tinker with BMW electronics :rolleyes:
 

Attachments

·
Registered
Joined
·
544 Posts
Discussion Starter · #11 ·
i have raspberry PI too... i try to connect in to my E38, I think we have similar protocols=) I'll be watching this topic=)
Yes, it's all IBUS. Programming will be a big part of it, can you code any? :)

ppmz, based on what you want to do interface board?
P.S. Sorry for my english=) i am from russia=)
Interface board will provide power (and standby) to Pi, so it doesn't drain your car battery. Also it will switch video source via a relay between 1) BMW MK4 computer 2) Reversing Camera 3) Raspberry Pi. It's got a small 8-bit Atmel microcontroller to do this and uses very little power (around 500 μA) so can be left running 24/7.

I have this all working, but no software to do anything useful yet. I guess it will require some hacking with xbmc.
 

Attachments

·
Registered
Joined
·
544 Posts
Discussion Starter · #17 ·
Very cool for an interface that was made in 1970 according to the date :p

Sweet features. Seems a bit slow though and what happens when you turn the car on (say after getting petrol) do you need to go through all the menus to get your music playing again?
Jeeze, you're a tough taskmaster, I only just got the basics going. It was slow because there was a stuck program running in the background on the Raspberry Pi, I've solved that now. It's about 3-4 times quicker when clicking things.

The hardware has power even if you lock the car, just gotta add some software that gracefully shuts down after ~5 mins of inactivity.

that is awesome! want to make me one ;)
Sure I'll make you one. It took me 6 months, so the invoice will be $50,000 or so (though there's $10 worth of parts on the board :). If you're handy with a soldering iron and have lots of patience I can give you the plans.
 

·
Registered
Joined
·
544 Posts
Discussion Starter · #21 · (Edited)
so would it be possible to run this in conjunction with my GROM plugged if i had a switch where the cd changer is?
GROM? I use pin 13 on the white plug of the TV module to input video and the CD changer for audio-in.

I don't really have any plans, just a schematic, board & incomplete software. If you really want a blank board, PM me your address and I'll stick one in an envelope. It shouldn't be underestimated what would be involved to build it:

1) Buy a Raspberry Pi.
2) Find a store to buy all the necessary parts (some surface mount, some thru hole).
3) Program the ATTiny microcontroller (you can buy a programmer on ebay for $5 from Hong Kong).
4) Buy a switch-mode power supply board from ebay - $2 and solder it on.
5) Play around with lots of little connectors/RCA cabling etc.
6) Find a way to mount it (in a box?).
7) Realise that the software is a work in progress and probably lacks the features you expect. Source code is available though.

Maybe these photos will put you off:
 

Attachments

·
Registered
Joined
·
544 Posts
Discussion Starter · #24 ·
Where abouts in melbourne are you? I'd love to see it in action and that doesn't scare me too much haha
Very little to see, it's not even permanently installed in the car yet.

Can you share sources? i install raspberry Pi in my e38, connect in to ibus with hand made adapter and run Carmedia. all works but it too slow, i want to run xbmc and use ibus commands with it.
P.S. Sorry for my english, i am from Russian.
Coming soon, I can't attach zip/tar files here. Maybe I'll open a sourceforge project for it.

I'm trying to hook up the audio cable now but not much success. What's the deal with the 6-pin CDC connector? I'm just getting silence even when my screen says "CDC". I've hooked up:

Pin1: Left
Pin4: Right
Pin2/5: Ground

Is there a special ibus command needed to un-mute it?
 

Attachments

·
Registered
Joined
·
544 Posts
Discussion Starter · #31 ·
The multi media is fantastic.
I cant wait for the step by step instructions.Does it have a gps set up.
THATS AWSOME DUDE !
For DECLANM3
I'm not planning to write any detailed instructions because this project isn't for everyone, it requires too much electronics knowledge. But if you ask something specific I'll try to answer it.

You require some device (like your ATTiny) to fake the responses to status requests and produce the appropriate codes to satisfy the Instrument Cluster. Your microprocessor can do this easily. Others have researched these so you should be able to google the codes.
I have that working now (CDC emulation). Sound works :D Now I'm playing with the MODE button and making it automatically switch the video when it detects the CDC screen and switch back to the MK4 when you return to the main menu.

I love the idea of a raspberry running a full version of xbmc to the existing screen. Aux in, Video stream, reverse camera are good inclusions. If the raspberry has the capacity I'd like to see you reserve space on your interface board for bluetooth to phone and possibly gps (even if YOU never intend to implement them).
I doubt I'll re-do the board. It has no GPS or bluetooth, but the Pi has USB ports so it's easy to plug-in a $4 bluetooth stick. I think you can ask the MK4 GPS for position data on the ibus. But honestly I actually like the MK4 navigation and see no need to replace it. I don't think you could beat it, it even does dead-reckoning.

Maybe another video this weekend if I make some progresss...
 

·
Registered
Joined
·
544 Posts
Discussion Starter · #40 ·
Finished modifying the pm3-hd skin, it's pretty polished now without bits of the GUI off-screen and unreachable anymore. BTW why are Samsung phones so bad at taking low-light videos?

I want to add digital TV next, but having trouble getting a strong enough signal. My dvb-t USB dongle might be too crap for the job...

http://youtu.be/ZNdktAFt-xY
 

·
Registered
Joined
·
544 Posts
Discussion Starter · #47 · (Edited)
Hi again ppmz,

I'm very interested in this project and will probably start building a version of the interface board this weekend. But first I need to check a few things :idea: (and I'm sure other watchers will need to know these too).
Good to hear, will be curious to see how you go. Sure you don't want a blank PCB? I think Auspost will do it with a 60c stamp. Or are you planning to improve it?

I worked out that you took pin 16 from the ATtiny to pin 5 (on/off) on the LM25765 voltage regulator module (orange jumper wire in picture from your www.classiccomputing.info web site). I'll be using a dual power module (5V @ 2A & 3.3V @ 0.5A) which will constitute a 3rd board in my setup.
Yep that's right re pin 16. Why do you need 3.3V? I used the LP2950-3.0 for good reason, so standby power loss is very low. If you plan to use the dual module to power the ATtiny, you might find it wastes a fair bit of juice when your car is switched off.

...so to get video with stereo sound the CD Changer inputs need to be commandeered. This also requires running the CD and the Aux Video at the same time, but the infotainment program in the Instrument Cluster is able to be told to do just that.
Not 100% right, it actually uses the RV camera Video input (pin 13), not aux. Aux video-in is a different pin isn't it?

Please, please correct any misconceptions or errors I have made in this summary.

thanx again for a great project :thumbup:.
Looks right to me. The board/schematic/software has a few errors and omissions:

1) D7 shouldn't be there, it ruins the regulation.

2) F1 is meant to be a poly-fuse, but I didn't have one and just linked it.

3) Some of the transistors look like BJTs on the schematic, but MUST be FETs: T4, T5, T6, T7, T8.

4) When I was first wiring/soldering it I had trouble getting the video trigger to work (pin 17) and changed the FET to a BJT (and added a base resistor). Later I found I had a loose wire, so this change may or may not be necessary (probably isn't).

5) The ATtiny firmware has 'power off' disabled because I was still tweaking it. There is one line in the source-code you can comment back in.

6) Make sure you get a ATtiny2313A and not a ATtiny2313.

7) I bought nearly every part from futurlec.com. The relays are: "JRC-23F-03 SPDT 3V 1A PCB Relay".

8) The crystal is a 4.9152 MHz.

9) Most important thing of all - don't forget to adjust your powersupply to 5.0V before plugging it into the Pi.
 

·
Registered
Joined
·
544 Posts
Discussion Starter · #48 · (Edited)
Please, please correct any misconceptions or errors I have made in this summary!
I hope you don't mind, but I used your text to flesh out the web site, and added some details.

My skills with a soldering iron are not good enough to create that board, i'd be very willing to buy one from you if you fancy making another with one of those spare blank boards !!
Sorry, no patience for that.

Wao. Fantastic... I have Xbox 1 with xbmc. I still love it.
Any chance to detail instruction ?
The web page (link in the 1st post) has a bit more details now. Is something missing or not clear?
 

·
Registered
Joined
·
544 Posts
Discussion Starter · #53 ·
Here's my take on the interface board, using readily available, through hole components and a pre-assembled power supply. the 3 boards will be stacked on top of each other with the 85x56mm Pi on the bottom, 65x56mm interface in the centre and the 49x32mm power board on the top.

View attachment 513421 View attachment 513422 View attachment 513426
Wow, strip boards are hard work. Hopefully it'll work on the first smoke-test, otherwise good luck debugging :yikes:
Keep us informed of progress.
 

·
Registered
Joined
·
544 Posts
Discussion Starter · #57 · (Edited)
Well done ppmz. does the sd car provide movies and or via usb. What is the extra rca for,I'm led to believe you place the digital antenna the coin box,run it along the door pillar,straight to the shark fin.
Yes it reads mp3/movies from SD card and USB. I haven't made any antenna connections at all.


---

A few people have asked the same questions privately, so here are answers:

1) Which power supply did you use?
Picture Attached! They are about $2-3 on ebay, just search for "LM2596" and find one with the same measurements 44x21mm. In theory the better ones have two coils and are sometimes labelled "low ripple" - I didn't use one of these, but if you can find one small enough to fit, go for it.

2) Can you share the PCB design files?
Yes, they are now in the Downloads section here: http://www.classiccomputing.info/pibus/

3) Can you send me a blank board?
Yep. Just PayPal me a few dollars to cover the postage. I'll post using an envelope and some cardboard, so you have to accept the risk of it being lost or rejected in some sorting machine (should be ok). Send a PM for Paypal details.
To Australia: $2 AUD
To EU/UK/USA: $7 AUD

4) Can you send me a finished board?
No.
 

Attachments

·
Registered
Joined
·
544 Posts
Discussion Starter · #62 ·
Hi all

I am looking at doing something similar in my M3. I have already got my Pi (it is just sat around looking at me). i have an Arduino also so I am looking to try and use this. If anyone has any experience with Arduino and Ibus let me know your experiences.

I am still in the early stages but will keep updated on progress.

My background is more software than hardware, so will be a bit slow on the electronics side.


Sent from BimmerApp mobile app
An Arduino is basically an Atmel AVR that's a bit more powerful than the processor I used. I guess you could use it, but you still need to translate the 12V ibus into what-ever voltage Arduino runs at - you can't plug it straight in. Then write your own (non-trival) firmware.

If you really want a shortcut and simplified version, then use a Resler USB interface straight to the R.Pi (google Resler IBUS). It would miss some features though like reverse-camera switching & automatic power on/off.

From public & private messages I think about 3-4 people are trying to reproduce my project. The pattern seems to be the all know software but struggle a bit with electronics. Who'll win the race to get it working first?
 

·
Registered
Joined
·
544 Posts
Discussion Starter · #70 ·
Hello) i am from Russia) and sorry for my English=) I install raspberry pi in my e38, connect video to RV Camera input, audio instead of TAPE and hand made Ibus adapter. I install cis-ibus and it work very well, but it slow and i want to use XBMC) can i use your pibus software in my case? can i switch between bmw menu and xbmc with MODE button (XBMC in TAPE mode)?
Not without modifying the pibus software a lot. It looks for the text "CDC 1-04" to switch the video and keyboard. It also does cd-changer emulation, you'd have to disable it. It also does re-transmit on the ibus, who knows if your adapter needs it, is it a TH3122 or something custom?

Unless you can program in C, the short answer would be no. Have you tried openBM on some German forums?
 
1 - 20 of 337 Posts
Top