FREE REPAIR MANUALS & LABOR GUIDES 1982-2013 Vehicles
Courtesy of Operation CHARM: Car repair manuals for everyone.

LIN (Local Interconnect Network)






LIN (Local Interconnect Network)

General
LIN (Local Interconnect Network) is a standardised protocol for serial communication on a single wire between a master and several slave nodes.
The LIN protocol supports Multiplex communication, which means several nodes can communicate on the same wire without disturbing each other.
LIN was developed, by a consortium of automotive manufacturers, at the end of the 90s in order to build a network for data exchange over short distances at a low cost. The development of the LIN standard is ongoing and Volvo plays an active part in this work.
LIN is adapted for one master and up to 16 slave nodes on each communication bus.
More nodes are possible, but several communication buses can in these instances be connected together via the master node. The master node can also make up an interface to other types of communication buses, for example, CAN or MOST.
LIN is bidirectional, (two way half duplex) which means information can be sent in both directions. However only one control module at a time can send information. The level on the bus wire is normally high (approx 13 V) via a pull-up resistance, but is taken down to a low level (approx 1 V) when one of the nodes on the bus transmits.
The LIN protocol is a supplement to CAN. LIN is a less expensive alternative to CAN and is used where the transfer rate and performance is not as critical.
Besides a reduction in the number of wires, LIN is adapted for more basic communications circuits, which means the internal clock circuit in a slave node can be an inexpensive oscillating circuit (a.k.a. RC circuits) instead of crystals or ceramic oscillators that are used in systems with greater sensitivity to time differences.
This means that control module costs for the LIN standard can be kept down.
A synchronisation procedure is used in each message on LIN in order to make communications, which are still time-dependent, possible. A number of bits at the start of each message are used so that the clock circuit in each slave control module can adjust to the correct frequency so that the subsequent data in the message can be received error-free.
If the LIN bus is inactive for a specific period of time, the slave nodes switch to sleep mode to reduce power consumption.
The transfer rate on LIN can lie between 5 and 20 kbit/s, but Volvo uses 9.6 kbit/s. This can be compared to the transfer rate on the CAN network which is 125-500 kbit/s.
1 kbit/s = 1000 bits per second.
The reason why Volvo has selected a transfer rate of 9.6 kbit/s is the balance between performance and transfer quality. A higher transfer rate can be used in some applications.
On a LIN bus there is always one control module that is the main control module (a.k.a. master node). All other control modules on the same LIN bus are slave nodes.
The master node contains a list describing which slave nodes are connected on the LIN bus in question. The list in the master node also describes which messages can be sent on the LIN bus and in which order.
Messages are sent in order according to the list in the master node with a specific time delay between messages, so that any responses from the slave nodes can be received by the master node.
What the slave nodes shall do and/or which data is to be sent as a response when the slave node receives a message is in turn described in a list that is programmed into each slave node. If a slave node has not managed to respond before it is time for the next message to be sent from the master node, the master node will start to send nevertheless and the slave node will be interrupted during its transmission.
The maximum length of a bus wire is set to 35 m (114.83 ft). The high level on LIN means battery voltage, i.e. approx 9-18 V, yet all circuits connected to the bus must withstand up to approximately 25 V.
The LIN bus is terminated to the battery voltage with a pull-up resistance on all nodes, the master mode with 1 kohms and the slave nodes with 20-47 kohms, usually 30 kohms.
This means that in sleep mode the voltage on the LIN bus is approximately 13 V and the dominant level on the bus (that is to say when a "1" is transmitted and a node takes down the bus to a low level during the transmission) is approximately 1 V.

Hint: The voltage on the communication wire is dependent on the supply voltage. The guideline is that the average value during communication is approximately 2/3 of the supply voltage. With a normal supply voltage and normal communication, the average voltage on the LIN bus lies at approximately 7-8 V.

The residue voltage level depends on the internal protection diodes in the control module.
The slave nodes also have a diode in series with the pull-up resistance to prevent the connected components from loading the bus by leading current the back-way if they do not have a power supply.

Wiring
The communication wire used on LIN is a single, unscreened conductor, which includes the most common cable harnesses in the vehicle. On account of the wire being unscreened, some restrictions due to EMC reasons can apply to wire routing.

LIN message

Complete message




A = Frame
B = Header
C = Message

A message on LIN is called a frame and consist of the following parts:
1. Synchronisation interrupt.Used to wake slave nodes that are in sleep mode.
2. Synchronisation field. The synchronisation field helps slave nodes to synchronise with their master node's clock frequency, in order for messages sent to be received correctly.
3. Identification field. Contains information about the contents of the message. All nodes can read and respond to a message, yet only one node has the right to send a response to the message. Which node has the right to answer the message (send response data) is evident from the identifier.
4. Data information. The data sent can be two to eight bytes long. The data information is sent with the least significant bit first.
5. Checksum. The checksum is a way for slave notes to check whether the received message has been transferred correctly, or if any disturbance can have occurred during the transmission which has corrupted the data. If an error has occurred in a message during transmission from the master node to the slave node, i.e. the checksum calculated by the slave node does not correspond, the slave node will erase the message and await the next message sent from the master node.
The slave nodes do not send an acknowledgement to a message that has been received correctly. The master node re-reads the message sent out on the LIN bus and compares the re-read message with the message that was sent.
If the sent and detected messages are the same, the master mode presupposes that the message has been received correctly by the slave nodes.

Example from an oscilloscope




If you have access to an oscilloscope and measure on the LIN bus, a start-up procedure with subsequent communication can appear as illustrated in the figure above.
The lower curve is a magnified section of the upper curve.
In the upper curve you first see the LIN bus in sleep mode with the subsequent message. This is followed by several messages.
The numbers in the different fields correspond to the parts of the message described in the list above.
In the figure you can see, among others, that the sleep voltage on the LIN bus is approximately 13 V and that the voltage drops to approximately 1 V during communication.

Note! The figure above is only one example of how messages on the LIN network can appear.