DIY - SuBerPL/v-link GitHub Wiki

The V-Link app is entirely open-source under the GPL-3.0 license and can be customized, shared, and non-commercially distributed. All you need is a Raspberry Pi. However, you cannot simply connect 12V, CAN, and all the other modules to the Raspberry Pi without using an "interface circuit." This is where the HAT comes into play. It contains all the necessary circuitry to make this system almost plug-and-play.

This project aims to be as approachable as possible, so in this section, you will find the information needed to build the circuit from scratch. Be advised, though, it's not the easiest task and requires tools for building and potentially debugging it. This guide will not teach you how to solder or wire components but will provide a general overview of the setup to get it working with the app. You can avoid all the hassle by using the HAT, but if you're feeling adventurous, keep reading!

Disclaimer:

If you decide to go this route, please don't ask for troubleshooting in the Discord channels. Only proceed if you know what you're doing. The setup is tedious and involves a certain amount of tinkering, which is exactly why the HAT was created.

Pinout and Software

If you want to use the V-Link App it is crucial to use the pinout provided below to connect your circuit. You will also need to make sure that all interfaces are activated and that the correct DeviceTree Overlays are loaded. For this you just need to run the V-Link installer as it will set up everything for you.

In case you are using a Raspberry Pi 3, you will need to connect the RTI serial to GPIO 14 instead of GPIO 4.

DIY SCHEMATIC

Shopping List

Below you will find a List of items that you will need. Some are mandatory, some are optional, Depending on what you want to get out of it. The HAT includes all components that are listed.

  • 1x Raspberry Pi PSU
  • 1x 12V to 5V Step Down with USB
  • 2x MCP 2515 CAN Bus Module
  • 1x MCP 2004 LIN Bus IC
  • 1x Logic Level converter 3V3 to 5V
  • 1x Analog to Digital converter
  • 1x 5V Optocoupler

Raspberry PSU

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

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

Hours were spent on online research until a suitable solution was discovered in this blog. However, after ordering the PCB and soldering the components it turned out that the circuit was not functioning as expected. Once the ignition was off the Raspberry would immediately turn back on again. You can now find a modified and working schematic in the main repository. The PCB and components need to be sourced and assembled by yourself. As stated in the original article, it is advisable to put a heatsink on the big transistor.

CAN Implementation

CAN communication with the Raspberry Pi is pretty straightforward. The only thing you will need is an MCP2515 module and to adjust some settings. To connect your Raspberry Pi with the module, you can follow any online resource. At the end of this page, you will find a pinout of the V-Link HAT.

LIN Implementation

V-Link currently uses the LIN network of P1 Volvos to recognize the steering wheel buttons for controlling functions in the app. LIN operates with 12V and 5V for signals, so you will need to use a Logic Level converter to step the TX signal of the IC down to 3.3V. Follow the datasheet of the MCP2004 to wire it up, and connect the downshifted TX signal from the IC to the designated GPIO pin.

ADC Implementation

If you want to use third-party sensors, you can connect an Analog-to-Digital Converter (ADC) to the Raspberry Pi. In the case of V-Link, we are using the I2C interface on GPIO 2 and GPIO 3. To use a thermistor, you also need to connect a resistor in parallel. Refer to your sensor datasheet for more information.

RTI Implementation

Opening and closing the RTI is quite simple. You need to connect the serial line from the RTI through the optocoupler and the logic level shifter to GPIO 4 of the Raspberry Pi. Using an optocoupler is crucial to isolate the two circuits and ensure signal integrity. As mentioned above, when using a Raspberry Pi 3 you need to connect the serial line to GPIO 14 instead due to the different hardware.