The local interconnect network (LIN) bus is essentially a sub-bus system rooted in a serial communications protocol. The LIN bus itself is a single master / multiple slave bus, employing a single wire for data forwarding. LIN is a low-cost option, compare to CAN, and LIN master quite commonly acts as a gateway to the CAN bus. Here we briefly describe LIN protocol and it’s applications.
Some principles of LIN
LIN includes one master node and up to 16 slave nodes. It has lower reliability, speed and performance compare to CAN, but due to significantly lower cost could be a favorable option in applications where speed and fault tolerance are not crucial parameters. LIN could be used within vehicles for interior lights, air conditioning, windows control, seat heaters, door locks, etc.
LIN often acting as a sort of supplement to the CAN bus, and commonly utilized in simple switching applications. LIN nowadays became a standard for in-vehicle communication but also currently employed in automation and some “in-house” devices. Having 6-bit identifiers and data forwarding speed peaking at 20 kbit/s, it could be treated as the lowest-level within the in-vehicle networking hierarchy.
Various relatively simple sensors could be connected via LIN in order to form simple networks, which afterward could be connected with some other networks in the vehicle by means of CAN.
LIN structure and workflow
LIN employs a single master / multiple slave model, where only the master is able to initiate communication. Lin frame includes the header part and response part. The header part sent by the master to start communication with a slave, and if the master requests data from the slave, the slave sends back the response part.
Within LIN, there is no possibility of direct communication among slaves, but master requests could be utilized to initiate slave-to-slave communication. The header itself includes the identifier for the LIN frame identification, as well as the data it contains. The LIN protocol is object and time-trigger oriented by nature, where different nodes may receive the same frame data. The response part contains selectable length data within 1 – 8 bytes range, secured by an 8-bit checksum.
A simplified LIN driver schematic is shown in the figure above. The transceiver facilitates communication between the bus and the rest of the network. The LIN transceiver converts the bit logic from the microcontroller into higher voltage levels as transmission along the bus, and vice versa. The TXD is connected to the microcontroller, where the message is sent and then broadcasted on the LIN bus.
The RXD monitors the bus and converts the messages on the LIN bus to voltage levels the microcontroller can interpret. An example of a LIN bus message with 220 pf at 20 kbps is shown in the figure above. It also demonstrates the effect of having the nominal amount of capacitance, and how the effect of having too much capacitance looks like.
LIN is a simple and low-cost bus, proven to be effective in various applications where speed and great robustness are not among crucial parameters. LIN bus now employed for in-vehicle communication applications, as well as in automation and home appliances.
- LIN basics, Lipowsky Industrie-Elektronik GmbH
- AN1278 Application Note, www.st.com
- D. Marsh, LIN simplifies and standardizes in-vehicle networks, 2005
- LIN Protocol and Physical Layer Requirements, Application report, 2018, Texas Instruments