7
4 FEATURE ARTICLE Riding the CAN Bus Faster, lighter, more reliable, and cheaper

Riding the CAN Bus...BMW first used a CAN bus on the 1993 740i/iL as a data link between the DME (Digital Motor Electronics module) and the EGS (electronic transmission control), and

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Riding the CAN Bus...BMW first used a CAN bus on the 1993 740i/iL as a data link between the DME (Digital Motor Electronics module) and the EGS (electronic transmission control), and

4

FEATURE ARTICLE

Riding the CAN Bus

Faster, lighter, more reliable, and cheaper

Page 2: Riding the CAN Bus...BMW first used a CAN bus on the 1993 740i/iL as a data link between the DME (Digital Motor Electronics module) and the EGS (electronic transmission control), and

Well, based on various estimates, thetypical mid-size car can have up to threemiles of wiring. Now, three miles of any-thing weighs a lot and takes up a lot ofspace. And installing all the wiring in a caralso takes a lot of time and money. With theapparently unending growth in the use ofelectronic components in modern vehi-cles, even more wiring will be necessary inthe future.Anything that reduces the amount of

wiring in a vehicle saves space, weight, andmoney. That's why BMW and other car-makers are jumping on the "CAN" Bus.CAN stands for “Computer Area Network”and “bus” is an electronics term for a sys-tem that links multiple points or devicestogether with a common connection.CAN bus technology was developed in

the late 1980s by Intel™ and Robert Bosch.The companies realized that unless therewas a way to reduce the amount of wiringneeded in a modern vehicle, the automo-tive industry was on the verge of an unman-ageable wiring problem.On a BMW, the ECU (Engine Control

Unit) requires inputs for engine speed, airtemperature, coolant temperature, throttleposition, road speed, etc. to properly man-age spark timing and fuel flow for optimalpower and fuel economy while also mini-mizing emissions. In the pre-CAN busdays, each sensor had to be connected tothe ECU with a separate wire, and the sig-nals from each sensor differed by dutycycle, frequency, range, etc. So, the result-ing connection to the computer was a thickwiring harness that had to fit in the limitedspace available inside the car.With a CAN bus, that thick harness is

gone, replaced by just two copper wirestwisted together. One wire is the called the“CAN-high,” the other is “CAN-low.” Each

wire transmits an opposing signal throughthe system at the same time. The opposingsignals virtually eliminate the effects of out-side electrical interference on signals sentover the CAN bus.Both wires are attached to every compo-

nent in the system. “Node” is the genericname for any device on a CAN bus. In auto-motive use, the nodes are usually “trans-mitters” and “receivers.” The transmitternodes are the various sensors and otherdevices that provide input data to the com-puter system. The receiver nodes are theactuators that receive and respond to data.

5

DME

Cluster

DSC

EGS

SteeringAngleSensor

DME

Cluster

DSC

EGS

SteeringAngleSensor

Before CAN bus, every componentwas wired to every other componentindividually (above). With CAN bus,one set of wires connects everything.

Yes, there is a lot of wire in a car,but did you ever wonder just howmuch wire?

Page 3: Riding the CAN Bus...BMW first used a CAN bus on the 1993 740i/iL as a data link between the DME (Digital Motor Electronics module) and the EGS (electronic transmission control), and

BMW first used a CAN bus on the 1993740i/iL as a data link between the DME(Digital Motor Electronics module) and theEGS (electronic transmission control), andstarted using it for scan tool communica-tions on the E70 and R56. Since then, BMWhas expanded its use of the technologyacross its entire vehicle lineup. The earlyBMW CAN bus installations used shieldedcable, but since MY 2000, the system usestwo copper wires twisted together.

On current BMWs, the CAN bus typicallylinks the:

• Engine controller (DME)• Electronic transmission controller (EGS)• Dynamic stability controller (DSC)• Instrument Cluster (KOMBI)• Lateral acceleration sensor

BMW also uses K-bus and MOST-bustechnology on its later models. The K-busor Body Bus is a “low speed” circuit used toconnect components inside the vehicle.The MOST-bus is an extremely fast fiberoptics circuit used to transmit visual oraudio signals.

Benefits

BMW is certainly not alone in riding theCAN bus. The technology has become thevirtual standard for under-hood and under-car communication among electronicdevices on almost every new vehicle fromevery manufacturer in the world. CAN bustechnology is also being used in many non-automotive applications, wherever sophis-ticated electronic components must com-municate with each other in a system.According to various electronic industryestimates, hundreds of millions of devicesor systems using a CAN bus are manufac-tured every year.It is easy to see why BMW has moved

quickly to adopt the system, because CANbus technology:

• Replaces multiple bundles of thick wiringharnesses with just two twisted wires, saving weight, space, and installation cost.

• Not only reduces the wiring needed, but also reduces the number of components

CAN

6

120 OhmTerminalResistor

120 OhmTerminalResistor

BMW CAN bus technology connects multiple components with just two twisted wires.

Page 4: Riding the CAN Bus...BMW first used a CAN bus on the 1993 740i/iL as a data link between the DME (Digital Motor Electronics module) and the EGS (electronic transmission control), and

in the system because messages from any component are shared throughout the system. For example, the ambient air temperature sensor can send data to both the ECU and the climate control system, instead of requiring two temper-ature sensors, one for the ECU and one for the climate control.

• Is energy efficient. The bus operates on 2.5 volts and goes into “sleep mode” when no messages are being transmit-ted. The system immediately “wakes up”when a message is sent.

• With fewer wires and components, is more reliable in the harsh under-hood and under-car environments.

• Is extremely accurate. The system has virtually no transmission failures or errors.

• Makes troubleshooting easier. The system can identify any node that is not performing properly and transmit a failure code for that component.

7

• Is easier to modify, adapt, or expand to meet different vehicle requirements.

Different from multiplexing

The CAN bus concept is similar to “multi-plexing” with one significant difference. In amultiplex system, each transmitter andreceiver has a unique address. Each mes-sage is sent directly from one unit to anoth-er unit. The message bypasses all othercomponents on the system.With a CAN bus, all nodes can send and

receive data equally. In theory, any givennode could communicate with all of theother nodes at any time. However, the pro-gramming controlling the CAN bus labelseach message sent out with a uniqueidentifier code. As the message isreceived, each component on the system“opens” or “reads” the message andimmediately looks for the identifier code.A component will process only the mes-sages that have the correct ID code for thecomponent. All other messages areignored. The use of identifier codes,

AmbientTemperature

Sensor

Additional Sensor(no longer used)

AmbientTemperature

Sensor

K-BusAmbient

TemperatureSignal

BMW uses a different bus, the K-bus or Body bus, for low speed data transmissioninside the vehicle.

Page 5: Riding the CAN Bus...BMW first used a CAN bus on the 1993 740i/iL as a data link between the DME (Digital Motor Electronics module) and the EGS (electronic transmission control), and

and a series of “bytes” forms the digitalmessage or signal that is transmitted alongthe CAN bus.

Troubleshooting

BMW uses a “Tree” or “Linear” arrange-ment for its CAN bus applications. Twoother setups, the Ring and the Star, areused with the K-Bus and MOST-busapplications. In a Tree arrangement, thetwisted wires are the “trunk” and eachcomponent on the circuit is a branch. Theability to easily add or delete componentsgives the CAN bus its flexibility for differ-ent applications.

instead of unique address , is one reasonwhy CAN bus systems can be easily mod-ified and expanded. The identifier code also gives the mes-

sage its priority. When a componentreceives two messages at the same time,the node will process the higher prioritymessage first, ignoring the lower prioritymessage. Within the CAN bus system, nomessages are ever lost. The lower prioritymessage is stored and retransmitted later,after the high priority message has beenprocessed. In addition to priority, the iden-tifier code also tells the CAN bus how fastto send the message. For example, the sig-nal to activate the antilock brake system(ABS) would be sent at the fastest possiblespeed through the system, while an adjust-ment to the climate control system wouldbe sent a at slower speed.

Of course, to a CAN bus, later and slowerare measured in milliseconds. To humans,high and low priority messages areprocessed at the same time and there is nosuch thing as slower, but within the CANbus, there is a later and slower. In a BMWCAN bus, data is transmitted at speeds upto 500K (500,000) bits per second (bps),which is an extremely fast rate for a “hardwire” system. “Bit” is the electronics termor abbreviation for “binary digit” which iseither a 0 or a 1. Eight bits make up a “byte”

CAN

8

ElectricalSignal

8Corresponding

"Bits"

One Byte8 Bits =

0 1 0 1 0 1 0 1

A digital signal is either 0 (off) or 1(on). Each signal is a bit, and eight bitsmake a byte.

CU CU

S O S

Morse code is a “human” version ofthe electronic bit. In between sendinga dot or dash (switch on) there is nosignal (switch off).

The K-bus normally uses a “ring”structure.

Page 6: Riding the CAN Bus...BMW first used a CAN bus on the 1993 740i/iL as a data link between the DME (Digital Motor Electronics module) and the EGS (electronic transmission control), and

The CAN bus is normally a very reliablesystem, but problems can occur. If there isa CAN bus communications fault that usesthe term “Timeout,” this refers to a compo-nent that cannot communicate with otherunits on the system. Each component willattempt to communicate several times.If there is no success after multipleattempts, the system will store a “Timeout”or “CAN bus” failure code. The system willself-diagnose to determine if the problem iswithin the bus or one of the units that can-not receive its messages.

Wiring failure

Before testing the CAN bus, check tomake sure that there is normal battery volt-age present and that the charging systemis operating.Failure of the CAN bus wiring can be

caused by a break in the wire, shorts to bat-tery voltage or ground, the two wiresbecoming shorted to each other, or a badconnection with one of the units on thesystem.Test for voltage drop and continuity

among the components. The CAN busshould show an average of 2.5V on both the

CAN-high and CAN-low wires. However,the presence of 2.5 volts does not eliminatethe possibility of a fault in the bus, it onlyindicates that there is adequate voltage forproper operation.CAN bus wiring is tested like any other

automotive wiring. Check the twisted wiresfirst. Then test for continuity between theconnections of the different components,with all components disconnected from apower source.

Resistor failure

Terminal resistors are used in the CANbus circuit to establish the correct imped-ance to ensure fault-free communication.A 120 Ohm resistor is installed in two con-trol units of the CAN between CAN-H andCAN-L. Because the CAN is a parallel cir-cuit, the effective resistance of the com-plete circuit is 60 Ohms. On some vehi-cles there is a jumper wire that connectsthe two parallel branches together, othershave an internal connection at the instru-ment cluster.

9

The ultra-high speed MOST-bus usesa “star” structure.

The “tree” or “linear” structure isused for all of BMW’s CAN bus instal-lations.

Page 7: Riding the CAN Bus...BMW first used a CAN bus on the 1993 740i/iL as a data link between the DME (Digital Motor Electronics module) and the EGS (electronic transmission control), and

The resistance is measured by connect-ing the appropriate adapter to any of themodules on the CAN and measuring theresistance between CAN-Low and CAN-High. The resistance should be 60 Ohms.The CAN bus is very stable and can con-tinue to communicate if the resistance onthe CAN bus is not completely correct;however, sporadic communication faultswill occur.The terminal resistors are located in the

ASC/DSC control unit and either the instru-ment cluster or in the DME. Early 750iLvehicles that used the star connector havea separate external resistor, which con-nects CAN-H and CAN-L together.Modules that do not have the terminal

resistor can be checked by disconnectingthe module and checking the resistancedirectly between the pins for CAN-H andCAN-L. The value at these control unitsshould be between 10 kOhms and 50kOhms

Control unit failure

Each component attached to the CANbus has its own communications modulethat allows it to communicate with othernodes on the bus. Failure of a control unit’scommunication module normally triggers afault code in the other units on the bus.In rare cases, failure of one unit can take

down the entire bus. When that happens,every unit will store a fault code. To isolatethe defective unit, disconnect units one at atime while monitoring CAN bus readingswith an oscilloscope or voltmeter. When thedefective unit is disconnected, the faultswill only point to communication with thatunit and none of the other units.

Interference

Interference is rare, but can happen.Unfortunately, interference problems oftenresemble shorts or communications fail-ures. The primary causes of interferenceare a defective alternator or improperlyinstalled aftermarket components. Checkthe CAN bus operation. If no problems arefound with the system, verify that generatoroperation is normal. Then check for after-market devices that have been added to thecar. Disconnect each device to see if theinterference problem disappears.

CAN

10

Voltage

Current2A

MFK 1 MFK 2 Currentprobe

Effective value

Current50A

Current1000A

Diode test-l>l-

Pressurebar

automatic

Freeze image

MinimumMaximum

2ndmeasurement

Stimulate

Presetmeasurements

System voltageRotation speed

PressureSensor

TemperatureSensor

Resistance Temperature°COhmV

Both CAN-high and CAN-low shouldaverage about 2.5V in normal opera-tion.

Cursor 1A {V} Memory Cursor 2Freeze Image

Channel B

Zoom

AmplitudeChannel A

AmplitudeChannel B

Time Value

Stimulate

B {V} V

Trigger

level

ms

The top trace shows the 2.5V baseline for the CAN-low wire. The volt-age is “pulled down” during datatransmission. The lower trace showsthe 2.5B base for the CAN-high. Itsvoltage is “pulled up” during datatransmission.