Skip to content

Media and CAN interface for the original Volvo P1 RTI.

Notifications You must be signed in to change notification settings

zvoniimiir/volvo-rtvi

 
 

Repository files navigation

Volvo RTVI System

Road Traffic and Vehicle Information

TITLE IMAGE

Infotainment system based on a Raspberry Pi for the Volvo P1 platform. Combines Apple Carplay/Android Auto with a dashboard for CAN data. This project is based on the following Git-Repositories and internet articles:

  • evy0311 - Volvo-CAN-Gauge
  • rhysmorgan134 - react-carplay
  • laurynas - volvo-crankshaft
  • LuukEsselbrugge - Volve

All of the above sources have been altered to my needs and are bundled with a custom app in this repository.

Content

Table of Contents
  1. | Hardware
  2. | Display Mod
  3. | Raspberry PSU
  4. | CAN Implementation
  5. | RTVI App
  6. | Wiring
  7. | Set Up
  8. | ToDo
  9. | Final Words

1 | Hardware

In order to get this build running you will need the following hardware. Tools and materials are not included. The display components are optional but the one I`m proposing has a much better resolution than the original one. If you want to use the original display you can find a way to do so in the repositories from laurynas.

  • Raspberry PSU as described in this Readme
  • OEM P1 RTI Display Unit
  • Raspberry Pi

I advise to go for a Raspi 4 because the performance will be better but a Raspi 3 should work as well. Not tested though!

2 | Display Mod

To swap the display, you will have to disassemble your original RTI unit and take all the display components out. Afterwards you glue the new display in place. I also mounted the buck converter and the display driver on the backside of the LCD panel because there is some space, and space is limited with this build. More information can also be found in laurynas' repo.

SCREENMOD IMAGE

3 | Raspberry PSU

Available solutions are way too bulky and I wanted a clean setup with some critical demands:

  • Raspi boots when igniton is ON
  • Raspi gracefully shuts off when ignition turns off (via shutdown -h command)
  • Little to no power is consumed in the off state

I went through many different forums and articles until I found a neat solution which is described in the article mentioned in the sources. After ordering the PCB and soldering the components I noticed that the circuit was not functioning as expected. Once the ignition was off the Raspberry would immediatley turn back on again.

In short, here are the reasons why:

  • Capacitance of the buck converter itself
  • Floating states on Q2/Q3

You can find an updated and working schematic in the schematics folder of this repository. As stated in the original article, it is adviseable to put a heatsink on the big transistor. If you want to know more about the issue and the solution you can follow this link.

4 | CAN Implementation

Since the Raspberry has the ability to communicate with a CAN network it would be a shame not to use this. The only thing you will need for this is a MCP2515 module and some scripting. In order to connect your Raspi with the module you can follow this link.

Make sure that you also set up the automatic can channel activation on boot!

5 | RTVI App

As mentioned above, I used node.js, electron and react to set up a custom application in the fashion of Rhys Morgan's "react-carplay", though the only component I reused was his node-carplay npm package. Kudos to him at this point for figuring all this out and helping me to troubleshoot some things along the way.

CARPLAY IMAGE

I would say that the app is in a usable beta-stage and I engourage anyone to help me improve it. In this repository you can find the full source code and altering it to your needs is quiet straight forward. For example to change the displayed CAN data, you will only have to make a few changes to python.py and Dashboard.js. In order to use Carplay/Android Auto you will need to have a Carlinkit adpater.

NOTE: Your Raspi needs a working internet connection when you launch the app for the first time because it needs to download some resources for the dongle. You can find more information in Rhys' repositories or in the source code.

6 | Wiring

In the installation schematic you can see how you connect everything with each other. I advise to keep the cables a bit longer and then shorten everything to the appropriate lenght once you install the package in your car.

PACKAGE2 IMAGE PACKAGE IMAGE

I decided to wire the connections to the car directly to the pins of the CEM connectors. This way I'm not destroying any harnesses, it's easy cause the pins are known and you can rebuild everything back to factory if you decide to undo the mod for whatever reason. Soldering in the passengers foot compartment is not the most comfortable thing but it's managable and as a result you have a very clean integration of your electronics with a little additional wire harness to run your setup. One thing to keep in mind though is to choose wires that are not too thick so you can put the pin back into the connector. This is especially an issue with the CAN wiring.

You need to make the following connections.

Connection Connector Pin
CAN-H B 11
CAN-L B 12
GND A 28
IGN A 17
12V E 21

EWD SCHEMATIC (Borrowed from the original Volvo Wiring Diagrams)

NOTE: Make sure that you stress-relief all your wiring connections with zipties, so the cable doesnt wiggle around and make more damage in case a connection brakes.

WIRING IMAGE

7 | Set Up

In this last step I will show you how I set everything up.

1.) Add these lines to your "/boot/config.txt" so the Raspberry shuts down gracefully and removes power from the PSU:

dtoverlay=gpio-shutdown,active_low=0,gpio_pull=up
dtoverlay=gpio-poweroff

2.) In order to not show anything on the screen until the Raspi is fully booted, add this to your “/boot/config.txt”:

# Disable rainbow image at boot
disable_splash=1

3.) Afterwards open "/boot/cmdline.txt" and add this at the end of the line:

logo.nologo vt.global_cursor_default=0

4.) To automatically hide the taskbar you can simply right-click it to activate this setting.

5.) Create a "startService.sh" file and add this line:

sudo /path/to/your/AppImage.AppImage --no-sandbox

6.) Add this line to your /etc/xdg/lxsession/LXDE-pi/autostart so the app runs directly after booting:

@bash '/path/to/your/startService.sh'

7.) Done. The Raspberry should be booting fairly clean now and the app should open right after the boot process, ready to connect to your phone.

NOTE: Since I now have a working media interface in my car, I also wanted to use it as my audio source. For this I'm going to use the aux port of the Raspi and mod my radio with this little module from Lithuania: V50 Aux-Input

He also got a bluetooth version available but since we're already wirelessly connected with our phone to Carplay, I thought running an aux-cable from the Raspi to the radio would be a cleaner solution and less prone to failure.

NOTE: This is no advertisement, just a clean and simple solution IMO.

8 | ToDo

  • Implement RTI folding mechanism
  • Implement OEM steering controls
  • Rework settings page

So far the software has to be controlled via mouse/keyboard. There is a touch screen module which is compatible with the screen but the end goal would be to integrate the OEM control elements that are mounted to the steering wheel. It is definitely possible to read these LIN commands with an arduino and forward them to the app. Infos on that can be found in LuukEsselbrugge's repositories. The carplay interface is already accepting keystrokes as input. Since I'm lacking the hardware, this was something I couldn't implement as of now.

For that reason I'm carrying a small bluetooth keyboard with an integrated touchpad in my glovebox and since you won't be switching between the carplay/dashboard page too much anyways this will be a decent solution for most. I also added a USB extension cable to the Raspi which ends up in the tray behind my waterfall so I can directly connect peripherals. This also works as a charging port for a phone!

USB IMAGE

9 | Final Words

I'm not a software developer or an electrician or an automotive technician and doing stuff like this is purely a hobby for me. I'm distancing myself from any damage that you might do to your car in case you would like to give this mod a try. The setup I described above is the way I fitted things to my V50. Eventually you will need to find other places to mount your components and different paths to route your cables than I did, after all it's a DIY mod.

That said, implementing it to your car should be quiet straight forward though and so far it's been working well for me. I'm happy if anybody who knows more than me can chime in and report their findings so the app can be further improved.

Last but not least, thanks again to the people who shared their code and insights and Yosh for helping me to stitch together this app.

DEMOGIF

About

Media and CAN interface for the original Volvo P1 RTI.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 72.4%
  • SCSS 10.9%
  • HTML 7.1%
  • Python 5.3%
  • CSS 3.1%
  • Shell 1.2%