The Local Interconnection Network (LIN) standard defines a low cost, serial communication network for automotive distributed electronic systems. LIN is a complement to the other automotive multiplex networks, including the Controller Area Network (CAN), but it targets applications that require networks that do not need excessive bandwidth, performance, or extreme fault tolerance.
LIN enables a cost-effective communication network for switches, smart sensors and actuator applications inside a vehicle. The communication protocol is based on the SCI (UART) data format, a single-master/multiple-slave concept, a single-wire (plus ground) 12 V bus, and a clock synchronization for nodes without a precise time base (i.e., without a crystal or resonator).
Typical LIN applications are associated with body-control electronics for occupant comfort, such as assembly units for doors, steering wheel, seats and mirrors, and motors and sensors in climate control, lighting, rain sensors, smart wipers, intelligent alternators and switch panels. With LIN, automotive subsystem designers can connect modules for these applications to the car's network and then have them accessible for a variety of diagnostics and services.
LIN versus CAN
Compared to CAN, LIN offers the advantage of lower cost per node when the bandwidth and performance of CAN is not needed. LIN's lower cost results from the use of single-wire communications, a lower implementation cost due to its lower UART complexity versus CAN, and need for crystals or ceramic resonators in the slave nodes.
The tradeoff for LIN's lower cost is the more restrictive nature of a single-master network and lower bandwidth, Table 1.
Table 1: LIN versus CAN comparison
(Click on image to enlarge)
The LIN bus is a single-wire bus connected via a termination resistor to the positive battery node Vbat. The bus line transceiver is an enhanced implementation of the ISO 9141 standard. In the United States, LIN-compliant components meet SAE J2602 specifications. The J2602 specification was developed to improve LIN component interoperability and interchangeability in a LIN network by resolving LIN 2.0 requirements that are ambiguous, conflicting, or optional, and adding additional requirements not present in the LIN 2.0 specification, such as fault tolerant operation.
The bus operates with two complementary logic levels:
- The dominant value with an voltage close to ground represents a logical '0'
- The recessive value with an electrical voltage close to the battery supply
Communications on the LIN is bus serial, frame-oriented over a maximum distance of 40 meters. Typical signal slew rate is 2V/μs. The bus is terminated with a pull-up resistance of 1 kΩ in the master node, and typically 30 kΩ in a slave node. The termination capacitance is typically 220 pF in the slave nodes and approximately ten times that value in the master node, so that the total line capacitance is less dependent on the number of slave nodes.
The bus is bidirectional and connected to the node transceiver, and also via a termination resistor and a diode to Vbat of the node (Figure 1), which can range from 8 V to 18 V.
Figure 1: Schematic of a typical LIN transceiver (from the LIN 2.0 Specification package, LIN Consortium [www.lin-subbus.org], Page 62)
(Click on image to enlarge)
The LIN bus does not need to resolve bus collisions since only one message is allowed on the bus at a time, hence no arbitration is employed and LIN network system developers can guarantee worst-case latency times.
The LIN physical layer specification requires that transceiver switching does not interfere with the performance of other electronic components in the vehicle. Designers have to make sure that the transceiver meets the EMC requirements of the automobile makers, using wave shaping or edge rounding to reduce high-energy harmonics from sharp wave edges and thus minimize radiated emissions.
With a recessive state, the transmitter is passive and the 1 kΩ pull-up resistor pulls the bus close to Vbat. A dominant state occurs when the transmitter actively pulls down the bus line towards the ground potential. All LIN transmitters operate as a wired-AND: they must all be in a recessive state in order for the bus to be in a recessive state.
Each LIN node needs to have a unique address before initiating normal-mode communication. The addresses can be set by one of the following ways: defined by the node's hardware (hard wired, one-time programmable [OTP], or switches), or assigned by the master node during power up after network installation or maintenance. In the case of master node assignment, slave nodes have no pre-defined addresses prior to connection to the LIN network and the address assignment at network startup is called "auto addressing" or Slave-Node-Position-Detection (SNPD).
Auto addressing is preferred since multiple nodes on the same LIN network can have similar functions and differ in only their addresses. Auto-addressing simplifies adding an additional node to the LIN network or replacing a defective node and thus reduces system upgrade or maintenance cost, since no manual intervention is needed for the new hardware. Nodes can be added to the LIN network without any hardware or software changes in existing slave nodes. Auto-addressing also lets developers integrate pre-assembled and pre-tested LIN modules into a network as the functions or options grow during the development process and at the end-of-line assembly of the vehicle. This allows multiple vehicles with varying options to use the same master node and varying sets of slave nodes to support the end-product options.
Figure 2 is a standard LIN bus topology with a single master and multiple slave nodes.
Figure 2: Block diagram of a typical LIN network
(Click on image to enlarge)
Each node comprises a transceiver controlled by a protocol-handler block that ensures the correct function of the data-link layer of the LIN protocol and correct exchange of data between the network and the application.
The master node differs from the slave nodes only by the presence of the pull-up resistor between the LIN bus and Vbat (for simplicity, the required reverse-protection diode together with other details of the bus connections are omitted in Figure 2). All nodes (master and slaves) are connected to the common LIN bus line by a single pin labeled "LIN."
The master node can often be supported by a high-performance 8-bit microcontroller with CAN interface and USART/Enhanced USART. The master node's memory needs depend on the required software functions, software stack and hardware I/O requirements. Slave node support can be accomplished with a lower performance, less expensive 8-bit microcontroller.
LIN Slave Implementation
Depending on the complexity of the slave application and budget, LIN subsystem developers can implement LIN in software, with a Standard USART, with an Enhanced LIN USART, or with dedicated LIN hardware. A purely software-based LIN implementation works for low- complexity applications such as switch panels, temperature sensors and LED displays. The low cost of this implementation is offset by a relatively high CPU load.
More complex systems, including actuators and motors, need higher CPU performance and utilize LIN implementations with a standard USART with the CPU offloaded, compared to a software LIN solution, by USART hardware features. The cost of a slave node using a standard USART are higher, due to a larger silicon area and the need for an external resonator or crystal.
Systems with even higher complexity require even more CPU performance for the application, which can be addressed with an Enhanced LIN USART (EUSART). EUSART features offload the CPU, and thus LIN systems using a EUSART work well with an on-chip RC oscillator, further helping to reduce overall system cost.
LIN application: Complex headlamp control
Figure 3 shows a LIN-based headlamp control system for leveling, swiveling and Adaptive Front Lighting System (AFS) of two headlamps.
Figure 3: Using a LIN bus, a headlamp control modular system needs a single ECU module for all control complexity configurations
(Click on image to enlarge)
The LIN Motor Driver in the figure is a two-phase, micro-stepping driver with a position controller which has integrated LIN control and diagnostics, Figure 4.
Figure 4: Block diagram of a bipolar, 2-phase stepper-motor driver IC from AMIS. The IC combines a position controller, motor driver and LIN control/diagnostics interface on a single chip, which can be mounted directly on a motor.
(Click on image to enlarge)
The headlamp controller receives high-level positioning instructions through the LIN interface and drives the motor coils until the desired position is reached. An on-chip position controller is configurable for different motor types, positioning ranges and parameters for speed, acceleration, and deceleration. Sensorless stall detection prevents the controller positioner from losing steps, and stops the motor if the system detects a stall condition. The master node can fetch specific status information such as actual position and error flags from each individual slave node.
The high abstraction level of the command set in the LIN Motor Drive controller reduces the load on the microprocessor in the ECU (Electronic Control Unit). Scaling of the application for different number of axes of headlamp motion control, representing different feature, is straight-forward, since hardware and software designs are modularly extended, with minimal impact on the demands on the master microcontroller. This subsystem design is advantageous since it uses only one ECU and adding or removing optional motors to support a desired feature set is an easy and inexpensive way to scale the system's control functions.
The Local Interconnection Network (LIN) standard offers an alternative to other multiplex networks, such as CAN, by providing a lower cost network than CAN for applications that do not need excessive bandwidth or performance. LIN provides a cost-effective, single-master, multiple-slave communication network for switches, smart sensors and actuator applications inside a vehicle. Typical automotive uses for LIN are body control electronics for occupant comfort, including assembly units for doors, steering wheel, seats and mirrors, and motors and sensors in climate control, lighting, rain sensors, smart wipers, intelligent alternators and switch panels.
About the authors
Jan Polfliet is a manager for worldwide automotive ASSP products at AMI Semiconductor. For more than thirty years, he has been involved in engineering, from process engineering to production manager. Prior to joining AMI Semiconductor in 2002, Jan was a product marketing manager at Alcatel Microelectronics. With Alcatel, Jan was responsible for defining, creating and promoting ASSP products ranging from plain consumer products like DECT, GSM and Bluetooth to more specific ASSP products like IVN transceivers and LED drivers for the automotive and industrial markets. Jan received his Master's degree in computer science. He speaks Dutch, French and English.
Pavel Drázdil completed his university studies in Technical Cybernetics at The Brno University of Technology, the Czech Republic, in 1994. During his final year and after graduation, he spent four4 terms at the "Laboratoire d'Instrumentation Microinformatique et Electronique" and "Laboratoire d'Automatique de Grenoble" in Grenoble, France. In 1997, he joined Alcatel Microelectronics, which later became AMI Semiconductors. After being a mixed-signal design engineer, project-leader and layout group-leader, he became an application engineer for in-vehicle networking products, focusing on LIN, CAN and FlexRay.