Анализатор lin шины ардуино

gicking/LIN_master_Arduino

Use Git or checkout with SVN using the web URL.

Work fast with our official CLI. Learn more.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching Xcode

If nothing happens, download Xcode and try again.

Launching Visual Studio Code

Your codespace will open once ready.

There was a problem preparing your codespace, please try again.

Latest commit

Git stats

Files

Failed to load latest commit information.

README.md

LIN Master Node Emulation

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

  • blocking and non-blocking operation
  • multiple, simultaneous LIN nodes with independent baudrates and protocol
  • optional callback functions for slave response frames

This library depends on the Task Scheduler library for background operation, which is available via the Arduino IDE library manager or directly from https://github.com/kcl93/Tasks

Supported Boards (with additional LIN hardware):

  • all boards using the Atmel ATMega328 controller, e.g. Arduino Uno and Nano
  • all boards using the Atmel ATMega2560 controller, e.g. Arduino Mega
  • all boards using the Atmel SAM3X8E controller, e.g. Arduino Due
  • No device specific tricks are used, so all boards supported by the Task Scheduler library should work
  • The sender state machine relies on reading back its 1-wire echo. If no LIN or K-Line transceiver is used, connect Rx&Tx (only 1 device!)

About

LIN master node emulation with preemptive background operation

Источник

macchina/LIN

Use Git or checkout with SVN using the web URL.

Work fast with our official CLI. Learn more.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching Xcode

If nothing happens, download Xcode and try again.

Launching Visual Studio Code

Your codespace will open once ready.

There was a problem preparing your codespace, please try again.

Latest commit

Git stats

Files

Failed to load latest commit information.

README.md

Library and examples for LIN (Local Interconnect Network) on Arduino. Developed for the Macchina M2. Can be modified for any Arduino board with UART available and any LIN slave.

  1. Download the files
  2. Move the folder LIN to your Arduino Libraries

Several example sketches are included in the LIN Library to demonstrate typical usage:

Lin2Lin M2 acts as the Sniffer – when traffic on one LIN channel is detected, incoming data is saved and then sent to another LIN channel with no modification. Arduino Due with simple 1-bit ADC is used as Master Node on first LIN bus and Ambient Light Module is used as a slave on another LIN bus.

Master works with Microchip’s Ambient Light Module. User builds an array of bytes, which is the length of the message and contains packages to be send to the module. Package is built out of Control Byte (control intensity, dim and ramp functions for the RGB LED), Red, Green and Blue Color Bytes and Zone Byte. Checksum calculation is supported in v2.0 library. There is no need to calculate checksum and include in it package.

Slave M2 acts like sniffer: when traffic is detected on LIN bus, incoming data is saved and processed. Arduino Due with simple 1-bit ADC is used as master. Master Node needs to be programmed with Master example Slave_Master

Data processing: If Identification Byte is correct, Checksum Byte is compared with Checksum calculated from received data. If Checksum Byte is correct, data is printed on Serial Monitor via SerialUSB. Otherwise error is printed on Serial Monitor and data cleared.

  • Sniffer M2 monitors traffic on LIN bus periodically. When traffic is detected, Sniffer reads incoming data and prints it on Serial Monitor via SerialUSB.

LIN Stack was developed using the following:

Microchip’s Interior Ambient Lighting Module with LIN Interface User Guide http://ww1.microchip.com/downloads/en/DeviceDoc/51714a.pdf

More information about LIN can be found in those documents.

  • correct checksum calculation, removed +1
  • inserted parity calculation in writeRequest method
  • implemented parity calculation
  • implemented bus wake up for proper lin bus waking up
  • Changed default baudrate to 19200 which is more common in automotive applications

About

Arduino library to add dual LIN support on SAM3X based boards with a TJA1021/TJA1027 transceiver

Источник

Arduino.ru

LIN «шпион» Mitsubishi Lanser 10

  • Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии

Всем првет, прошу подсказку. Есть подрулевой переключатель в авто (поворотники свет, дворники . ), сигнал с ручки выходит по LIN шине, мне нужно этот сигнал считать и идентифицировать по средствам Arduino.

Вот что удалось раздобыть и разобрать.

С ардуино знаком но с обработкой сигнала с байтами и битами у меня пробелы бооольшие =) кто нибудь может помочь ?

Первая и вторая осциллограмма включен — режим Авто -> габаритный свет

  • Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии

т.к. физически LIN это K-line

собирай k-Line ардуино сниффер или просто K-Line Terminal на компе сниффер. Осликом это жесть байты смотреть.

k-Line ардуино сниффер выглядит так и скетч к нему:

В строке 07 меняешь скорость, пока не увидешь в мониторе порта байт 0х55, если чё, в строке 13 играешься задержкой, для лучшей компановки кадров.

K-Line Terminal на компе сниффер выглядит так:

ну собственно это самый обычный USB K-line адаптер, можно купить недорого готовый в магазинах. Его подключаем к этому терминалу . И пробуем менять скорость, пока не увидим начало кадра 0x55.

  • Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии

1. Сначало : MC33290 -> USB UART -> Terminal2, находим нужную скорость .

2. Потом : MC33290 -> Arduino , подключаемся уже с известной скоростью .

  • Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии

1. Сначало : MC33290 -> USB UART -> Terminal2, находим нужную скорость .

2. Потом : MC33290 -> Arduino , подключаемся уже с известной скоростью .

1. Можно после нахождения нужной скорости и дальше терминалом расшифровывать данные , а ардуино использовать уже когда протокол будет хакнут.

2. Ну если вы найдёте MC33290. Гораздо проще найти тоже специализированную микросхему L9637D.

схема будет похожая, в любом случае к-лайн нужно вешать на софтсериал соединение, чтобы хард сериал оставался для вывода на сериал монитор компа. Схема примерно такая.

Но я бы сделал на дешевой LM393 — стоит 10 рублей и есть в любом магазине, или вообще готовый к-лайн адаптер типа VAG COM KKL 409 купить, пригодится полюбому.

Источник

frankschoeniger/LIN_Interface

Use Git or checkout with SVN using the web URL.

Work fast with our official CLI. Learn more.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching Xcode

If nothing happens, download Xcode and try again.

Launching Visual Studio Code

Your codespace will open once ready.

There was a problem preparing your codespace, please try again.

Latest commit

Git stats

Files

Failed to load latest commit information.

README.md

Arduino LIN Interface

This Project will use an Arduino to communicate with an HELLA IBS 200X Batteriesensor. The current software version is able to read the most importand parameter from the sensor and print it as a json String over the serial interface or show it on a TFT Display.

The project uses a LIN breakout board from skpan electronics: http://skpang.co.uk/catalog/linbus-breakout-board-p-1417.html, and an ST7735S based 1,8″ TFT display.

This project uses ideas and code snipets from: https://github.com/gandrewstone/LIN

The Hardware configuration is as follows:

LINBUS Breakout — skpang.co.uk

PIN LIN PIN Arduino Nano
GND GND
CS 2
FAULT VCC +5V
TxD 3
RxD 4
VCC Vcc +5V

Connector 2 on LIN Breakout:

  • UBat —> + Akku
  • LIN —> IBS PIN 2
  • GND —> GNC Connector Sensor not Akku !!

Источник

matt2005/LIN-1

Use Git or checkout with SVN using the web URL.

Work fast with our official CLI. Learn more.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching Xcode

If nothing happens, download Xcode and try again.

Launching Visual Studio Code

Your codespace will open once ready.

There was a problem preparing your codespace, please try again.

This branch is not ahead of the upstream macchina:master.

No new commits yet. Enjoy your day!

Latest commit

Git stats

Files

Failed to load latest commit information.

README.md

Library and examples for LIN (Local Interconnect Network) on Arduino. Developed for the Macchina M2. Can be modified for any Arduino board with UART available and any LIN slave.

  1. Download the files
  2. Move the folder LIN to your Arduino Libraries

Several example sketches are included in the LIN Library to demonstrate typical usage:

Lin2Lin M2 acts as the Sniffer – when traffic on one LIN channel is detected, incoming data is saved and then sent to another LIN channel with no modification. Arduino Due with simple 1-bit ADC is used as Master Node on first LIN bus and Ambient Light Module is used as a slave on another LIN bus.

Master works with Microchip’s Ambient Light Module. User builds an array of bytes, which is the length of the message and contains packages to be send to the module. Package is built out of Control Byte (control intensity, dim and ramp functions for the RGB LED), Red, Green and Blue Color Bytes and Zone Byte. Checksum calculation is supported in v2.0 library. There is no need to calculate checksum and include in it package.

Slave M2 acts like sniffer: when traffic is detected on LIN bus, incoming data is saved and processed. Arduino Due with simple 1-bit ADC is used as master. Master Node needs to be programmed with Master example Slave_Master

Data processing: If Identification Byte is correct, Checksum Byte is compared with Checksum calculated from received data. If Checksum Byte is correct, data is printed on Serial Monitor via SerialUSB. Otherwise error is printed on Serial Monitor and data cleared.

  • Sniffer M2 monitors traffic on LIN bus periodically. When traffic is detected, Sniffer reads incoming data and prints it on Serial Monitor via SerialUSB.

LIN Stack was developed using the following:

Microchip’s Interior Ambient Lighting Module with LIN Interface User Guide http://ww1.microchip.com/downloads/en/DeviceDoc/51714a.pdf

More information about LIN can be found in those documents.

About

Arduino library to add LIN support to the Arduino Nano board using a MCP2025 LIN transceiver

Источник

Adblock
detector