USBlini EB - USB to LIN board

USBlini - USB to LIN Interface

USBlini connects a LIN bus via USB to a host system. It provides easy access to LIN bus devices and can act as both master and slave. It features a logic analyzer function to sample the logic levels on the LIN RX line.
USB-LIN-Adapter board

USBlini EB board
Buy on Fischl.de!
(€ 29,90 incl. 19% VAT excl. € 4 shipping)

Buy on TinyTronics.nl!
(€ 31,50 incl. 21% VAT excl. shipping)
English, Nederlands

Buy on Amazon.de!
(€ 29,90 incl. 19% VAT excl. shipping)
English, Deutsch, Nederlands,
Polski, Türkçe, Čeština

Contents

Software

A Python library is available for easy and rapid development on different operating systems.

Python library "pyUSBlini" (Windows, MacOS, Linux)

pyUSBlini is a Python library for the USBlini adapter which allows easy, platform-independent access to LIN devices.


Step-by-step tutorials:

Installation

The easiest way to install the library is using pip:
pip install git+https://github.com/EmbedME/pyUSBlini

Drivers

The library uses libusb. On Linux and MacOS X no kernel driver is needed. Please use following tool for Windows to install the "WinUSB" driver:
Windows driver installation for USBlini
Depending on the application, under Windows a libusb-1.0.dll is required. These can be found for various architectures on the libusb project homepage under "Download -> Windows Binaries". Please place the DLL in the application folder (e.g. in the "Scripts" folder for Anaconda Python).

Example

Request data for ID 0x10 via master write:
from usblini import USBlini
usblini = USBlini()
usblini.open()
data = usblini.master_write(0x10, USBlini.CHECKSUM_MODE_LIN2, [])
print(data) # print out response
usblini.close()

Simple graphic interface "USBliniGUI" (Windows, MacOS, Linux)

USBliniGUI
Based on the python library there is a simple graphic application: USBliniGUI.


How-to use USBlini with Python on Windows 10 and run USBliniGUI.py.

Logic analyzing with PulseView (Windows, MacOS, Linux)

USBlini with Pulseview
With the logic recording function (USBliniGUI -> Logic), the logic level on the LIN RX line can be captured and then analyzed with PulseView.


How-to analyse USBliniGUI recordings with PulseView

Firmware

Source code and HEX file

The firmware of USBlini is available as precompiled HEX file and as C (XC8 compiler) source code.

Precompiled HEX and source code archive:
USBlini_firmware_v1.01.zip (2022-11-08) Increased receive timeout (intrabyte: 16 tbit, response: 50 tbit)

USBlini_firmware_v1.00.zip (2021-12-28) First public version

Firmware update via bootloader

Start the bootloader via software (e.g. start_bootloader.py). Use a bootloader application (en MPHidFlash) to load the new firmware into USBlini:
mphidflash -w USBlini_firmware_v1.01.hex -r

Hardware

Schematic - USBlini's circuit diagram

USBlini Schematic

Partlist - Build your own USBlini!

Here you find a list of all parts needed to build your own USBlini board.

PartnumberValue
C14,7u
C2, C3, C4220n / 50V
C51u / 50V
C6220p / 100V
D1BAT54S
IC1PIC16F1454
IC2MCP2003B
LED1red LED
R1, R2, R31k
X1USB-B
X22pol 2.54mm

Troubleshooting

Linux: "LIBUSB_ERROR_ACCESS" as non-root

Add udev rule to give permissions to all users.
sudo bash -c $'echo \'SUBSYSTEM=="usb", ATTRS{product}=="USBlini", MODE="0666"\' > /etc/udev/rules.d/50-USBlini.rules'
sudo udevadm control --reload-rules
Please tell me about your USBlini project!

USBlini talks to 8W1919616
   Retrieve status from LIN slave 8W1919616 (Audi A4 audio control panel).

Example Python script: 8W1919616.py

by Thomas Fischl (06/2022)
Alternator
   Set voltage of alternator (controlled by TLE8880) and monitor temperature and battery voltage.

Python script: TLE8880.py

by Lucas K. (12/2022)
BMW Ambient Light+ retrofit kit
   Digital BMWay uses USBlini as a development tool for the BMW Ambient Light+ retrofit kit.

by Digital BMWay (02/2023)
Thetford N4000
   Read parameter from refrigerator Thetford N4000 series via CI-bus: supply type and voltages are interpreted.
Unfortunately, it is not yet known how the temperature can be read - you know? Please contact us!

Github project: CI-Bus interface for Thetford N4000 refrigerator

by Jörg W. (07/2023)
Maxim has wired a USBlini from several breakout boards
  
Maxim has wired a USBlini from several breakout boards.

by Maxim D. (06/2024)
Case for USBlini
   Stefan has designed a housing for the USBlini board: USBlini Case on Thingiverse.

by Stefan N. (09/2024)

Other LIN interface projects/products

en PLIN-USB by PEAK-System
en LUC by ucandevices
en Kvaser Leaf Professional LIN