ADC - SuBerPL/v-link GitHub Wiki
Besides using CAN or LIN, V-Link is capable of showing analog data from 3rd party sensors.
Introduction
Using an ADC interface with V-Link is straightforward, especially when you have the V-Link HAT. If you don’t have the HAT, you will need to connect an analog-to-digital converter to the I2C bus on GPIO 2 and 3. V-Link can support up to 4 different sensors. The HAT has a dedicated jumper that lets you convert one of the inputs to an input for an NTC thermistor.
JSON File Configuration
You can configure the ADC integration in V-Link using the file /v-link/backend/adc.json
.
Sensors
Here, you can define the parameters you want the app to retrieve/intercept from the ADC interface. You can add up to 4 sensors using the template given below.
"sensors": {
"pressure": {
"app_id": "oilp",
"label": "Oil Pressure",
"unit": "kPa",
"min_value": 0,
"max_value": 1000,
"limit_start": 3000,
"ntc": false,
"channel": "P1",
"characteristic": {
"0.5": 0,
"4.5": 1000
}
},
}
min_value / max_value
- Define the minimum / maximum value to be displayed in the app.
limit_start
- Define the start of the redline.
ntc
- If you are connecting an NTC set this to true. NTC is supported on channel P0 / AN1.
characteristics
- Provided through the sensor datasheet. In this example, 0.5V refers to 0 psi and 4.5V refers to 1000 psi.