LRYMND / volvo-rtvi

Media and CAN interface for the original Volvo P1 RTI.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Volvo RTVI System

Road Traffic and Vehicle Infotainment

TITLE IMAGE

This is a react web-app to run natively on a RaspberryPi. It's providing a fully functioning Carplay/AndroidAuto integration as well as an interface for canbus and linbus. The app is intended for Volvo P-chassis with a T5 engine (C30, V50, V70 II). However, the canbus codes can be easily adjusted with an exposed settings file in order to change the data.

PAGES IMAGE

You can find a demo gif at the end of the readme.


The project is based on the following repositories:

Got any tips for improvement or need help?

Swedespeed Forum

RTVI Discord Server

> System Requirements:

Raspbian 11 Bullseye
Chromium 116
Python 3.9.2

> How to use:

Production:

wget "https://github.com/LRYMND/volvo-rtvi/releases/download/v2.0.0/Installer.sh"
chmod +x Installer.sh
sh Installer.sh

cd /home/$USER/volvo-rtvi
python3 Volvo-RTVI.py

Development:

git clone https://github.com/lrymnd/volvo-rtvi.git
cd volvo-rtvi
pip install -r requirements.txt
cd frontend
npm i & npm run build

cd /home/$USER/volvo-rtvi/frontend
npm run vite

cd /home/$USER/volvo-rtvi
python3 Volvo-RTVI.py dev
Node v18.12.1
NPM 8.19.2

Content

Table of Contents
  1. | BOM
  2. | Display Mod
  3. | Raspberry PSU
  4. | CAN Implementation
  5. | Wiring
  6. | Set Up
  7. | Audio
  8. | Extended Functionality
  9. | Roadmap
  10. | Disclaimer

01 | BOM

Down below is a list of the required hardware. The display is optional but the one proposed has a much better resolution and also supports touch input with an additional panel. If you want to use the original display, you can find a way to do so in the repositories from laurynas, however, its highly recommended to go the extra mile.

Also:

  • Raspberry PSU
  • OEM P1 RTI Display Unit
  • Raspberry Pi

> Note:

The app runs on a RPi3 as well as on a RPi4 with OS Bullseye, both on 32 and 64-bit.

02 | Display Mod

This guide involves adding an aftermarket touchscreen to the 6.5" LCD to enhance the usability. This is optional but it's highly recommended! To swap the display, you will have to disassemble your original RTI unit and take the original display components out. Afterwards you will need to mount the touchscreen to your LCD panel and mount the new display/touchscreen unit into the RTI frame. The buck converter as well as the display and touch screen drivers are mounted to the backside of the LCD panel because space is quite limited.

SCREENMOD IMAGE


03 | Raspberry PSU

The power supply should fulfill some critical demands and available solutions are quite bulky.

  • Raspi boots when igniton is turned ON
  • Raspi gracefully shuts off when ignition is turned off
  • Little to no power is consumed in the off state so the battery is not drained

In the schematics folder you will find a fully working PSU that fulfills all of these criteria. It will also host the MCP2004 chip in order to connect your Raspberry to the LIN-bus. Along with it comes a KiCAD project file as well as the PSU Gerber files so you can build or order your own PSU from one of the many PCB manufacturers. It is advisable to put a heatsink on the big transistor.

The original source can be found here. Also you can check out this article for some more information.

04 | CAN Implementation

CAN communication with the Raspberry Pi is pretty straightforward. The only thing you will need for this is a MCP2515 module and adjust some settings. To connect your Raspi with the module you can follow this.

> Note:

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


05 | Wiring

In the installation schematic you can see how you connect everything. Keep the cables longer in the beginning and then shorten everything to the appropriate length once you install the package in your car.

PACKAGE2 IMAGE PACKAGE IMAGE

The easiest way is to mount the wires to the pins of the CEM connectors. This way you are not destroying or splicing any harnesses, the pins can be found easily in the documentation and you can rebuild everything back to factory if you decide to undo the mod for whatever reason. The idea is to have a small additional wire harness to run your entire setup. Keep in mind 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 Electronic Wiring Diagrams)

> Note:

Make sure that you stress-relief all wiring connections and secure them properly with zip ties.


WIRING IMAGE

06 | Set Up

1.) To automatically hide the mouse curser you will need to install unclutter

sudo apt-get install unclutter

2.) Add these lines to your "/boot/config.txt"

# Shutdown and remove power from PSU
dtoverlay=gpio-shutdown,active_low=0,gpio_pull=up
dtoverlay=gpio-poweroff

# Disable rainbow image at boot
disable_splash=1

# Hide mouse-cursor after 2 seconds
@unclutter -idle 2

3.) 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 simply right-click it to activate this setting.


07 | Audio

There are a couple of ways to use the raspberry as an audio source for your car speakers now. I propose a small module from Lithuania with which you can mod your radio to add an aux port. There is also a Bluetooth version available but since the phone is already wirelessly connected to the Carlinkit adapter dongle, an aux-cable seems pretty clean and less prone to failure.

> Note:

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


08 | Extended Functionality:

> Steering Wheel Controls

In order to implement the steering wheel controls, you need to connect the Raspberry to the LIN bus of your car. The app will convert the signals from the sw buttons to keyboard/mouse HID events. Also you will be able to control opening/closing of the RTI screen by sending serial events to the RTI screen module.

The LIN Bus wire must be connected to pin 6 of the LIN bus transceiver labeled "Lbus".

MCP2004_PINOUT_IMAGE

The easiest place to find the LIN Bus is the "ICM Connector A" behind the waterfall. Either connect a DuPont wire to the associated pin or disassemble the ICM and solder a small wire to it.

LIN Connector LIN Connection
ICM_CONNECTOR_IMAGE ICM_CONNECTION_IMAGE

Connect RX, TX and CS from the MCP2004 to LIN_RX_PIN, LIN_TX_PIN and CS_PIN respectively. After testing, it turned out that it was not necessary to connect the Fault pin to the Arduino. In Laurynas' volvo_linbus repo, this fault pin is connected in the scheme but there is a typo in the code, so it's not used.

> RTI folding mechanism

Connect RTI_TX_PIN to pin 4 of the RTI unit. Again, either use a DuPont wire or solder directly to the RTI PCB/connector. Don't forget to also connect pin 7 (GND) to the Raspi or another common grounding point.

RTI_CONNECTOR_IMAGE

When ignition is turned on, the RTI screen automatically folds up and you can use the joystick on the back of the steering wheel to navigate through CarPlay. When clicking on the 'Enter' button on the back of the steering wheel, the Arduino sends an ASCII 'space' event (spacebar) to navigate the app. (CarPlay requires this instead of a left click or a return/enter)

> Using the SW Module

Control folding mechanism:

Button Function
'back' Hold down to close screen
'enter' Click to open screen

Control interface:

Button Normal Mode Mouse Mode
'Enter' Enter Left Click
'Joystick' Navigate Control mouse

Holding down 'prev' button for 2 seconds toggles between normal and mouse mode. The button mappings, timeouts etc can be adjusted in the settings file.

> Adding Peripherals

USB IMAGE

To make life a bit easier, you can connect an USB extension cable to the Raspi and mount it to the removable tray behind the waterfall console. This way you can directly connect peripherals to it.


09 | Roadmap

  • 3D-printed display mount
  • Reimplement LIN interface
  • Integrate ADC functionality
  • Integrate DTC functionality
  • Sniff canbus messages
  • Integrate MOST-bus
  • Improve hardware and installation

10 | Disclaimer

I am distancing myself from any damage that you might do to your car in case you want to follow this guide. The setup described above is the way we fitted the package to our cars. Eventually you will need to find other places to mount your components and different paths to route your cables, it's DIY after all!

DEMOGIF (Outdated - Version 1.2.1)

Got any tips for improvement or need help?
Swedespeed Forum

RTVI Discord Server


Want to support us?

Buy Me A Coffee Buy Me A Coffee
(Louis) (Tigo)

About

Media and CAN interface for the original Volvo P1 RTI.


Languages

Language:TypeScript 67.8%Language:Python 16.9%Language:SCSS 11.3%Language:Shell 2.0%Language:HTML 1.0%Language:JavaScript 0.6%Language:CSS 0.5%