I implemented an idea so that the ACC speed is automatically set to 90 km/h every time the car is started.
I have a 2018 Passat 1.8 TSI equipped with ACC.
With almost simple software on a cheap processor connected to the CAN bus, I send some data packets with specific timing that set the cruise control speed to any desired value.
Only two ACC settings have memory and do not need to be set every time the car is started. One is whether ACC is on or off and the other is the distance from the car in front. But for me, every day after starting the car I have to set the cruise speed to 90 and then use it (the speed limit in our area is 90 on the highway). For this, I have to press the speed increase key (V+) seven times on the steering wheel and make sure that not more than that by mistake. This daily repetition is a bit annoying.
Of course, I understand that memorizing ACC speed by the car is intentionally not allocated, so the risk of uncontrolled speed does not arise when using ACC for the first time. The driver has to set the ACC speed on purpose to accept the resulting responsibility.
However, since the cruise control in my car is adaptive, in my opinion, this risk is not significant. So I decided to add this feature to the vehicle.
Findings
The processor inside the steering wheel transmits information through the Convenience CAN bus. In some previously reviewed cases (see here and here) the right side keys, which are mainly used for AID settings and audio, are sent via CAN ID = 5BF. But the processor sends the status of the left side keys (cruise control keys) in a different way and with a different CAN ID. My searches to find its specifications were unsuccessful.
By monitoring the Convenience CAN bus and overcoming many difficulties, I was able to find out that the processor on the steering wheel does the sending with the following rules:
1) The CAN-ID is equal to 12B and the data length is always 8.
2) According to the CAN bus standard, the packet structure is as follows (each number is one byte and is displayed as hex):
4) The yy number in each packet increases by one digit compared to the previous packet. If ACC was on, it would start from 0x40 and continue until 0x4F, which means 16 different numbers. After that, it starts again from 0x40. The number xx is determined by the rule that is unknown to me but depends on the numbers yy and zz.
5) If all keys were released, the zz number in packets is 80.
6) If the speed increase key (V+) is pressed, the zz number is 82. As long as the V+ key remains pressed, other specific series of codes will be sent.
7) The rest of the ACC keys also have their zz. For example, for V- it is 84.
The table for "no key", "V+ key" and "V- key" is as follows:
A real sample of packets
These are real packets sent by the steering wheel via the CAN bus when I pressed V+ key for a short time:
It can be seen that yy numbers didn't change but xx and zz numbers changed from "No-key" table to "V+" table. The V+ key code started from yy=43 just by chance.
Designing
It is possible to use a cheap simple board like Arduino and a CAN bus interface board like MCP2515. But, for some reason, I used the STM32 processor.
The main idea is to artificially simulate the pressing of the V+ key and send the desired number of appropriate packets on the CAN bus.
While working with the system, I realized that if for any reason, the yy numbers are not sent in the order that was said, an ACC error will be declared and ACC will be unusable for now. Of course, this error will be resolved by restarting the car.
Therefore, from a technical point of view, this task is as follows:
16 consecutive packets of V+ table will be sent with a time interval of 1.5 milliseconds. These packets take about 24 milliseconds and fit between the transmissions of the steering wheel processor. So that the overall sequence of yy numbers does not get mixed up and the pressing of the V+ key will be simulated.
Packets on the CAN bus in the time axis will be as follows:
The blue packets are sent by the processor on the steering wheel, and the red packets are sent by our processor.
The final algorithm can be expressed as follows:
It is possible to develop the above algorithm in any software language on various processors.
Final result
I implemented the above algorithm in STM32 processor in C language. The MCP2515 function library was very useful. The board power should be connected to Terminal-30.
Please see this video:
go.screenpal.com/watch/cZiv6zVPHpy
The system works well, without any errors.
When the car is started, the ACC speed is set to 90 km/h automatically within 10 seconds.
It has brought me a kind of comfort. Besides, it was fun to face this challenge.
I have a 2018 Passat 1.8 TSI equipped with ACC.
With almost simple software on a cheap processor connected to the CAN bus, I send some data packets with specific timing that set the cruise control speed to any desired value.
Only two ACC settings have memory and do not need to be set every time the car is started. One is whether ACC is on or off and the other is the distance from the car in front. But for me, every day after starting the car I have to set the cruise speed to 90 and then use it (the speed limit in our area is 90 on the highway). For this, I have to press the speed increase key (V+) seven times on the steering wheel and make sure that not more than that by mistake. This daily repetition is a bit annoying.
Of course, I understand that memorizing ACC speed by the car is intentionally not allocated, so the risk of uncontrolled speed does not arise when using ACC for the first time. The driver has to set the ACC speed on purpose to accept the resulting responsibility.
However, since the cruise control in my car is adaptive, in my opinion, this risk is not significant. So I decided to add this feature to the vehicle.
Findings
The processor inside the steering wheel transmits information through the Convenience CAN bus. In some previously reviewed cases (see here and here) the right side keys, which are mainly used for AID settings and audio, are sent via CAN ID = 5BF. But the processor sends the status of the left side keys (cruise control keys) in a different way and with a different CAN ID. My searches to find its specifications were unsuccessful.
By monitoring the Convenience CAN bus and overcoming many difficulties, I was able to find out that the processor on the steering wheel does the sending with the following rules:
1) The CAN-ID is equal to 12B and the data length is always 8.
2) According to the CAN bus standard, the packet structure is as follows (each number is one byte and is displayed as hex):
3) This processor sends one data packet approximately every 30 milliseconds to let the system know that it is alive and well. Thus, even if no key is pressed, approximately 32 packets are always sent per second.00 00 01 2B 08 xx yy zz 2A 00 00 00 00
4) The yy number in each packet increases by one digit compared to the previous packet. If ACC was on, it would start from 0x40 and continue until 0x4F, which means 16 different numbers. After that, it starts again from 0x40. The number xx is determined by the rule that is unknown to me but depends on the numbers yy and zz.
5) If all keys were released, the zz number in packets is 80.
6) If the speed increase key (V+) is pressed, the zz number is 82. As long as the V+ key remains pressed, other specific series of codes will be sent.
7) The rest of the ACC keys also have their zz. For example, for V- it is 84.
The table for "no key", "V+ key" and "V- key" is as follows:
A real sample of packets
These are real packets sent by the steering wheel via the CAN bus when I pressed V+ key for a short time:
Code:
. . . . .
00 00 01 2B 08 0D 4F 80 2A 00 00 00 00
00 00 01 2B 08 86 40 80 2A 00 00 00 00
00 00 01 2B 08 F4 41 80 2A 00 00 00 00
00 00 01 2B 08 50 42 80 2A 00 00 00 00
00 00 01 2B 08 CF 43 82 2A 00 00 00 00 // V+ key pressed
00 00 01 2B 08 4F 44 82 2A 00 00 00 00
00 00 01 2B 08 EA 45 82 2A 00 00 00 00
00 00 01 2B 08 F3 46 82 2A 00 00 00 00
00 00 01 2B 08 D6 47 82 2A 00 00 00 00
00 00 01 2B 08 03 48 82 2A 00 00 00 00
00 00 01 2B 08 CC 49 80 2A 00 00 00 00 // V+ key released
00 00 01 2B 08 DC 4A 80 2A 00 00 00 00
00 00 01 2B 08 79 4B 80 2A 00 00 00 00
. . . . .
Designing
It is possible to use a cheap simple board like Arduino and a CAN bus interface board like MCP2515. But, for some reason, I used the STM32 processor.
The main idea is to artificially simulate the pressing of the V+ key and send the desired number of appropriate packets on the CAN bus.
While working with the system, I realized that if for any reason, the yy numbers are not sent in the order that was said, an ACC error will be declared and ACC will be unusable for now. Of course, this error will be resolved by restarting the car.
Therefore, from a technical point of view, this task is as follows:
16 consecutive packets of V+ table will be sent with a time interval of 1.5 milliseconds. These packets take about 24 milliseconds and fit between the transmissions of the steering wheel processor. So that the overall sequence of yy numbers does not get mixed up and the pressing of the V+ key will be simulated.
Packets on the CAN bus in the time axis will be as follows:
The blue packets are sent by the processor on the steering wheel, and the red packets are sent by our processor.
The final algorithm can be expressed as follows:
Code:
Start-up and initialize //immediately after ignition-on
delay for 6 seconds
N = 7; /* 1=30 km/h , 2=40 km/h , ... , 7=90 km/h, … */
For N times
{
Wait and Read-CAN packets to find: xx,yy,zz = 0D,4F,80
delay for 3 mili-sec
Every 1.5 mili-sec: Send-CAN packets of V+, start from 41,40,82 up to CA,4F,82
delay for 300 mili-sec
}
Set MCP2515 to sleep mode
Set the CPU to sleep mode
Final result
I implemented the above algorithm in STM32 processor in C language. The MCP2515 function library was very useful. The board power should be connected to Terminal-30.
Please see this video:
go.screenpal.com/watch/cZiv6zVPHpy
The system works well, without any errors.
When the car is started, the ACC speed is set to 90 km/h automatically within 10 seconds.
It has brought me a kind of comfort. Besides, it was fun to face this challenge.