Docsity

CAN Bus: Understanding Controller Area Networks and Their Advantages over Ethernet, Study Guides, Projects, Research of Digital Communication Systems

Toggle sidebar
bg1
CAN – Controller Area Network
• The general CAN specification (ISO11898) defines the physical layer and data link
layer
• Many other standards define application layers and physical layers
• The problem with Ethernet
1. Latency is not deterministic – CSMA/CD
2. Ethernet frame overhead for small data size
Ex. Sending an 8-bit sample:
RrB
T
)1( += Manchester encoding → ½ Efficiency
RRRR T
ND
N
eff 014.0
2646
1=
+
== Frame inefficient
009.0
)1(
014.0 =
+
== rB
R
T
eff
eff
η
for r=0.5
• Controller area networks require deterministic latency and must send/receive a small
amount of data quickly. Computers large data files as-fast-as-it-can.
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download CAN Bus: Understanding Controller Area Networks and Their Advantages over Ethernet and more Study Guides, Projects, Research Digital Communication Systems in PDF only on Docsity!

CAN – Controller Area Network

• The general CAN specification (ISO11898) defines the physical layer and data link

layer

• Many other standards define application layers and physical layers

• The problem with Ethernet

1. Latency is not deterministic – CSMA/CD

2. Ethernet frame overhead for small data size

Ex. Sending an 8-bit sample:

BT = ( 1 + r ) R Manchester encoding → ½ Efficiency

R R R R

NT

ND

eff^0.^014

= = Frame inefficient

B r

R

T

eff

η eff for^ r =0.

• Controller area networks require deterministic latency and must send/receive a small

amount of data quickly. Computers large data files as-fast-as-it-can.

Physical Layer - Signaling

• ISO11898 and SAE J2284 Standards

• CAN uses differential dominate/recessive signaling.

• System Diagram (Phillips TJA1040 App Note AN10211)

RT = 120Ω

• 0 → Dominate, 1 → Recessive (ESC Class 109)

• Signal Details (Phillips TJA1040 App Note AN10211)

2

Data Link Layer – Frame Construction and MAC

• Standard Frame Construction, CAN V2.0A

S O F

Identifier 11 bits

R T R

I D E

r 0

DLC 4 bits (^) 0 to 64 bitsData Field 15 bitsCRC

A C K

EOF 7 bits

Recessive

Dominent

Arbitration Field ControlField Data Field

Standard CAN Frame

Inter 3 bits

D e l m

D e l m

Bit Stuffing

• Extended Frame Construction, CAN V2.0B

S O F

Identifier 11 bits

S R R

I D E

r 0

DLC 4 bits (^) 0 to 64 bitsData Field 15 bitsCRC

A C K

EOF 7 bits

Recessive

Dominent

Arbitration Field ControlField Data Field

Extended CAN Frame

Inter 3 bits

D e l m

D e l m

Bit Stuffing

Identifier Ext 18 bits

R T R

r 1

SOF – Start-of-Frame, 1-bit

Identifier – Identifies the message and priority, 11-bits, MSB first

RTR – Remote Request, Dominate if Data Frame

IDE – Identifier Extension bit, Dominant if Standard Frame

SRR – Substitute Remote Request

r0,r1 – Reserved for future Expansion

DLC – Data Length Code, Equal to the number of bytes in the data field.

CRC – Cyclical Redundancy Check, 15-bit CRC + one recessive delimiter bit.

ACK – Acknowledgment Field, 1 bit Acknowledgment slot + one recessive delimiter

bit.

EOF – End-of-Field, 7 recessive bits.

Inter – Intermission, must be greater than or equal to 3 bits.

4

  • Medium Access Control – CSMA/CA

CAN.doc, 06/01/07 ©Todd Morton 5

Parameter Group Specification Examples: 3.3.32 FUEL ECONOMY Transmission repetition rate: 100 ms Data Length: 8 bytes Data Page: 0 PDU Format: 254 PDU Specific: 242 Default Priority: 6 PGN 65,266(0x00FEF2) Byte: 1,2 Fuel Rate 3.2.5. 3,4 Inst. Fuel Econ. 3.2.5. 5,6 Avg. Fuel Econ. 3.2.5.

3.3.37 VEHICLE ELECTRICAL POWER Transmission repetition rate: 1 s Data Length: 8 bytes Data Page: 0 PDU Format: 254 PDU Specific: 247 Default Priority: 6 PGN 65,271(0x00FEF7) Byte: 1 Net Battery Current 3.2.5. 2 Alternator Current 3.2.5. 3,4 Alternator Potential 3.2.5. 5,6 Electrical Potential 3.2.5. 7,8 Battery Potential, switched 3.2.5.

3.2.5.63 Fuel Rate – Amount of fuel consumed by engine per unit time Data Length: 2bytes Resolution: 0.05 L/h per bit gain, 0 L/h offset (13.9 x 10-6^ L/s per bit) Data Range: 0 to + 3212.75 L/h Type: Measured Suspect Parameter Number: 183

3.2.5.67 Instantaneous Fuel Economy – Current fuel economy at current vehicle velocity Data Length: 2bytes Resolution: 1/512 km/L per bit gain, 0 km/L offset Data Range: 0 to + 125.5 km/L Type: Measured Suspect Parameter Number: 184

3.2.5.68 Average Fuel Economy – Average of instantaneous fuel economy for that segment of vehicle operation of interest. Data Length: 2bytes Resolution: 1/512 km/L per bit gain, 0 km/L offset Data Range: 0 to + 125.5 km/L Type: Measured Suspect Parameter Number: 185

3.2.5.75 Battery Potential(Voltage), Switched – Electrical potential measured at the input of the electronic control unit supplied through a switching device. Data Length: 2 bytes Resolution: 0.05V per bit gain, 0V offset Data Range: 0 to 3212.75 V Type: Measured Suspect Parameter Number: 158

CAN.doc, 06/01/07 ©Todd Morton 7

  • Parameters Specification Examples:

3.2.5.76 Alternator Potential(Voltage) – Electrical potential measured at alternator output. Data Length: 2 bytes Resolution: 0.05V per bit gain, 0V offset Data Range: 0 to 3212.75 V Type: Measured Suspect Parameter Number: 167

3.2.5.77 Electrical Potential(Voltage) – Measured electrical potential of battery. Data Length: 2 bytes Resolution: 0.05V per bit gain, 0V offset Data Range: 0 to 3212.75 V Type: Measured Suspect Parameter Number: 168

3.2.5.78 Net Battery Current – Net flow of electrical current into/out of the battery or batteries. Data Length: 1 byte Resolution: 1.0A per bit gain, - 125A offset Data Range: -125 to + 125 A Type: Measured Suspect Parameter Number: 114

3.2.5.79 Alternator Current – Measure of electrical flow from the alternator. Data Length: 1 byte Resolution: 1.0A per bit gain, 0A offset Data Range: 0 to + 250 A Type: Measured Suspect Parameter Number: 115

8

From Tim Jackson’s Website:

(http://eet.etec.wwu.edu/jacksot3/project/can/CAN_files/frame.htm)

10

From Tim Jackson’s Website:

(http://eet.etec.wwu.edu/jacksot3/project/can/CAN_files/frame.htm)

CAN.doc, 06/01/07 ©Todd Morton 11