Language:

How to add bluetooth music playback in a car

Categories: My Projects
Tags: No Tags
Comments: No Comments
Published on: 10/04/2015

The multimedia center in my car is quite useful – it features a built in GPS navigator, a rear-view camera, an MP3 player and several other handy functions. However, its greatest weakness is the inability to play music via Bluetooth. The only supported option is the hands-free bluetooth phone connection mode. To listen to music on a phone it must be wired to the audio-port in the media centre.

I like listening to audiobooks on the road, as well as during my daily morning walks, and use my smartphone for this purpose. This is why it is important for me to continue listening to my books in the car in the same spot I left them off at before. This is the reason why having a second copy of the book on a disc will not work. The Android smartphone can connect to different devices for different purposes. For example, it can connect to the car’s hands-free module for conversations and to the A2DP module to play music, and even determines where to send each signal in each situation. This way, during an incoming call, it stops the music and switches to the hands-free module until the conversation is finished, before switching back to the music on the A2DP device. As you can see, we have all the conditions to add the ability to listen to audiobooks in the car. All that is left is to build the A2DP module to connect to the audio-port in the media centre. The power for this can be taken from the cigarette lighter socket, since I never use it and it is placed in a convenient location for this project. Because of this, I plan to place my device inside it.

What we will need:

  1. A case (about the size of the socket) with a built in plug for the cigarette lighter.
  2. An A2DP bluetooth module.
  3. A power supply. A highly effective (non-linear) and quiet one is recommended.
  4. An isolator for the breaking of the ground loop, which is formed by the power of the cigarette lighter socket and generates a large amount of background noise.

 

So let’s look at all these elements with more detail.

The Case.

I printed the case on a 3D printer with its required ability to be placed into the socket in mind. This is how it looks with the board installed (as you can see, lacking a face plate):

Enclosure

I ordered, on dx.com, this plug, which is cut off immediately above the anchoring hole and is fastened via this opening to the case (SKU: 183318):

sku_183318_1

The switch for the plug is not thrown away, but installed on the face plate on the case. For this I lengthened the wires emerging from the it. I also replaced the 10А safeguard, which was in the plug, with a 0.25А one for safety – my device does not use more than 50мА.

These are the files for the case in the stl format: bluetooth. The case and the board for it were modeled after the cigarette lighter socket size of the Mitsubishi Pajero (model of 2012). If you want to replicate this case, I recommend increasing the size of it since it does not fully reach the edges of the socket, which can sometimes lead to the loss of contact due to tilting.

The power supply is mounted onto the circuit board, which is placed into the cut inside the case. A switch, a 3.5mm audio exit port and a pause button are all mounted on the face plate. Initially I planned to include indicator LED’s, but later decided to abandon the idea.

A2DP модуль.

The module I chose, the XS3868, is quite well known and requires minimum binding. It can be purchased on eBay for $5-6. The problem is only in the lack of a good documentation on the module.

The documents on the internet, as well as the information supplied by the manufacturers, is incorrect. For example, this connection schematic is false:

The ground must be connected to pin 20, not 21. The buttons are also mixed up. It took me one burnt module and a few weeks of waiting for a new one to find this out. And, of course, the required modification of the board with the help of a scalpel and some wires:

PCB

 

The red line marks the spot of the cut ground pin. Above it can be seen that the neighboring pin is soldered to it instead.

The buttons also don’t match and I had to find where to hook up the pause button (‘push style’). This is the schematic of my device (no modification):

Schematic

If you want to replicate this, don’t forget to change its connection to the module.

At default, the module is turned on at full volume, which is good to connect to an amplifier, but you need to be careful about the use of headphones. Since I use this device only to listen to audiobooks, I do not need other buttons, except for the pause button, so I cannot verify their correctness.

The sound quality of this module is quite high, but it probably will not satisfy hardcore music lovers.

Ground Loop.

Since the module is powered by the car’s circuit and is connected to the same ground as the media system, a ground loop is created in which a whining background noise is formed by the car’s generator and depends on the RPM of the engine. In does not interfere with the listening, but is in general very annoying. You can find more on this on Wikipedia.

The simplest method to get rid of this is to break the loop. This can be achieved with an isolating transformer without a coefficient of increase or decrease (its primary and secondary windings relate 1:1). It is installed between our module and the car’s media center. Ready-to-install devices like these can be bought on eBay for $5-10. Since the AUX inlet in my car is positioned in the glove compartment and is consisted of RCA ports, I found a transformer with RCA inlets and outlets and placed it in as well: http://www.ebay.com.au/itm/AV-Link-201-086-Gold-Plated-Connectors-Ground-Loop-Isolator-RCA-to-RCA-60cm-/121511856330? After installing it, the wailing was fully silenced.

Power Supply.

To power the module 4V are needed. In the car’s circuit, the voltage alternates between 10V and 14.5 V. The easiest way to lower this voltage down to 4V would be to install a linear converter (like series 1117), since they give a good quality of output voltage, but are ineffective, leading to their overheat. This depends on the current and voltage. The current in my device is small (less than 100mA), but the voltage drop can consist of more that 10V (14.5V – 4V). This means that the converter should dissipate about 1W in energy. In the car the surrounding temperature can be quite high from the sun or the heater, as well as the fact that the ventilation of the converter is limited by the case of the device, led me to use a pulsed power supply. This system does not have problems with overheating, but it can cause problems with the sound quality.

I chose a converter IC with an ultra-low noise level LT1777 and installed power filters. This solution ended up being relatively expensive (more than $10 for the separate parts of the power supply against the $0.5 of a linear converter), but secured me from the problems of cooling and interference. You can probably use cheaper step-down converters since the module XS3868 already has a linear converter, which will smoothen the sound, but I decided to keep safe.

I am pleased with the result – the board does not heat up and does not make additional sound interference. The only problem was that at first, the device did not automatically connect to the phone after being turned on. As a result, I had to do that manually, although after a few days the problem disappeared completely. This is how the device looks like when it is properly installed into the car:

bluetooth_pajero

The audio wire, which is connected to the device, goes away into the glove compartment.

That’s all. ‘Till next time!

Leave a Reply

Welcome , today is Wednesday, 27/09/2017