Global Sources
EE Times-Asia
Stay in touch with EE Times Asia
?
EE Times-Asia > Embedded
?
?
Embedded??

Physical layer is key in LIN designs

Posted: 16 May 2008 ?? ?Print Version ?Bookmark and Share

Keywords:Local Interconnection Network? serial communication network?

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 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) 12V 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 those applications to the car's network and then have them accessible for a variety of diagnostics and services.

LIN vs. CAN
Compared with CAN, LIN offers the advantage of lower cost per node when the bandwidth and performance of CAN are not needed.

LIN's lower cost results in part from the use of single-wire communications and its lower UART complexity compared with CAN. The trade-off for LIN's lower cost is the more-restrictive nature of a single-master network and lower bandwidth.

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.

Complementary logic levels
The bus operates with two complementary logic levels:? The dominant value with a voltage close to ground represents a logical 0.
? The recessive value with an electrical voltage close to the battery supply voltage represents a logical 1.

Communication on the LIN bus is serial, frame-oriented over a maximum distance of 40m. Typical signal slew rate is 2V/?s. The bus is terminated with a pull-up resistance of 1k in the master node and typically 30k in a slave node. The termination capacitance is typically 220pF in the slave node and about 10x that value in the master node, so that the total line capacitance is less dependent on the number of slave nodes.

The bus is bi-directional and connected to the node transceiver, and also via a termination resistor and a diode to Vbat of the node (Figure a), which can range from 8V to 18V. 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 PHY specification requires that transceiver switching 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 1k pull-up resistor pulls the bus close to Vbat. A dominant state occurs when the transmitter actively pulls down the bus line toward 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 either be defined by the node's hardware (hardwired, one-time programmable or switches), or assigned by the master node during power-up after network installation or maintenance. In case of master node assignment, slave nodes have no predefined addresses prior to connection to the LIN network, and the address assignment at network startup is called auto-addressing or Slave Node Position Detection.

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 pretested 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 end-product options.

Sample configuration
Figure b is a standard LIN bus topology with a single master and multiple slave nodes. 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 network and 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 b). All nodes (master and slaves) are connected to the common LIN bus line by a single pin labeled LIN.

The LIN bus is a single-wire bus connected via a terminator resistor to the positive battery node Vbat (a); a standard LIN bus topology has a single master and multiple nodes (b).
(Click to view image.)

The master node can often be supported by a high-performance 8bit MCU 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 8bit MCU.

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 (EUSART) 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.

Complex systems
More-complex systems, including actuators and motors, need higher CPU performance and utilize LIN implementations with a standard USART with the CPU offloaded, compared with a software LIN solution, by USART hardware features. The cost of a slave node using a standard USART is higher, because of 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 EUSART. Features of EUSART offload the CPU, and thus LIN systems using an EUSART work well with an on-chip RC oscillator, further helping to reduce overall system cost.

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.

Reducing load
The high abstraction level of the command set in the LIN motor drive controller reduces the load on the microprocessor in the electronic control unit (ECU). Scaling of the application for different numbers of axes of headlamp motion control, representing different features, is straightforward, 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.

Cost-effective alternative
The 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 applications 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.

- This article is contributed by Jan Polfliet and Pavel Drazdil of AMI Semiconductor Inc., now ON Semiconductor Corp.





Article Comments - Physical layer is key in LIN designs
Comments:??
*? You can enter [0] more charecters.
*Verify code:
?
?
Webinars

Seminars

Visit Asia Webinars to learn about the latest in technology and get practical design tips.

?
?
Back to Top