Shenzhen ZTRON Microelectronics Co., Ltd
Telephone
0755-8299 4126

Internet of things

Music fountain system controller design


Fountains play an extremely important role in the construction of urban and community environments. The combination of fountain engineering and high-tech also makes the forms of fountains more diverse, and the effect is more colorful and charming. Among them, the music fountain system achieves a unique artistic effect with sound, light, water, color and shape. It has become an important part of urban landscape construction and performance theater. , Surprise, and joyful emotions, and get the artistic enjoyment of water beauty from it. At present, many squares or parks and outdoor performances also adopt music fountain landscape design. Various fountains, colorful lights and beautiful music form a pleasant night scene, which attracts people's attention, especially in hot weather. In summer, it is unforgettable.


Fountains in gardens are generally artificially constructed decorative water spraying devices to meet the needs of landscaping. Such fountains can humidify the surrounding air, reduce dust and lower the temperature. The tiny water droplets of the fountain collide with air molecules, which can generate a large number of negative oxygen ions. Therefore, fountains are beneficial to improving the appearance of the city and improving the physical and mental health of residents. At present, the development of urbanization and the needs of landscape construction have made the musical fountain system increasingly popularized and applied.


1. The principle and composition of the musical fountain system


A fountain is a combination that sprays water or other liquids through a nozzle under a certain pressure and has a specific shape. Water pressure is generally provided by a water pump. Generally speaking, the fountain landscape can be divided into two categories: one is to adapt measures to local conditions, according to the topographic structure of the site, it is made in imitation of natural water features, such as wall springs, springs, fog springs, pipe flows, streams, waterfalls, water curtains, falling fountains, etc. Water, water waves, whirlpools, etc.; the second is to rely entirely on fountain equipment for artificial landscaping. Fountains, amusement fountains, super high fountains, stage water curtains, laser water curtain movies, etc.


1.1 Ordinary music fountain


Ordinary music fountain system is mainly composed of audio control system, waterway control system, lighting control system and electrical control system. The audio control system includes players, amplifiers, power amplifiers, speakers, sound columns, etc.; the waterway control system is mainly composed of fountain controllers, frequency converters, water pumps, multi-function regulating valves, nozzles and water supply pipe networks; the lighting control system includes various Lamps, lighting control software systems, lighting control loop systems, etc.; electrical control systems include weak current control loops, strong current systems, water pumps, nozzles and other hardware.


The control circuit includes a trigger switch, an integrated control chip, a music output circuit, a water pump drive circuit and a light display circuit. The trigger head is connected to the trigger input end of the integrated control chip, and the music output circuit, the water pump drive circuit and the light display circuit are respectively connected to the corresponding output ends of the integrated control chip. The integrated control chip is triggered to work by the trigger switch, so that the integrated control chip outputs audio signals to the music output circuit to play music, and at the same time, outputs a stable pulse and a pulse that changes synchronously according to the music melody and rhythm to the motor amplifier circuit to obtain superimposed Change the current, and control the water pump motor through this current, so as to drive the water pump to change the pumping height as the music changes. The rhythm and intensity of the music are converted into a control signal, and this signal controls a voltage control device. After the power supply passes through the voltage control device, the output voltage also changes with the change of the music, and then controls the water pump motor. Changing the frequency changes the speed of the motor, which also changes the pressure of the pump. The different frequencies of the music are processed by the integrated control chip and sent to the control end of the variable frequency motor, so that the motor speed changes with the tone, rhythm and strength of the music, the pressure of the water pump changes accordingly, and the sprayed water column has a change in height , At the same time, several sets of equipment are used to control multiple groups of nozzles.


The music fountain control system is a complex on-site control system integrating sound, light and electricity. With the continuous promotion of frequency conversion speed regulation technology, special frequency converters for water pumps have been widely used in water pump control. In the musical fountain system, a large number of water pumps are required to control the circulating water of the fountain. According to the working characteristics of the water pumps, it is known that the flow of the pump is proportional to the speed of the pump. Relationship, by adjusting the pump speed can directly control the flow of the pump. The music fountain system needs to realize the real-time adjustment of the water volume of the fountain. Therefore, the frequency conversion speed regulation technology is more suitable for use in the music fountain system. In addition, according to the characteristics of the water pump, the use of frequency conversion speed regulation technology has a certain energy-saving effect, which is also the reason why the frequency converter can be popularized and applied in the music fountain control system. With the continuous promotion of the application of musical fountains, various fountain controllers have also been continuously improved. The fountain controller or running fountain controller has multi-function switch output, standard analog output and built-in communication interface circuit, which can communicate with the host computer through RS-485 or bus, and the output standard current or voltage signal can be used as frequency conversion The speed regulation given signal of the inverter, combined with the unique functions of the special frequency converter for musical fountains, can realize complex control.


1.2 Drain type music fountain


When the music signal is relatively low and the submersible pump is operating normally, the circuit output control signal will open the drain valve through the solid-state relay to reduce the pipeline pressure, thereby reducing the water spray height; and when the music signal is relatively strong, the drain valve will be activated. Closed, the pipe maintains normal pressure, and the water spray is relatively high. In this way, the electromagnetic valve is opened and closed under the control of the music signal, the pressure of the pipeline is constantly changing, and the water splashes jump up and down, forming a water-discharging music fountain.


1.3 water supply type music fountain


When the music signal reaches a certain range, the circuit output control signal will start the submersible pump to spray water through the solid state relay. Intermittent, the water jumps up and down, forming a water-supplying musical fountain.


音乐喷泉系统方案设计公司


2. The control principle of the music fountain system


The principle of the control system is to sample and process the A/D-converted audio signal through the assembly program in the integrated control chip, and control the single-phase motor in stages to finally achieve the method of controlling the flow of the nozzle. Use program control or manual button to control the solenoid valve to control the pattern. The audio signal is also used to control the change of light color and light shade, so that the light effect and the water posture of the fountain change with the rhythm of the music. The musical fountain is a comprehensive waterscape composed of computer-controlled sound, light, and nozzle combinations to produce different shapes, different colors, and music rhythms. The shape of the water will change with the cadence of the sound, coupled with the illumination of the light, it can form a variety of fountains with beautiful dances and colorful colors. Most audio control systems use multimedia PCs to play music through host computer programs.


In terms of fountain system control, the fountain water pump has adopted frequency conversion speed regulation technology to realize stepless speed regulation of the water pump. The speed of the water pump can be adjusted at any time according to the strength of the audio signal. The multi-function valve and universal nozzle are controlled by the special fountain controller. Various patterns and shapes can be realized according to the set program.


The music fountain control system is a control system that integrates audio control technology and program control technology. It belongs to an industrial field control system. The intensity of rhythm and audio controls the fountain system, and its electrical control system mainly has the following three forms:


(1) Centralized control: The centralized control system adopts a radial structure, which can meet the needs of musical fountains whose control room is close to the pool, small in scale, and less flower-shaped.


(2) Fieldbus control: Fieldbus is a serial data communication link, which realizes the connection between the basic control equipment on the fountain site and the superior control equipment. The advantages of the field bus type are: one transmission line can control multiple devices, the control system is simple, and it is easy to install and maintain; it adopts digital communication technology, which has strong anti-interference and high precision; reliability and flexibility.


(3) Network fieldbus control: The structure of the network fieldbus is similar to that of the fieldbus, and its performance is superior to the latter. The network fieldbus belongs to a distributed control system, and the electronic control system runs faster, meeting the requirements of real-time control of musical fountains, and is stable The performance is also better; there are many types of network connection structures, which can support bus type and radial type at the same time, and a mixed structure can be used; the main difference between network fieldbus and fieldbus is that the former uses a dedicated network operating system to realize the mutual communication between various devices on the network. operate. The music fountain lighting control system and electrical control system will not be described in detail here.


3.Music fountain system anti-interference measures


The musical fountain system integrates music, lighting, and fountains. Its electrical control system is relatively complicated, and it is prone to the following audio signal interference problems:


(1) From the working principle of the inverter, it can be known that when the inverter is running, its input and output sides will generate rich harmonics, and the harmonic signals will interfere with other equipment through conduction, radiation, coupling, etc. Proper wiring and shielding are used in the design to eliminate inductive interference propagation. An AC reactor is connected in series between the inverter and the transformer to suppress the high-frequency harmonic current. Interference propagated by radiation is suppressed by incorporating a radio interference suppression filter.


(2) After the harmonic interference signal in the music fountain system is amplified by the audio amplifier system, it will form harsh noise and affect the playback of music. In order to avoid this situation, the following measures can be taken: reduce the carrier frequency of the inverter; ground the inverter reliably, use a thicker wire for the grounding wire, and keep the distance between the grounding point and the inverter as short as possible; Keep the power lines as far away as possible from the audio signal lines and control lines, and do not put the power lines and control lines in the same slot; the power supply of the audio signal amplification system should be isolated from the power supply of the inverter as much as possible.


(3) Harmonic interference signals will interfere with the normal operation of the frequency converter. The fountain pump needs to adjust the speed at any time according to the strength of the audio signal. learn. In general, a music fountain frequency converter is required to control multiple water pumps. When selecting the frequency converter, firstly, ensure that the function of the frequency converter is greater than the sum of the functions of the water pumps, and reserve at least 10% margin. In terms of frequency converter parameter setting, frequency conversion The acceleration and deceleration time of the controller should be as short as possible. However, if the addition and subtraction time is too short, overcurrent protection may occur, so special attention should be paid when using it. At present, most inverters have a fault self-recovery function, which can be turned on during debugging to avoid false signals causing the inverter to alarm and stop.


4. Design of indoor music fountain based on single chip microcomputer


At present, fountains in public places generally only match the music with the height of the fountain, which cannot truly reflect the melody and rhythm of the music; or use a high-cost and complex control system to build complex peripheral circuits to achieve functions; and most of them can only be viewed on the spot. , cannot enter the family. This article introduces a small indoor mobile music fountain controlled by AT89S52 microcontroller. It uses fewer peripheral devices and a relatively simple circuit design, low cost, small size, various water types, strong practicability, and is suitable for indoor viewing.


The system collects music signals, and controls the speed of the water pump motor and the on and off of the LED lights according to the strength of the music signals. The overall structure of the system is shown in Figure 1, which consists of music input part, audio amplifier part, single-chip microcomputer control part and 1 output control part. AT89S52 single-chip microcomputer is the main chip of the system. On the one hand, it collects music signals, and on the other hand, it outputs rectangular waves with different delays according to the strength of the collected music signals to control the conduction time of the thyristor, and then control the speed of the water pump motor. , so as to achieve the purpose of controlling the spray height. The bright and extinguish of colored lights is also controlled by the single chip microcomputer according to the size of the music sampling value.


5. Hardware Design of Indoor Music Fountain System


The music fountain hardware system is composed of single-chip microcomputer circuit, audio circuit, stepper motor control circuit, colored lamp control circuit, power supply circuit and so on.


5.1 Microcontroller circuit


The single-chip microcomputer needs to collect the music signal, and adjust the output of the I/O port accordingly to control the water pump and colored lights. The main chip is AT89S52 microcontroller. The standard microcontroller AT89S52, which is good at handling multi-switch values, is adopted as the controller. AT89S52 is a low-power, high-performance 51-core CMOS 8-bit microcontroller. The chip contains 8k space and can be repeatedly erased 1000 times Flash read-only memory, with 256bytes random access data memory (RAM), 32 I /O port, 1 watchdog timer, 3 16-bit programmable timers, with ISP function, which can meet the design requirements. Easy to use and very inexpensive. Therefore, the main controller of the system adopts this scheme.


5.2 Sampling of music signal


(1) Audio power amplifier: The audio circuit consists of two parts: audio amplifier and music preprocessing circuit. The audio amplifier circuit puts the music out, including two-stage amplification and one-stage power amplifier. The music preprocessing circuit is to input the audio signal to the single-chip microcomputer through amplification and filtering for on-chip AD collection. The whole system is powered by a single power supply of 5V, and the operational amplifier LM324 that can be powered by a single power supply is selected. The power amplifier is powered by 4V ~ 12V, and the power is completed by LM386 up to 1.25W, which can drive the horn to achieve the function of a speaker. After preliminary processing by the audio circuit, the signal is sent to the internal AD of the single-chip microcomputer, and the music signal is collected at a sampling rate of 8k under the control of a timer.


(2) Music control: The music signal is a rather complex quantity. Practice has proved that using the international standard volume measurement unit VU signal to perform music control on the fountain can achieve a relatively ideal effect. The music signal is converted into a VU (volume unit) signal (changes with the music) through the circuit, and then converted into a numerical signal by A/D, which is processed by the single-chip microcomputer, and the output control signal is used to control the fountain. The music sub-band processing in Figure 1 is mainly to pick up more information of the music, improve the control effect and realize the control of the fountain according to various spray patterns. The control equipment can divide the frequency bands up to 6 bands. The simplest way is to divide the music into three frequencies (high, medium and low frequencies), and each frequency band controls the on, off and combination of certain groups of spray patterns. , The middle and high frequency bands are generally used to control "rotation", "swing", "direct shooting" and so on.


(3) AD conversion circuit: The input voltage is an AC analog quantity, which cannot be directly sent to the microcontroller for processing. Therefore, full-bridge rectification and filtering are first used. Make it a DC signal, and then use the ADC circuit. Among them, the AD chip is ADC0832. ADC0832 is an 8-bit resolution A/D conversion chip, and its highest resolution can reach 256 levels, which can meet the general analog conversion requirements. The multiplexing of its internal power supply input and reference voltage makes the analog voltage input of the chip between 0 and 5V. The conversion time of the chip is only 32μS. It is said that the dual data output can be used as data verification to reduce data errors, and the conversion speed is fast and the stability is strong. Independent chip enable input makes multi-device mounting and processor control more convenient. Through the DI data input terminal, the channel function selection can be easily realized. Serial communication saves MCU I/O resources. AT89S52 and ADC0832 adopt SPI serial interface mode, connect CS and CLK of ADC0832 to P0.0 and P0.1 pins of microcontroller respectively, connect D1 and D0 to P0.2 and P0.3 pins respectively. A/D conversion is performed on the analog signal of CH0 channel, and the conversion result is sent to the array mo_shu.


5.3 Stepper motor control


The stepper motor controlled in this article is a four-phase unipolar 35BY48HJ120 deceleration stepper motor. The stepper motor control driver designed in this paper is composed of AT89C52 microcontroller, optocoupler and device, integrated chips L297 and L298. L297 is a stepper motor controller (including ring distributor), and L298 is a high voltage, high current dual full bridge driver and dual H bridge driver. It is designed to accept standard TTL logic level signals and drive inductive loads such as relays, cylindrical coils, DC motors, and stepper motors. There are two suppression inputs to make the device immune to input signals. The emitters of the triode tubes of each bridge are connected together, and the corresponding external terminals can be used to connect the peripheral sensing resistors. Another input power supply can be placed to allow the logic to operate at low voltages. The L298 chip is an integrated chip in a high-power in-line package with 15 pins. AT89S52 is connected to the microcomputer through the serial port after MAX232 level conversion, accepts the instructions of the host computer, and sends clock signals, forward and reverse signals, reset signals and enable control signals to L297. Since the L297 has a chopper constant current circuit inside, the peak value of the winding phase current is determined by Uref. When two pieces of L297 are used to drive the two windings of the stepping motor through L298, and the Uref of each phase winding is changed through two D/A converters, the stepping motor subdivision driving circuit is formed. In addition, in order to effectively suppress electromagnetic interference and improve the reliability of the system, two 16-pin photoelectric coupling devices TLP521-4 are used to form an isolation circuit in the single-chip microcomputer and the stepping motor drive circuit. Its function is to cut off the direct electrical connection between the single-chip microcomputer and the drive circuit of the stepping motor, realize the separate connection between the single-chip microcomputer and the ground wire of the drive circuit system, and prevent the interference signal generated by the drive circuit working under the high-current inductive load and the sudden change of the grid load The generated interference signal is connected to the single-chip microcomputer through the line, which affects the normal operation of the single-chip microcomputer.


5.4 Lantern control circuit


Lanterns are designed to render colors and enhance rhythm. Use high-brightness LEDs to surround the nozzle, with three colors of red, green and yellow. It is designed to form a tree structure with three layers surrounded by up and down. Each layer has six lights, and the colors are properly matched. The lights of each circle occupy one I/O port in parallel, and the triode 8050 is used to amplify and provide sufficient current drive, and the number of circles to be lit is determined according to the music sampling value.

音乐喷泉控制器单片机设计


6. Music fountain control system software design


On the hardware, this system uses AD, comparator, timer, interrupt and other resources, so the software programming includes the setting and use of these aspects. Timer T0 controls the sampling rate of AD. Timer T1 is started in the falling edge interrupt of the comparator, delays for a period of time, and finds the starting point of each cycle of 100Hz pulsating DC. The timer T2 is started in the interrupt of the timer T1, and the time delay varies according to different AD sampling values. In the interrupt program of T2, a rectangular wave is output to start the water pump drive circuit.


The designed musical fountain LED lights are insulated with heat-shrinkable tubes, then wrapped with wires on plastic hoses, and then fixed in the basin. Drill a few small holes around the plastic hose and install the plastic plug for the sprinkler. You can use a computer or MP3 as the sound source, and the height of the fountain and the colored lights change with the rhythm of the music's start and stop. The main control circuit of the system is installed in the box and placed next to it. Pay attention to insulation and use electricity safely.


The designed fountain control system is based on the AT89S52 single-chip microcomputer, which adopts simple peripheral circuits such as audio amplifier and thyristor control. After welding, assembly and debugging, the control function can be well realized, and it is very practical, especially with a volume Small, easy to move, suitable for home and indoor use. This solution can also be expanded in terms of functions, such as adding frequency domain analysis of music, controlling water pumps in combination with frequency domain characteristics; it can also make atomizers to render effects, etc.


Summarize


With the continuous promotion of the fountain system, the fountain control technology is also constantly improving and improving. It has developed from the early simple fountain control to the current network field control integrating sound control technology, program control technology and host computer control technology. Among them The application of frequency conversion speed regulation technology in the fountain system has also gradually matured, and has become the main way of speed regulation of its water pumps. Practice has proved that after the fountain system is controlled by frequency converter, on the one hand, the flexibility of system control is improved, and on the other hand, the water pump adopts frequency conversion speed regulation to achieve energy saving effect. Therefore, the music fountain frequency conversion speed regulation technology is worthy of further promotion and application.


The above are the details of the musical fountain system solution introduced by Shenzhen Zuchuang Microelectronics Co., Ltd. for you. If you have the electronic function development needs of the music fountain controller, you can rest assured to entrust it to us. We have rich experience in custom development of electronic products, and can evaluate the development cycle and IC price as soon as possible, and can also calculate the PCBA quotation. We are a number of chip agents at home and abroad: Songhan, Yingguang, Jieli, Ankai, Quanzhi, realtek, with MCU, voice IC, Bluetooth IC and module, wifi module. Our development capabilities cover PCB design, single-chip microcomputer development, Bluetooth technology development, software customization development, APP customization development, WeChat official account development and other hardware and software design. It can also undertake the research and development of smart electronic products, the design of household appliances, the development of beauty equipment, the development of Internet of Things applications, the design of smart home solutions, the development of TWS earphones, the development of Bluetooth earphone speakers, the development of children's toys, and the development of electronic education products.

  • TOP