Introduction of msgeq7

msgeq7 is a CMOS chip that can divide the audio frequency spectrum into seven frequency bands: 63Hz, 160Hz, 400Hz, 1kHz, 2.5kHz, 6.25kHz and 16kHz. Seven frequencies are peak-detected and multiplexed to the output to provide a DC representation of the amplitude of each frequency band. The filter response can be selected without external components. Only off-chip resistors and capacitors are required to select the on-chip clock oscillator frequency. The filter center frequency tracks this frequency.

Except for coupling and decoupling capacitors, no other external components are required. The chip power supply can be between 2.7 and 5.5 volts, of which 5 volts can provide the best performance. For portable audio equipment, the quiescent current of the device is very low (typical value less than 1ma). The multiplexer is controlled by a reset and a strobe pulse, allowing the multiplexer to read out using only two pins. The readout rate of the multiplexer also controls the decay time (10% attenuation per reading), so this function does not require external pins.

Ref: msgeq7

Pin function of msgeq7

VDD:Positive Power Supply Typically 5 Volts.

VSS:  Negative Power Supply Typically 0 Volts.

OUT: Multiplexed DC Output.

STROBE Channel Selection Pin.

IN: Audio Input.

GND Internally: Generated Ground Reference Typically 2.5V

RESET: Resets Multiplexor.

CKIN: Clock Oscillator Pin.

Features of msgeq7

  • Low Power Consumption
  • Only Two External Components
  • On Chip Ground Reference
  • Switched – Capacitor Filters
  • 3.3 o r 5 volt Operation
  • 20 dB of Gain Typical
  • On Chip Oscillator
  • Output Multiplexor
  • Variable Decay Time
  • 8 Pin Package

Application areas of msgeq7

  • Portable Stereos
  • Car Stereos
  • Hi-Fi Stereos
  • Spectrum Analyzers

Working block diagram of msgeq7

msgeq7 is used for music rhythm color light control

Materials include:

Single chip microcomputer, MSGEQ7 chip, WS2812 lantern module, solid state relay module, Bluetooth audio module, etc.

This design can realize the frequency spectrum analysis of the music played by the user, judge the drum rhythm and music atmosphere of the music according to the frequency spectrum characteristics, and control the color lights to change with different effects according to the music rhythm.

Among them, the Bluetooth audio module is mainly used to receive music signals, the MSGEQ7 chip is used to analyze the music spectrum, the single-chip host computer analyzes the music rhythm according to the analyzed spectrum signal, and the single-chip slave computer is used to control the switch of the WS2812 chip and the solid state relay, thereby controlling the LED strip Show different lighting effects.

hardware design

Audio acquisition, processing and analysis modules are Bluetooth audio module, MSGEQ7 chip and single-chip host.

The Bluetooth audio module is used to realize the audio collection function. The Bluetooth audio module adopts the Jie Li Bluetooth decoding chip, built-in lossless power amplifier module, can output left and right channels, provides AUX input and output audio interface, supports Bluetooth 5.0 protocol, stable connection range is 5 meters, and can collect audio signals and amplify in various ways And output to the next level.

The single-chip host computer is used to analyze the spectrum amplitude. After receiving the amplitude of the 7 frequency points, the microcontroller host will analyze the data to determine whether the music has a drum rhythm and how high the music atmosphere is. Then control the LED to display various effects according to the judged situation.

Illumination control

In order to ensure the real-time performance of audio processing and the complexity of lighting effects, we have specially set up a single-chip slave machine to control the lighting effects.

The system uses a total of 2 single-chip microcomputers to control the lighting effects. The 2 single-chip microcomputers are respectively used to control the atmosphere and rhythm lights. These 2 single-chip microcomputers use serial communication to communicate with the main control chip. In order to improve real-time performance, the serial port The baud rate is 115200bps, the communication mode is broadcast communication, and the communication command frame is only one character.

The colorful light module adopts WS2812 driver chip. WS2812 is an LED light control chip. Each WS2812 can control one RGB full-color LED light. WS2812 can be used in series, and only one data cable is needed to control. Since each LED color light corresponds to a WS2812 chip control, each LED light can be lit independently. Controlled by the main control chip, the colorful light strip can display a variety of transformation effects, such as water light, gradient color, rainbow

Running water and so on. The lantern interface uses a customized type-C interface, which can not only be used for power supply, but also can communicate with WS2812. In addition to the type-C interface, it also provides a standard power socket for connecting ordinary LED desk lamps or non-custom colored light strips. The main control chip controls the on and off of the socket through a solid-state relay to control the on and off of ordinary colored lights. The solid state relay has a fast response speed, which can make ordinary LED lights flash with the rhythm of music.

Music rhythm judgment

To grasp the music rhythm, it is necessary to determine the low-frequency drum beat signal of the music. The main control chip will extract the filtered low frequency amplitude for judgment. When the amplitude exceeds the threshold we set, the main control chip will consider the signal as a low frequency drum beat. At this time, the system will control the rhythm lights to display the rhythm effect.

In addition to music rhythm, we also need to present a musical atmosphere. The music atmosphere is mainly judged based on the average amplitude of the signal spectrum. When the average amplitude of the music spectrum increases, the main control chip will think that the music atmosphere has increased at this time, and the system will control the atmosphere lights to gradually light up to enhance the music atmosphere.

Lantern effect

The colored lights can present two kinds of music effects, namely music atmosphere effect and music rhythm effect. The system can drive 6 light strips at the same time, of which 3 are rhythm light strips, used to respond to low-frequency rhythm, and the other 3 are ambient light strips, used to respond to music atmosphere. Each light strip can contain up to 100 LED lamp beads. The effect of the music atmosphere colored lights is specifically manifested in that when the music atmosphere changes, the LED lights on the entire light strip are gradually brightened or dimmed at the same time, and the gradual process lasts for a short period of time. In order to ensure the effect of the music atmosphere, it will be kept for a period of time after the fade-in and fade-out, without drastic changes. There are two performance effects of the music rhythm lights, namely the flowing water effect and the breathing effect. The specific performance of the flowing water effect is that every time a rhythm command is received, the colored lights start at the designated end, and a flowing water lamp similar to the meteor effect flows to the end of the other end, and finally flows out to the end; the specific performance of the breathing effect is when the rhythm After it appears, the LED lights on the entire strip light up quickly at the same time, and keep it for a short period of time, and then quickly fade out at the same time until it goes out.

Seeed Fusion has a powerful component library, which can complete PCB assembly as quickly as possible.

Please follow and like us:

Leave a Reply

Your email address will not be published.


September 2020
« Aug   Oct »
Wordpress Social Share Plugin powered by Ultimatelysocial