Design and Implementation of Bluetooth Car Audio Stream Player

The current car infotainment system is equipped with a radio with a CD player function and a liquid crystal screen. Other optional devices include a GPS and a Bluetooth handsfree. With the application of Bluetooth technology in audio and video transmission, a Bluetooth audio stream playback function that can enhance the user's entertainment experience is gradually being applied in the in-vehicle infotainment system. The Bluetooth audio stream playback function means that the music on the Bluetooth MP3 or the Bluetooth mobile phone is transmitted to the remote device through the Bluetooth to be decoded, and then played through the power amplifier system of the remote device, and the remote device also has a remote control. The function allows the user to operate the music on the remote device, causing it to pause, play, fast forward and rewind, or switch between the top and bottom. The author designed and implemented a Bluetooth car audio stream player, the player and the radio and LCD screen are connected through the CAN bus, the control operation is realized on the radio, the LCD screen displays the music tagID3, play time, audio track, total Information such as audio tracks, control commands and playback information are transmitted via the CAN bus. From the user's point of view, the Bluetooth audio stream player is a system composed of a radio and a liquid crystal screen.
1 system structure system structure shown in Figure 1. The audio stream player, LCD screen and radio form a CAN network of the car entertainment system. The control commands and status information are transmitted via the CAN bus. The radio has a power amplifier, directly drives the car speaker, and manages the FM, CD and audio streams. The audio source of the player's audio output. The audio stream player and the bluetooth mobile phone interact with each other through Bluetooth, and the audio audio stream data and related format information are transmitted by using A2DP (Advanced Audio Distribution Profile), and the remote playback control of the music is completed by AVRCP (Audio/Video Remote Control Profile). Play information and status reading. Two terminal names are introduced in A2DP: SRC (Source) and SNK (Sink). Here, the data transmitter of the digital audio stream is called a SRC, and the Bluetooth audio stream player of the digital audio stream is called SNK.

This article refers to the address: http://

2 hardware design Bluetooth audio stream player hardware design, including CAN communication, Bluetooth subsystem and audio system three parts, of which Bluetooth subsystem and audio system part using CSR Bluetooth single chip Bluecore5-MutiMedia (hereinafter referred to as BC5) . The chip integrates MCU to realize Bluetooth protocol stack and application, integrates DSP with performance up to 64MIPS to realize encoding and decoding of music files, integrates CODEC, audio ADC and DAC, realizes audio input and output function, Figure 2 depicts the chip based on the chip. hardware design.
As can be seen from Figure 2, the BC5 integrates Bluetooth RF and baseband control, MCU, DSP and audio CODEC, and requires only a few peripheral components to complete the circuit design.

3 Design of the playback control state machine The remote playback control of the Bluetooth audio stream allows the user to control the music on the Bluetooth mobile phone using the buttons on the car radio that control the CD music. The control operations include play, pause, previous, next, fast. In and out, through the AVRCP (Audio Video Remote Control Profile) command. Considering the randomness of the user operation and the different audio stream support characteristics of the Bluetooth mobile phone, it is necessary to design a perfect remote playback control state machine to ensure a good operating experience.
The remote play control state machine is a combined state machine, including two small state machines: (1) the state is the Bluetooth mobile phone music state, the input is the human machine interface operation, the current music state is judged in the processing of the human machine interface operation, and the output is determined. The AVRCP command; (2) the state is the human-machine interface operation or "desired state", the input is the update of the current state of the Bluetooth mobile phone music, and the output AVRCP command is determined according to the desired state in the processing of the music state update. The human interface operation is referred to as "desired state" and the current music state is referred to as "actual state". The principle of the two state machines is to transmit an AVRCP command that can reach a desired state when the desired state and the actual state are inconsistent. The design points of the lower state machine are described in detail below.
First, each human-machine control command corresponds to two commands on the AVRCP. For playback, pause, previous, and next operations, the commands are executed continuously. For example, the pause operation is to continuously execute PAUSE_PRESS and PAUSE_RELEASE on the AVRCP. For the fast forward command, the FF_PRESS command is executed first, and the FF_RELEASE command is executed when the fast forward button is released.
The music state (including the desired state and the actual state) includes two steady states (play state PLAY, pause state PAUSE) and two intermediate states (fast forward state FF and fast reverse state FB). For the PLAY and PAUSE states, since the play button and the pause button of the Bluetooth mobile phone are a ping-pong button, pressing in the pause state will start the play, and pressing in the play state will cause the pause, so if the actual state and the desired state are the same, The AVRCP command is sent, and the AVRCP command is not sent for the inconsistency between the actual state and the expected state caused by the user operating on the mobile phone. Otherwise, an error that would otherwise be paused but played or paused should be caused. For fast forward and rewind, first of all, in the fast forward and rewind, do not judge whether the current music is paused or played, and secondly, because some mobile phones will pause the music and then play it after fast forward and rewind, so don’t fast forward and rewind. The playback control state machine is called at the end and needs to be delayed for a while.
4 Audio stream state processing and information analysis Streaming media information includes codec format and sampling rate setting, music playing status, current playing time, TagID3 information, and the like. First, the data transmitted by Bluetooth is the encoded music file, the SRC end implements the encoding, and the SINK side implements the decoding. Therefore, the corresponding decoder is first selected according to the encoding format, and secondly, the same sampling frequency needs to be set at the local audio output end.
The play state corresponds to the play mode, including four states of play, pause, fast forward, and fast reverse, wherein play and pause are states that are very critical to the play control state machine. For Bluetooth phones that cannot send playback and pause status, you need to design a way to determine which state the current music is in. When the music is playing, the streaming music data is transmitted from the SRC end to the SNK end through Bluetooth, and the SNK end transmits the Bluetooth data to the DSP of the BC5 for decoding, so it can be judged by judging whether there is data in the decoder buffer of the DSP. Current music status, if there is no data, the music is paused.
The current playback time, TagID3 information needs AVRCP V1.3 support, AVRCP V1.3 defines a unique format of TagID3 information. The following is an example of Mike Jackson's Billie Jean music as the TagID3 format in AVRCP, Tag ID3 The data is in hexadecimal form "0 0 0 1 0 6a 0 b 42 69 6c 6c 69 65 20 4a 65 61 6e 0 0 0 2 0 6a 0 f 4d 69 63 68 61 65 6c 20 4a 61 63 6b 73 6f 6e 0 0 0 3 0 6a 0 0 0 0 0 4 0 6a 0 1 32". TagID3 includes five attributes: title name, singer, album name, audio track (number of first), total track (total music), and each attribute uses "4 bytes of attribute ID + 2 bytes of character set. The format of the information + 2 bytes of attribute length + attribute data", where the attribute ID "0 0 0 1" indicates the title name, "0 0 0 2" indicates the singer, and "0 0 0 3" indicates the album name, " 0 0 0 4" indicates the track, "0 0 0 5" indicates the total track, the common character set is avrcp_char_set_ascii=0 3, avrcp_char_set_utf_8=0 6a. According to the above format, the music title is "42 69 6c 6c 69 65 20 4a 65 61 6e" with a length of 11 (0 b), ie Billie Jean, the singer is "4d 69 63" with a length of 15 (0 f). 68 61 65 6c 20 4a 61 63 6b 73 6f 6e”, Michael Jachson, no album name and total track (length 0), the track is 0x32, the second song.
The property extractor is designed according to this format as follows:
While(m {
For (k=0;k<4;k++)
{ av_streaming[n].attri[k]=TagID3[m];
m++;
}
If((av_streaming[n].attri[0]!=0)‖(av_streaming[n].attri[1]!=0)‖(av_streaming[n].attri[2]!=0)‖(av_streaming[ n].attri[3]>5))
{ errorflag=1;
}
If(errorflag==0)
{ for(k=0;k<2;k++)
{ av_streaming[n].charset[k]=TagID3[m];
m++;
}
For (k=0;k<2;k++)
{ av_streaming[n].datalength[k]=TagID3[m];
m++;
}
Av_streaming[n].datalen=av_streaming[n].datalength[1]|(av_streaming[n].datalength[0]<<8);
For (k=0;k { av_streaming[n].tagid3data[k]=TagID3[m];
m++;
}
Av_streaming[n].tagid3data[av_streaming[n].datalen]=' ';
n++;
}
Else
{ errorflag=0;
}
}
Through the parsing of the above code, the attribute ID is in av_streaming[n].attri, and the attribute data is in the data av_streaming[n].tagid3data of length av_streaming[n].datalen.
This paper designed a Bluetooth car audio stream player. The player runs stably and reliably, has good compatibility, and is greatly convenient for the user to use, and has good practical value.
references
[1] Su Minsheng. Bluetooth A2DP technology and audio application testing [J]. Electronic Design Application, 2008 (11): 92-94.
[2] Hu Peiru, Yan Yanan. Design and implementation of a Bluetooth audio streaming solution [J]. Modern Electronic Technology, 2006 (3): 31-33.
[3] BluetoothSIG. AUDIO/VIDEO REMOTE CONTROL PROFILE Revision 1.3. 2007-04-16.

 Multilayer PCB

Multilayer PCB consist of 3 or more circuit layers bonded together by a thickness of insulating material called prepreg and core. They came into the industry with the advent of SMD population. They are found almost everywhere, wherever electronics are in use – from aircraft to motorcycles, and storage power stations to photovoltaics.

Multilayer PCBs are most complicated than others, and are generally considered to be the most sophisticated PCB product due to their construction methods and design complexities.

BentePCB offers multilayer printed circuit boards with the following special technologies:

·  Edge plating for shielding and ground connection

 Â·  High frequency base materials for applications up to 80 GHz

 Â·  Cavities, countersunk holes or depth milling

 Â·  Thick copper up to 105μm (inner and outer layers)

 Â·  500μm thick copper inlays using HSMtec technology

·  Solder resist in green, white, black, blue, grey, brown, etc.

·  Controlled impedances (single, differential, etc.)

·  All recognised Printed Circuit Board industry surfaces available


Items

Manufacturing Capabilities

Number of Layers

1-16 layers

Material

FR-4

Maximum PCB Size(Dimension)

650x1200 mm

Board Size Tolerance(Outline)

±0.2mm/±0.5mm

Board Thickness

0.6-3.0mm

Board Thickness Tolerance(t≥1.0mm)

±10%

Board Thickness Tolerance(t<1.0mm)

±0.1mm

Min Trace

0.1mm/4mil

Min Spacing

Outer Layer Copper Thickness

1oz/2oz/3oz/4oz(35μm/70μm/105μm/140μm)

Inner Layer Copper Thickness

1oz/2oz/3oz/4oz(35μm/70μm/105μm/140μm)

Drill Sizes (CNC)

0.2-6.3mm

Min Width of Annular Ring

0.15mm(6mil)

Finished Hole Diameter (CNC)

0.2mm-6.2mm

Finished Hole Size Tolerance(CNC)

±0.08mm

Solder Mask

LPI

Minimum Character Width(Legend)

0.15mm

Minimum Character Height (Legend)

0.8mm

Character Width to Height Ratio (Legend)

1:05

Minimum Diameter of Plated Half Holes

0.6mm

Surface Finishing

HASL with lead

HASL lead free

Immersion gold

Solder Mask

Green ,Red, Yellow, Blue, White ,Black

Silkscreen

White, Black, None

Panelization

V-scoring,

Tab-routing,

Tab-routing with Perforation (Stamp Holes)


About Us:

BentePCB is a professional PCB manufacturing which is focus on double side, multilayer, HDI PCB, rigid PCB and Flexible PCB mass production. The company was established on 2011.
We have two factories together, The factory in Shenzhen is specialized in small and middle volume orders and the factory in Jiangxi is for big volume.

Why Us?

UL (E492586), ISO9001,  ISO14001, TS16949, RoHS certified.
Turnover USD 
10-50 million per year.
15,000 sqm area, 450 staff .
Mass Production from single to 
16 layers.
Special Material:
ROGERS, Arlon, Taconic.etc.
Client:
Huawei, SAMSUNG, Malata, Midea,Texas Instruments.etc.


Certification(UL:E492586, TS16949, ISO14001, ISO9001,RoHS):

ISO9001,ISO14001UL:E492586

Factory Tour:

PCB Manufacturer

PCB Factory

PCB Manufacturing

Exhibition:

We Took part in the famous exhibitions over the past years,and got highly appreciation from the top experts,as well as cooperated tightly with them.

Exhibition

Delivery:

BentePCB offers flexible shipping methods for our customers, you may choose from one of the methods below.
Delivery

FAQ:

Q1: What does BentePCB need for a customized PCB order?
A: The customers need to provide Gerber or pcb file.If you do not have the file in the correct format, you can send all the details related to the products.
Q2: What is your quotation policy?
A: For the PCB order in large quantity, BentePCB will send you the quotation based on the MOQ of the products concerned, and the price will be reasonable with good quality.
Q3: How long will you send us quotation ?
A: After all files were sent, 2 to 8 hours as per your file.
Q4: What is your minimum order quantity?
A:Our MOQ is 1 PCS.
Q5: How about the service BentePCB offered to the customers?
A: If you have any questions about our products or company, do not hesitate to send us your inquiry to our customer service representatives, Your satisfaction is our pursuits.

PCB China

Contact Us

Multilayer PCB

Multilayer PCB, Multilayer PCB Design, Multilayer Circuit Board, Rigid Multilayer PCB

Shenzhen Bente Circuit Limited , http://www.bentegroup.com

Posted on