LIN communication on nano

I am working on a project that will read LIN data from an IBS sensor and print it to an LCD screen. I'm using an arduino nano, an MCP2004 transceiver, and an IBS. I'm stuck at the beginning. I have been doing research to figure out where to begin and I'm lost. All of the other threads I've found were from people who already have some aspect working, and I don't understand how they got there.

Here is what I understand. The arduino nano is the master, and the IBS is the slave. I need to have the nano send out a header to the IBS through the transceiver. The IBS will then respond with the requested data.

First milestone: send out a LIN header from the nano
Second milestone: read LIN data from the IBS and decode it
Third milestone: print decoded data to LCD (current, battery voltage, etc.)

As far as which libraries to use, and how to program the arduino I'm entirely lost, and that's where I would like to begin. I can use an oscilloscope to confirm whether or not I'm sending/receiving a LIN message.

I've included pictures of my physical setup (probably not super helpful for you) and my circuit diagram for the transceiver and arduino. Thank you in advance for your help!

I do not know what LIN or IBS are and it is not my job to find out. It is up to you to explain out of the ordinary acronyms.

I would suggest that you use a software serial port to communicate with your external device so that you can use hardware serial to monitor program flow and variable values if the baud rate can be 38400 or less. If higher speed is necessary, use an Arduino with multiple hardware serial ports.

groundFungus:
I do not know what LIN or IBS are and it is not my job to find out. It is up to you to explain out of the ordinary acronyms.

I would suggest that you use a software serial port to communicate with your external device so that you can use hardware serial to monitor program flow and variable values if the baud rate can be 38400 or less. If higher speed is necessary, use an Arduino with multiple hardware serial ports.

LIN is Local area network and is used for low cost simple feature communication, especially in the auto industry for the steering wheel column and more. IBS is intelligent battery sensor. The baud rate is 19200. As far as your suggestion to use the software serial port and the hardware serial port, I am a little confused. How do I do that? I think the RX and TX are my hardware serial ports. And I don't know how to use the software serial ports.

crose4:
I'm using an arduino nano, an MCP2004 transceiver, and an IBS. I'm stuck at the beginning.

Is the MCP2004 you have a bare chip? Is it a breakout board with no other components? Is it a module with some of the recommended circuit on it? Where did you get it? Did they provide any documentation, library, or example code? Have you tried duplicating any of the examples you have found? If not, why not?

johnwasser:
Is the MCP2004 you have a bare chip? Is it a breakout board with no other components? Is it a module with some of the recommended circuit on it? Where did you get it? Did they provide any documentation, library, or example code? Have you tried duplicating any of the examples you have found? If not, why not?

Here is a picture of my physical setup, I'm trying to include it in this reply. It seems just to be a bare chip (it's the small black thing above the LCD screen). I got it from digikey. If you google MCP2004 there is a pdf of documentation on it, and I have read. I haven't found any documentation specifically to use with that chip. I have tried duplicating each of the examples I have found but am stuck.

Interested in this too for communication with an automotive rain sensor.

There are some “arduino Lin” hits but not spent any time on it.

In the datasheet (https://ww1.microchip.com/downloads/en/DeviceDoc/20002230G.pdf), look at the "Typical Applications" circuits. That shows you how the chip would typically be connected to an MCU.

Face palm well that makes sense. I will try that for my hardware setup. Before I can test the hardware setup, however, I still don't know how to communicate with the LIN slave device using my arduino. Conceptually what I think is supposed to happen is that I download a library that is written specifically for sending and receiving LIN messages, Then I will write a code that first sends a LIN header to my LIN device, requesting information. Then my LIN device will send the requested information and I will decode it using the LIN library I downloaded and print that information. All of this will happen with the transceiver as the middleman.

Which library should I use, and how do I send the header to my LIN device to request info?

Have you done a search for LIN Arduino libraries? I found this one:

johnwasser:
Have you done a search for LIN Arduino libraries?

I have found a few different LIN libraries, but am unsure of how to use them. I believe one of the libraries I found did not work for my specific board (whatever board the nano uses).

Does anyone have any ideas for how I can at least send a LIN header from my arduino nano on my TX/RX pins? That is probably the first thing I need to get working.