Hello,
I'm working on a project to read out some LIN messages and use them the switch 5 relays. To make a PCB is not the problem. But to get the LIN message in to the Arduino software and let it make a output high is the hard part for me.
I look on the internet to find a simple example to make this but the only examples that I can find are LIN communications between a Arduino and a Arduino.
What I got here is a joystick from an Agriculture machine. The joystick is communicates on a LIN network.
With the program PLIN and a PCAN-USB Pro from Peak I read out the LIN bus and find that the functions where we are looking for are in the following messages:
ID 29h
Length 8 Bit
DATA 0F 7D 7D 11 17 07 00 9C
Every time when I press a button from the joystick and holt it the number in the data is jumping one number higher to a even number, when I release the button it will go one number higher to a odd number. He will continue dis till the reach the 7 and then will start over again at number 0.
So the numbers for button pressed is 0, 2, 4, 6
The numbers for button released is 1, 3, 5, 7
Al the buttons are in the same ID. We can find them in the next location:
Button 1: 0F 7D 7D 11 17 07 00 9C
Button 2: 0F 7D 7D 11 17 07 00 9C
Button 3: 0F 7D 7D 11 17 07 00 9C
Button 4: 0F 7D 7D 11 17 07 00 9C
Button 5: 0F 7D 7D 11 17 07 00 9C
The last thing is de status of the Joystick (ON or OFF). I want to use this message so the relays will not switch when the joystick is off. We can find this status in the next ID:
ID: 2Dh
Length: 1
DATA (Joystick ON): D4
DATA OFF (Joystick OFF): C1
I was thinking to us a Arduino NANO with a MCP2003 IC.
If there is somebody that can me help to get started with this project please let me know.
I also attached some screenshot to this topic.
Kind Regards,
Daan W

