LIN Bus Explained (2021)

LIN Bus Explained (2021)

Once again, we have prepared a simple introduction to LIN Bus. Several topics and aspects have been researched, analyzed and then included, all with the purpose of explaining the LIN Bus and LIN Protocol to you, in a very easy and understandable way.


We have combined expertise from our top tech engineers and wrote this article in a very simple way, in order to make it as easy to understand as possible. 


What is a LIN Bus?

LIN Bus stands for Local Interconnect Network (LIN) and is known as a supplement to CAN Bus. It is used for communication among components in the vehicle. 


LIN Bus protocol is very cost effective, meaning it is much cheaper than CAN Bus. On the other side, it also offers much lower performance and is not as reliable as CAN Bus. 


LIN Bus came to life when CAN Bus was simply too expensive to implement for every component in the vehicle. Instead, LIN Bus was released to solve this challenge and has worked out perfectly ever since. 



What is a LIN protocol?

LIN protocol is a wired communication protocol for electronic devices. It consists of one master and one or more slaves. 


Each LIN frame consists of two pairs - header and response. The header is always sent by the LIN master and the response is sent by either one dedicated LIN slave or the LIN master.


Two bus states, sleep mode and active are used within the LIN protocol. 



Key facts about LIN Bus

  • Low cost option

  • Single wire with 1-20 kbit/s at maximum 40m bus length (+ground)

  • Operating voltage - 12V

  • Frequently used in vehicles for wipers, air condition, steering wheel, windows and so on

  • LIN clusters contain of 1 master and up to 16 nodes

  • Latest vehicles have more than 10 nodes

  • Several data lengths (2,4 and 8 bytes)

  • Guaranteed latency time with time triggered scheduling 

  • Sleep mode and wake up support

  • The physical layer is based on ISO 9141 - K-line

  • LIN Bus protocol support error detection and configuration 



How Does the LIN Bus Work?

LIN Bus might be also used in the vehicle’s battery power-line, with a LIN over DC (DC-LIN) transceiver. It was also standardized as ISO/AWI 17987-8. 


LIN Bus is nowadays pretty much standardized in all modern vehicles. There are several cases, where LIN Bus is being used such as:


  • Sensors for position and temperature

  • Speed and pressure

  • Cruise control

  • Wipers

  • Radio

  • Climate control

  • Small motors

  • Side mirrors

  • Seat control

  • Locks

  • Rain sensors

  • Headlights

  • And more


In addition, LIN Bus is also being used in home appliances such as: washing machine, stove, refrigerator and more. 



LIN Bus vs CAN Bus


Lin Bus

  • Lower cost 

  • Typically, a LIN master works as a gateway to the CAN Bus

  • LIN clusters have a single master

  • LIN is settled - not event driven

  • Uses single wire 12V

  • LIN offers max 20 kbit/s



CAN Bus

  • Uses twisted shielded dual wires 5V 

  • Uses 11 or 29 bit identifiers 

  • CAN could have multiple masters

  • CAN offers up to 1 Mbit/s  


The LIN Frame Format

Simply said, the LIN bus message frame consists of a header and a response. Generally speaking, the LIN master typically sends a header to the LIN bus, which then triggers a slave. 


The slave sends up to 8 data bytes in response. An illustration of the LIN frame format can be seen below. 


LIN Bus frame explained in an easy picture


We will now explain to you in details specific parts of the LIN frame format


Break

  • The Sync Break Field (SBF), also known as just Break is a minimum of 13 + 1 bits long

  • Commonly used as 18 + 2 bits

  • Operates as a start of the frame


Sync

  • Is 8 bit long

  • Has a predetermined value of 0x55 

  • Its structure allows the LIN nodes to determine the time between rising and/or  falling edges


Identifier

  • Is 6 bits long and followed by 2 parity bits

  • The ID operates as an identifier for each LIN message 

  • Slaves determine the validity of the ID field and operate accordingly - ignore the subsequent data transmission, listen to the data transmitted from another node and publish data in response to the header


In addition, usually one slave is taken for the information at the time. This means that there is zero collision risk and no need for arbitration. The 6 bits allow for 64 IDs, where ID 60-61 are used for diagnostics.



LIN Bus Message Frames

A LIN message consists of identifier byte, checksum byte, synchronization byte and synchronization fields. 


Frame types

  • Unconditional frame - 0-59 ID dec, 00-3B ID hex

  • Event-triggered frame - 0-59 ID dec, 00-3B ID hex

  • Sporadic frame - 0-59 ID dec, 00-3B ID hex

  • Diagnostic frame - 60-61 ID dec, 3C-3D ID hex

  • User-defined frame - 62 ID dec, 3E ID hex

  • Reserved frame - 63 ID dec, 3F ID hex



LIN Description File (LDF)

The LIN network is described by a LIN description file (LDF) that includes information about frames and signals. The file is being used for creation of the software in both master and slave. 


You might need to decode your raw LIN bus data to physical values as a part of your LIN data workflow.


In order to decode raw data into a readable form, you need to extract LIN signals from the LIN frame payload. LIN bus decoding is very similar to CAN bus decoding and it requires the same information, see below:




LIN Bus History

Here, you can find the history of LIN Bus. We have also created a timeline of the LIN Bus history, in order to make it easier and more understandable. 


    • 1999 - LIN 1.0 released by the LIN Consortium (BMW, Volkswagen Group, Volvo Cars, Audi and Mercedes-Benz) 

    • 2000 - The LIN Bus protocol was updated - LIN 1.1 and LIN 2.2

    • 2002 - LIN 1.3 was released 

    • 2003 - LIN 2.0 was released with multiple changes

    • 2006 - LIN 2.1 specification released

    • 2010 - LIN 2.2A was released 

    • 2010 - 2012 - Based on LIN 2.0, SAE standardized LIN as SAE J2602

    • 2016 - LIN standardized as ISO 17987:2016


    a timeline showing the history of lin bus


    Future of LIN Bus

    LIN Bus is expected to be commonly used in modern vehicles due to its low cost feature expansion


    We have seen a huge increase in popularity of LIN Bus since 2015 and it is expected to increase even more.


    We have also heard that LIN Bus might be also used in J1939 for its low cost. However, a lot will change and we hope you will follow it with us.


    AutoPi.io
    AutoPi.io
    Follow us here:

    Or sign up to our newsletter and receive the news first.