Design of wireless active speaker based on BC03 Bluetooth module

Publisher:DreamySunsetLatest update time:2014-03-10 Source: elecfansKeywords:BC03  C8051F020 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

  Bluetooth is a radio technology that supports short-range communication between devices (generally within 10 m). It can exchange wireless information between a wide range of devices, including mobile phones, PDAs, wireless headsets, laptops, and related peripherals. Bluetooth technology can effectively simplify the communication between mobile communication terminal devices, making data transmission faster and more efficient. Bluetooth uses a decentralized network structure, fast frequency hopping, and short packet technology to support point-to-point and point-to-multipoint communication. It works in the globally used 2.4 GHz ISM (industrial, scientific, and medical) frequency band and uses a time-division duplex transmission scheme to achieve full-duplex transmission with a data rate of 1 Mb/s. Bluetooth technology is essentially a short-range wireless communication standard.

  The C8051F020 single-chip microcomputer is selected as the processing and controller of the wireless communication system, and the BC03MM Bluetooth module is selected as the transceiver module of the wireless communication system. The single-chip microcomputer and the Bluetooth terminal device are connected to each other through serial communication. By writing relevant control programs, the keyboard signal is processed and converted by the single-chip microcomputer module and then sent to the Bluetooth module. Related commands are sent to control the corresponding Bluetooth terminal (mobile phone) to play music, make calls, etc. The use of a single-chip microcomputer as the command control and data display processing and controller of the Bluetooth module has the advantages of simple circuit structure, flexible control, low cost, and portability.

  1 Overall solution design

  The main task of the scheme is to complete the communication and control with the Bluetooth module through the C8051F020 single-chip microcomputer UART0, realize the interconnection between the Bluetooth mobile phone or PC computer and the BC03 Bluetooth module, and complete the hands-free (Hand Free Profile, HFP) and music playback (Advanced Audio Distribution Profile, A2DP) functions. The system consists of a keyboard, a single-chip microcomputer, an LCD display, and a BC03MM Bluetooth module with a solidified cable communication protocol (RFCOMM). The keyboard is used to input control signals, the LCD is used to display communication data to facilitate system operation, the single-chip microcomputer is used to control the operation of the system, receive the command signal from the keyboard and transmit it to the Bluetooth module, and the BC03 Bluetooth module is used to connect to an external Bluetooth terminal (mobile phone or PC computer), and control the connected terminal by sending commands to realize system functions.

  2 Hardware Circuit Design

  2.1 Overall hardware design

  The whole system uses a C8051F020 microcontroller and a CSRBC03 Bluetooth module to complete the system design. Among them, UART0 is configured on P0.0 (TXD) and P0.1 (RXD) of C8051F020, and is connected to the serial port of the BC03 module through a 1 kΩ resistor in series. Since both C8051F020 and BC03 Bluetooth modules are 3.3 V systems, there is no need to add additional level conversion serial communication circuits, which simplifies the system design. Port P3 of C8051F020 controls the command and data display of LCD1602, and port P2 completes the input of keyboard information. For the BC03MM Bluetooth module, the voice signal input is completed through the electret microphone, and the audio signal output of the Bluetooth module is driven by TDA2030A to drive the load. The overall circuit design block diagram of the system is shown in Figure 1. 

  2.2 Bluetooth module wiring design

  The wiring of the BC03MM Bluetooth module mainly involves three parts:

  (1) Voice signal input: Voice signal input is completed by an electret microphone and a filter processing circuit, and is set to a single-ended input mode.

  (2) SPK stereo output of 16-bit stereo audio decoding part. For the two-way stereo output of the Bluetooth module, TI's stereo audio power amplifier chip TPA6112 is selected for pre-amplification, and the gain can be set by yourself. [page]

  (3) Connection with MCU.

  2.3 MCU control and communication circuit

  The MCU control and communication circuit includes three parts: serial data communication circuit, control signal input and communication data display.

  C8051F020 has built-in enhanced serial port UART0 and digital cross switch. By configuring the cross switch control registers XBR0 and XBR2, the TXD and RXD digital signals of UART0 are configured on the port I/O pins. In this article, UART0 is configured on P0.0 (TXD) and P0.1 (RXD) of C8051F020, and connected to the UART (RX and TX) of the BC03MM module through a series 1 kΩ resistor to complete the reception and transmission of serial data.

  The control signal input part is mainly completed by the C8051F020 I/O port P2 controlling the matrix 4×5 keyboard. The use of a matrix keyboard has the characteristics of occupying less I/O resources and simple programming. The system needs to implement HFP and A2DP functions, and the key functions are shown in Figure 2. SHIFT is a function switching key that switches between HFP and A2DP. Keys 0 to 3 are multi-function keys. When the SHIFT key is not pressed, it means the number keys 0 to 3 for dialing a phone or the functions of answering a call, hanging up a call, rejecting a call, and redialing; when the SHIFT key is pressed, it indicates the functions of music pause/start, connecting Bluetooth music, next song, and previous song. Keys D, E, F, and G are reserved for system function expansion keys, and have no effect when pressed.

  The display part uses port P3 of C8051F020 as an 8-bit data line to communicate with LCD1602, mainly completing the display of communication data and status information.

  2.4 Audio Amplification and System Power Supply

  The audio power amplifier TDA2030A from CONTEK is used to form an OCL connection, with a maximum output power of 14 W. The audio signals SPKR+ and SPKL+ output by the Bluetooth module enter two TDA2030A chips for power amplification to drive the speaker with RL=4 Ω.

  The normal operation of the system requires ±12 V, +5 V and +3.3 V voltage power supply. This paper converts the mains 220 V/50 Hz into a voltage-down converter through a 2×12 V/40 W transformer, and generates ±12 V after bridge rectification and filtering, which directly supplies power to TDA2030A. The rectified and filtered voltage passes through the LM7805 voltage regulator chip, and the output is a stable +5 V to power LCD1602. The LM7805 output voltage is then passed through the ASM1117-3.3V to power the microcontroller system and Bluetooth module, completing the system power supply.

  3 Software Design

  The system software mainly includes three parts: the construction of Bluetooth protocol stack, Bluetooth communication software design and microcontroller control software design.

  The main purpose of software design is to provide an efficient command to avoid the changing standards and complex Bluetooth functions between different Bluetooth devices. The software interface is a serial interface, which is used for communication between two processors with a transmission rate of 19 200 b/s, 8,N,1.

  Bluetooth technology is an open system (OSI), and its main purpose is to enable various devices that comply with the specification to communicate with each other, which requires that the local device and the remote device use the same protocol. Of course, different applications may use different protocol stacks, but they must all use the physical layer and data link layer in the Bluetooth technology protocol specification. The complete Bluetooth protocol stack mainly involves baseband protocol (Basebaria), link manager protocol (Link Manager Protocol, LMP), logical link control and adaptation protocol (Logmal Link Control and Adaptation Protocol, L2CAP), service discovery protocol (Service Discovery Protocol, SDP), cable replacement protocol (RFCOMM), telephone control protocol (Telephony Control Pro-tocols, TCS), point-to-point protocol (PPP), object exchange protocol (OBEX), wireless application protocol (WAP), Bluetooth audio transmission model protocol (A2DP) and other protocols. This article mainly involves baseband protocol (Baseband), LMP, L2CAP, SDP, RFCOMM, TCS, PPP, A2DP and other protocols, as shown in Figure 3. [page]

  Since the system uses the CSR BC03 Bluetooth module that solidifies the cable communication protocol (RFCOMM) and other underlying protocol stacks, the module only gives simple interface instructions for the communication part with the microcontroller. When the module receives the status inquiry command (blank +?) sent by the C8051F020 control unit, the module will transmit the parameter characters and the end character "0x0D0x0A" to the host via the TX pin. When the C8051F020 control unit sets the command to the BC03 module via TXD, the module will be commanded to perform the corresponding action at the same time. The command has several characters, the first one is "space" (ASCII=20H), and the rest are command characters. At the same time, the BC03 module will have a feedback character sent to the control unit through the BC03MMUART within 100 ms, indicating the current execution of the system and the current status of the Bluetooth system.

  The C8051F020 microcontroller control software mainly completes the following functions: BC03 Bluetooth module command control, LCD1602 system status display command control and key input command decoding.

  The control flow chart of the BC03MM Bluetooth module system based on the C8051F020 microcontroller is shown in Figure 4.

  4 Conclusion

  The function of the system built based on the C8051F020 microcontroller and the BC03MM Bluetooth module is verified. The system can realize the interconnection between a Bluetooth mobile phone or PC device and the BC03 Bluetooth module, and complete the HFP and A2DP functions of the Bluetooth module. The maximum audio output power can reach Po=14 W (RL=4 Ω), and can directly drive a 4 Ω or 8 Ω speaker load. In addition, the system has a friendly human-machine interface, simple operation, low price, good portability, and is convenient for commercial use.

Keywords:BC03  C8051F020 Reference address:Design of wireless active speaker based on BC03 Bluetooth module

Previous article:Design of wireless display system based on GSM network
Next article:Design of three-phase inverter power supply based on SA8282

Recommended ReadingLatest update time:2024-11-16 14:45

Total phosphorus online automatic analyzer based on C8051F020 chip
  1 Overview   The C8051F0XX series of microcontrollers is a new type of mixed signal system-level microcontroller launched by Cygnal. This series of microcontrollers contains the CPU core of CIP-51, and its instruction system is fully compatible with MCS-51. The C8051F020 microcontroller contains 64kB on-chip Flash p
[Test Measurement]
Total phosphorus online automatic analyzer based on C8051F020 chip
Design scheme of oscilloscope monitoring program
The design uses the high-performance single-chip microcomputer C8051F020 as the control chip to monitor the status of 40 buttons, 3 coding switches and 4 potentiometers on the oscilloscope panel. The working principles of the keyboard, coding switches and potentiometers are introduced respectively, as well as the ha
[Test Measurement]
Design scheme of oscilloscope monitoring program
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号