Documente Academic
Documente Profesional
Documente Cultură
Abstract
The rising numbers of sensors, actuators and electronic controls increased the complexity of automotive networks.
Moreover, multiple network systems have evolved to meet the different requirements coming from automotive
applications. A gateway Electronic Control Unit (ECU) is a central network interconnecting system to link various field
buses in a vehicle. In this paper, a gateway ECU is proposed to interconnect Controller Area Network (CAN) and Local
Interconnect Network (LIN) field buses for Low Price Vehicles (LPVs).
A gateway ECU is necessary for addressing the communication and network challenges in todays vehicles. A study is
conducted to know about existing commercial gateway ECU, and derive the specification for a gateway ECU suitable for
LPVs. The proposed gateway ECU is designed based on this specification and implemented using PIC microcontroller
and line transceivers for interconnecting LIN and CAN buses. The designed gateway ECU has been successfully validated
using two other nodes one node with LIN and another with CAN networks.
The proposed gateway ECU has optimal functionality and is cost effective solution for LPV segments. The trends in
automotive networks and electronics show that the LPV needs to have only CAN and LIN networks in next one to two
decades. In short, the proposed gateway ECU has optimal balance between functionality and cost, and is best suitable for
LPVs.
Key Words: Electronic Control Unit, Gateway, In Vehicle Network, Control Area Network, Local Interconnect Network,
Low Price Vehicle
several ECUs and the need for information exchanges
among them have been evolved.
The
different
performance
requirements
throughout a vehicle, as well as competition among the
companies in automotive industry, have led to the
design of a large number of communication networks.
A gateway is required to manage all these in vehicle
networks and messages effectively. Network gateway is
a device or a piece of software in a computer that
forwards and routes data packets along networks. A
possible gateway concept in a LPV is depicted in Fig. 1.
This paper focuses to design, implement and validate
gateway ECU to interconnect LIN and CAN networks
of LPV.
Abbreviations
AUTOSAR
AVC-LAN
BEAN
CAN
ECU
FPGA
LIN
LPV
Mbps
MOST
OSI
PDU
PSoC
RAM
TP
TTP
kbps
uC
Smart Sensor
Dashboard Unit
1. INTRODUCTION
Since the 1970s, an exponential increase in the
number of electronic systems has been observed that
have gradually replaced those that are purely
mechanical or hydraulic as discussed in [1]. In early
days, each new function was implemented as a standalone ECU, which is a sub-system composed of a
microcontroller and a set of sensors and actuators. The
evolution of automotive electronics since 1960 was
tremendous starting from simple ignition control to Xby-wire technology by 2010 [2]. As the electronics
increased, the need for functions to be distributed over
SAS
TECH
Immobiliser
Gateway ECU
Engine ECU
79
SAS
TECH
80
Values in LPVs
~1020
CAN, LIN
~200400
CAN : 500kbaud
LIN : 9.6kbaud
Simple scheduler
Single
Possible
32..64kB
820MHz
<=3 (10ms,100ms,
1000ms)
Be able to configure CAN message parametersidentifier, message length and data pointer.
Be able to configure LIN message parameters identifier, communication mode transmit/ receive
and message data.
SAS
TECH
81
Start
Initialise timer for scheduler, LIN,
CAN, display and interrupts
100ms lapsed?
1000ms
lapsed?
10ms lapsed?
Yes
Yes
No
No
Yes
send CAN, LIN
messages
scheduled for
1000ms
No
Check for any
new CAN and
LIN messages received?
Yes
Check if the new message
needs to be converted?
Yes
No
Yes
if LIN to CAN
convertion?
if CAN to LIN
convertion?
Yes
No
Yes
Yes
Do protocol
convertion from
CAN to LIN
No
Do protocol
convertion from
LIN to CAN
Yes
If Master node?
No
If BREAK sequence
is received?
Yes
Receive SYNC and ID
If Master to send
message?
Yes
Compute the checksum and
send data bytes followed by
checksum
If Master is sending
the message?
Yes
End
SAS
TECH
82
Start
CAN Initialisation in
Receive mode (Port,
Buadrate, mask etc)
New message
received? (Buf
status)
Yes
Identify the buffer in
which new data
received
Configure CAN
module in transmit
mode
No
No
Data transmission
is completed?
No
Yes
Scheduler
triggered? (10ms,
100ms,1000ms)
Yes
New message to be
transmitted?
}CANMsgHdr;
LIN message buffer is defined as array of the
below data structure
typedef struct {
unsigned char LIN_FrameStat;//Frame status
unsigned char LIN_ComMode;// Com mode :
(RECEIVE or TRANSMIT)
unsigned char LIN_Identifier; // Identifier
unsigned char LIN_MsgPtr[9]; // data
}LINMsgHdr;
End
No
SAS
TECH
83
D1
CP1
X1
33pF
40
39
38
37
19
20
21
22
27
28
29
30
V1
VBB
1N4001
EN
RXD
TXD
8
RC4
RC3
RC2
RB7
RB6
RB5
RB4
23
18
17
LBUS
INH
TPIC1021
LIN Bus
220pF
C2
1
4
D1
R2
1K
GN D
26
25
3
7
U2
N W ak e
V SU P
15
16
24
OSC1
OSC2
3
1
RS
E nable
D B0
D B1
D B2
D B3
D B4
D B5
D B6
D B7
7
8
9
10
11
12
13
14
RC7/RX
RC6/TX
10K
14
RC0
RC1
RC5
VO
VCC
RB0
RB1
RB2/CANTX
V SS
U3
1
36
4
5
8
V SS
RB3/CANRX
33
34
35
13
RD0
RD1
RD2
RD3
RD4
RD5
RD6
RD7
R3
3 2
VD D
12MHz XTAL
MCLR/VPP/RE3
RA0
RA1
RA2
RA3
RA4
RA5
RE0
RE1
RE2
VCC
2
15
VCC
CS1
MC1602-13 - LCD 16 x 2
TXD
RXD
Vref
Rs
CANL
V SS
33pF
C1
2
3
4
5
6
7
8
9
10
VD D
11
U1
R1
1K
32
VCC
VD D
VCC
GND
CS2
R/W
4
6
1
16
5
31
12
CANH
CAN Low
R4
120R
CAN High
MCP2551
2
PIC18F4580
Title
Gateway ECU
Size
A
Document Number
001
Date:
Rev
000
Sheet
of
Power Supply
CAN Node
LIN Node
SAS
TECH
84
Us ed, 22.74%
Free, 77.26%
OSCPU
1%
ProtCOnv
19%
Components
Can
20%
MC9S12XDP512C PIC18F4580 :
AL : $10.27
$4.38
LIN Transceiver MCZ33689DEW : TPIC1021 :
$1.70
$0.55
CAN Transceiver MCZ33989EG : MCP2551 :
$2.33
$0.79
Total
$14.3
$5.72
(approximate)
All price for approximately 1000 samples from the
websites www.microchip.com, www.ti.com,
www.freescale.com
Tools
MC9S12XDP512 PIC18F4580
CAL
Compiler suite
CodeWarrior
MPLAB IDE :
Professional
Free
(IDE+Compiler) MPLAB C
from $1995
Compiler :
$495.00
Programmer
M68CYCLONEP PICSTART
ROE ~$498
PLUS
Programmer :
$ 223.99
Debugger
MPLAB ICD
3 : $219.99
Total
$2493.00
$938.98
(approximate)
All price for approximately for one sample from the
websites www.microchip.com, www.freescale.com
High end gateway Proposed
gateway
Development
~12-18 man
~6-12 man
effort
months
months
GatMain
18%
Library
6%
Us ed
3 4%
Fr ee
66%
can
14%
Library
7%
stack
48%
disp
11%
GatMain
1%
OSCPU
2%
LINMast
8%
ProtCOnv
9%
SAS
TECH
Proposed
Microcontroller
disp
14%
LINMast
22%
High end
85
5. LIMITATIONS OF PROPOSED
GATEWAY ECU
[4]
[5]
[6]
[7]
[8]
[9]
[10]
[11]
6. CONCLUSION
[12]
[13]
[14]
[15]
[16]
[17]
REFERENCES
[18]
SAS
TECH
[19]
[20]
86