Subsections of Outputs
Digital Outputs
Overview
The ECU has a number of digital outputs (ON / OFF) that can be used to control various devices through the wiring loom. These outputs may be assigned to different functions by setting options in the calibration.
Some digital outputs may be switched to other functions such as PWM or timed outputs. For devices that require a proportional control signal, use a PWM output channel instead.
PWM Outputs
Overview
The ECU has a number of Pulse Width Modulated (PWM) outputs that can be used to control various devices. These outputs may be assigned to different functions such as VV control, Idle valve, Wastegate, Servo.
Some PWM outputs may be claimed by specific functions. For instance, if Active Throttle is enabled, it owns a bridge driver and prevents others attempting to use the output, unless e.g.
Act T 1 No Drive is set to ON.
Note
Some PWM channels have usage / precision restrictions - see the specific PWM channel documentation for details.
Duty Cycle
The duty cycle of a PWM signal is the ratio of the ‘on’ time to the total period of the signal. The frequency of the PWM signal is the rate at which the signal repeats. Over time, this produces a proportional control signal with low power loss.
For devices that require a simple on/off control signal, use a digital output channel instead.
Configuration
PWM outputs must be enabled using options in the calibration and are typically routed to from ECU functions using additional calibration options.
Some PWM outputs are used for specific features such as active throttle, so some care is required to avoid conflicts.
Restrictions
PWM1-16 are fixed to individual pins, however, PWM17 onwards are assignable to any simple output pin. In the pin-outs diagram/table, these fixed PWMs have a code of ‘Pnn’,
where ‘nn’ is 01-16.
PWM Output Pin Assignment
For PWMs that may be assigned to output pins, pin assignment options are available in the calibration.
e.g.
Out PWM17
As with any other output pin assignment, using a negative value will invert the output signal.
Note
Note that output pin assignments differ to PWM numbers. For example,
Out PWM17 is a pin number.
Out Oil Feed 1 PWM is a PWM number (which may be further routed to a pin).
Oil Feeds
See Oil Feed Outputs for details on the Oil Feed channels - which can either use PWM outputs or generate low-speed PWMs in software on simple digital outputs.
Timed Outputs
Overview
Timed output pins are used for precisely timed pulses for functions such as Ignition, Injection, High Pressure Pump, etc.
On the EM80, there 8 x 8bit PWM output pins that can be PWM outputs 1 to 8, injector outputs 1 to 8 or simple low-side outputs.
Timed outputs allow the processor to schedule asynchronous events like ignition in response to crank tooth interrupts, with high precision timing and are enable features like variable ignition advance / retard to work.
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 |
Oil Feed 1 Source |
Selects an input channel for varying the duty cycle. The MSB of the raw input value is displayed by the Oil Feed 1 raw channel. |
Oil 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. |
Oil 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 Oil Feed 1 Duty |
Oil Feed 1 PWM Out
Out Oil Feed 1 PWM |
PWM channel number for high rate / precision PWM, using PWM output settings with duty cycle Oil Feed 1 Duty. Note: PWM numbers are not the same as output pin numbers. |
Oil Feed 1 Out
Out Oil Feed 1 |
Digital output pin for low rate PWM, only used if Oil 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 (
Oil Feed 1 PWM Out or
Oil 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 |
Oil Feed 1 Stop Duty |
If ON then when Stat Running is OFF, Oil Feed 1 Duty Stopped will be used for the duty cycle of the output, unless Oil Feed 1 Stopped OFF is ON (in which case the output would be switched ‘OFF’). |
Oil Feed 1 Duty Stopped |
Duty cycle to use when engine is not running ( Stat Running is OFF), depending upon Oil Feed 1 Stop Duty and Oil Feed 1 Stopped OFF options |
Oil Feed 1 Fixed On |
Use a fixed-length ON pulse, with the duty cycle affecting the duration of the space between ON pulses. |
Oil Feed 1 Stopped OFF |
If ON then the output will be switched off when the engine is not running ( Stat Running is OFF), otherwise the output will be set to Oil Feed 1 Duty Stopped. |
Fixed Mode
Enabled when
Oil Feed 1 Fixed On = ON.
This mode uses a fixed duration ON pulse and variable duration OFF interval.
Option |
Description |
Oil Feed 1 Fixed On |
ON |
Oil Feed 1 Fixed T.B. |
Maximum duration of variable part of OFF period, in milliseconds (added to Oil Feed 1 OFF min). |
Oil Feed 1 Fixed comp |
If set, changes the type of complement operation performed on Oil Feed 1 Duty prior to scaling Oil 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. |
Oil Feed 1 OFF min |
Minimum duration of OFF period, in milliseconds. |
Oil Feed 1 Fixed ON Duty |
Fixed duration of ON pulse, in milliseconds. |
Oil Feed 1 Period |
Reports current period of signal. |
Oil Feed 1 T Count |
Count-up timer, used for signal generation. |
The duration of the ‘OFF’ interval is calculated by scaling option
Oil Feed 1 Fixed T.B. by the (inverted) duty cycle percentage shown by
Oil 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
Oil Feed 1 OFF min option.
Oil 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
Oil Feed 1 Period.
Oil Feed 1 T Count counts up every millisecond.
When
Oil Feed 1 T Count exceeds the value of
Oil Feed 1 Period, the output is switched on and
Oil Feed 1 T Count is reset to 0.
When
Oil Feed 1 T Count reaches
Oil Feed 1 Fixed ON Duty, the output is switched off.
Proportional Mode
Enabled when
Oil 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 |
Oil Feed 1 Fixed On |
OFF |
Oil Feed 1 Duty Max |
Maximum ON period |
Oil Feed 1 Fixed comp |
If set, changes the type of complement operation performed on Oil Feed 1 Duty prior to scaling Oil 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. |
Oil Feed 1 Time base |
Total period of the PWM signal, in milliseconds. |
Oil Feed 1 P Max |
Maximum number of pulses to deliver to the output before ECU reset. If 0, then no limit is applied. |
Oil Feed 1 P Count |
Reports the number of pulses delivered to the output when Oil Feed 1 P Max is non-zero. |
Oil Feed 1 Duty Time |
Stores the result of scaling Oil Feed 1 Duty Max by Oil Feed 1 Duty. |
Oil Feed 1 T Count |
Count-down timer, used for signal generation. |
New calibrations may prefer to use
Oil 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
Oil Feed 1 Duty result in higher duty cycles (effectively inverted).
Oil Feed 1 T Count is decremented every millisecond. When
Oil Feed 1 T Count reaches zero, the output is switched off.
When the output is switched off,
Oil Feed 1 T Count is reset to
Oil Feed 1 Time base. Additionally the result of scaling
Oil Feed 1 Duty Max by
Oil Feed 1 Duty is stored in
Oil Feed 1 Duty Time. Note that this does not happen in ‘Fixed Mode’.
When
Oil Feed 1 T Count reaches the value of
Oil Feed 1 Duty Time, the output is switched ON.
When switching on the output, if
Oil Feed 1 P Max option is non-zero then the
Oil 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
Oil Feed 1 P Max pulses have been delivered to the output.
Note
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.
Peak & Hold Injector Outputs
Overview
Some GEMS ECUs provide dedicated on-board “Peak & Hold” injector outputs that provide a specially shaped pulse to drive injector solenoids.
Tip
Fuel Injector settings need either the manufacturer’s data (often restricted) or flow bench test results. GEMS may be able to provide Calibration Aspect files for specific injectors or the layout may include selectors for common injector types.
Peak and Hold Injector Drive
Instead of a simple ON/OFF signal driving an injector solenoid, the drive transistor is first driven hard on for a specified time to ensure opening, then the current is dropped to a holding current, minimising heat dissipation in both injector and transistor. When the injector is closed, the driver circuit recirculates energy from the collapsing magnetic field of the injector coil, preventing abrupt closure of the injector which can lead to physical injector damage (fuel leakage) and unpredictable fuel delivery due to pintle bounce.
The peak & hold injectors are active if
Injector Peak & Hold = ON.
Note
Note if injector outputs 4 to 8 are not used as injectors their recirculation diodes may be turned on, to reduce currents when used as PWM outputs, so these outputs must not connect to permanently powered devices. Active if not an injector drive when e.g.
Fuel 1 Recirculate = ON.
Peak
The
Injector Peak Time table specifies the time that the drive transistor is fully ON for, prior to entering hold mode. The peak time is dependent on battery voltage, since this directly affects the rate at which the magnetic field within the injector builds.
Some ECUs may include table
Injector Peak Decay Time, which is currently unused, future versions may implement this as a smoother transition from peak to hold.
Hold
The frequency and duty of hold signal is given by option
Injector Hold Frequency, and table
Injector Hold Duty.
Recirculation
The recirculation diode is controlled per injector driver by options
Fuel 1 Recirculate …
Fuel 8 Recirculate. Recirculation manages the current flow when the injector is turned off to smooth the closing.
Compensations
Tables
Injector Volts comp and
Injector Volts comp Secondary allow for additional compensation in response to battery voltage changes.
Compensations are displayed by channels
Injector Comp Fuel Primary and
Injector Comp Fuel Secondary.