Files
NeoECU-Hardware/Architecture/IO_MODULES/ANALOG_INPUTS.md
T
h3cx 0de94168f7 Initial function IO and power architecture
This commit contains the inital functional IO (engine controls and
general digital and analog IO excluding digital IO) and the initial
power architecture for the project
2026-08-29 21:18:45 +02:00

3.9 KiB

Analogue and Temperature Inputs

Scope

This is the V1 front-end architecture for nine general 0--5 V channels and four NTC temperature channels. Exact protection parts, ADC timing, and sensor curves remain schematic-release validation items. All harness analogue signals use SENSOR_GND and are kept separate from ignition/injector return currents.

General 0--5 V channels

connector -- transient clamp -- R_TOP --+-- ADC-local C_HOLD -- ADC
                                        |
                                      R_BOTTOM
                                        |
                                    SENSOR_GND

R_TOP is the divider's upper resistor; do not add a separate series R_PROT in the normal passive channel. It is the element that limits current from the connector clamp into the ADC-side network, so select an appropriate pulse/voltage rating for the expected residual transient. R_TOP, the clamp, and R_BOTTOM are a system: select standoff, hot leakage, dynamic clamp voltage, pulse energy, negative-excursion path, and local return from the actual harness-fault specification. A nominal TVS voltage alone is not a sufficient selection. Microamp leakage can be a significant offset with a high-value divider, and neither clamp may feed an unpowered analogue rail or MCU protection diode.

For 0.5--4.5 V and 0--5 V active sensors, use a 0.55--0.60 divider with 1% parts or a matched network. The existing 0.55 target maps 5.25 V to 2.89 V. Choose impedance low enough that leakage and PCB contamination are negligible, but high enough not to load the sensor.

Place C_HOLD at the ADC after a small isolation resistor. It is both the low-pass/anti-alias capacitor and local sample-and-hold charge reservoir. Validate its value and ADC sample time together against worst-case divider Thevenin resistance, ADC sampling capacitance, channel-to-channel steps, and sample rate. A large capacitor does not by itself make arbitrary source impedance acceptable.

For ratiometric 5 V sensors, provide a corresponding divider/filter measurement of +5V_SENS and sample it close to the sensor channel.

NTC temperature channels

+5V_SENS -- R_PULLUP --+-- NTC -- SENSOR_GND
                       |
               attenuator / local filter --> ADC

The attenuator and ADC protection are required even if a normal temperature range appears below 3.3 V: an open thermistor raises the node to +5V_SENS. Calculate resistance from the thermistor and measured +5V_SENS ADC ratio, then use the selected sensor's R/T calibration rather than a nominal beta equation.

Fit one defined pull-up per channel, using 0.1% or better low-TCR resistance; provide alternate DNP footprints only where the sensor family is expected.

Sensor family / example Initial R_PULLUP Basis
Bosch Motorsport 2.5 kOhm at 20 C NTC 3.01 kOhm Bosch states typical ECU pull-ups of 1 or 3 kOhm; 3 kOhm retains useful engine-temperature resolution with less self-heating than 1 kOhm.
10 kOhm at 25 C, beta about 3435--3976 K 10.0 kOhm Centres resolution around ordinary ambient/medium temperatures.
30 kOhm at 25 C 30.1 kOhm Only for a confirmed curve; reduces divider current and self-heating.

For Bosch's 2.5 kOhm curve, a 3.01 kOhm pull-up produces approximately 4.69 V at -40 C, 2.27 V at 20 C, and 0.29 V at 100 C. A 0.60 attenuator produces about 2.81 V, 1.36 V, and 0.18 V at the ADC; the open fault maps to 3.0 V. Make the attenuator high enough that it adds under 1% loading error at the coldest required NTC resistance, or include its loading in calibration. Its high Thevenin resistance is acceptable only with designed C_HOLD and settling/sample time.

Validate NTC self-heating in the actual mounting medium (worst case is normally hot), plus open/short detection, supply tolerance, pull-up TCR, cable resistance, clamp leakage, PCB contamination, and operation alongside ignition switching.