Control an external device in the car using the buttons on the steering wheel

Hello everyone.

Sometimes it becomes necessary to control some external device in the car, for example, a video recorder or a winch. In this case, usually, additional buttons are installed. But sometimes I want to make a hidden installation, so that the interior of the car remains unchanged. We’ll do this today, as a car there will be a VW Polo Sedan with an installed Vega MTX monitoring unit, and as a load there will be an emergency button. Let’s make sure that while holding the “ok” button on the steering wheel, the “emergency light” blinked 3 times.

Under the cut, a large number of pictures and videos.

Once I was asked to make a thank you button on a 2012 Renault Kaptur. By clicking on this button the car should blink “emergency gang” 3 times. This car had an analog steering column joystick. I connected one of the buttons on the steering column joystick to a time relay that gave an impulse 3 seconds long to the emergency gang button. Later, the owner spoke very well about the new function of his car and I decided to try to repeat it on my Polo Sedan.

Unlike Renault Kaptur, I do not have analog buttons, but the signal from all the buttons on the steering wheel can be found in the CAN bus. As the button, the “ok” button on the steering wheel of the car was selected. In my configuration, this button is almost never used. So far, I have found that with it you can set the operation of the "limiter" when the tidy beeps when exceeding the set speed. In any other cases, clicking on this button does nothing.

It was possible to implement our plans with the help of home-made electronics, but in my car there was already a Vega MTX telematics unit, so it was decided to try to implement this functionality using it.

Pressing this button can be found in the CAN bus, which is located behind the radio. I described in detail the search for such sensors inhis previous article about decrypting the CAN bus .

In our case, the data was found at 5BF. When you click on the "ok" button in the zero byte, the figure 40 appears in decimal format. When the buttons are not pressed, the zero byte will be 0. It will be necessary to make a sensor in which these changes will be displayed. In my case, this is a button on the steering wheel.



Now let's figure out how to control the emergency gang button. Unfortunately, Polo Sedan cannot control the emergency gang via the CAN bus, so you will have to manage it by analogy. To do this, you will have to stretch the wire from the white-blue wire from the connector of the emergency gang button. If a ground signal is applied to this wire with a short-term pulse, then the emergency gang turns on. Similarly, it turns off.

Serve the "ground" will be using the digital output Vega MTX. Here we have 4 digital outputs, we will use the third output (blue wire).



Now you need to set the algorithms by which the button will work.

Firstly, I don’t want the emergency gang to turn on immediately by pressing the ok button, I want it to turn on after holding the button for a second. I do this to protect against accidental pressing and to save the functionality of this button.

Secondly, you need to turn off the emergency gang after 3 flashes. 3 flashes "emergency gang" makes in 2 seconds.

To enter all these algorithms, go to the Vega MTX settings, then go to the "Scripts" tab. Here you can set the conditions under which any actions are performed. For implementation I had to use 3 scenarios.

In general, the scenarios are not intended for such operations, so I had to experiment for a long time until the desired result was obtained.



The first scenario serves to create a delay per second after clicking on the “ok” button. It works if in the CAN sensor the value becomes 40 and the external digital output 1 is 0.



Here I will explain about external digital outputs. If the task requires more than 4 digital outputs, then you can connect an additional external module to Vega MTX, which will have 15 digital outputs and many more other inputs and outputs. Since we do not have this external unit, we can use these outputs as variables, putting 0 or 1 there (on or off). By default, all outputs are turned off. External digital output 1 will be a variable that indicates that one second has elapsed since pressing the ok button.

Our script should read like this: now the ok button is pressed, and it is pressed for less than one second. If these conditions coincide, then the action is performed: the external digital output 1 is turned off for 1 second. It means that it goes into the “off” state, but after a second it will go into the “on” state.



Now let's move on to the second scenario.



Unlike the first scenario, it will work with the “Buttons on the steering wheel” sensor equal to 40 and with an external digital input equal to 1. That is, the “ok” button is pressed and the external digital output 1 is 1. And the external digital output will become 1 only after a second after triggering the first scenario.

Now we will analyze what happens after the second scenario is triggered.



Here a pulse of 1 second long is given to digital output 3, to which the output from the emergency gang button is connected, thereby we turn it on.

After that, we need to reset 0 the external digital output 1. Therefore, we turn on the external digital output 1 for 1 second. That is, 1 second after the script is triggered, the external digital output 1 will become 0.

The last item, we transfer 2 seconds 15 to position 0. After 2 seconds after the script is triggered, the external digital output 15 will be 1. The external digital output 15 is used as a variable, that the emergency light was turned on using the button on the steering wheel. 2 seconds is the time during which the car blinks “emergency gang” 3 times.

Now the last scenario, which should send an impulse, to turn off the emergency gang.



This scenario will work when the external digital output 15 becomes 1, that is, 2 seconds after the second scenario is triggered.



After the third script is triggered, we send an impulse to turn off the emergency gang, and reset the external digital output 15 to zero (off).

This ends the work with scripts, save the result in Vega MTX and check the operation of the device.

Thus, you can control any device using the CAN bus of the car. Management is not limited to buttons on the steering wheel. For example, you can set the device to turn on by vehicle speed, by opening a window or door, by starting the engine, by engine speed, by engine temperature, etc. You can lock the doors at a certain speed (if the manufacturer has not provided such an opportunity), turn on the camera when you open the window, and many other options.

All of the above is in the video format, and also there is an example of enabling emergency lights when reverse gear.


All Articles