Return to Home Page

BMW E39-RPi Homebrew Navigation System

e39-rpi running in my car

The PCB I designed

Architecture

The e39-rpi project is made of several components.

It is a Rasberry Pi embedded Linux device running a Jetpack Compose for Desktop GUI on an X-server. The RPi is attached via GPIO, Power, and USB to a HAT that I designed.

It is designed to be wired into the e39 and make use of the existing displays and buttons

Car Hardware

The diagram below shows how the e39-rpi board and some of its components work together.

architecture-beta group e39[BMW IBUS network] group e39rpi[E39 RPi] in e39 group rpi[Raspberry Pi] in e39rpi group pico[Raspberry Pi Pico] in e39rpi group api[API] service ibusnet(internet)[IBUS] in e39 service bmbt(internet)[Bordmonitor] in e39 service ikde(internet)[IKE Cluster] in e39 service tvtuner(internet)[TV Module] in e39 service radio(internet)[Radio Tuner BM54] in e39 service cdChanger(clarity:cd-dvd-line)[CD Changer] in e39 service gpsAntenna(internet)[GPS Antenna] in e39 service db(database)[Database] in api service disk1(disk)[Storage] in api service disk2(disk)[Storage] in api service server(server)[Server] in api db:L -- R:server disk1:T -- B:server disk2:T -- B:db

Overview Pictures

Software Architecture

High level

The Raspberry Pi runs an embedded linux distro that runs my HMI.

The Pi Pico runs a bare-metal firmware that I wrote called “Linster OS for Automotive”

architecture-beta group e39[BMW IBUS network] group e39rpi[E39 RPi] in e39 group rpi[Raspberry Pi] in e39rpi group pico[Raspberry Pi Pico] in e39rpi

Linster OS For Automotive (Pi Pico firmware)

The raspberry pi pico firmware acts as a hardware controller for the raspberry pi in the car.

architecture-beta group e39[BMW IBUS network] group e39rpi[E39 RPi] in e39 group rpi[Raspberry Pi] in e39rpi group pico[Raspberry Pi Pico] in e39rpi

«Navigation(“Pi Pico Firmware”, “pico”, true)»

Pico-Pi Private Message Protocol

The Pi and Pico send each other special messages over the same IBUS link, allowing the Pi to control the PICO hardware directly and set configured behaviour. The Pico can send messages to the Pi as well, to respond to configuration queries, warn the Pi of impending shutdowns, and send log messages.

Raspbian Firmware (RPi)

This is a prototype setup that needs some initial setup work to setup the HMI environment.

Yocto Firmware (RPi)

Tbd, this is a reworking of the prototype Raspbian firmware using Yocto and BitBake to get a more predictable production environment.

Hardware Design

I designed a custom-board (e39-rpi-mainboard) that incorporates a series of building blocks that I all tested separately.

My hardware prototyping setup consists of:

  1. Development Laptop
  2. Development Laptop attached to car
  3. Test bench
  4. Development Laptop attached to test bench
  5. Test “sled”
  6. Test “sled” attached to my car
  7. e39-rpi-mainboard boards attached to the test bench
  8. e39-rpi-mainboard board attached to my car (production environment)

The software protoyping setup works by writing code on a PopOS laptop, which has a similar BlueZ/DBUS environment, allowing rapid local development. The

Overview

Development Laptop (& attached to car)

This is where I started the project in September 2020.

Test bench

This is where I started building the hardware for the project. It consists of an IKE instrument cluster, steering wheel buttons, BMBT screen, and wiring via terminal blocks for easy prototyping. I built this so that I didn’t have to sit in the car for extended periods of time writing code.

Test sled

I started building the sled after I realized I needed to miniaturize the design. I needed a way for the RPi power to be turned off and on with the car, and I wanted to reduce the dependency on the European TV Tuner Module.

ToC

«GlobalTOC()»