PID formulas¶
All live values obd-diag knows, with the key for obd-diag live --pids, unit,
conversion according to SAE J1979 (service $01) and value range. The table is generated
from PIDS in src/obd_diag/protocol/pids.py when the documentation is built.
tests/verification/test_pid_differential.py compares every formula for every possible
byte value with python-OBD. Two deviations are intended and justified against J1979:
32(evap system vapor pressure): 16-bit two’s complement over A and B; python-OBD evaluates A and B separately.44(commanded air-fuel equivalence ratio): factor exactly 2/65536 instead of the rounded 0.0000305.
The PIDs 68 (intake air temperature per sensor), 6C (throttle actuator),
6D (fuel rail pressure control), 70 (boost pressure) and 85 (AdBlue)
are reported as supported by the Mercedes A 180 d, but there are no responses from the
car yet: not yet verified on the car. Their structure follows J1979 according to
two independent descriptions that agree (OBDb signal list, DashLogic PID list). Each of
these PIDs starts with a status byte A that says which values the vehicle provides; if
the bit is missing, the value stays empty. A value only appears anyway if the vehicle
reports the PID.
Not included are bit fields without a measured value (01, 03, 12, 13, 1C,
1D, 1E, 41, 51, 65, 88, 92, the control status in 70) and PIDs with a
status byte whose structure is not unambiguous in free sources or that the test car
does not report (among them 69 EGR, 7A–7C particulate filter), as well as
53/54. They will only be added with the standard (J1979-DA) or real responses.
140 values from 87 PIDs, sorted by PID. A, B, C … are the data bytes after 41 <PID>; the range is the full value range of the encoding, not the physically plausible one.
PID |
Key |
Value |
Unit |
Formula |
Range |
|---|---|---|---|---|---|
|
|
Calculated engine load |
% |
|
0 to 100 |
|
|
Coolant temperature |
°C |
|
-40 to 215 |
|
|
Short-term fuel trim bank 1 |
% |
|
-100 to 99.2188 |
|
|
Long-term fuel trim bank 1 |
% |
|
-100 to 99.2188 |
|
|
Short-term fuel trim bank 2 |
% |
|
-100 to 99.2188 |
|
|
Long-term fuel trim bank 2 |
% |
|
-100 to 99.2188 |
|
|
Fuel pressure (gauge) |
kPa |
|
0 to 765 |
|
|
Intake manifold pressure (absolute) |
kPa |
|
0 to 255 |
|
|
Engine speed |
rpm |
|
0 to 16383.8 |
|
|
Speed |
km/h |
|
0 to 255 |
|
|
Timing advance (before TDC, cylinder 1) |
° |
|
-64 to 63.5 |
|
|
Intake air temperature |
°C |
|
-40 to 215 |
|
|
Air flow rate (MAF sensor) |
g/s |
|
0 to 655.35 |
|
|
Throttle position |
% |
|
0 to 100 |
|
|
Oxygen sensor 1 voltage |
V |
|
0 to 1.275 |
|
|
Oxygen sensor 1 trim |
% |
|
-100 to 98.4375 |
|
|
Oxygen sensor 2 voltage |
V |
|
0 to 1.275 |
|
|
Oxygen sensor 2 trim |
% |
|
-100 to 98.4375 |
|
|
Oxygen sensor 3 voltage |
V |
|
0 to 1.275 |
|
|
Oxygen sensor 3 trim |
% |
|
-100 to 98.4375 |
|
|
Oxygen sensor 4 voltage |
V |
|
0 to 1.275 |
|
|
Oxygen sensor 4 trim |
% |
|
-100 to 98.4375 |
|
|
Oxygen sensor 5 voltage |
V |
|
0 to 1.275 |
|
|
Oxygen sensor 5 trim |
% |
|
-100 to 98.4375 |
|
|
Oxygen sensor 6 voltage |
V |
|
0 to 1.275 |
|
|
Oxygen sensor 6 trim |
% |
|
-100 to 98.4375 |
|
|
Oxygen sensor 7 voltage |
V |
|
0 to 1.275 |
|
|
Oxygen sensor 7 trim |
% |
|
-100 to 98.4375 |
|
|
Oxygen sensor 8 voltage |
V |
|
0 to 1.275 |
|
|
Oxygen sensor 8 trim |
% |
|
-100 to 98.4375 |
|
|
Run time since engine start |
s |
|
0 to 65535 |
|
|
Distance with MIL on |
km |
|
0 to 65535 |
|
|
Fuel rail pressure (relative to manifold) |
kPa |
|
0 to 5177.27 |
|
|
Fuel rail pressure (gauge) |
kPa |
|
0 to 655350 |
|
|
Wide-band sensor 1 |
Lambda |
|
0 to 1.99997 |
|
|
Wide-band sensor 1 voltage |
V |
|
0 to 7.99988 |
|
|
Wide-band sensor 2 |
Lambda |
|
0 to 1.99997 |
|
|
Wide-band sensor 2 voltage |
V |
|
0 to 7.99988 |
|
|
Wide-band sensor 3 |
Lambda |
|
0 to 1.99997 |
|
|
Wide-band sensor 3 voltage |
V |
|
0 to 7.99988 |
|
|
Wide-band sensor 4 |
Lambda |
|
0 to 1.99997 |
|
|
Wide-band sensor 4 voltage |
V |
|
0 to 7.99988 |
|
|
Wide-band sensor 5 |
Lambda |
|
0 to 1.99997 |
|
|
Wide-band sensor 5 voltage |
V |
|
0 to 7.99988 |
|
|
Wide-band sensor 6 |
Lambda |
|
0 to 1.99997 |
|
|
Wide-band sensor 6 voltage |
V |
|
0 to 7.99988 |
|
|
Wide-band sensor 7 |
Lambda |
|
0 to 1.99997 |
|
|
Wide-band sensor 7 voltage |
V |
|
0 to 7.99988 |
|
|
Wide-band sensor 8 |
Lambda |
|
0 to 1.99997 |
|
|
Wide-band sensor 8 voltage |
V |
|
0 to 7.99988 |
|
|
Commanded EGR |
% |
|
0 to 100 |
|
|
EGR error |
% |
|
-100 to 99.2188 |
|
|
Commanded evaporative purge |
% |
|
0 to 100 |
|
|
Fuel tank level |
% |
|
0 to 100 |
|
|
Warm-ups since codes cleared |
|
0 to 255 |
|
|
|
Distance since codes cleared |
km |
|
0 to 65535 |
|
|
Evap system vapor pressure |
Pa |
|
-8192 to 8191.75 |
|
|
Barometric pressure (absolute) |
kPa |
|
0 to 255 |
|
|
Wide-band sensor 1 (current) |
Lambda |
|
0 to 1.99997 |
|
|
Wide-band sensor 1 pump current |
mA |
|
-128 to 127.996 |
|
|
Wide-band sensor 2 (current) |
Lambda |
|
0 to 1.99997 |
|
|
Wide-band sensor 2 pump current |
mA |
|
-128 to 127.996 |
|
|
Wide-band sensor 3 (current) |
Lambda |
|
0 to 1.99997 |
|
|
Wide-band sensor 3 pump current |
mA |
|
-128 to 127.996 |
|
|
Wide-band sensor 4 (current) |
Lambda |
|
0 to 1.99997 |
|
|
Wide-band sensor 4 pump current |
mA |
|
-128 to 127.996 |
|
|
Wide-band sensor 5 (current) |
Lambda |
|
0 to 1.99997 |
|
|
Wide-band sensor 5 pump current |
mA |
|
-128 to 127.996 |
|
|
Wide-band sensor 6 (current) |
Lambda |
|
0 to 1.99997 |
|
|
Wide-band sensor 6 pump current |
mA |
|
-128 to 127.996 |
|
|
Wide-band sensor 7 (current) |
Lambda |
|
0 to 1.99997 |
|
|
Wide-band sensor 7 pump current |
mA |
|
-128 to 127.996 |
|
|
Wide-band sensor 8 (current) |
Lambda |
|
0 to 1.99997 |
|
|
Wide-band sensor 8 pump current |
mA |
|
-128 to 127.996 |
|
|
Catalyst temperature bank 1, sensor 1 |
°C |
|
-40 to 6513.5 |
|
|
Catalyst temperature bank 2, sensor 1 |
°C |
|
-40 to 6513.5 |
|
|
Catalyst temperature bank 1, sensor 2 |
°C |
|
-40 to 6513.5 |
|
|
Catalyst temperature bank 2, sensor 2 |
°C |
|
-40 to 6513.5 |
|
|
Control module voltage |
V |
|
0 to 65.535 |
|
|
Absolute load value |
% |
|
0 to 25700 |
|
|
Commanded air-fuel equivalence ratio |
Lambda |
|
0 to 1.99997 |
|
|
Relative throttle position |
% |
|
0 to 100 |
|
|
Ambient air temperature |
°C |
|
-40 to 215 |
|
|
Absolute throttle position B |
% |
|
0 to 100 |
|
|
Accelerator pedal position D |
% |
|
0 to 100 |
|
|
Accelerator pedal position E |
% |
|
0 to 100 |
|
|
Commanded throttle actuator |
% |
|
0 to 100 |
|
|
Time run with MIL on |
min |
|
0 to 65535 |
|
|
Time since codes cleared |
min |
|
0 to 65535 |
|
|
Ethanol fuel percentage |
% |
|
0 to 100 |
|
|
Short-term secondary O2 trim bank 1 |
% |
|
-100 to 99.2188 |
|
|
Short-term secondary O2 trim bank 3 |
% |
|
-100 to 99.2188 |
|
|
Long-term secondary O2 trim bank 1 |
% |
|
-100 to 99.2188 |
|
|
Long-term secondary O2 trim bank 3 |
% |
|
-100 to 99.2188 |
|
|
Short-term secondary O2 trim bank 2 |
% |
|
-100 to 99.2188 |
|
|
Short-term secondary O2 trim bank 4 |
% |
|
-100 to 99.2188 |
|
|
Long-term secondary O2 trim bank 2 |
% |
|
-100 to 99.2188 |
|
|
Long-term secondary O2 trim bank 4 |
% |
|
-100 to 99.2188 |
|
|
Relative accelerator pedal position |
% |
|
0 to 100 |
|
|
Hybrid battery state of charge |
% |
|
0 to 100 |
|
|
Engine oil temperature |
°C |
|
-40 to 215 |
|
|
Fuel injection timing |
° |
|
-210 to 301.992 |
|
|
Engine fuel rate |
L/h |
|
0 to 3276.75 |
|
|
Driver’s demand engine torque |
% |
|
-125 to 130 |
|
|
Actual engine torque |
% |
|
-125 to 130 |
|
|
Engine reference torque |
Nm |
|
0 to 65535 |
|
|
Engine torque idle |
% |
|
-125 to 130 |
|
|
Engine torque point 1 |
% |
|
-125 to 130 |
|
|
Engine torque point 2 |
% |
|
-125 to 130 |
|
|
Engine torque point 3 |
% |
|
-125 to 130 |
|
|
Engine torque point 4 |
% |
|
-125 to 130 |
|
|
Mass air flow sensor A |
g/s |
|
0 to 2047.97 |
|
|
Mass air flow sensor B |
g/s |
|
0 to 2047.97 |
|
|
Coolant temperature sensor 1 |
°C |
|
-40 to 215 |
|
|
Coolant temperature sensor 2 |
°C |
|
-40 to 215 |
|
|
Intake air temperature bank 1, sensor 1 |
°C |
|
-40 to 215 |
|
|
Intake air temperature bank 1, sensor 2 |
°C |
|
-40 to 215 |
|
|
Intake air temperature bank 1, sensor 3 |
°C |
|
-40 to 215 |
|
|
Intake air temperature bank 2, sensor 1 |
°C |
|
-40 to 215 |
|
|
Intake air temperature bank 2, sensor 2 |
°C |
|
-40 to 215 |
|
|
Intake air temperature bank 2, sensor 3 |
°C |
|
-40 to 215 |
|
|
Commanded throttle actuator A |
% |
|
0 to 100 |
|
|
Relative throttle position A |
% |
|
0 to 100 |
|
|
Commanded throttle actuator B |
% |
|
0 to 100 |
|
|
Relative throttle position B |
% |
|
0 to 100 |
|
|
Commanded fuel rail pressure A |
kPa |
|
0 to 655350 |
|
|
Fuel rail pressure A |
kPa |
|
0 to 655350 |
|
|
Fuel rail temperature A |
°C |
|
-40 to 215 |
|
|
Commanded fuel rail pressure B |
kPa |
|
0 to 655350 |
|
|
Fuel rail pressure B |
kPa |
|
0 to 655350 |
|
|
Fuel rail temperature B |
°C |
|
-40 to 215 |
|
|
Commanded boost pressure A |
kPa |
|
0 to 2047.97 |
|
|
Boost pressure A |
kPa |
|
0 to 2047.97 |
|
|
Commanded boost pressure B |
kPa |
|
0 to 2047.97 |
|
|
Boost pressure B |
kPa |
|
0 to 2047.97 |
|
|
Reagent consumption (average) |
L/h |
|
0 to 327.675 |
|
|
Reagent demand (average) |
L/h |
|
0 to 327.675 |
|
|
Reagent tank level |
% |
|
0 to 100 |
|
|
Run time with NOx warning |
s |
|
0 to 4.29497e+09 |
|
|
Odometer |
km |
|
0 to 4.29497e+08 |