Project

General

Profile

Analog Output » History » Version 1

Adam Klama, 06/21/2026 03:26 PM

1 1 Adam Klama
# Analog Output
2
3
## Overview
4
An **Analog Output** drives a real analog **voltage** on a hardware pin
5
(digital-to-analog conversion). Use it to feed the analog input of another ECU,
6
or to drive an analog gauge or meter, by turning a control value into a voltage.
7
8
You set an **output voltage range/reference** and a scaling that maps your input
9
(engineering) value onto a voltage within that range.
10
11
## Prerequisites & hardware
12
- Wire the output pin to the analog input it should drive, with a **common
13
  ground** between the controller and the receiving device.
14
- Pick a **range** the receiving input can accept (e.g. 0–5 V or 0–12 V); do not
15
  exceed its input rating.
16
- Have a source value (a map, driver or input) ready to command the output.
17
18
## Add it in the app
19
1. Add a new output and choose **Analog Output** as the type.
20
2. Select the **pin** and give it an **alias** (e.g. `Boost Gauge Drive`).
21
3. Choose the output **range**, then set the **in** and **out** scaling points.
22
4. Drive the output from a map/driver that supplies the input value.
23
24
## Settings reference
25
> Schema: `config/DacConfiguration.proto`.
26
27
| Setting | Meaning | Unit | Range / values | Notes |
28
|---|---|---|---|---|
29
| **Range** | Output voltage scale / reference | — | `5V`, `Internal 5 V`, `12V`, `Raw` | Sets the full-scale voltage the **Out** values refer to. `Internal 5 V` uses the controller's own 5 V reference; `Raw` outputs the unscaled DAC value. |
30
| **Enable interpolation** | Scale the input through the in/out points | — | on / off | On = interpolate input to output voltage; off = pass the value straight through. |
31
| **In min / In max** | Input (engineering) range to scale **from** | source unit | sint32 | The source low/high points. |
32
| **Out min / Out max** | Output voltage range to scale **to** | mV | sint32 | The voltage produced at In min / In max, within the selected range. |
33
34
**Scaling:** the input value is mapped from `In min…In max` to `Out min…Out max`
35
using [two-point interpolation](Scaling_and_Maps#two-point-interpolation).
36
37
## Common settings
38
Analog Output also uses the shared settings — alias and pin. See [Common IO Settings](Common_IO_Settings).
39
40
## Example — 0–5 V boost gauge drive
41
1. Type **Analog Output**, alias `Boost Gauge Drive`, on the gauge's pin.
42
2. **Range = 5V**, **Enable interpolation on**.
43
3. **In min/max** `0`/`300` (kPa) → **Out min/max** `0`/`5000` (mV).
44
4. Command it from the boost-pressure channel; 0 kPa gives 0 V, 300 kPa gives 5 V.
45
46
## Troubleshooting
47
- **Output voltage too high/low for the device:** pick a smaller **Range** or lower
48
  the **Out max** value.
49
- **Voltage doesn't change with the command:** check **Enable interpolation** is on
50
  and that the **In min/In max** span matches the source's real range.
51
- **Reads as a fixed offset on the receiver:** confirm a shared **ground** and that
52
  the receiver's range matches the selected **Range**.
53
54
## Related
55
- [PWM Output](PWM_Output) — for a switched/PWM signal instead of a voltage.
56
- [Tacho Output](Tacho_Output) — generated tacho/frequency signal.