LIN_slave_portable_Arduino

Portable LIN Slave Node Emulation

Doxygen docs

Introduction

This Arduino library implements a Local Interconnect Network slave node emulation. For an explanation of the LIN bus and protocol e.g. see https://en.wikipedia.org/wiki/Local_Interconnect_Network.

Optionally LIN protocoll via RS485 is supported (see respective examples). In this case Rx-enable (=RE) must be statically enabled to receive LIN echo, and Tx-enable (=DE) is controlled by the Arduino.

The class structure is very flexible and aims at supporting different Serial interfaces and architectures. It can easily be ported to other boards - in which case a pull request is highly appreciated…

For a similar Arduino libary for LIN master emulation see https://github.com/gicking/LIN_master_portable_Arduino

Supported functionality

Supported Boards (with additional LIN hardware)

Notes

Test Matrix

An ok in the below test matrix indicates that normal master request frames are received, slave responses are sent and bus disconnection is detected (-> error). Also, code execution starts with only external supple, i.e. USB not connected. No extensive testing of all possible error cases was performed. Please let me know if you experience unexpected errors.

Test Matrix

Logic analyzer screenshots of LIN bus, idle pin and error pin levels are stored in folder “./extras/testing/Board

Have fun!, Georg


Revision History

v1.3 (2025-02-06)

v1.2 (2025-10-28)

v1.1 (2025-05-03)

v1.0 (2025-02-01)