Oil Feed Outputs

Overview

GEMS ECUs typically provide 4 Oil Feed output controllers for controlling solenoid pumps. This section discusses Oil Feed 1, but the same principles apply to the other Oil Feed output controllers.

Tip

Oil Feed outputs may also be repurposed and used as slow pulse width modulated (PWM) outputs, or low resolution user signals.

It is recommended that the behaviour of the oil outputs is tested following configuration. Monitoring the associated output pin channel using a Scope View or a physical oscilloscope is recommended.

Oil Feed Configuration

Each oil feed controller has a set of configuration options. Considering Oil Feed 1:

Option Description
option iconOil Feed 1 Source Selects an input channel for varying the duty cycle. The MSB of the raw input value is displayed by the channel iconOil Feed 1 raw channel.
option iconOil Feed 1 Source Bigend Specifies upper/lower byte of the input channel, if it is 16bit. This is usually set to OFF. In some cases (e.g. Little Endian data coming via CAN bus) the bytes of the raw input channel may require swapping.
option iconOil Feed 1 Mul Multiplier for re-scaling the raw input value, saturates at 100% duty cycle in case of overflow. The result is stored in channel iconOil Feed 1 Duty
option iconOil Feed 1 PWM Out
option iconOut Oil Feed 1 PWM
PWM channel number for high rate / precision PWM, using PWM output settings with duty cycle channel iconOil Feed 1 Duty. Note: PWM numbers are not the same as output pin numbers.
option iconOil Feed 1 Out
option iconOut Oil Feed 1
Digital output pin for low rate PWM, only used if option iconOil Feed 1 PWM Out = 0. If a negative value is supplied for the pin number here (e.g. ‘-5’), the signal is inverted (on e.g. pin ‘5’). In this case there are additional Oil Feed options to control the software PWM.
Warning

Changing the output pin (option iconOil Feed 1 PWM Out or option iconOil Feed 1 Out) may leave the prior output in an undefined state. It is recommended to store the calibration and power-cycle the ECU following output pin changes.

Digital Output Configuration

If the Oil Feed output is using a digital output instead of a PWM output, a low frequency / low precision PWM is generated by software.

The following common options are effective in this mode:

Option Description
option iconOil Feed 1 Stop Duty If ON then when channel iconStat Running is OFF, option iconOil Feed 1 Duty Stopped will be used for the duty cycle of the output, unless option iconOil Feed 1 Stopped OFF is ON (in which case the output would be switched ‘OFF’).
option iconOil Feed 1 Duty Stopped Duty cycle to use when engine is not running (channel iconStat Running is OFF), depending upon option iconOil Feed 1 Stop Duty and option iconOil Feed 1 Stopped OFF options
option iconOil Feed 1 Fixed On Use a fixed-length ON pulse, with the duty cycle affecting the duration of the space between ON pulses.
option iconOil Feed 1 Stopped OFF If ON then the output will be switched off when the engine is not running (channel iconStat Running is OFF), otherwise the output will be set to option iconOil Feed 1 Duty Stopped.

Fixed Mode

Enabled when option iconOil Feed 1 Fixed On = ON.

This mode uses a fixed duration ON pulse and variable duration OFF interval.

Option Description
option iconOil Feed 1 Fixed On ON
option iconOil Feed 1 Fixed T.B. Maximum duration of variable part of OFF period, in milliseconds (added to option iconOil Feed 1 OFF min).
option iconOil Feed 1 Fixed comp If set, changes the type of complement operation performed on channel iconOil Feed 1 Duty prior to scaling option iconOil Feed 1 Fixed T.B.. If ON then a 1’s complement (logical NOT) is used instead of 2’s complement (arithmetic negation). It is recommended to set this to ON for new calibrations and can give better results at higher frequencies.
option iconOil Feed 1 OFF min Minimum duration of OFF period, in milliseconds.
option iconOil Feed 1 Fixed ON Duty Fixed duration of ON pulse, in milliseconds.
channel iconOil Feed 1 Period Reports current period of signal.
channel iconOil Feed 1 T Count Count-up timer, used for signal generation.

The duration of the ‘OFF’ interval is calculated by scaling option option iconOil Feed 1 Fixed T.B. by the (inverted) duty cycle percentage shown by channel iconOil Feed 1 Duty.

The OFF interval can’t ever be 0 and will have a lower limit of 1ms. The lower limit may be clamped to a higher value by setting the option iconOil Feed 1 OFF min option.

option iconOil Feed 1 Fixed ON Duty option defines the duration of the ON pulse. This added to the calculated OFF duration to give the total period of the PWM signal and is placed in channel iconOil Feed 1 Period.

channel iconOil Feed 1 T Count counts up every millisecond.

When channel iconOil Feed 1 T Count exceeds the value of channel iconOil Feed 1 Period, the output is switched on and channel iconOil Feed 1 T Count is reset to 0.

When channel iconOil Feed 1 T Count reaches option iconOil Feed 1 Fixed ON Duty, the output is switched off.

Proportional Mode

Enabled when option iconOil Feed 1 Fixed On = OFF.

Proportional mode has a fixed period and varies the duty cycle of the signal over that period. Additionally this mode can limit the total number of pulses delivered to the output after ECU reset.

Option Description
option iconOil Feed 1 Fixed On OFF
option iconOil Feed 1 Duty Max Maximum ON period
option iconOil Feed 1 Fixed comp If set, changes the type of complement operation performed on channel iconOil Feed 1 Duty prior to scaling option iconOil Feed 1 Duty Max. If ON then a 1’s complement (logical NOT) is used instead of 2’s complement (arithmetic negation). It is recommended to set this to ON for new calibrations and can give better results at higher frequencies.
option iconOil Feed 1 Time base Total period of the PWM signal, in milliseconds.
option iconOil Feed 1 P Max Maximum number of pulses to deliver to the output before ECU reset. If 0, then no limit is applied.
channel iconOil Feed 1 P Count Reports the number of pulses delivered to the output when option iconOil Feed 1 P Max is non-zero.
channel iconOil Feed 1 Duty Time Stores the result of scaling option iconOil Feed 1 Duty Max by channel iconOil Feed 1 Duty.
channel iconOil Feed 1 T Count Count-down timer, used for signal generation.

New calibrations may prefer to use option iconOil Feed 1 Fixed On = ON.

Warning

In Proportional Mode, some ECUs will have an initial 65 second delay before the output PWM becomes operational.

Low values in channel iconOil Feed 1 Duty result in higher duty cycles (effectively inverted).

channel iconOil Feed 1 T Count is decremented every millisecond. When channel iconOil Feed 1 T Count reaches zero, the output is switched off.

When the output is switched off, channel iconOil Feed 1 T Count is reset to option iconOil Feed 1 Time base. Additionally the result of scaling option iconOil Feed 1 Duty Max by channel iconOil Feed 1 Duty is stored in channel iconOil Feed 1 Duty Time. Note that this does not happen in ‘Fixed Mode’.

When channel iconOil Feed 1 T Count reaches the value of option iconOil Feed 1 Duty Time, the output is switched ON.

When switching on the output, if option iconOil Feed 1 P Max option is non-zero then the channel iconOil Feed 1 P Count will count up to this value, and the output will cease to be switched on again until the ECU is reset when option iconOil Feed 1 P Max pulses have been delivered to the output.

Note

option iconOil Feed 1 Duty Max should be less than or equal to option iconOil Feed 1 Time base. The sense of channel iconOil Feed 1 Duty is inverted, so that a value of 0 is really 100% duty cycle. This can be inverted by setting a negative output pin number in option iconOil Feed 1 Out.

Mapped Control

The ECU provides user tables and maps that may be used to control the Oil Feed outputs.

See ECU Internal Routing for details on how to route these user maps to the Oil Feed outputs.