E81/E87 Hands Free Arduino/KCANBus/BT solution

Check here to find out more about ICE, Satellite Navigation, Telecoms etc.

Moderators: Lambster, marco_polo, Producethis, babybmwadmin, Rich196

Post Reply
DaIceMan
Junior Member
Junior Member
Posts: 6
Joined: Thu Dec 27, 2018 5:27 pm

E81/E87 Hands Free Arduino/KCANBus/BT solution

Post by DaIceMan » Mon Feb 11, 2019 11:15 pm

Hi all,
As I have a Business radio model without BT support on my 2008 E81 I decided to go all the way and add my own support for it using an Arduino Pro Mini, an MCP2515 CANbus module and a BT module to make use of the steering command buttons which you wouldn't have with the basic BT modules you can find anywhere. I tapped into the KCAN bus and power from behind the radio and routed the audio output to the AUX input pins there as well. Here is the module assembly:
Arduino-CAN-BT-top-s.jpg
BT Module Top
Arduino-CAN-BT-top-s.jpg (142.08 KiB) Viewed 906 times
Arduino-CAN-BT-s.jpg
BT Module Bottom with Arduino Pro and MCP2515 module
Arduino-CAN-BT-s.jpg (65.67 KiB) Viewed 906 times
This is the link of the BT module:
https://www.aliexpress.com/item/5V-Wifi ... 33834.html
You can find alternatives to this model, but this is the only I found with INPUT and OUTPUT apart from the USB and MicroSD card reader (the most interesting is the USB port). This means you can route the AUX input to this module and the output to the back of the radio. You can then select the operation mode using the steering "Voice" button and switch from BT to USB to AUX Input in a loop. Unfortunately if you are in USB or AUX input mode on the module the BT is disconnected from the phone, but you can quickly cycle back using the steering button. The next/prev track is the up/down button on the steering wheel and long pressing it increases/decreases the BT volume which is handy as this module has a very high output.

As you can see I stuck the Arduino Pro Mini and MCP module on the bottom side of the BT module using thick double sided tape and wired everything. The 5 buttons (Mode Play Next Prev EQ) have 2 redundant connections each, just use a tester to find the ground and the next pin is the signal pin to be wired to the Digital Input pins of the Arduino (9,8,7,6,5). The EQ pin at the moment is not used but I wired it anyhow in case I decide to make use of it through software as it only works when listening to the MP3 files on the USB port. Wire the SPI pins as indicated following the labels (standard SPI wiring). In the above photo I have my FTDI programing USB-2-serial interface plugged in. I soldered the condenser mic after having measured the length needed to the 2 MIC pins. I tucked it under the black plastic cover between the ashtray and HU block. Alternatively you can route it all the way to the side, up the front glass side and back to the top center lighting block where it is originally housed. Quality was good enough where I put it so I decided to leave it there.

Here are a few pics of my installed setup (still have to add some foam to keep the board in place):
20190210_193613s.jpg
HU with removed climate control panel showing install location.
20190210_193613s.jpg (101.98 KiB) Viewed 906 times
AUX-IN-s.jpg
AUX plug C-Connector removed from Quadlock assy.
AUX-IN-s.jpg (94.11 KiB) Viewed 906 times
The above shows the removed C plug of the quadlock block (the bottom right connector viewing from the back). Mine only had these 3 pins connected which come from the AUX mini jack plug under the arm rest above the 12V cigarette power port. This is an option and not all E81/87s have it. However ALL Business radios have the AUX input, you just need to wire them and enable the AUX input through coding (use NCSExpert for ex.). The hardest part will be to locate the exact pins (search on RS, Farnell or Digikey) which if you do not have the option you will certainly need to complete the wiring. You can find the pinout of the quadlock on the usual pinouts site. I wired the BT power to the +12V line on the quadlock. This is powered until the car goes into sleep mode. Please be careful if you want to tap in here when removing the pin from the quadlock as it most likely will be still powered so avoid any shorts (best disconnect negative from battery if not comfortable). I am not very happy about this delayed +12V disconnect not because of the insignificant power it absorbs (30mAmps) but because if you turn off the car and stay near it your phone will still be connected via BT and you won't be able to answer your phone (or even not hear it) if you don't disable BT first which is annoying. So I will add a transistor or FET which is driven by the radio Pilot wire (black wire on quandlock A block) which pilots the switch and powers the BT module block. This way when you turn off your radio your BT will be OFF. In reality the radio amplfier is never really off as if you have parking sensors these trigger the tone through your radio amplifier even if it is off (more like stand-by). The whole assembly uses from 30 to 60mAmps when streaming BT music and using handsfree. It reaches around 90mAmps if you leave a USB key connected (depending on the USB key size and model). This is under the 100mAmp limit of the 78L05 regulator on the Arduino pro Mini so everything is powered from that (+12V input goes to the RAW pin and MCP and BT module are powered from the VCC pin). I added a 20Ohm resistor in series to the 12V to limit the voltage drop on the regulator so it does not dissipate too much heat. This also provides an additional safety headroom for any voltage peaks. The 78L05 has thermal shutdown if it overheats and overcurrent protection in any case. An in series 250mA slow fuse can be added in series to the +12V.
A big thanks to Trevor Cook (loopbunny.co.uk) avoiding me the hassle of debugging the KCAN bus and to mr-fix (mr-fix.pl) where I found the BT module model I ordered from aliexpress with button support.
Attachments
KCAN_BT_Handsfree.zip
Source INO file
(3.51 KiB) Downloaded 5 times
Last edited by DaIceMan on Fri Apr 12, 2019 12:43 am, edited 1 time in total.

User avatar
Nottsknots
Too Much Time To Waste Member
Too Much Time To Waste Member
Posts: 3073
Joined: Sat Jun 29, 2013 8:35 pm

Re: E81/E87 Hands Free Arduino/KCANBus/BT solution

Post by Nottsknots » Tue Feb 12, 2019 8:37 am

Great work there. Those modules are getting so small these days - I love the Arduino minis, so much scope for mischief :D

I’m pretty sure there will be a power line thats not subject to the delay; I’ll have a poke around the wiring diagrams later - might be easier than faffing with a FET.
E87 118d, stock, plus PDC control unit drain, Parrot, debadged, Mothercare baby shades (but no babies), and occassionally a good layer of wax. Instantly forgettable, and thats the way I like it.

Not long now until the end of May...

Post Reply

Return to “In Car Entertainment, Communication & Sat Nav”