Sunteți pe pagina 1din 8

30 March 2010

CRACKING THE
CODE BEHIND
DTCs BY BERNIE THOMPSON
If you want to understand how computer-controlled
vehicles operate, a good place to start is to look at
how they make decisions. It all comes down to 1s and
0s, on or off, high or low, yes or no. Simple, right?

T
he triode, invented by Lee De voltage and a high (1) at source voltage, in-
Forest in the early part of the formation can be transmitted or stored in a
last century, was the first elec- circuit. This is accomplished using Boolean
trical amplifier. Built on vacu- logic, the logic of the digital numbers 0 and
um tube technology, the triode 1. The electrical circuit can be set up so that
Photoillustration: Harold A. Perry; images: SPX/OTC & Thinkstock

provided the ability to turn an one or more logic inputs can be processed to
electrical circuit on or off using current flow. a single logic output. This electronic circuit
No longer was a mechanical switch needed to is called a logic gate (Fig. 1, page 32). There
control an electrical circuit; voltage could now are several logic gate configurations, among
be used to do it. This new control strategy them the AND gate, NAND gate, OR gate,
would signal the start of modern electronics. NOR gate, EXCLUSIVE OR gate and EX-
The use of a triode to switch voltage from a CLUSIVE NOR gate.
low potential to a high potential was instru- In order to process data, many logic circuits
mental in the construction of early electric are used in conjunction with one another.
telephones, radios and calculators. In the early These 0s and 1s can be used to set up a logical
1950s, a new technology based on semicon- decision circuit that can convey information in
ductor construction would replace triodes with a digital format. All modern microprocessors
transistors, in cases where low-power amplifi- use digital logic circuits to process data. Each 0
cation was needed. The transistor, when fully or 1 is called a bit, the maximum amount of in-
saturated, could turn a circuit on or off, and formation that can be used or stored by a de-
then could be used to control an electrical cir- vice that has only two possible states. These
cuit or store information in an electrical circuit. two states may be defined as off or on, 0 or 1,
By allowing the on/off states of these tran- no or yes, false or true. In computers, these
sistors to represent a low (0) usually near zero two states are binary digits designated as 0 and

March 2010 31
CRACKING THE CODE BEHIND DTCs
1. When four bits are combined to con- base-2 system, to convey information. puter, it’s based on a set of instructions
vey information, it’s called a nibble; if The base-2 system makes for very long that are executed by the central pro-
eight bits are used it’s called a byte. encoded messages or bit width, so pro- cessing unit (CPU). The CPU contains
It may be hard to understand how grammers came up with a way to short- thousands of transistors and logic cir-
just two states of operation could be en this encoding based on the hexadeci- cuits packaged in a very small design
used for the transmission and/or storage mal system (Fig. 2). Instead of a count known as an integrated circuit (IC).
of information. However, you’re already system based on 10—such as the deci- This package of transistors allows for
aware of such systems. One early use of mal system—the hexadecimal system logical decision circuits to operate using
digital binary bit encoding to send infor- uses a count system of 16 to convey in- the encoded messages known as a pro-
mation in an electrical format was the formation. The hexadecimal system us- gram. These logical decision circuits,
telegraph, which used Morse code. es numbers 0 through 9 and letters A when operating with the encoded mes-
Morse code uses a binary bit of dot (0) through F to encode information. You sages, will have a predictable outcome.
or dash (1) to convey data. With just two may have seen an example of this hexa- Since the outcome can be predicted,
states of operation, Morse code allows decimal encoding when reading Mode a logic path can be written to obtain a
very complex information to be trans- 6 data from an engine control module. desired outcome. The CPU’s task is to
mitted or stored. Whichever method of encoding or execute a sequence of stored instruc-
Computers use a binary code, or language is chosen to operate the com- tions, as indicated by the program. The

Switch Logic
AND Gate OR Gate

A B A

B
A “AND” B A “OR” B
Logic Gates
AND Gate NAND Gate
A A
Out Out
B B

OR Gate NOR Gate


A A
Out Out
B B
Illustrations: Blue Soroos/Automotive Test Solutions

EXCLUSIVE OR EXCLUSIVE NOR


A A
Out Out
B B

Fig. 1 Fig. 2

32 March 2010
CRACKING THE CODE BEHIND DTCs
program will run the primary instruction
set layer by layer, with many subrou-
tines, loops, conditions and exceptions DLC 12V
running layer by layer at the same time.
The CPU gets the instructions, decodes
them and carries them out, all based on
the physical layer of the IC and the
process scheduling from the program
control flow. The computer’s IC and 5V Reg.
program instruction set are based on
which system the controller is responsi- A/D
ble for, such as the engine management
system, wheel antilock control system, CPU
air conditioning control system, etc.
Regardless of the type of control sys-
tem used, the program will work with
the CPU to help it carry out its tasks. TPS Signal Voltage
The first task is to initiate the base pro- ECM High Due to
gram that will control and operate the Ground Resistance
device. In one of the subroutines, the
CPU will do a self-test on its internal Fig. 3
circuits. This self-test is based on what
the programmer decided was necessary gram label with an instruction set that at values that are above and below the
to verify the operation of the device. will check the powertrain throttle posi- operational voltage range of the circuit.
This is important because the program- tion sensor (TPS) for a voltage that’s less The purpose of these initial tests is to
mer designed the circuit self-test based than .2 volt for one second. If the volt- find a circuit that’s in a gross failure at
on an analysis of a good circuit and what age is below .2 volt for one second, the system start. If a circuit breaks the set
might fail within that circuit. program equals “true” and the DTC la- point over the prescribed time period,
To accomplish this, a set of instruc- bel P0122 will be stored. the program will be equal to “true” and
tions are written that allow set points or The program instruction set is writ- will carry out the correct program in-
thresholds to be above or below a set ten to check each circuit the program- structions. These instructions may be to
value for a set time period. If these pre- mer deems important. The circuit tests set this DTC in a pending column or to
determined set points are broken, the have set points against time that are as- set a mature DTC and turn on the vehi-
code in the program will show this is signed to each of these individual cir- cle’s warning lamp.
equal to “true,” and the instructions for cuits. These set points are programmed What’s important to understand here
this outcome will be to activate the
warning lamp and set a diagnostic trou-
ble code (DTC). If this test is to check Direct
the CPU, the DTC may read “internal DLC 12V Transmission
failure,” and the diagnostic trouble tree Wiring
would instruct you to replace the con-
trol unit. What needs to be understood A/D SOL A
here is that the instructions did not ac-
count for someone putting in an extra SOL B
fuse or relay in a spare location, or pos-
sibly a short circuit. This additional cir-
cuit now allows power to be applied to CPU
the CPU that can change the internal
voltage on the circuit the program is Input
Speed
looking at, thus setting a false DTC.
Once the subroutine self-test for the
internal circuit has run and passed, the Output
program initiates the next subroutine to Speed
check the basic circuits of the system it TCM
controls. Each one of these subroutines A/D Volt. Reg.
is labeled with the circuit to be tested.
One example of this is a P0122, a pro- Fig. 4

34 March 2010
Some of your service technicians probably use K&N products in their own cars and
trucks, so why don't you sell them too? Customers love K&N Air Filters for their
is that a circuit that’s within its opera- dependable performance and long life. Shops that install and service K&N products find
tional range may not set a DTC. One that they are easy to sell and are a great accessory item to suggest to someone looking
example of this is if a TPS has unwanted to personalize or add performance.
resistance in the ground circuit that
K&N filters are not new. Your service department probably already sees plenty of them
causes the sensed voltage to rise above
installed on your customer's cars. That's because K&N has sold over 30 million reusable
the clear flood mode set point (Fig. 3).
air filters in the past 40 years. K&N premium filters can increase parts revenue and can
This is a mode to shut the injector pulse
down during cranking so the spark grow your service business through installation and air filter cleaning services. K&N
plugs can dry. However, if the engine is products are hard to find at a repair shop, but progressive service and repair shops have
not flooded, this unwanted condition realized that selling K&N makes sense.
will cause a no-start problem. The pro-
40% of surveyed K&N customers want to be able to have them installed by their service
gram instructions would be: If the crank
provider. If they can't get it done at your service shop, then they will turn to an
signal equals “true,” and if TPS voltage
independent provider. K&N has created a K&N Authorized Dealer and Installer program
greater than 4.0 volts equals “true,” dis-
to help consumers find a K&N installer in their local area. This can drive new customers
able fuel injector pulse. The CPU acts
on the data that’s present. It has no way to you and increase traffic in your service department.
to check driver intent; it checks only the In 2009, K&N made over 1,500,000 consumer referrals under this program.
actual TPS voltage, and that the TPS
voltage is in range.
When writing the program, the pro-
grammer did not make the assumption
that the TPS signal would fail. The pro-
gram was written on the assumption - Go to KNFILTERS.COM/MOTM for more information
that the system is working correctly. - Register to become a K&N Authorized Dealer and Installer
There will be no DTC set for a problem - Check your dealer referral listing on knfilters.com®
such as this because the CPU carried
- Receive a free K&N welcome kit
out its instruction set correctly. Once
the subroutine self-test has run to com- - Sign up to receive electronic product data notifications
pletion, the tests may be suspended un- - Receive assistance in finding a K&N supplier
til the next key cycle, or they may be - Contact us at 877-AIR-FILTER or knfilters.com®
run in a continuous loop.
The base program will continue run-
ning to control the device, taking inputs
through logic circuits that have program
instructions. These instructions are
based on algorithms so the proper out-
puts can be obtained. During the con-
trol of the device, DTC subroutines will
run to check the operation of the cir-
cuits, sensors and actuators.
- Designed to increase horsepower and acceleration
Enabling Criteria Arsenal - Drops right in the factory air box
- Washable / Reusable
To obtain the highest probability of a
- K&N Million Mile Limited Warranty®
successful DTC subroutine test, en-
abling criteria will be used, which is a - Average retail price over $50
way of controlling the outcome of the - Available for 97% of cars and light trucks
test by controlling the variables. Just as
in a laboratory, to obtain consistent re-
sults, the test must hold the variables to
a minimum and use a set procedure. - Guaranteed to increase horsepower
The enabling criteria accomplish this - Replaces factory airbox with custom tube and filter system
by allowing the DTC subroutine to run - K&N Million Mile Limited Warranty®
only under certain conditions. Once all - Average retail price over $300
the conditions have been met, the DTC - Some kits have CARB exemption for use in CA
subroutine is allowed to run. One exam- - Detailed installation instructions
ple of this would be a small leak detect- - Opportunity for 90 minute install service charge
ed an evap system when running a test - Available for most cars and light trucks
Circle #23
CRACKING THE CODE BEHIND DTCs
for DTC P0442. The enabling criteria sure in the fuel containment system, all the nonliquid area is very large and
might read as: Fuel tank level greater criteria that can affect the pressure may not show the pressure change of
than 15% and less than 85% equals changes within the system must be an actual leak. In this case, a DTC will
“true,” ambient temperature greater controlled. If the fuel tank is full, the not set that should be set.
than 30°F and less than 95°F equals nonliquid area within the tank is very If the ambient temperature is lower
“true,” BARO greater than 70kPa small and may show a pressure change than 30°F, the gaseous phase above the
equals “true.” that’s not an actual leak and thus set a fuel could be contracting and show a
Since the test is dealing with pres- false DTC. If the fuel tank is empty, pressure change that’s not an actual
leak, thus setting a false DTC. If the
ambient temperature is higher than
95°F, the gaseous phase above the fuel
could be expanding and may cover up
an actual leak. In this case a DTC will
not set that should be set.
If the BARO is below 70kPa (high el-
evation), the pressure between the in-
side of the fuel containment system and
the atmosphere will not be enough to
change the sensed pressure inside the
tank if a leak is present and may not set a
DTC that should have been set. As you
can see, the enabling criteria are a way
to control the results of the DTC sub-
routine so the best possible conditions
are present during the testing sequence.
It’s important to look at the enabling
criteria at the beginning of the trouble
tree for the DTC. This will show which
sensors are being used to allow the
DTC subroutine to run. If a sensor
reading is inaccurate, it can allow the
test to run at the wrong time, or may
not run the test at all. In the P0442 ex-
ample above, the fuel level, intake air
temperature and manifold absolute
pressure sensors are used. If the fuel
level sensor malfunctioned and showed
three-quarters of a tank when the fuel
tank was actually full, it would allow the
DTC subroutine to run and would set a
false P0442.
When a DTC is set, you must check
a wiring diagram to see which wires are
present at the controller. To set a DTC,
the CPU must be able to check the out-
come of the DTC subroutine. To ac-
complish this, a circuit must be wired to
the control unit that the programmer
can use to check the outcome of the
test. This can be done with a direct test
or an indirect test.
In a direct test, the circuit to be test-
ed can be monitored by an electronic
Circle #24 device such as an analog-to-digital
(A/D) converter. The A/D converter
changes an analog voltage to a digital
code comprised of 0s and 1s. The CPU

36 March 2010
can be programmed to understand the
sequence of 0s and 1s on a parallel bus, Indirect
DLC 12V Transmission
or the sequence can be read by a serial
converter that can process this data and Wiring
send it on a serial line to the CPU.
The CPU can then use this informa-
SOL A
tion to determine whether the voltage
in the circuit had the anticipated and SOL B
correct change. One example of a direct
test is a transmission solenoid that was Volt. Reg.
commanded to be activated (Fig. 4, CPU Input
page 34). Once the program set points Speed
for a shift have been met, the CPU in-
structions turn on the transistor driver
for the solenoid. The program instruc- Output
tions then check to see whether the Speed
voltage state of the solenoid control cir-
cuit had changed to the expected value. TCM
If the voltage value did not change Volt. Reg.
within the program set points for a stat-
ed time period, a DTC is stored and the Fig. 5
appropriate instruction set is carried tra expense to the controller that may then the CPU checks the input speed
out. In order for a direct test to occur, not be needed in all circuits. sensor and compares it to the output
the circuit board must be designed with In an example of an indirect transmis- speed sensor. If the solenoid activation
the physical layer of the A/D converter sion solenoid activation test (Fig. 5), the was completed, then the ratio between
to monitor the circuit. This adds an ex- CPU commands the transistor driver on, the input and output speed sensors

Circle #25

March 2010 37
CRACKING THE CODE BEHIND DTCs
changes to a known factor. If this factor
does not change within the correct set DLC 12V Direct O2
points, a DTC is stored and the appro- Heater Circuit
priate instruction set is carried out.
With the indirect test design, the physi-
cal layer to check the input and output
speed sensors is already on the circuit A/D
board, so additional controller expense
is unnecessary. With this type of circuit
design, it’s important to understand that
a scan tool will display only the com-
manded state; it cannot show whether
CPU
that state actually occurred.
Another example of a direct or indi-
rect circuit test is a P0135 oxygen sensor
heater circuit fault. If the oxygen sensor A/D
heater circuit is wired directly to the
control unit, an A/D converter with a ba-
ECM
sic shunt circuit is used to directly check
the current of the circuit (Fig. 6). This
test circuit allows a voltage drop to occur Fig. 6
that the A/D converter can read and
that’s directly proportional to the current When you check a wiring diagram ing bulb is cold, the resistance is greater
flow. Now the programmer can write an and see that the wiring for the associat- than 100 megohms, and when this sens-
instruction set that converts this voltage ed DTC is not directly connected to the ing bulb is heated to 700°F, the resis-
from the A/D converter to an amperage control unit, you must look for the wire tance drops to less than 100 ohms.
reading. If this voltage is not within the that could convey the information to the This sensing bulb resistance change
program set point, a DTC is stored. In CPU directly. For the programmer to can be used to check the operation of
the case of an indirect reading for the write instructions for the DTC subrou- the heater circuit by applying a regulat-
oxygen sensor heater circuit, there’s no tine, a circuit must be connected to the ed voltage to a very large resistor inside
heater circuit wire connected to the con- control unit that can be used to obtain the control unit that’s connected in se-
trol unit (Fig. 7). The heater circuit pow- the information for the DTC. With the ries to the sensing circuit. This creates a
er wire is supplied directly from the igni- P0135, the CPU has a circuit inside the voltage divider circuit. The resistor in-
tion circuit or a relay and the heater cir- control unit that applies a bias voltage to side the control unit is fixed and the
cuit ground is connected directly to the the oxygen sensor signal wire. When the sensing bulb has a variable resistance
ground plane. zirconium dioxide oxygen sensor sens- that changes when heated. If the heater
circuit is working, it heats the sensing
Indirect O2 blub, thus changing the resistance of the
DLC 12V bulb. As the resistance of the sensing
Heater Circuit
bulb drops, so does the voltage between
the resistor and the sensing bulb. By
checking the voltage change between
the fixed resistor and the sensing blub
over a set time period, the programmer
A/D writes an instruction set that can run the
DTC subroutine. This allows a check of
oxygen sensor heater circuit without a
direct connection to the CPU.
CPU It’s important to understand the
digital logic behind the operation of
computer-controlled vehicle systems,
so they can be quickly and accurately
5V Reg. repaired.
ECM
This article can be found online at
www.motormagazine.com.
Fig. 7

38 March 2010

S-ar putea să vă placă și