The Local Interconnect Network (LIN) is a low-cost embedded networking standard for connecting intelligent devices. LIN is most popular in the automotive industry.
The Local Interconnect Network (LIN) bus was developed to create a standard for low-cost, low-end multiplexed communication in automotive networks. Though the Controller Area Network (CAN) bus addresses the need for high-bandwidth, advanced error-handling networks, the hardware and software costs of CAN implementation has become prohibitive for lower performance devices such as power window and seat controllers. LIN provides cost-efficient communication in applications where the bandwidth and versatility of CAN are not required. You can implement LIN relatively inexpensively using the standard serial universal asynchronous receiver/transmitter (UART) embedded into most modern low-cost 8-bit microcontrollers.
Modern automotive networks use a combination of LIN for low-cost applications, primarily in body electronics, CAN for mainstream powertrain and body communications, and the emerging FlexRay bus for high-speed synchronized data communications in advanced systems such as active suspension.
The LIN bus uses a master/slave approach that comprises a LIN master and one or more LIN slaves.
LIN Message Frame:
The working of a LIN bus is very simple. Every LIN system consists of a one master LIN bus device and multiple slave devices which are interconnected with each other. Every slave has a single task to perform but all these tasks are totally controlled though master LIN bus device. The message which is transfer from LIN bus device to slave deice is called message frame and it is divided into message header and message frame. Message header which always sent the message from master node to slave, it consists of three different fields such as break, synchronization (Sync) and identifier (ID). Similarly, the message response which always receive the message which is sent by master node, it consists of two different fields such as data and checksum. The block diagram of LIN message frame.
For stating communication when message is sent from master LIN bus device to message header, then break field check number of bits this data which comprises this data into 13 dominant bits. Then Sync field synchronize this data means it defined this data into x55 character and allows the slave device to automatic set the baud rate of this data. After that the ID field which is final field of the message header. It provides the identification of each message on network and finely decided whose slave node would be responded on this data or message. Similarly, the Data field in message response checks this data, convert it into zero to eight bytes and then send it to slave bus. The checksum field checks the algorithms of this data and finally send this data to slave bus.
Creation of LIN frame:
LIN Bus Timing
Because the LIN bus is a polled bus, the processing of each frame is allocated a nominal time slot as follows:
THeader_Nominal = 34 * TBit
TResponse_Nominal = 10 * (NData + 1) * TBit
TFrame_Nominal = THeader_Nominal + TResponse_Nominal
Processing of each frame is allocated a maximum time slot as follows:
THeader_Maximum = 14 * THeader_Nominal
TResponse_Maximum = 1.4 * TResponse_Nominal
TFrame_Maximum = THeader_Maximum + TResponse_Maximum
Advanced LIN Communication Protocol Frame Types
The LIN 2.0 specification further classifies LIN frames into six types:
- Event triggered
Unconditional LIN Frame: This type of LIN frame always carry signal and identify it from range 0 to 59 (0x00 to 0x3b). All the subscriber of this LIN frame will receive the signal and use it for their applications.
Event Triggered LIN Frame: This type of LIN frame increases the responsiveness of LIN cluster means different nodes of slave without assigning to much bus bandwidth during any sudden event occur.
Sporadic LIN Frame: This type of LIN frame is provided by master bus so that the collision could not occurred.
Diagnostic LIN Frame: This type of LIN frame always carries configured or diagnostic data in the range from 0 to 8 bytes.
User defined LIN Frame: This type of LIN frame carries all types of data means all kinds of information data and its identifier is 62 (0x3E).
Reserved LIN Frame: This type of LIN frame is not used in LIN 2.0 cluster and its identifier is 63 (0x3F).
PC LIN Interfaces
The NI-XNET product line is a combination of accelerated CAN, LIN, and FlexRay interfaces; an optimized driver; easy-to-use APIs; and configuration and debug utilities. With NI-XNET interfaces, you can develop applications for prototyping, simulating, and testing CAN, LIN, and FlexRay networks faster and more easily in NI LabVIEW and LabVIEW Real-Time as well as C/C++.
The NI-XNET PCI/PXI and C Series LIN interfaces also feature integrated LDF support, hardware-timed scheduling for master tasks, and frame and signal communication.
NI-XNET Platform for CAN, LIN, and FlexRay
USB-8476 LIN Interface
LIN communication protocol Working
Every LIN system consists of a one master and one or more LIN slaves. If we take example of an automotive industry, then LIN bus is connected between smart sensor and electronic control unit (ECU) in which CAN bus use as a gate way. Block diagram of this vehicle LIN system is shown in figure 3. this system has made with the help of three microcontrollers
Block Diagram of Vehicle LIN System
Different vehicles sensors are connected with this LIN system such as wheel speed sensor, impact sensor, gyroscope, pressers break sensor and light sensor etc. These sensors are controlled through LIN bus and this LIN bus has made with three microcontrollers which are interconnected with each other with the help of single cable. Microcontroller are programmed with the help of c language and through these microcontrollers all the connecting sensors are controlled. All these sensors received the logic high or low signal through microcontroller and microcontroller received this signal through LIN bus. Any microcontroller could be used as a transmitter or receiver any time.
LIN system is mostly used in advanced automotive industry therefore here we will explain its application when it is controlling different parts of the vehicle.
Roof: LIN system is used at the vehicle roof for controlling their sensors such as sun roof sensor and light control sensor.
Steering wheel: It is used at the vehicle steering wheel for controlling climate control sensor, wiper sensor, turning light sensor, radio and wheel lock sensor etc.
Seat: It is used at vehicle seat where the position of seat is controlled through a motor and this motor is controlled through LIN system. Besides it is also used for controlling the occupant sensor and control panel sensor which are installed at seat.
Door: It is used at a vehicle door for controlling the position of motor which is installed with door mirror. Beside this it is also used for controlling central ECU (electronic control unit), window lift, seat control switch and door lock etc.
Engine and Illuminations: It is also used for controlling engine sensor such as cooling fan motor sensor and illumination senor which controls the illumination of light.
CAN VS LIN