Menu

andipanda.dev

DIY Raspberry Pi Head Unit for a VW T4

CaRadio in its current form didn't appear overnight. In fact, when I first decided to build my own car head unit, CarPlay wasn't even something I was thinking about.

The story began in late 2021 — early 2022 with my Volkswagen T4, a couple of old Chinese head units, and the idea of installing a proper large screen in the car.

How It All Started

One day, my neighbor asked me to help replace his old Orion AVM-56277BTG 2DIN head unit with a new one. The old Orion eventually ended up with me.

At the time, I had a Volkswagen T4. Almost immediately, I had the idea of installing this head unit in the T4. The problem was that my dashboard had no factory space for a full-size 2DIN unit. The initial plan seemed simple enough: remove part of the shelf above the heater controls and install the head unit there.

In practice, things turned out to be more complicated. There was a structural reinforcement behind the shelf, and I definitely didn't want to cut it just to install a head unit.

That led to a second idea: reduce the depth of the Orion itself. I didn't need the CD/DVD drive anyway, so simply removing it and shortening the head unit's chassis seemed like a logical solution.

But after taking it apart, I discovered that it wasn't that simple: a significant part of the Orion's electronics was tied to the drive electronics. So that idea was abandoned as well.

That was the moment when the question changed from "how do I install a ready-made 2DIN head unit?" to something much more interesting:

Why not just build my own?

Mystery as a Donor

I had an old Mystery MMTD-9122S with a motorized 7-inch screen. At one point, it had served me perfectly well as a typical Chinese head unit, and later I had connected a rear-view camera to it. Over time, however, the mechanism for the motorized screen stopped working properly.

Most of the head unit's electronics were still functional.

I took the Mystery apart and started studying its circuitry. Inside, I found a PT2348 audio processor, for which documentation was available, and a TEF6621 FM tuner. Both could be controlled independently of the head unit's original logic.

My first experiment didn't even involve a Raspberry Pi. I disconnected the original STM8 and connected the necessary components to an Arduino. I found suitable libraries, and before long I managed to get the first sound without the original Mystery controller being involved at all.

That was an important moment: it became clear that there was no reason to throw away the working analog section of the head unit. I could control it from my own controller.

Raspberry Pi Instead of the Original "Brains"

By that time, I already had experience programming in C++/Qt on Raspberry Pi, and I also had a Raspberry Pi on hand. So the next step was fairly obvious: use it as the central computer for the future head unit.

From the Mystery, I decided to keep only what was actually useful: the audio path, amplifier, FM tuner, and screen.

The original 7-inch LCD panel used a TTL interface. To connect it to the Raspberry Pi, I bought an RTD2660-based scaler. This effectively turned the screen that had once been part of the Mystery into a regular display for the Raspberry Pi.

I took a similar approach with the touchscreen. I moved its controller onto a separate board with only the minimum necessary components and connected it to the Raspberry Pi.

As a result, only a few useful hardware blocks from the original head unit gradually remained, while all of the device logic came under my control.

My Own Interface

At the same time, I started developing my own head unit interface in Qt/C++.

The goal wasn't simply to display a Linux desktop on a screen in the car. From the beginning, the interface was designed specifically for use while driving: large buttons, very few small elements, and separate screens for the main functions.

One of the first features to become fully functional was FM radio. The Raspberry Pi directly controlled the hardware FM tuner, while my own interface displayed the frequency and provided station search and preset storage.

Gradually, a main menu appeared with radio, music, Bluetooth, camera, and settings.

Today, the interface obviously looks fairly simple. But what mattered much more to me at the time was that this was no longer just a Raspberry Pi connected to a screen in a car. The head unit's main functions were actually being controlled by my own software.

Bluetooth from the Other Head Unit

This is where the same Orion that had started the whole story came in handy again.

I removed its automotive Bluetooth module, but couldn't find any documentation for it. So I had to connect a logic analyzer and figure out the communication protocol between the module and the Orion's original electronics.

The Bluetooth module itself already supported the automotive functions I needed, including Bluetooth Audio and Hands-Free. It was controlled over UART.

After reverse-engineering the protocol, I connected the module to my own system. Bluetooth Audio was definitely implemented and working. I also installed a microphone in the car. As far as I can remember now, I never quite finished the software side of the full phone-call interface.

In fact, this became a characteristic approach throughout the first version of the project: instead of trying to implement everything from scratch, I reused existing hardware blocks, figured out how the original electronics controlled them, and connected them to my own system.

From Prototype to the Car

The electronics were gradually coming together, but the original problem remained: I still had to properly install everything in the T4.

At first, I considered 3D-printing a new panel. But by then, I had an opportunity to make a much cleaner metal panel that would replace part of the T4's original center console. The blank was laser-cut from 1 mm sheet metal, the edges were then bent, and the panel received a matte black powder-coated finish.

The screen was mounted in the panel, while the original heater controls remained underneath.

The old Mystery chassis once again came in handy as an enclosure for all the electronics. Inside were a Raspberry Pi 4, a power converter, the remaining head unit electronics, and the scaler. Additional ventilation holes were made in the bottom of the chassis.

The result was a rather unusual mixture of hardware from two Chinese head units, a Raspberry Pi, custom electronics, and software written in Qt.

But the most important thing was that it worked.

Rear-View Camera

The camera was a separate challenge.

The RTD2660 scaler had not only an input for the Raspberry Pi's video signal, but also a composite video input. This meant that a standard automotive rear-view camera could be connected directly to it.

The Raspberry Pi controlled the video source switching, allowing the camera image to be displayed directly on the same screen.

In the version I actually used, the camera could be activated through the software interface. The project never reached the point of fully automatic switching based on the reverse gear signal.

I had also planned to connect a signal from the reversing lights and add vehicle supply voltage monitoring to protect the battery from deep discharge.

What Worked — and What Didn't

This head unit wasn't a finished commercial product, and it was never intended to be one.

FM radio worked. Bluetooth Audio worked. I had my own touchscreen interface. The camera worked. The entire system was physically installed in the car and used for some time.

What I never completed was proper automotive power management. The head unit was switched on and off using a simple physical switch. There was no proper ACC logic, no correct automatic shutdown, no standby mode, and no monitoring of the vehicle's state.

Some of the software features also remained unfinished.

In essence, it was a fully functional prototype that allowed me to prove the main idea:

an ordinary single-board computer really can become the central unit of a custom in-car multimedia system.

Then the project stopped for reasons that had nothing to do with the project itself.

One of the CaRadio boot tests on the bench before installation in the car.

Moving and a Long Break

At the end of 2022, I left Ukraine and moved to Poland.

The T4 and the first head unit became part of an earlier chapter of my life, and continuing development simply wasn't something I could focus on at the time.

The story of the project could easily have ended there.

But some time later, already in Poland, I got a Nissan Primera P12 with a factory onboard computer and a screen that displayed very little useful information. And with it came the idea of doing something about that once again.

By then, a lot had changed: different hardware, a different car, a different software stack — and there was now a technology I hadn't even considered while building the head unit for the T4.

Apple CarPlay.

And that's where the next stage of the project begins.


Continued

→ CaRadio: How I Returned to Building My Own Head Unit and Ended Up with CarPlay