Help needed with lin bus communication using Arduino Mega

I am working on a project where i need to communicate with a number of LIN bus devices. These will all be put together to create a functional dash The devices include a drive mode switch, a lighting control switch and the HVAC controller. The devices are all built by Audi/VW (though come from a range of cars). The key point...I do not have access to the original cars, so i cannot sniff the various lin buses. That would make life too easy. I'm left with trying to hack and decode each device individually.

I've started with the drive mode switch and have a basic lin bus library on a Mega. Since there are essentially only 60 possible addresses, I was able to quickly find its ID. (11 if anyone else was wondering about the Aventador drive mode switch). There are two bits in the data from ID 11 that represent when the drive mode up and down buttons are pushed.

Now for the hard part....

I have 3 leds on the device that I need to control. I believe that these would be controlled by 3 separate pwm values that I must (continually?) send to the device. But what else is needed? Does anyone have any thoughts or insight on how to determine what id and data is needed to control the leds?

....I tried sending random data slowly through all addresses in the hope that I'd stumble on to the correct address, but no luck yet. Doing a bit by bit trial could take years, so it's not an option.

You might consider posting the modules you are working with along with make and model they came from. Somebody here may have worked with one or more of them. Also look for service manuals they may give you an insight as to how they communicate and how the packets are formed.

Thanks for the quick reply.

Unfortunately, even though the modules (devices) are manufactured with the Audi/VW symbols on them, they are actually unique Lamborghini modules. Lamborghini Aventador and Huracan service modules are not easily obtainable. Hence the need for a more generic procedure.

The drive mode switch part number is 470959674.

Correction...I meant to write Lamborghini "service manuals" are not easily obtainable

I was finally able to decode the Lamborghini Aventador Drive Mode switch LIN functions. Strangely, the Huracan light mode switch runs using the exact same LIN addresses and most of the same coding.

Next up will be the Audi HVAC/climate control (LIN) and the Audi MMI (RS232), and then push everything out over an Arduino based CAN Bus.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.