With STM32F103 as the microprocessor, a low-cost wireless WiFi music playback system is designed. The MP3 music player is realized by the WM-G-MR-08 (wm631) module and the VS1003B audio decoder that receive WiFi data. The client software developed based on Android system adopts mobile phone control, completes the data transmission between the mobile terminal and the control terminal, and realizes the remote control of the music player by the mobile phone. The results show that the system is simple and convenient, low cost, reliable and easy to expand. This article refers to the address: http:// The design is based on the already developed WiFi wireless network, making full use of the advantages of wide coverage of WiFi, fast transmission speed and strong anti-interference ability. Android has the advantages of open source, encapsulation, and high cost performance. The client software developed based on Android system has strong portability and high versatility. The mobile phone is used as a control terminal for easy operation. The mobile phone controls the music playing system through the wireless network (WiFi), which can realize convenient, fast and intelligent requirements. 1 system design There are many advantages to using the STM32F103 as a microcontroller. The STM32F series is a medium-capacity enhanced type. It is a 32-bit ARM core-based microcontroller with 64 or 128KB flash memory. It is a very cost-effective product on the market. This design mainly has control module, WiFi wireless module, audio decoding module VS1003B, SD card, its system structure block diagram shown in Figure 1. Figure 1 System block diagram Workflow: Click the play button on the smartphone client software, after receiving the command through the WiFi module, STM32F103 reads the MP3 music file in the SD card, and then transfers the read data to the audio decoding chip VS1003B through SPI, and decodes After conversion, it is sent to the earphone to realize the function of playing music; when the pause button is clicked, STM32F103 stops reading the MP3 music file data in the SD card, so that the function of stopping the music can be realized; clicking other buttons can also realize the corresponding function. The main features of this design are as follows: 1 Based on the design of the open Android system control terminal, use the support component to reuse and replace the application framework. The use of an interactive graphical interface is clear and beautiful, the operation control is simple, and the designed product is very well reflected by the user experience. 2 This design eliminates the dependence of the traditional music playback system on the dedicated control buttons, and the user can control the playback, pause, etc. of the music player through the user's mobile phone, which greatly facilitates the user's operation. The music playing system designed in this way not only has the function of a general music player, but also has the advantage of separating the control end and the hardware part, and realizes the remote control of the music playing system. 2 hardware circuit design 2.1 audio decoding module The VS1003B is a single-chip MP3/WMA/MIDI audio decoder and ADPCM decoder. It contains a high-performance, proprietary, low-power DSP processor core, VS_DSP4, which provides 5KB of instruction ROM and 0.5KB of data RAM for user applications. It also features a serial control and data interface, a high quality variable sample rate ADC and stereo DAC, four general purpose I/O ports, a UART, and a ground buffer and headphone amplifier. The STM32F103 transmits the MP3 audio data stream read from the SD card to the audio decoding module, and the audio decoding module parses and converts the data stream into an analog signal before outputting. The data communication between VS1003B and STM32F103 is performed by the SPI bus method on the J2 pin header. The schematic diagram of the audio decoding module circuit is shown in Figure 2. Figure 2 audio module decoding circuit diagram 2.2 SD card interface module The SD card is the most versatile data storage card. It has the advantages of low price, large storage capacity, convenient use, versatility and security. Therefore, the memory cards on MP3, MP4, MP5, Pad and digital cameras are SD. card. The bus mode supported by the SD card is SD mode and SPI mode. The SPI mode is adopted in this design. Figure 3 shows the interface circuit of the SD card module (SPI mode on the J10 pin). Figure 3 SD card module diagram 2.3 WiFi wireless module The biggest advantage of WiFi (Wireless Fidelity) is that the transmission speed is high, and the bandwidth can be automatically adjusted, which can effectively ensure the stability and reliability of the network. The WM-G-MR-08 module used in this design not only has the function of WiFi, but also provides a small size and high data rate wireless connection for wireless PDA, DSC, media adapter, micro printer, barcode scanner, VOIP. Telephone, etc. The data storage device is a potential application of the WM-G-MR-08, and the embedded application is mainly focused on the mobile device. In the design, the WM-G-MR-08 module communicates with the main control chip through the SPI pin of the J1 pin header on the development board, and the ANT1SMACON is a wireless network card. The schematic diagram is shown in Figure 4. Figure 4 WM-G-MR-08 module diagram 3 embedded software design The design uses RealView MDK development kit as the software development platform, embedded software is written in C language, and the operating system adopts μC/OS-II. μC/OS-II is written in C language and assembly language. The structure is simple and concise, and it is very readable. At the same time, it has most functions of real-time operating system, and can be widely used in various kinds after appropriate expansion. Application. After the system is started, the STM32F103 is initialized, then the SD card, the audio decoding module, the WiFi wireless module are initialized, and finally the μC/OS-II system is initialized. When the WiFi command determines that it is a play command, the microcontroller sends some basic information of the SD card to the FAT file system interface for reading, and obtains the capacity of the SD card, the FAT table, and the starting sector where the root directory is located. Through this information, it can be determined whether the SD card stores a music file that the audio decoding module can decode and play. If there is the music file, the controller will read the audio information of the file through the SPI bus mode, and send the audio stream information to the audio decoding module, which is decoded by the VS1003B chip, and then passed through the included high quality The stereo DAC and the headphone driver circuit can realize the music playing. The program flow chart is shown in Figure 5. Figure 5 program flow chart 4 mobile client software design Development tools for mobile client software development include Eclipse, JDK, ADT, and the Android SDK. The development environment is built as follows: First install the JDK, then extract the Eclipse and Android SDK separately, then install the ADT plugin for Eclipse, and finally configure the Android SDK, and finally build the Android development environment. For the client software, use ImageView+TestView for UI design, select the appropriate image as the background and add ButtonStart, Button-Stop, ButtonOff and other function buttons to control the playback, pause and close of the music playback system. After designing the UI interface, respond to user actions by adding a setOnClickListener event to each button. According to the different command buttons, different commands are sent to the slave nodes through the network in the response function to implement the corresponding control functions. Conclusion This design is to build WiFi on the ARM7 platform, and the cost advantage is obvious. Adopting the newer control method--smartphone software control + wireless network, not only can fully utilize the advantages of fast transmission speed and wide coverage of WiFi, but also the construction cost of Android-based platform is low and easy to use. At the same time, the mobile phone software adopted in this way has universality, high market application value, easy to promote, and can provide users with high quality, convenient and fast music broadcasting service. Solar Cable,Tuv Approval 6M Solar Wire,Solar Dc Panel Power Cable Kit,Automotive Power Dc Cable Dongguan City Yuanyue Electronics Co.Ltd , https://www.yuanyueconnector.com