LIN Bus

Local Interconnect Network is a low-cost, single-wire bus for simple sensors and actuators. Learn master/slave (commander/responder) operation, the frame (break, sync, protected ID, data, checksum), schedule tables, timing, LDF files and diagnostics.

Not every node needs CAN. Window switches, mirror motors, rain sensors, seat controls and ambient lights use LIN — a single wire at up to 20 kbit/s, cheap enough to put in every small module.

A master node decides who talks when, using a fixed schedule table, so LIN is deterministic and simple.

An analogy

LIN is like a classroom where only the teacher (master) asks questions in a fixed order, and each student (slave) answers only when called.

Bus basics

Single wire referenced to ground, 12 V levels, up to ~16 nodes, max 40 m, 1–20 kbit/s (typically 19.2 kbit/s). Very cheap transceivers; slaves can even use an RC oscillator because they resynchronise on each frame's sync byte.

Frame structure

The master sends the header: break (≥ 13 dominant bits), sync (0x55) and protected identifier. The node that owns that frame then sends 1–8 data bytes and a checksum (classic or enhanced including the PID).

Schedule tables

The master cycles through a fixed schedule, guaranteeing timing. Unconditional, event-triggered and sporadic frames give flexibility. Diagnostic frames (0x3C/0x3D) carry transport-layer messages for configuration and UDS.

Gateways and limits

LIN clusters hang off a CAN/Ethernet body controller acting as master and gateway. Low speed means long latencies — unsuitable for safety-critical or high-bandwidth functions. Auto-addressing and node configuration simplify identical modules (e.g. seat motors).

Formulas

Worked example: Frame time

Given: 19.2 kbit/s, 8 data bytes

Find: Nominal and maximum frame time.

Answer: 6.5 ms nominal, slot ≥ 9.04 ms

Worked example: Schedule cycle

Given: Four 2-byte frames and two 8-byte frames

Find: Minimum schedule cycle.

Answer: ≈ 40 ms cycle

LDF excerpt

LIN_description_file;
LIN_protocol_version = "2.2";
LIN_speed = 19.2 kbps;
Nodes { Master: BCM, 5 ms, 0.1 ms; Slaves: MirrorL, MirrorR; }
Signals {
  MirrorL_Cmd: 8, 0, BCM, MirrorL;
  MirrorL_Pos: 16, 0, MirrorL, BCM;
}
Frames {
  MirrorCmd: 0x10, BCM, 2 { MirrorL_Cmd, 0; }
  MirrorStatus: 0x11, MirrorL, 2 { MirrorL_Pos, 0; }
}
Schedule_tables {
  Normal { MirrorCmd delay 10 ms; MirrorStatus delay 10 ms; }
}

The master (BCM) sends the header for each frame in the schedule; the publishing node supplies the response.

Common mistakes

Applications

Key takeaways

Going further