- Home >> News >> Blog articles >> Internet of things
Design and development of music fountain control system
The music fountain can combine light, music and water column to bring people beautiful enjoyment. At present, large and medium-sized musical fountains in the society have been developed relatively well, but the control system of musical fountains in public places is very complicated and the cost is high. Therefore, it is the future development trend to miniaturize musical fountains and make them "into" the room. By designing a music fountain control system based on Bluetooth communication, and designing a mobile app to control the switch of the fountain, the height of the water column, the switch of music, the selection of music, and the size of the sound. The music fountain is also equipped with LED lights, and the color change of the LED lights can be adjusted by the mobile phone according to personal preferences, and the brightness of the lights can be changed. The system brings auditory and visual impact to people by realizing the simultaneous transformation of fountains, lights, and water columns, and makes the practicability of the music player and the artistry of the fountain perfectly combined.
1. The overall design of the music fountain system
The system is divided into hardware part and software part. The hardware part is composed of 51 single-chip microcomputer as the core control module, supplemented by audio amplifier module, A/D conversion module and bluetooth module. The software part has two major components: one is to set the height of the music fountain water pump and the way the LED lights flash, and the other is to realize the display and control of the mobile phone App. The system as a whole includes a single-chip microcomputer module, a Bluetooth module, a power circuit module, an A/D conversion module, an acquisition module and a mobile phone App.
2. Hardware Design of Music Fountain System
2.1 MCU control module
The main chip is AT89C51 microcontroller. AT89C51 single-chip microcomputer is a 51-core CMOS8-bit single-chip microcomputer with low power consumption and high performance. This microcontroller has Flash read-only memory, 256bytes random access data memory (RAM), 32 I/O ports, 1 watchdog timer, and three 16-bit programmable timers. It has ISP function and can meet design requirements of the system. The four data output ports of the 51 single-chip microcomputer are P0, P1, P2, and P3 respectively. Among them, P0 has a strong load capacity. In addition to being used as the bottom eight bits of the address bus, it can also be used as a data bus to connect the A/D converter ADC0832 with the data line when accessing the external expansion program memory. The load capacity of P1 and P2 is relatively weak. P2, as the high eight-bit address line for accessing external memory, cannot be used as an output and input port of data. P3 has special functions such as read and write control, serial communication, and external interrupt, and it cannot be used as an input and output port. Only P1 can be used as a data output port. mouth.
2.2 Audio amplifier module
Since the output signal of the external audio source signal is relatively small, the original signal must be amplified before being sent to the A/D converter. The audio amplifier chip selected by this system is LM386. The main reason for choosing the LM386 chip is to take advantage of its advantages such as low power consumption, wide operating voltage range, and few required peripheral components. LM386 is a three-stage amplifier circuit. The first stage is a differential amplifier circuit, the second stage is a common emitter amplifier circuit, and the third stage consists of two composite PNP transistors and one NPN transistor to form a quasi-complementary output stage.
2.3 A/D conversion module
The input voltage of the system is an AC analog quantity. In this paper, the AC analog quantity is converted into a DC signal through full-bridge rectification and filtering. When the signal is DC, the A/D conversion is performed, and the A/D chip is ADC0832. ADC0832 is an A/D conversion chip with 8-bit resolution, which can meet the conversion of analog quantities in this design. The ALE signal of the single-chip microcomputer is used as the clock signal of ADC0832. The clock frequency used is 12MHz, and the ALE of 2MHz is divided by four times. 500kHz is used as the clock frequency of ADC0832. Finally, the data from ADC0832 is received by the single-chip microcomputer P1, and sent out from the serial port by means of query.
2.4 Bluetooth control module
The use of Bluetooth is FHSS (Frequency Hopping Spread Spectrum), generally 1600 hops per second, 79 frequency band channels to divide the 83.5MHz frequency band, and the bandwidth occupied at each moment is 1MHz. GHSK (Gaussian frequency shift keying) is its modulation method, and wireless communication of data and voice can be carried out simultaneously. The communication distance of Bluetooth is relatively short, generally 10-50 m. When the Bluetooth module is connected, configure the serial port module first. There are two steps here, the first step is to configure the Bluetooth serial port module as a slave mode, the second step is to enter the Bluetooth serial port module setting interface, and connect the module to the computer through the serial port cable. Open the right side of the "Bluetooth Test Software" and enter the information you want to configure. Since the Bluetooth serial port module has been set to the Bluetooth slave mode before, the mobile App is used as the host to initiate the connection. Open the serial debugging software. Finally, the serial port debugging software sends data to the mobile phone. Realize the connection between the mobile phone App and the Bluetooth module, so that users can control the mini music fountain system with the mobile phone at any time.
3. Music fountain system software composition
This article uses 51 single-chip microcomputer program development software Keil uVision4, and the download software is STC-ISP. Use the Eclipse software to develop the Android terminal program, open the written mobile app to log in to the client, and then you can control the music fountain.
(1) Mobile App development: Use Eclipse to develop App, write software that meets your needs, find the installation package apk file, and send it to the mobile phone for installation. The App and the RAM in the mobile phone build a channel to connect the Bluetooth module with the mobile phone Bluetooth, and finally establish the connection of the entire system, and use the mobile phone to control the entire system.
Summarize
This paper proposes a bluetooth-based music fountain control system design scheme, through the bluetooth module to realize the communication between the music fountain and the mobile app, using the ADC0832 to convert the music transmitted by the mobile phone from analog to digital, and using the single-chip serial port to send the music data To the Bluetooth module, so as to complete the wireless forwarding of data, and realize the control and real-time display of music and water column size.
The above is the design and development example of the music fountain control system based on Bluetooth technology introduced by Shenzhen Zuchuang Microelectronics Co., Ltd. for you. If you have the development needs of the music fountain system solution, you can trust us. We represent a variety of single-chip microcomputers, voice chips, dual-mode Bluetooth ICs, and wifi chips. Brands include Songhan MCU, Yingguang MCU, Jerry Bluetooth, Ankai Bluetooth, Allwinner, and Realtek. Our technical services include: PCB design, microcontroller development, Bluetooth solutions, software and hardware custom development, APP development, small program development, WeChat official account development, etc. It can also undertake the design of intelligent electronic products, the development of living appliances, the research and development of beauty equipment, the application of Internet of things platform, the smart home control system, the development of TWS earphones, Bluetooth earphone speakers, the development of children's educational toys, the design of electronic education products, etc.
Proposal recommendation
- TOP