BMW E38 DVB-T retrofit DIY

*EDIT 2015.03

After some changes, the project is now simplified. I suggest you go thru this text, then download pdf with detailed polish version and use google translate. main changes are with sound - it is now conected to AV sound input (don't forget to setup AV input on tuner before. No need of sound preamp. This improved sound quality a lot. thank's to "cursor" - user of 7er.pl for this tip.

second change is removal of power supply converter. It can stay, but if you use only pendrive (not HDD) current consuption is not high - so we can use LEAR power supply. This i learned from "peteAU" from e46fanatics forum - thanks.

On the very beginning , I would like to send few flying thanks to all the enthusiasts who did awesome job and documented BMW I-bus protocol details (hardware, software). Especially helpful was famous “I-bus monitor” tool made long time ago by Franck Touanen. Great work.

All the others – who maintain websites with detail of connectors, diagrams, messages, ideas. - thanks

Also to my friend mrrisc - great suport when unexpected trouble appeared. - thanks

The idea in few words and one picture

Sniff I-bus messages (ex on pin3 of blue connector of tv module) to detect when old good LEAR Loewe TV tuner will be chosen from main menu screen of BM (or other defined message). After this event is recognized – switch “rear cam ON” signal to ground (pin 17 on blue tv tuner connector) and inject composite video signal from damn cheap DVB-T tuner to board monitor (pin 13 sig / 14 gnd of white connector) . The same time send on I-bus message to Radio to choose tape signal and inject audio from DVB to these input (par C of socket / pins 1,2 L R/ GND 7,8). (not necessary to send it – changed to inject sound to the same wire where TV tuner used to send sound - pin 9sig/ 18gnd of blue TV tuner connector).

If above occurs ( I mean TV was chosen) , listen on IBUS to knob turn left/right packets to know when to switch channel UP or DOWN and other necessary commands.

To do it we need a uC – who will listen for IBUS messages, and who will control DVB-T tuner accordingly. Here comes Arduino as another bus slave device. On the beginning I was sure that it will be necessary also to send messages. But during construction it started to be clear that it’s enough to listen for messages.

diagram of installation

Picture above illustrates the idea.

That’s all. Now the details.

Signals we are interested in are shown below.

During project realization I was wondering where should I install the hardware, and how to power it.

After opening the original video module I noted lot of space inside. Then I started to poke on it’s internal hardware. I was looking for possibility of sourcing power from it’s internal power supply (5V / 12V), also I had idea to replace it’s analog integrated tv head (controlled by I2C – easy to sniff as well), but finally I rejected this because later picture processors added OSD on the picture… Anyway, sourcing power from it’s internal power supply has few advantages:

- it’s stable 12V , stable 5 V

- It’s well filtered from car noises

- It’s switched automatically on after IBUS activity, and off after timeout of bus inactivity – that’s very helpful!

You can connect to them, by soldering to free pads close to power supply shield:

internal LEAR tv module power supply

Because DVB-T tuner power consumption is described as 5V / 1,5 A max, I was not sure if such increased current will not damage the power supply. I decided to install separate battery>>5V converter – just to power the hungry tuner.

Cables shown above are used only to power:

- operational amplifier of sound

- relay to switch on the power converter from battery voltage (pin 1,2 of blue socket – NOT yellow cable shown on picture above)

POWER SUPPLY for dvb-t tuner

Converter used in project is based on LM2596S , is cheap and easy to get… mine looks like this (small but according producer it’s capable of 2A conversion…)

power supply for DVB-T module

I found it on auction site in Poland. Just type LM2596S.

AUDIO

Another needed hardware is voltage amplifier of sound signals.

The issue with sound is because BMW engineers decided to use relatively high voltage analog audio wiring. Cables are not shielded, it’s just twisted pair type connection. That’s why it’s necessary to increase output audio signal voltage. (that was one point where I stopped for longer time… I tried audio preamp with bass an treble regulation, but not succeed… colleague of mine helped a lot with few good comments)

Here comes operational amplifier board. Again damn cheap and popular, simple opamp board like this on photo below will do the job:

My choice is available in EU as self assembly kit called AVT2392 from avt company

But any audio amp with ~10x amplification ratio will be fine.

uController – Arduino board

Arduino board used in project is based on ATMEGA328P Atmel AVR family processor. It’s very popular environment with many extension boards. I used additional prototyping board. But now I have to say that it’s not really necessary (additional elements could be installed without board at all… but it’s very convenient to have it)

Above is shown Arduino clone board, and prototype board example (I used different, but above is more than enough)

Using Arduino board has advantage of loading software via USB and boot loader, without any external programmer.

DVB-T tuner

Core of this hack is of course DVB-T tuner. I decided to use cheapest tuner available - it was WIWA HD50 series with external LED display, and remote control.

Connection possibilities we can see from this advertisement picture (in Polish – but you know what is going on…) it has even an HDMI output… but we will use old poor composite video.

To take control over tuner we can send IR signals using IR diode, or inject them directly to proper pin of internal logic. I decided to take second option: (you can try to solder to cable somewhere, in my case it was white cable – I mean IR receiver and LED display cable)

To do it you have to find and solder above shown pin of IR connector. Ground will be taken from power (common ground) so it’s enough to use only one wire. As on photo.

Unfortunately for me I was not able to find any information of WIWA IR remote control standard. So I just connected my friends logic analyzer and recorded all signals, then in software reconstruct them using internal timer. Now I wonder why not to write learning procedure, but when I started with first command, other were only change of few bits. All together we really need is not more than 10 commands.

Below is shown as example OK command scan. (compare with Exit command below)

IR codes scanned with logic analyzer

There is a constant “preamble”, then we have few bits to change… that’s it.

So if our Arduino send this sequence with proper timing – we control the tuner.

There is one more thing to solder inside of this tuner – composite video is not available as RCA connector, only inside of SCART connector. So I soldered to proper pin of SCART to have composite video out signal on separate RCA cable.

Picture below shows the details:

composite video out diagram

It’s very convenient to make it easy to uninstall (just in case).

Now all together should be connected as shown below (see pdf file below for details):

connecction diagram detailed

Almost all will easily fit inside tuner. The only thing outside is DVB-T tuner. You can install it on the analog tuner.

example of itnernal instalation in Original LEAR video module

On above pictures you can see installed modules inside original video module. Please note the module with four potentiometers. It’s audio preamp – on beginning I tried to use it to amplify audio from DVB-t, but it was not enough. Because I bough it – it’s there , but in fact you need only opamp (see on upper left corner, glued to shield).

Antenna

If your car had analog TV, you already have two good antennas with two amplifiers.

They need to have power supply, and fortunately for us in the DVB-T tuner there is option to feed external amplifier with power. By default it’s off, so do not forget to switch it on.

Because original antenna socket is something unusual – most probably you will cut it and solder typical home antenna socket.

Software

Software was written in MCS Bascom.

Implemented functionality is only limited to change of channels, and switch ON/OFF according to user decision.

I am still working on software to extend the functionality.

My target is to use not only TV, but also play movies and music from USB port. This is done and implementd.

Just press menu button - and there will appear menu to choose mp3 , movies, pictures etc.

Software, just like the description, is freely available for everyone to use. No source code is published – I am not proud of my programming skills enough to publish it… anyway development is ongoing and new version will be released soon.

Disadvantages

Tuner used in this hack has small fonts. On the screen you can barely read them. The same limitation will be painful for playing mp3. I think the issue is composite video quality. It’s very good for movies, but precise graphics like messages – here RGsB (Internal standard in BMW E38) would help a lot.

Also another thing is that in analog TV, even when signal was weak, there was a noisy picture on screen. In digital TV, when signal is poor, the picture looses audio completely, picture is fragmented or stand still. That’s much more annoying than analog noises. This issue is also a driver to develop software to play movies. The main target of this hack was not to watch TV in car, but to make this part of car vital again. And there will be not a big difference if you will watch soap opera or avi file…

Notes

Modification in case on you already have rev. camera:

It’s just necessary to switch screen between cam and tv. Relay connected like on screen should do the job. It will be activated with reverse gear light. With no voltage on coil – signal will be passed from DVB-T tuner.