BimmerFest BMW Forum banner

1 - 20 of 135 Posts

·
Registered
Joined
·
119 Posts
Discussion Starter · #1 · (Edited)
Hi folks,

As you know, enabling the Traffic Jam Assistant (TJA) feature requires a capacitive-touch sensor enabled steering wheel along with a Hands on Detection (HOD) module which BMW calls "Electronics of Touch Detection". Some of us have been looking into designing a Hands on Detection "Emulator" in order to try this feature out without spending the high cost of the new steering wheel. After several weeks of research, our efforts have been successful. This post shows detailed instructions that you can follow to make your own HOD emulator. This particular device has been tested on an F10.

Disclaimer:
This emulator can only be used for research and testing purposes! It does not replace the driver! It does not make your vehicle self-driving. Legally, you are still required to put your hands on the steering wheel and pay full attention to the driving as you normally would. The authors do not take any responsibility for any instructions/code/materials provided.

Team Members:
This work is a collaborative effort of a team of three: marvel.marv, dayvg and myself.
A big thanks to my teammates for all their help and support without which this project wouldn't have been a success! Cheers! :thumbup:

Building the HOD Emulator:
Fundamentally, the emulator consists of an ATMega328PB microcontroller paired with a LIN bus transceiver connected to the LIN bus inside the steering wheel. It communicates with the SZL module over LIN bus by sending LIN packets that convey a state of "hands-on-wheel" to the SZL. Since the hands-on-wheel pre-condition is emulated to be met, the TJA system can be enabled as it normally would.

Prerequisites:
  • Your vehicle must be equipped with Adaptive Cruise Control (ACC), with appropriate multifunction switch.
  • Multifunction switch meant for ACC also works for TJA, just that the "Increase Distance" button becomes "Enable TJA" button. You don't need to buy a new switch.

Parts List:
  1. 1x Pololu A-Star 328PB - 5V, 16MHz Microcontroller Board (link). Cost: $4.95
  2. 1x Pololu USB AVR Programmer v2.1 (link). Cost: $7.77
  3. 1x LIN Bus Transceiver TJA1027T 8-SO (link). Cost: $0.89
  4. 1x SOIC TO DIP ADAPTER 8PIN (link). Cost: $2.95
  5. 1x 220pF Capacitor (link). Cost: $0.58
  6. 2x 3-Pin Female Connector (link). Cost: $1.10
  7. 6x Female Socket Contacts (link). Cost: $1.20
  8. 1x 3-Pin Male Connector (link). Cost: $0.81
  9. 3x Male Socket Contacts (link). Cost: $0.63
  10. 2x Blue hookup wire (link). Cost: $1.12
  11. 2x Black hookup wire (link). Cost: $1.64
  12. 2x Red hookup wire (link). Cost: $0.80
Parts Total Cost: ~$24.44 + Shipping

The following picture shows some of these parts:



Tools and Softwares:
  1. Atmel Studio (link).
  2. Soldering iron & solder wire
  3. Magnifying glass
  4. ESys for coding the vehicle

Programming the Microcontroller:
The ATMega328PB microcontroller (MCU) on Pololu A-Star board needs to be programmed to communicate over LIN bus.
  • In order to be able to program the MCU, solder the ISP headers shown in figure below to the Pololu MCU board. Only the 6 pins encircled in the figure below are needed:


  • Download the HOD_Emulator.elf.pdf file and rename it to "HOD_Emulator.elf".
  • Connect the Pololu AVR Programmer with the Pololu MCU board using the ISP programmer cable provided with the programmer. Checkout the programmer's user guide here.
  • Open Atmel Studio and try out programming the MCU with a simple example program by follow the programmer user guide tutorial at this link
  • Once your programming setup is working correctly via the tutorial above, now when you reach the step 9 in tutorial above, point to the "HOD_Emulator.elf" file downloaded earlier instead of the "BlinkLED.elf" file shown in the picture below, and program the MCU as you normally would in the tutorial.


  • At this point, your MCU is programmed to communicate over LIN bus.
  • In the final version of your emulator (once TJA is working fine), you may de-solder the 6-Pin ISP headers from the MCU board to reduce the vertical thickness of your emulator.

Hardware Connections:
  • Solder the LIN Bus Transceiver to the 8-Pin adapter. Follow instructions provided in this guide: 8-Pin SOIC to DIP Adapter Hookup Guide
  • Make connections between the Pololu microcontroller board and the LIN bus transceiver by soldering some wires as per the schematic shown below:


  • Also connect a 220pF capacitor between the LIN wire and GND as shown in the schematic.
  • Solder 3 right-angled pins that came with the MCU board to the <12V, LIN, GND> pads on the LIN bus transceiver adapter as shown below. After this step, the emulator looks something like this:


  • The emulator hardware is complete at this point. Next steps are to make a wire harness extension to connect the emulator to SZL LIN bus, and to package the emulator.

Building the Wire Harness Extension:
We'll be building a "V" type splitter cable harness to connect our HOD emulator to the SZL LIN bus.
  • Use the 3-Pin connector housings and their respective terminal contacts to build the splitter harness.


  • The two female 3-pin connectors should be on the top two ends of "V", whereas the one male 3-pin connector should be at the bottom end of the "V" splitter.
  • Use the Black, Blue, and Red hookup wires in pin positions 1, 2, and 3 respectively in each connector housing to build the splitter harness. Notice that one end of the "V" should be shorter (~4 inch) and the other one should be longer (~12 inch).


Packaging the Emulator:
Packing the emulator boards in some form of robust package is important to secure the circuitry from breaking apart and unintentional short circuits etc. I used a flexible plastic card and some hot glue to make a package for the emulator. The package has anchors on the back side such that the emulator can be mounted and secured to the dedicated spot for HOD module inside the steering wheel.



Connecting the Emulator:
  • Always disconnect the negative battery cable before unplugging the Airbag.
  • Remove the steering wheel's airbag and put it aside.
  • Unplug the 3-Pin connector of Multifunction Switch in the steering wheel, and plug it into the Male end of the "V" splitter cable. Make sure each of the three wires is connecting to the same colored wires: Red to Red, Black to Black, Blue to Blue. Now your LIN bus is split into two ends.
  • Connect the shorter end of the splitter to the Multifunction Switch and secure the harness out of the way. Again take note of the wire colors in each position, and they should match the original harness' colors that you unplugged.
  • Route the longer end of the splitter to the left side of the steering wheel and connect it to your HOD emulator. Make sure the Black wire is connected to GND position of the 3-pin connector on your emulator. It is very easy to get this step wrong as nothing is stopping this connector to be plugged in 180 degree flipped.
  • Mount the emulator to the HID module spot using the anchors, secure the harness out of the way. Replace the Airbag, and we are done with the hardware.
  • Reconnect the battery.


Coding the vehicle:
Last step is to code the vehicle to enable the TJA (5AR) feature. I'm sure there are experts out there who can help with any coding questions.
I'll share the steps I took to code my F10 LCI.
  • Added 5AR to the FA
  • VO coded SZL, EPS, KOMBI
  • FDL coded the following parameters:
    • FRM: PERSONEN_WARNUNG_STA --> aktiv
    • ACSM: Zentralsensor_Rollover_y-z_low_g --> aktiv
    • ICM: C_Stauerkennung_on --> on
    • ICM: C_Stauassistent_Vorhanden --> aktiv

And that concludes the DIY. If everything goes right, you should be able to enable TJA as shown below:



Hope this is helpful, and many of you will give this DIY a try!

Cheers! :thumbup:
 

Attachments

  • Like
Reactions: tsgeorge

·
Registered
Joined
·
57 Posts
Perfect work. Congratulations! The elf download was not successful, says invalid link.
Do you also have FDL coding guide instead of VO coding?
Would this work on F45/I3 or tailored only for F10?
 

·
Registered
Joined
·
119 Posts
Discussion Starter · #3 ·
Thanks! The elf file should be downloadable now.

So far this has only been tested on F10. My understanding is that this should work for series that have SZL module. We need feedback from owners of other series who can try it out to see if it works for their series. If it doesn't work as is, in most likelihood a software update of the emulator (meaning a new elf file) should make it work, and hopefully your hardware won't be wasted. ;)
However for this, we need feedback from other users first.
 

·
Registered
Joined
·
119 Posts
Discussion Starter · #4 ·
Completely FDL coding (and no VO coding) option should be possible, and I believe others have posted some parameters to code in other threads. But I wanted to reduce the uncertainty and therefore VO coded where possible.
 

·
Registered
Joined
·
95 Posts
Super nice work, gents! I thought I was done, no more retrofits left, but you gave me a new project! Awesome and thanks for sharing!
 

·
Registered
Joined
·
119 Posts
Discussion Starter · #6 ·
Thanks, glad to be able to contribute this to the community! :thumbup:

Looking forward to see you and others install this and hear everyone's thoughts!
 

·
Registered
Joined
·
119 Posts
Discussion Starter · #8 ·

·
Retrofit ALL the things
Joined
·
64 Posts
I've also completed my HOD emulator to work on my 2015 F11. Everything works as expected.

I've opted for a little more compact layout. The LIN chip board is stacked on top of the MCU board:




I have a few spares assembled. PM me if you're interested.
 
  • Like
Reactions: cdr96mb

·
Welcome everyone retrofit
Joined
·
137 Posts
kamrankazmi
Great, excellent, wonderfull
Thank you very much
 

·
Registered
Joined
·
95 Posts
Great stuff! Was fun project thanks to clear write up!

Thanks a lot!

Now all i need to do is wait for a traffic jam :angel:
 

·
Registered
Joined
·
57 Posts
Hello,

I tried with a Mini F54 and TJA did not work. I would be glad if someone with F45, F48 or I3 with TJA could share their cafd files.
I made it work with my mini. The only problem is that, I can not trace if the system is on, because Mini Kombi does not have a TJA symbol. Except for that it works fine.

5AR is not an available SALAPA Element for Mini chassis, so I had to experiment with FDL coding. Please find the FDL as below:

SAS:
LDM_Stauassistent_vorhanden ==> true = 01
LDM_Ext_Fahrzeugverlassenswarnung ==> wahr = 01
LDM_STA_Einschraenkung ==> keine Einschraenkung = 00
LDM_STA_P_Faktor ==> wert37 = 25
LDM_AchsabstandFahrzeug ==> 2.67 = 01 0B (choose your appropriate wheelbase, for F54:2.67m)
LDM_Daempfung_EPS_vorhanden ==> true = 01

EPS:
C_ADAS_IF ==> C_ADAS_ACTIVE = 01

KOMBI:
KL_PREDRIVE_F17_STA ==> aktiv = 01
STA_ENABLE ==> aktiv = 01
SU_SW_DRDY_2_TIMEOUT ==> aktiv = 01
SU_SW_DRDY_2_APPL ==> aktiv = 01

BDC:

ComAdapterPdu_31C_Anzeige_Fahrerassistenzsystem ==> aktiv = 01
LRE_VERBAUT ==> aktiv = 01
HOD_VERBAUT ==> aktiv = 01
LIN_VARIANTE_LRE ==> lre_tlc = 03
PERSONEN_WARNUNG_STA ==> aktiv = 01
 

·
Registered
Joined
·
119 Posts
Discussion Starter · #15 ·
Great work! I'm glad you were able to figure out the FDLs and the emulator worked!
 

·
Registered
Joined
·
95 Posts
Great work! I'm glad you were able to figure out the FDLs and the emulator worked!
Short question, i need to have a can1 to can2 converter. So nothing fancy, just a straight passthrough that converts the different baudrates of can1 and can2. Can i use a similar setup but with a can soic chip instead of lin? Any pointers to help create it? Any ideas?

I have ICAM f15 in F10 and it works super, except for the front and rear view button activation due to different can connection between f10 and f15.

Thanks!
 

·
Registered
Joined
·
119 Posts
Discussion Starter · #17 ·
Short question, i need to have a can1 to can2 converter. So nothing fancy, just a straight passthrough that converts the different baudrates of can1 and can2. Can i use a similar setup but with a can soic chip instead of lin? Any pointers to help create it? Any ideas?

I have ICAM f15 in F10 and it works super, except for the front and rear view button activation due to different can connection between f10 and f15.

Thanks!
Converting CAN packets format/baudrate should be possible with appropriate programming of the microcontroller, and two CAN transceivers attached to it. One channel receives CAN1.0 packets, MCU converts them to CAN2.0, and second channel forwards it to the CAN2.0 bus.

Is baud rate the only difference in CAN1 and CAN2? I believe CAN2 offers larger packets too? Depending upon how much changes are needed to convert the packet, writing the MCU program can be simple or complicated. I suggest to look for CAN Software libraries on internet, and pick a transceiver compatible with the library to make the programming job easier.

If possible, you can pick an appropriate dual channel CAN transceiver chip to keep the design compact. Some dual-channel chips can be found here.
 

·
Registered
Joined
·
95 Posts
If possible, you can pick an appropriate dual channel CAN transceiver chip to keep the design compact. Some dual-channel chips can be found here.[/QUOTE]

Thanks! Not sure what i will encounter, if straight pass through or translations are needed.part of the fun. There are emulators for sale that can do this also, but where is the fun in that.
 

·
Registered
Joined
·
119 Posts
Discussion Starter · #20 ·
Do you need to change the multi control buttons on the steering wheel for this extra function?
If you already have the adaptive cruise control (which is a pre-requisite for this anyway), then you don't have to change the multifunction switch. The lower distance control button of ACC becomes TJA enable button.
 
1 - 20 of 135 Posts
Top