0% found this document useful (0 votes)
138 views34 pages

Lpc4 Ecu - Reference Manual: Baldur Gíslason January 18, 2021

The document provides information about wiring an LPC4 ECU, including pinouts and descriptions for three connectors, wiring diagrams, and wiring guidelines. It also covers software configuration topics like trigger settings, data logging, firmware upgrades, and OBD2 communications.

Uploaded by

Andrzej Gomula
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
138 views34 pages

Lpc4 Ecu - Reference Manual: Baldur Gíslason January 18, 2021

The document provides information about wiring an LPC4 ECU, including pinouts and descriptions for three connectors, wiring diagrams, and wiring guidelines. It also covers software configuration topics like trigger settings, data logging, firmware upgrades, and OBD2 communications.

Uploaded by

Andrzej Gomula
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 34

LPC4 ECU

-
REFERENCE MANUAL
Baldur Gíslason

January 18, 2021

Contents

1 Introduction 3
2 Wiring 4
2.1 Pin-outs and description . . . . . . . . . . . . . . . 4
2.1.1 Pin numbering . . . . . . . . . . . . . . . . 4
2.1.2 Connector A pin-out . . . . . . . . . . . . . 6
2.1.3 Connector B pin-out . . . . . . . . . . . . . 7
2.1.4 Expansion board . . . . . . . . . . . . . . . 8
2.2 Wiring diagram . . . . . . . . . . . . . . . . . . . . 11
2.3 Wiring guidelines . . . . . . . . . . . . . . . . . . . 12
2.3.1 Grounding . . . . . . . . . . . . . . . . . . . 12
2.3.2 Engine speed sensors . . . . . . . . . . . . . 12

1
Contents Contents

2.3.3 Ignition outputs . . . . . . . . . . . . . . . . 12


2.3.4 Idle control . . . . . . . . . . . . . . . . . . 12
2.3.5 Programmable outputs . . . . . . . . . . . . 13
3 Software conguration 14
3.1 Crank/cam trigger conguration . . . . . . . . . . . 14
3.1.1 Basic trigger . . . . . . . . . . . . . . . . . . 15
3.1.2 Versatile multi tooth decoder . . . . . . . . 16
3.1.3 Dual edge trigger . . . . . . . . . . . . . . . 19
3.1.4 Duty cycle coded trigger . . . . . . . . . . . 19
3.2 Internal data logging . . . . . . . . . . . . . . . . . 19
3.3 Performing rmware upgrades . . . . . . . . . . . . 20
3.4 OBD2 communications . . . . . . . . . . . . . . . . 22
3.4.1 Wiring . . . . . . . . . . . . . . . . . . . . . 22
3.4.2 Custom OBD2 PIDs . . . . . . . . . . . . . 23
3.4.3 Transmitting data back . . . . . . . . . . . . 24
A Real time data elds 25
B Error codes 26
C Old LPCX expansion board 30
C.1 Wiring . . . . . . . . . . . . . . . . . . . . . . . . . 30
C.1.1 Connector C pin-out . . . . . . . . . . . . . 32
C.1.2 Connector D pin-out . . . . . . . . . . . . . 33

2
1 Introduction

LPC4 is an engine management system for spark ignition engines,


capable of sequential fuel injection and ignition on 4 cylinder
engines, bank re and waste spark or distributor spark on engines
with up to 8 cylinders. In addition to the more common four
stroke engines, two strokes and Wankel type engines are supported
as well.
LPC8 is an evolution of the LPC4 that adds sequential fuelling
and ignition for up to 8 cylinders as well as more sensor inputs,
including but not limited to an integrated wide band lambda
sensor controller for Bosch LSU sensors and inputs for two knock
sensors. On the LPC8, internal data logging and real time clock
is standard tment, but an option on the LPC4. The LPC8 also
has electronic throttle control support standard while the LPC4
requires an add-on board for that.
It must be noted that many aspects of the conguration and
strategies are also documented inside the conguration le. If
you push F1 while editing a variable in the Calibrator application,
you will get context sensitive help related to the category you
are editing.

3
2 Wiring

2.1 Pin-outs and description


2.1.1 Pin numbering

(a) Connector B (b) Connector A

Figure 2.1: Connectors on the back of the controller and their


pin numbering.

4
2. Wiring 2.1. Pin-outs and description

5
2. Wiring 2.1. Pin-outs and description

2.1.2 Connector A pin-out

Pin I/O Function Note


1 OUT 5V sensor supply 200mA max
2 IN Analog 0 - TPS 100kΩ pull-down
(APP A in ETC
mode)
3 IN Analog 1 - Lambda 51kΩ pull-up
(APP B in ETC
mode)
4 OUT Ground return for
analog sensors
5 IN Analog 4 0-5V 51kΩ pull-up
6 IN Analog 5 0-5V 51kΩ pull-up
7 IO CAN H 120Ω termination
8 IO CAN L 120Ω termination
9 OUT Output 1 (Tach Low-side switch, 5A max,
out) 1kΩ pull-up to 12V
10 OUT Output 2 (Fuel Low-side switch, 5A max
pump relay)
11 IN Power ground
12 IN Power ground
13 IN Digital input 1 Active low, 5.7kΩ 5V
pull-up, 12V safe
14 IN Analog 2 - Coolant 3kΩ pull-up
temperature sensor
15 IN Analog 3 - Charge 3kΩ pull-up
air temperature
sensor
16 OUT Ground return for
crank/cam sensors
17 IN Cam sync input 2.2kΩ pull-up
18 IN Crank trigger input 2.2kΩ pull-up
19 IN Digital input 5 Active low, 5.7kΩ 5V
pull-up, 12V safe
20 OUT Ground for signal (or extra power ground)
shields
21 OUT Output 4 Low-side switch, 5A max
22 OUT Output 3 (PWM Low-side switch, 5A max.
idle) Clamping diode to supply 6
pin.
23 IN Digital input 2 Active low, 5.7kΩ 5V
pull-up, 12V safe
24 IN Switched +12V Internally fused
supply
2. Wiring 2.1. Pin-outs and description

2.1.3 Connector B pin-out

Pin I/O Function Note


1 OUT Output 5 (PWM idle Low-side switch, 5A
anti-phase) max
2 OUT Output 6 Low-side switch, 5A
max
3 OUT Injector 1 Low-side switch, 5A
max
4 OUT Injector 2 Low-side switch, 5A
max
5 OUT Injector 3 Low-side switch, 5A
max
6 OUT Injector 4 Low-side switch, 5A
max
7 OUT Output 7 Low-side switch, 5A
max
8 OUT Output 8 Low-side switch, 5A
max
9 OUT Ignition 1 5V logic or low-side
switch 10A max1
10 OUT Ignition 2 5V logic or low-side
switch 10A max1
11 OUT Ignition 3 5V logic or low-side
switch 10A max1
12 OUT Ignition 4 5V logic or low-side
switch 10A max1

1 Depending on build time options


7
2. Wiring 2.1. Pin-outs and description

2.1.4 Expansion board

In late 2019 a new expansion board was introduced, part number


LPCX2. The expansion board installs inside the case and adds
a third connector on the back providing 8 additional analog
inputs, 2 additional digital inputs and 4 additional switching
outputs.

Figure 2.2: Connector C, note that it is installed upside down on


the controller.

8
2. Wiring 2.1. Pin-outs and description

Pin I/O Function Note


1 IN Power Join to wires connecting main ECU
ground ground. Not necessary if not using
outputs 9-12.
2 OUT Output 9 Low-side switch, 5A max, no PWM
capability.
3 OUT Output Low-side switch, 5A max, no PWM
10 capability.
4 IN Digital Active low, 12V tolerant. 10kΩ
in 3 pull-up to 5V.
5 IN Analog 3kΩ pull-up
in 10
6 IN Analog 51kΩ pull-up
in 8
7 IN Analog 51kΩ pull-up
in 12
8 IN Analog 51kΩ pull-up
in 14
9 OUT Sensor Do not connect to any other ground
ground
return
10 IN Power Join to wires connecting main ECU
ground ground. Not necessary if not using
outputs 9-12.
11 OUT Output Low-side switch, 5A max, no PWM
11 capability.
12 OUT Output Low-side switch, 5A max, no PWM
12 capability.
13 IN Digital Active low, 12V tolerant. 10kΩ
in 4 pull-up to 5V.
14 IN Analog 51kΩ pull-up
in 11
15 IN Analog 51kΩ pull-up
in 9
16 IN Analog 51kΩ pull-up
in 13
17 IN Analog 51kΩ pull-up
in 15
18 OUT 5V 200mA max (shared with other 5V
supply outputs) 9
for
sensors
2. Wiring 2.1. Pin-outs and description

Figure 2.3: Solder jumpers on expansion board. Solder jumpers


are the pads with no component mounted. SJ2 on top, SJ1 on
bottom.

Digital inputs 2 and 3 can be congured for activation by a positive


voltage instead of by grounding by the means of bridging solder
jumpers on the expansion board. SJ1 pulls down input 3 and
SJ2 pulls down input 2.

10
2. Wiring 2.2. Wiring diagram

2.2 Wiring diagram

Figure 2.4: Typical basic wiring

11
2. Wiring 2.3. Wiring guidelines

2.3 Wiring guidelines


2.3.1 Grounding

The controller should be connected to the battery negative terminal


or another reliable grounding point by a pair of 1.5mm2 wires or
a single 6mm2 wire joined to smaller wires near the connector.
An improper ground connection will cause electrical noise and
possibly faults with controller operation. If utilising factory
wiring, joining all of the supply ground wires for the original
ECU should suce.

2.3.2 Engine speed sensors

The inputs on the controller for crank/cam sensors are of schmitt


trigger logic type, with 2.2kΩ pull-ups and with over-/undervoltage
protection diodes. Thus they may be connected directly to open-collector
or logic sensors (Hall eect, optical) or variable reluctance sensors.
Some poorly designed VR sensors have an output voltage too
small at cranking speeds for reliable starting, for those an amplier
module must be installed in the controller.

2.3.3 Ignition outputs

The default is to have four 5V logic-level outputs current limited


to 18mA. Internal coil drivers for passive coils can be specied at
order time, from 1 up to 4 coils.

2.3.4 Idle control

The LPC4 supports three types of idle control valves. 2 wire


PWM, 3 wire PWM and 6 wire stepper. 4 wire stepper can
be handled by tting pull-up resistors to each wire. A value
of 15Ω and 2W has been shown to work well on the common
GM/Chrysler valves. A 2 wire PWM valve must be connected
to output number 3. A 3 wire PWM valve uses outputs 3 and 5
to drive each coil. Stepper valves can be connected to any of the

12
2. Wiring 2.3. Wiring guidelines

outputs but usually outputs 5 through 8 are used, arrangement


of the wiring does not matter as it can be congured in software.

2.3.5 Programmable outputs

The ECU has eight programmable outputs and while all low
speed functions are applicable to every output, some PWM functions
have dedicated outputs. This means that if those functions are
used, they can only be assigned to the specied output. Outputs
1, 3 and 4 provide high accuracy PWM capability, with events
timed to the nearest microsecond and a maximum PWM frequency
of 2000Hz. Since rmware version 1.8, outputs 5 through 8 provide
lower accuracy PWM capability with microsecond timing but
possible timing error of individual pulses up to 100 microseconds.
Maximum frequency on those outputs is 200Hz and although
average error is on the order of zero, due to the nature of these
software driven outputs occasional pulses may be out by as much
as 100 microseconds. The exception is output 5 when in PWM
idle anti phase mode, where it is driven at full 1 microsecond
precision.
Function Output
Tachometer output 1
PWM idle control 3
PWM idle anti-phase 5
Figure 2.5: Functions with dedicated outputs

13
3 Software conguration

Refer to BG calibrator manual for introduction to the software.


The default conguration le has the following dened keyboard
shortcuts:
Key Function
F5 Edit main fuel map
F6 Edit main ignition timing map

3.1 Crank/cam trigger conguration


The LPC4 ECU has a unique way of dealing with crank/cam
trigger signals. This enables it to decode a large variety of dierent
trigger arrangements without needing the rmware to specically
support each arrangement. As a consequence the conguration
of the trigger inputs may seem confusing to rst time users. To
combat this, presets are provided for common congurations, see
the presets dialog in the calibrator software and check if your
engine is listed.
In this chapter, the primary (or only) trigger is always referred
to as the crank trigger, despite the possibility of the reluctor or
shutter wheel being driven from the camshaft. The primary/cam
lter periods let the ECU ignore any event occurring within a
certain amount of time since the previous event. Useful against
certain types of noise in certain trigger arrangements. Must
be set to a lower number than the shortest anticipated event
interval at maximum engine operating speed.
The modes of trigger input operation are as follows:
Basic Single impulse on crank trigger input for each cylinder's
ring event. Works for congurations that only require a

14
3. Software conguration 3.1. Crank/cam trigger conguration

single ignition output, either single cylinder, multi cylinder


with distributor or multi cylinder running all cylinders in
waste spark conguration. Also useful if no ignition control
is required.
Versatile multi tooth The highly versatile crank/cam decoder
for variable reluctance type crank sensors or hall eect
setups where all the information required is available by
decoding only one type of signal edge (rising or falling, not
both).
Dual edge A variation of the versatile multi tooth decoder
where alternating teeth dened are alternating polarity
(rising or falling, starting with whichever is dened as the
crank trigger active edge).
Duty cycle coded A variation of the versatile multi tooth
decoder that triggers on one edge type (rising or falling)
but measures the duty cycle, the ratio between high and
low state. A pattern can then be entered denoting the
duty cycle of past previous pulses and when that pattern is
matched, the decoder generates a sync event. This arrangement
is used on the earlier generation GM LS type engine (24X
trigger) but this mode can also be congured to decode
some Chrysler crank triggers.
Log only A mode that does not enable running an engine but
does let one capture an event log of the crank/cam inputs
without fuel being injected or ignited.

3.1.1 Basic trigger

This mode has only three congurable options. The trigger angle
oset whose useful range would be from zero up to the angle
between ring events. (90 degrees on a 4 stroke V8 f.ex). The
crank trigger active edge and the pulses skipped when starting
options are also used. Cam sync, trigger teeth and other options
not used. Primary trigger lter period does apply.

15
3. Software conguration 3.1. Crank/cam trigger conguration

3.1.2 Versatile multi tooth decoder

The basic operating principle of the versatile multi tooth decoder


is that each tooth sensed by the crank angle sensor is dened
by the crank angle that separates it from the previous tooth
before it. The crank angle of the rst tooth in the cycle (aka
trigger angle oset) in degrees before top dead centre cyl 1 is
also dened, cyl 1 being assumed to have an angle oset of zero
in the cylinder angle table. The trigger angle oset can have a
value of anywhere from zero to 719 degrees. Used in conjunction
with the tooth gap table is also a tooth repeat table. The tooth
repeat table saves the user from having to congure multiple
tooth entries where a number of adjacent teeth all have the same
spacing. As an example a 36-1 crank trigger wheel only needs
two tooth entries. 20 degrees and 10 degrees, and in that case
the repeat values are 0 and 33 as the rst tooth of the 35 that
are present only occurs once, zero repetitions are performed.
The second tooth and the 33 teeth that follow it have the same
tooth spacing so a value of 33 is used for the second repeat value.
From knowing the angle of the rst tooth and the spacing of
every tooth from the previous one, the decoder can calculate
engine speed as well as crank angle every time an event occurs
on the crank trigger input, but this information is not enough to
let the decoder nd its reference point in the cycle. To nd the
reference point and start decoding from tooth one, there are a
number of strategies available. At the time of writing they are as
follows:
None In this mode, cam sync is relied upon entirely for crank
angle reference. In this mode, there must be enough teeth
dened to cover the entire cycle so if there are 12 teeth on
the crank, the tooth cong must account for 24 teeth or
sync is deemed lost before the next cam sync opportunity.
Missing tooth In this mode, the decoder compares the spacing
of adjacent events and if the interval between events exceeds
the interval of the previous event by a congurable threshold
(typically at least 1.5), the current event is deemed to be
tooth one and crank decoding can start. In this mode, the

16
3. Software conguration 3.1. Crank/cam trigger conguration

rst dened tooth must have its dened angle greater than
the other teeth.
Extra tooth In this mode, the decoder compares the spacing
of adjacent events and if the most recent interval is shorter
than the previous interval by a congurable threshold (typically
no more than 0.7, preferrably less) then that tooth is ignored
and the next event following it is deemed tooth one and
decoding can start. There is a very good reason why the
extra tooth is ignored in the code. For one, having extra
crank angle resolution at one part of the cycle is of little
benet, but if the exact angle of the extra tooth is not
known then it would be very detrimental to engine control
to include it in the decoder output. Therefore, in this mode,
the extra tooth must not exist in the tooth denitions, the
rst tooth is the tooth following the extra tooth.
If a cam position sensor is present, there are a number of dierent
strategies available to decode that. The behaviour of the cam
sync diers if a crank sync strategy is congured or not. When
a crank sync strategy is congured, the cam sync will not apply
unless crank sync has been found, and when that happens the
crank angle will be set to the correct phase according to the
angle oset of crank tooth #1. If no crank sync strategy is selected,
then the cam sync will apply immediately.
The cam sync strategies are the following:
Cam state on crank sync This mode is useful for hall eect
or similar logic output cam position sensors with a single
wide tooth (half moon type). In this mode, the cam signal
is not logged and no interrupts are generated on edge events
but instead the state of the cam signal is polled when a
crank sync event happens (missing tooth, extra tooth).
If the cam input is in a logic low state (less than 1 volt
input) then the congured angle oset is applied and full
sync mode is entered. If the cam input is in a logic high
state, then the congured angle oset is applied, shifted by
360 degrees and full sync mode is entered.

17
3. Software conguration 3.1. Crank/cam trigger conguration

Count cam impulses This mode is useful for all types of sensors
and applies to cam wheels with as little as a single tooth
but also applies to more complex arrangements. In this
mode, every event on the cam input increments a counter
but every event on the crank input reads the counter and
resets it to zero. If the counter value matches the congured
cam sync count, then cam sync is applied at that crank
event and full sync mode is entered.
An example where this mode is used is the Subaru 6/7
pattern, where a series of two or three cam impulses can
be used to determine the crank angle and cam phase.
Count crank impulses This mode applies to certain crank/cam
patterns where there are two or more cam teeth unevenly
spaced or a greater number of evenly spaced cam teeth
with some oddly spaced crank teeth. A counter is incremented
on every crank event but read and reset on every cam
event. If the counter matches the congured cam sync
count then the following crank event will apply the cam
sync. An example where this mode applies is Cosworth YB
where the cam sync has two teeth spaced at 180 degrees of
crank rotation.
Primary trigger is cam This mode allows the use of a missing
tooth or extra tooth trigger wheel rotating at cam speed
so the reference tooth angle is correct and no extra cam
position information is required for full sync operation.
Crank state on cam impulse This mode only applies to dual-edge
trigger decoder mode, used to decode DSM/Miata/Neon
trigger. Has a congurable option for what the crank state
must be for the cam event to register. The crank event
following the cam event is deemed tooth number one.
Cam count pattern Principally the same as count cam impulses
mode, except instead of comparing only the current value
of the counter every crank event, a congurable number
of previous values are also considered. This is useful if the

18
3. Software conguration 3.2. Internal data logging

cam wheel has an insane amount of oddly spaced teeth,


such as seen on early Chrysler/Jeep 4.7 V8.

3.1.3 Dual edge trigger

A mode for logic type sensors only (hall eect or optical). This
mode is operationally identical to the versatile multi tooth trigger
except that alternating teeth are expected to occur on alternating
edges, with the rst tooth occurring on the congured active
edge for the crank trigger. Examples that use this include the
Mitsubishi 4g63 and Mazda Miata, where it is used with cam
sync.

3.1.4 Duty cycle coded trigger

A mode for logic type sensors only (hall eect or optical). This
mode is operationally identical to the versatile multi tooth trigger
except that the crank sync mode selector is not used. Instead
it is hard coded to use a duty cycle pattern to sync. Normal
trigger operation only happens on either a rising edge or a falling
edge and the period since the last opposite edge divided by the
period since the last active edge is the duty cycle. In the pattern,
a value of 1 matches a duty cycle greater than 50% and a value
of zero matches a duty cycle less than 50%. The pattern can
have up to 8 positions. The typical use of this trigger mode is
the GM LS1 engine, where it allows reliable operation with or
without cam sync.

3.2 Internal data logging


As an option, the controllers can be tted with internal data
logging. The option involves tting the hardware required for
recording data inside the controller so the option must be tted
at purchase time or the unit returned to the vendor for reconguration.
Controllers tted with internal logging memory will generally
have 8GB or more logging memory as well as a real time clock
to time stamp the log les with time and date of when logging

19
3. Software conguration 3.3. Performing rmware upgrades

started. Data recorded at the highest available logging rate (100Hz)


will take up around 2 megabytes per minute. At the time of
writing the download rate is around 3 megabytes per minute so
a 30 minute data log recorded at the highest rate would take
around 20 minutes to download from the controller. Data can
only be downloaded when a log isn't being captured and the
engine isn't running. For that reason it is recommended that the
controller is congured to not start recording until engine speed
reaches some non-zero number, except for testing of the logging
function itself. Once logging is started, it will continue until the
controller is powered o. It is important to note that the binary
format of the log les changes when the rmware is updated,
so old logs can be downloaded but will not convert correctly to
csv format when the conguration le open in the Calibrator
application does not match the rmware that recorded the log.

3.3 Performing rmware upgrades


Whenever new features are introduced, new rmware becomes
available for download at https://controls.is/firmware/.
See the release notes if you are unsure of whether you should
update or not. To perform a rmware upgrade:
1. Download rmware package from web site
2. Unzip rmware package into a directory on your hard drive
3. Connect USB cable between ECU and PC.
4. Power on ECU, do not start engine.
5. If you do not have the conguration backed up, run BG
Calibrator, read conguration from ECU and save to le.
This step may be skipped if you are performing the upgrade
on an ECU you haven't made any previous conguration
changes to.
6. Run upgrade.cmd in directory where rmware les are
located.

20
3. Software conguration 3.3. Performing rmware upgrades

7. Wait until the upgrade application nishes, should be on


the order of 10 seconds.
8. Power ECU o.
9. Do not power ECU back on until you are ready to upload
conguration to it.
The ECU has been upgraded but now contains invalid conguration.
If you are proceeding with default conguration, simply open the
default conguration le for the new rmware in BG calibrator
and go on-line, then send local settings when prompted about
what to do with the ECU side conguration. Otherwise, if you
wish to retain your previous conguration, which is generally
recommended, perform the following steps:
1. Run the BG Calibrator software
2. Open your old conguration le
3. Select File -> Convert configuration from the menu
bar.
4. Select the conguration included with the new rmware in
the le dialog.
5. The conguration has now been converted to the new format,
save it and exit the Calibrator software.
6. Run the Calibrator software again and open the conguration
le you saved previously, choose to work o-line.
7. Review the settings and verify that they make sense, see
release notes for information about what settings may need
revisiting.
8. Go on-line and power on the ECU. Do not start engine.
9. When prompted, select to use local settings, which will
then be uploaded to the ECU.
After the conguration has been sent to the ECU and Calibrator
application becomes responsive again, power the ECU o and
then back on. Now you can start the engine.

21
3. Software conguration 3.4. OBD2 communications

3.4 OBD2 communications


It is possible to perform OBD2 over CAN bus communications
with the ECU. This enables the use of accessories that can display
OBD2 data for instrumentation purposes (various OBD2 gauges,
mobile phone applications and scan tools) as well as diagnostic
trouble code readout. The protocol implemented is ISO15765-4
11 bit OBD over CAN.
To enable this functionality, the following conguration parameters
must be set:
CAN bus data mode 500kbit
CAN receiving enable Enabled
OBD2 service enable Enabled

For diagnostic trouble codes, see Appendix B

3.4.1 Wiring

Figure 3.1: OBD2 female connector as seen from the end the
scan tool plugs in to.

The OBD2 connector has four essential connections. Pin 6 (CAN-H)


. Pin 14 (CAN-L) . Pins 4 and 5 connect to ground (any chassis
ground will do) and pin 16 connects to +12V. The standard
species that the +12V should be taken through a fuse directly
from the battery but most OBD2 devices will also perform correctly
if the 12V source is switched. For correct operation it may be
necessary to have a 120 ohm termination resistor connected
across the CAN wires if there is none connected to the CAN bus
already.

22
3. Software conguration 3.4. OBD2 communications

3.4.2 Custom OBD2 PIDs

The ECU already implements nearly every standard OBD2 PID


that is applicable to this application, but there are plenty of
common sensors for which there is no documented standard
OBD2 PID (for example, oil pressure) and also lots of examples
of the ECU being used to monitor custom sensors. To facilitate
this, custom OBD2 PIDs have been provided. The custom PIDs
can be used to add PIDs and they can also override existing
PIDs if desired. For a list of dened standard PIDs see https:
//en.wikipedia.org/wiki/OBD-II_PIDs
It is safe to dene custom PIDs in the range of 197 up to 223
(0xC5 to 0xDF in hex) without conicting with any predened
PIDs.

In the Torque app, the OBD2 command to retrieve these values


is 01 succeeded by the PID in hex, so to get PID 197 for example
it would be 01 C5 OBD2 species the data is always in big-endian
format meaning the most signicant byte comes rst, so the
following data types are provided, but for most scenarios it is
recommended to stick to either u8 or u16be:
bit Single bit to indicate a status, 1 or 0. Treat the same as a
u8 byte but with only 2 possible values. Example formula
in Torque app: A
u8 Single unsigned byte ranging from 0 to 255. Example formula
in Torque app: A
s8 Single unsigned byte ranging from -128 to 127. Example
formula in Torque app: SIGNED(A)
u16be 2 byte 16 bit unsigned integer ranging from 0 to 65535.
Example formula in Torque app: INT16(A:B)
s16be 2 byte 16 bit signed integer ranging from -32768 to 32767.
Not simple to use in Torque app, use unsigned value and
oset it using input/output scaling on ECU instead.
u32be 4 byte 32 bit unsigned integer ranging from 0 to 4294967295.
Example formula in Torque app: INT32(A:B:C:D)

23
3. Software conguration 3.4. OBD2 communications

s32be 4 byte 32 bit signed integer ranging from -2147483648 to


2147483647. Not simple to use in Torque app, use unsigned
value and oset it using input/output scaling on ECU
instead.

3.4.3 Transmitting data back

As of rmware version 2.3, the ECU provides a set of remotely


manipulable bits that can be used to trigger things on or o,
switching calibrations, etc. These bits can be manipulated by
Calibrator scripts using the remote procedure call remotebit
or using OBD2 commands. The results can be observed on the
remotebits variables in the real time data.
To access the remote bits from OBD, use the AA command. The
command takes 2 arguments. First argument is the bit number,
from 00 to 07 and the second argument is the action to perform.
The possible actions are:
00 Flip bit to 0 state.
01 Flip bit to 1 state.
02 Toggle bit between states.
03 Do nothing, just return current value.
04 Flip bit to 1 momentarily and then back to 0 about half a
second later.
The AA command sends a reply on channel EA with two data
bytes, the rst data byte being the bit number that was accessed
and the second data byte being the new state of that bit. To
read the status of a bit using a custom PID in Torque, send
the command AA 00 03 where 00 is the bit you wish to read.
The formula for the return data is simply B. To alter a bit from
Torque create a push button widget that sends a raw OBD command,
for example AA 00 02 to toggle bit 0 between states each time
you push the button.
Manipulating these bits from a Calibrator script can be done in
a similar manner. Example:

24
3. Software conguration 3.4. OBD2 communications

[ "rpc", "remotebit", [ 0, 2 ] ] to toggle bit 0.

25
A Real time data elds

The descriptions of all the real time data elds have been moved
into the conguration le as of rmware version 1.15. They can
be read in the dialog for conguring the real time display or
exported to a text document from Calibrator.

26
B Error codes

The error codes are stored on four bit masks, error0, error1,
error2 and error3. They can be read using the Calibrator application
(Communication -> View controller errors in on-line mode,
Tools -> Decode error variables in log view mode). It is
also possible to read the errors using an OBD2 scan tool if OBD2
connector is wired and OBD2 communications are enabled in the
conguration. OBD2 DTC codes take the form of P3XZZ where
X is the error variable, 0 for error0 and so on and ZZ is the bit
oset in that variable, starting with 00. Note that these codes
do not correspond with any auto manufacturer's codes.
As of rmware 2.0 it is also possible to congure the check engine
lamp to ash when error codes are present. The lamp will alternate
between slow and fast ash rate, with the number of slow pulses
preceding the number of fast pulses. For example, four slow
ashes succeeded by a single fast ash signies low battery voltage.
In the following error code tables, the second column shows the
number of ashes associated with each error code.

Errors that prohibit engine starting (error0):

27
B. Error codes

Value Count Description


P3000 1-1 Electronic throttle primary sensor low voltage
P3001 1-2 Electronic throttle primary sensor high voltage
P3002 1-3 Electronic throttle secondary sensor low voltage
P3003 1-4 Electronic throttle secondary sensor high voltage
P3004 1-5 Throttle position primary/secondary sensors
disagree
P3005 1-6 Electronic throttle not following target
P3006 1-7 Engine enable input not active
P3007 1-8 Engine oil pressure low
P3008 1-9 Slave processor software fault
P3009 1-10 Slave processor hardware fault
P3010 1-11 Test mode active
P3011 1-12 Hardware fault
P3012 1-13 Conguration error
P3013 1-14 Firmware crashed
P3014 1-15 Firmware crashed in interrupt mode
P3015 1-16 Firmware crashed in priority interrupt
Errors that let the engine start and idle but disable the accelerator
pedal in electronic throttle mode (error1):
Value Count Description
P3100 2-1 TPS voltage low
P3101 2-2 TPS voltage high
P3102 2-3 Accelerator pedal primary sensor low voltage
P3103 2-4 Accelerator pedal primary sensor high voltage
P3104 2-5 Accelerator pedal secondary sensor low voltage
P3105 2-6 Accelerator pedal secondary sensor high voltage
P3106 2-7 Accelerator pedal sensors disagree
Errors that will allow vehicle operation, but possibly at reduced
performance (error2 and error3):

28
B. Error codes

Value Count Description


P3200 3-1 MAP sensor voltage low
P3201 3-2 MAP sensor voltage high
P3202 3-3 Coolant temp sensor open circuit
P3203 3-4 Coolant temp sensor short circuit
P3204 3-5 Air temp sensor open circuit
P3205 3-6 Air temp sensor short circuit
P3206 3-7 Lambda sensor voltage out of range
P3207 3-8 Lambda sensor lack of activity
P3208 3-9 Camshaft position sensor error
P3209 3-10 RTC battery fault or no RTC battery tted
P3210 3-11 Barometric pressure sensor low voltage
P3211 3-12 Barometric pressure sensor high voltage
P3212 3-13 EMAP sensor low voltage
P3213 3-14 EMAP sensor high voltage
P3214 3-15 MAP signal implausible
P3215 3-16 Engine coolant temperature too high
P3216 4-1 Supply voltage too low
P3217 4-2 Supply voltage too high
P3218 4-3 Charge air temperature too high
P3219 4-4 Overboost protection triggered
P3220 4-5 Fuel pressure sensor low value
P3221 4-6 Fuel pressure sensor high value
P3222 4-7 Loss of CAN input data
P3223 4-8 Fuel pressure low
P3224 4-9 Fuel pressure high
P3225 4-10 Engine coolant temperature implausible
P3226 4-11 VVT primary cam o target
P3227 4-12 VVT secondary cam o target
P3228 4-13 Lambda reading too lean
P3229 4-14 Lambda reading too rich
P3230 4-15 MAF input low value
P3231 4-16 MAF input high value

29
B. Error codes

Value Count Description


P3300 5-1 Lambda sensor 2 voltage out of range
P3301 5-2 Lambda sensor 2 lack of activity
P3302 5-3 Lambda 2 reading too lean
P3303 5-4 Lambda 2 reading too rich
P3304 5-5 N2O run aborted by low fuel pressure
P3305 5-6 Oil pressure sensor low value
P3306 5-7 Oil pressure sensor high value
P3307 5-8 Oil temperature sensor low value
P3308 5-9 Oil temperature sensor high value
P3309 5-10 VVT cam 3 o target
P3310 5-11 VVT cam 4 o target
P3311 5-12 Post compressor pressure sensor low value
P3312 5-13 Post compressor pressure sensor high value
P3313 5-14 Post restrictor pressure sensor low value
P3314 5-15 Post restrictor pressure sensor high value
P3315 5-16 Transmission temperature sensor low value
P3316 6-1 Transmission temperature sensor high value
P3317 6-2 User dened error 1
P3318 6-3 User dened error 2
P3319 6-4 User dened error 3
P3320 6-5 User dened error 4
P3321 6-6 Injector duty cycle exceeded maximum
P3322 6-7 Knock sensor 1 low input signal
P3323 6-8 Knock sensor 2 low input signal
P3324 6-9 Excessive knock detected
P3325 6-10 Fuel temperature sensor low input value
P3326 6-11 Fuel temperature sensor high input value
P3327 6-12 Fuel composition sensor low input value
P3328 6-13 Fuel composition sensor high input value
P3329 6-14 Mass air ow sensor signal implausible

30
C Old LPCX expansion board

An expansion board was available that t inside the ECU case,


part number LPCX. This expansion board adds 7 analog inputs,
internal barometer, 2 extra digital inputs, 4 extra low side switch
outputs and an H bridge drive output for electronic throttle
control. If H bridge is used, only 3 of the low side drivers are
available. The expansion board is incompatible with internal
ignitors so if upgrading an ECU tted with internal ignitors,
external ignitors must be used instead.
This board has now been superceded by the LPCX2 which adds
8 analog inputs, 2 extra digital inputs and 4 extra low side switch
outputs. New board does not include an H bridge but it is compatible
with internal ignitors.

C.1 Wiring

(a) Connector C (b) Connector D

Figure C.1: Connectors on the back of the expansion board.

31
C. Old LPCX expansion board C.1. Wiring

32
C. Old LPCX expansion board C.1. Wiring

C.1.1 Connector C pin-out

Pin I/O Function Note


1 IN +12V supply Not protected, use external 15A
for H bridge fuse. Only connect if using
electronic throttle.
2 IN PWM input Connect to pin 22 of connector
for H bridge A if using electronic throttle
control.
3 IN Analog 10 3kΩ 5V pull-up
0-5V
4 IN Analog 8 100kΩ pull-down. Throttle
0-5V position A when using ETC.
5 IN Analog 12 51kΩ 5V pull-up
0-5V
6 IN Analog 14 51kΩ 5V pull-up
0-5V
7 OUT Ground
return for
analog
sensors
8 OUT 5V sensor 200mA max, shared with other
supply 5V outputs
9 IN Digital input Active low, 5.7kΩ 5V pull-up,
3 12V safe
10 IN Digital input Active low, 5.7kΩ 5V pull-up,
4 12V safe
11 IN Analog 11 3kΩ 5V pull-up
0-5V
12 IN Analog 9 51kΩ 5V pull-up. Throttle
0-5V position B when using ETC.
13 IN Analog 13 51kΩ 5V pull-up
0-5V
14 NC NC Analog 15 if without internal
barometric pressure sensor
15 OUT Ground
return for
analog
sensors
16 OUT 5V sensor 200mA max, shared with other 33
supply 5V outputs
C. Old LPCX expansion board C.1. Wiring

C.1.2 Connector D pin-out

Pin I/O Function Note


1 OUT H bridge Positive in forward (opening)
output 1 direction. 15A max current
2 OUT H bridge Positive in reverse (closing)
output 2 direction. 15A max current
3 IN Power Join to pins 11 and 12 on connector
ground A
4 IN Power Join to pins 11 and 12 on connector
ground A
5 OUT Output 9 Low-side switch, 5A max
6 OUT Output 10 Low-side switch, 5A max
7 OUT Output 11 Low-side switch, 5A max. Not
available when H bridge is used.
8 OUT Output 12 Low-side switch, 5A max

34

You might also like