Sensors

Overview

Attached to the ECU are a number of sensors that provide information about its environment (e.g. feedback from an engine).

These sensors are connected to the ECU through the wiring loom and provide data that is used to control the engine.

Some sensors have special processing in the ECU to convert their raw data into a more useful form. For example, a temperature sensor may provide a raw voltage that is converted into a temperature reading.

Sensor Types

Subsections of Sensors

Load Sensing

Overview

The Engine Load may be measured in a variety of ways, such as using a Manifold Absolute Pressure (MAP) sensor (Boost Pressure), a Mass Air Flow (MAF) sensor, or a Throttle Position Sensor (TPS). Pedal position may also be used.

MAP or MAF may use Pedal as a backup should the primary sensor fail.

Scaling

The Load Scalar is used to convert the raw ’load’ values into more meaningful physical units.

Pedal as Load

If option iconFuel Map Pedal is On, then a correction, channel iconBoost Correction from the table iconBoost Correct table is used to correct for the change in air pressure entering the engine.

This can result in a more responsive Pedal.

Note the map iconFuel Pedal map is used instead of map iconFuel map as the base fuelling in this case.

MAF Sensor

Overview

The Mass Air Flow (MAF) sensor measures the mass of air entering the engine. This may optionally be used to calculate the amount of fuel required to maintain the desired air/fuel ratio.

The MAF sensor is typically a hot wire or hot film sensor, which heats a wire or film to a constant temperature and measures the cooling effect of the air flow. The cooling effect is proportional to the mass of air flowing past the sensor.

The voltage output of the MAF sensor is often non-linear, so the ECU may apply a calibration curve to convert the raw voltage into a more useful linearized form.

MAF Sensor Options

Option Description
option iconMAF Use MAF as the “Engine Load” measurement?
option iconMAP Set to 0 if using MAF for Engine Load.
option iconLoad source Do not set if using MAF for Engine Load.
option iconMAF source Select an input channel to use for MAF. This could be an Analogue input or another source such as CAN bus.
option iconMAF source Bigend Swaps the bytes from the 16bit MAF source. This may be required if the source is from a little-endian (Intel) 16bit CAN signal.
channel iconMAF Raw Raw MAF sensor reading as obtained from the MAF source.
option iconMAF no Speed comp If ON, the MAF sensor reading is not compensated for engine speed. Otherwise, the MAF sensor reading is multiplied by the inverse engine speed and divided down.
option iconMAF no X16 If ON, the MAF sensor reading is not multiplied by 16, following speed compensation. This option does nothing if option iconMAF no Speed comp is ON.
table iconMAF Sensor MAF Sensor Table to convert raw MAF sensor voltage into a linearized form.
option iconMAF Cal Number of internal teeth over which to average the MAF sensor readings when running. Typically this would be set to 1, 2 or 3 revolutions; the actual value to set here would depend upon the number of internal teeth per revolution which should be configured in the option iconWheel Teeth option.
option iconMAF min Minimum MAF sensor reading, below which an error condition is indicated.
option iconMAF max Maximum MAF sensor reading, above which an error condition is indicated.
channel iconMAF Linear Linearized MAF reading, scaled using MAF (Load) Scalar.
channel iconMAF Linear Scaled Linearized MAF reading, scaled using MAF Scalar.
channel iconMAF as Load Compensated MAF reading, scaled using MAF (Load) Scalar.
channel iconMAF as Load Scaled Compensated MAF reading, scaled using MAF Scalar.
channel iconError MAF Indicates an error condition with the MAF sensor.

Flowchart

flowchart TD
    MAFMIN@{ shape: diamond, label: "< MAF Min"}

    MAFMAX@{ shape: diamond, label: "> MAF Max"}
    MAFNSPD@{ shape: diamond, label: "MAF no Speed comp"}
    NOMAFMUL@{ shape: diamond, label: "MAF no X16"}

    MAFRAW["MAF Raw"]

    MAF_Source(["MAF source"])-- RUNNING? -->MAFSMP(["MAF samples"])
    MAFSMP-->MAFAVG["Average"]-->MAFRAW
    MAFCAL(["MAF Cal [teeth]"])--"Window Size"-->MAFAVG
    MAF_Source--"NOT RUNNING"-->MAFRAW

    MAFRAW-->MAFMIN
    MAFMIN-- Y -->ERROR_MAF(["Error MAF"])
    MAFMIN-- N -->MAFMAX

    MAFMAX-- Y -->ERROR_MAF(["Error MAF"])
    MAFMAX-- N -->MAFTBLW["MAF Sensor Table"]
    SPEEDN(["− Engine Speed"])
    MAFTBLW-->MAFLIN(["MAF Linear [MAF Load Units]"])
    MAFLIN-->MAFLINSCALED(["MAF Linear Scaled [MAF Units]"])
    

    MAFLIN-->MAFNSPD
    MAFNSPD-- N -->SPEEDMUL["×"]
    MAFNSPD-- Y -->MAFLOAD
    SPEEDN-->SPEEDMUL

    SPEEDMUL-->NOMAFMUL

    NOMAFMUL-- N -->MUL16["×16"]
    NOMAFMUL-- Y -->MAFLOAD
    MUL16--> Overflow -->ERROR_MAF
    MUL16-->MAFLOAD

    MAFLOAD(["MAF as Load [MAF (Load)]"])

    MAFLOAD-- "MAF AND NOT MAP AND NOT "Load Source"" -->LOAD(["Engine Load [Load]"])
    MAFLOAD-->MAFLOAD_SCALED(["MAF as Load Scaled [MAF Units]"])

MAP Sensor

Overview

MAP sensors measure the pressure of air entering an engine (Manifold Absolute Pressure). This information may be used by the ECU to calculate the amount of fuel required for combustion.

There are typically two MAP sensor inputs on the ECU, with the two sensors being used for redundancy and error checking.

The voltage output of the MAP sensor is typically linear with pressure, and the ECU can be configured to convert this voltage into a pressure reading in kPa.

The MAP sensor can optionally be used as a measure of Engine Load, in which case the ECU will convert the pressure reading into a load value. This load value is used as an axis input for many of the ECU’s calibration tables such as the map iconFuel map or the map iconIgnition map.

Calibration

Option / Channel Description
option iconMAP Use MAP as the “Engine Load” measurement?
option iconMAF Set to 0 if using MAP for Engine Load.
option iconLoad source Do not set if using MAP for Engine Load.
option iconMAP Source The source of the MAP sensor data. This is an analog input number.
option iconMAP2 Source The source of the 2nd MAP sensor data. This is an analog input number. If using a single MAP sensor, option iconMAP2 Source should be set to the same value as option iconMAP Source
option iconMAP Cal Number of internal teeth over which to average the MAP sensor readings when running. Typically this would be set to 1, 2 or 3 revolutions; the actual value to set here would depend upon the number of internal teeth per revolution which should be configured in the option iconWheel Teeth option.
option iconMAP1 samples When running this table is filled with the samples used for averaging MAP1.
option iconMAP2 samples When running this table is filled with the samples used for averaging MAP2.
option iconMAP raw Invert Inverts the MAP sensor reading, useful for some sensors that output a voltage that decreases with pressure. This same setting applies to both MAP sensor inputs.
channel iconMAP1 raw Result of averaging / inverting the MAP sensor voltage readings. This value can be monitored to verify the MAP sensor input configuration and that the analogue input is reading the MAP sensor correctly.
channel iconMAP2 raw Result of averaging / inverting the second MAP sensor voltage readings. This value can be monitored to verify the MAP sensor input configuration and that the analogue input is reading the MAP sensor correctly.
option iconMAP Min Error The minimum valid voltage for the MAP sensor.
If channel iconMAP raw reads below this value, an error will be triggered channel iconError MAP.
If channel iconMAP2 raw reads below this value, an error will be triggered channel iconError MAP2.
option iconMAP Max Error The maximum valid voltage for the MAP sensor.
If channel iconMAP raw reads above this value, an error will be triggered channel iconError MAP.
If channel iconMAP2 raw reads above this value, an error will be triggered channel iconError MAP2.
option iconMAP ref low Volts The voltage output of the MAP sensor at a low pressure reference value option iconMAP ref low Pressure.
option iconMAP ref low Pressure The physical pressure reading from the MAP sensor when the voltage reading from the analogue input reads option iconMAP ref low Volts.
option iconMAP ref high Volts The voltage output of the MAP sensor at a high pressure reference value option iconMAP ref high Pressure.
option iconMAP ref high Pressure The physical pressure reading from the MAP sensor when the voltage reading from the analogue input reads option iconMAP ref high Volts.
option iconMAP Pressure Max If non-zero, this overrides the calculated channel iconMAP for Load Max for re-scaling MAP.
channel iconMAPM The MAP sensor calibration multiplier, derived from the reference low and high pressure and voltage values.
channel iconMAPC The MAP sensor calibration constant, derived from the reference low and high pressure and voltage values.
channel iconMAP for Load Max Indicates the maximum pressure that the MAP sensor can read. This value is used to scale the MAP sensor readings to a load value.
channel iconMAP for Load Scalar Alias of channel iconMAP for Load Max
channel iconMAP1 abs The absolute value of the MAP sensor reading, in kPa.
channel iconMAP1 abs FP The absolute value of the MAP sensor reading, scaled using Fuel Pressure Scalar.
channel iconMAP2 abs The absolute value of the second MAP sensor reading, in kPa.
channel iconMAP2 abs FP The absolute value of the second MAP sensor reading, scaled using Fuel Pressure Scalar.
channel iconMAP abs Peak Maximum of channel iconMAP1 abs or channel iconMAP2 abs, in kPa.
channel iconMAP abs Peak FP Maximum of channel iconMAP1 abs or channel iconMAP2 abs, scaled using Fuel Pressure Scalar.
channel iconMAP1 as Load channel iconMAP abs is rescaled by the ECU to make more use of the full-scale range. Scaled to physical units using Load Scalar.
channel iconMAP2 as Load channel iconMAP2 abs is rescaled by the ECU to make more use of the full-scale range. Scaled to physical units using Load Scalar.
channel iconMAP1-MAP2 The difference between channel iconMAP1 as Load and channel iconMAP2 as Load.
channel iconMAP1+MAP2/2 The average of channel iconMAP1 as Load and channel iconMAP2 as Load.
channel iconMAP as Load The average of channel iconMAP1 as Load and channel iconMAP2 as Load, unless an error is detected (e.g. out of range voltage) in either input, in which case the valid input value is used where possible.
channel iconEngine Load If the ECU is configured to use MAP as the measurement of Engine Load, this channel will show the value of channel iconMAP as Load. This value is scaled to physical units using Load Scalar, as with channel iconMAP as Load.
channel iconError MAP Error flag for MAP sensor 1. Set if the voltage reading is outside the range defined by option iconMAP Min Error and option iconMAP Max Error.
channel iconError MAP2 Error flag for MAP sensor 2. Set if the voltage reading is outside the range defined by option iconMAP Min Error and option iconMAP Max Error.
channel iconBarometer The barometric pressure reading, in kPa.
channel iconBoost1 gauge The difference between channel iconMAP1 abs and channel iconBarometer, in kPa.

MAP as Load Scaling

The channel iconMAP1 abs value is rescaled to make full use of the range. This may therefore require adjustment to the Load Scalar to arrive at correct pressure values for channel iconMAP as Load and channel iconEngine Load.

Be aware that if the MAP sensor is not being used as a measure of Engine Load then the Load Scalar could be in use by something else. For example, if Load source is being used for Engine Load then the Load scalar may be responsible for rescaling the data selected by option iconLoad source so that channel iconEngine Load is in the correct units.

Flowchart

flowchart TD
    MAPMINER@{ shape: diamond, label: "< MAP Min Error"}

    MAPMAXER@{ shape: diamond, label: "> MAP Max Error"}
    MLDMAX_D@{ shape: diamond, label: "> MAP for Load max"}

    BARSCLD(["Barometer"])
    MAP1_abs(["MAP1 abs"])

    MAP_Source(["MAP Source (A2D)"])-- RUNNING? -->MAP1SMP(["MAP1  samples"])
    MAP1SMP-->MAP1AVG["Average"]-->MAP_raw_Invert
    MAPCAL(["MAP Cal [teeth]"])--"Window Size"-->MAP1AVG
    MAP_Source--"NOT RUNNING"-->MAP_raw_Invert["MAP raw Invert?"]
    MAP_raw_Invert-->MAPRAW1(["MAP1 raw [V]"])
    MAPRAW1-->MAPMINER
    MAPMINER-- Y -->ERROR_MAP(["Error MAP"])
    MAPMINER-- Y -->MAP_ZERO["0"]-->MAP1_abs(["MAP1 abs"])

    MAPMINER-- N -->MAPMAXER

    MAPMAXER-- Y -->ERROR_MAP(["Error MAP"])
    MAPMAXER-- Y -->MAP_FULL["MAX"]-->MAP1_abs(["MAP1 abs"])
    MAPMAXER-- N -->MAP1M["×"]
    MAPM-->MAP1M
    MAP1M-->MAP1C["+"]
    MAPC-->MAP1C
    MAP1C-->MAP1_abs

    MAP1M_SRC["(MAP ref high Pressure − MAP ref low Pressure) / (MAP ref high Volts − MAP ref low Volts)"]
    MAP1M_SRC-->MAPM(["MAPM"])

    MAP_Ref_low_v["MAP ref low Volts"]-->MAPC_M["×"]
    MAPM-->MAPC_M

    MAP_Ref_low_p["MAP ref low Pressure"]-->MAPC_C["−"]
    MAPC_M-->MAPC_C
    MAPC_C-->MAPC(["MAPC"])

    MAPC-->MLDMAX_ADD["+"]
    MAPM-->MLDMAX_ADD["+"]
    MLDMAX_ADD-->MLDMAX(["MAP for Load Max [kPa]"])
    MLDMAX_ADD-->MLDS(["MAP for Load Scalar"])

    MLDMAX-->MLDMAX_D
    MLDMAX-->MAP1_abs_DIV

    BARSCLD-->MAP1_abs_sub
    MAP1_abs-->MAP1_abs_sub["−"]

    MAP1_abs_sub-->BSTGAGE1["Boost1 gauge"]

    MAP1_abs-->MLDMAX_D
    MLDMAX_D-- Y -->MAP1_abs_FULL["MAX"]-->MAPLOAD1(["MAP1 as Load [Load]"])
    MLDMAX_D-- N -->MAP1_abs_DIV["/ MAP for Load max"]-->MAPLOAD1(["MAP1 as Load [Load]"])

    MAPLOAD1-->MAPLOAD1_MINUS_2
    MAPLOAD2(["MAP2 as Load [Load]"])-->MAPLOAD1_MINUS_2

    MAPLOAD1_MINUS_2["−"]-->MAPLDIFF(["MAP1-MAP2 [Load]"])

    MAPLOAD1-->MAPLOAD1_AVG_2
    MAPLOAD2-->MAPLOAD1_AVG_2
    MAPLOAD1_AVG_2["Average OR Select"]-->MAPLDAV(["MAP1+MAP2/2 [Load]"])
    MAPLOAD1_AVG_2-->MAPLOAD(["MAP as Load [Load]"])

    MAPLOAD-- "MAP AND NOT MAF AND NOT "Load Source"" -->LOAD(["Engine Load [Load]"])