Hi all; I am working on a project that used the Msgeq7 chip. When I connect the input audio to the chip as per the datasheet, I get a noise that is noticable by the speakers playing the music. (I use an audio splitter to split the signal to two connections). How can I get rid of this noise?
Also I've read that that the input circuit (using 2 resistors) isn't the most optimal solution to converting stereo audio to mono; what's an optimal method of converting stereo audio to mono?
You'll need to track down where the noise is coming from. Try disconnecting the audio input (and maybe connect a different audio source to "activate" the MSGEQ7). If there is still noise the noise is getting into the audio through the power supply or ground. Do you have separate power supplies for the amplifier and MSGEQ7?
The 2-resistor method will "average" the signals which means the voltage will be cut in half* when there is sound on only one channel. That's fine unless your signal is not strong enough.
If the signal is too weak you can use a [u]summing amplifier[/u] (audio mixers are built-around summing amplifiers).
An op-amp will also help to "isolate" noise if it's getting back onto the audio circuitry through the audio connection.
Note that a "good" op-amp summing amplifier will generally require positive and negative power supplies.
This is with a high-impedance load (relative to the series resistors) and the MSGEQ's input impedance is 1M. With lower impedance inputs the series resistor makes a voltage divider, further lowering the signal and that's the main reason passive-resistive summing is not recommended for general-purpose mixing where the input impedance is lower (or unknown or variable).
I would also like to have an envelope detector circuit to detect the level of the audio signal. How do I choose the component values for the simple diode resistor capacitor envelope detector? Cheers!
The MSGEQ7 is 7 frequency-filters and 7 envelope detectors so you can just sum the outputs. If you want the envelope follower to run more slowly you can use "smoothing" (a moving average).
The problem with a passive diode envelope detector is the ~0.6V diode drop... I doesn't work with low-level signals. (I use an [u]active peak detector/envelope follower[/u], but I'm not using an MSGEQ7.)
The reason I want an envelope detector is so I could have the Arduino adjust the "gain" so that the loudness of the audio doesn't matter, just the frequency. So the values of the peaks read by the analogue read from the msgeq7 are multiplied by a factor (either to make it smaller or bigger). I hope I am making sense!
So I should just sum the values read by the chip and divide them by the number of frequency bands, or just sum them only?
So the value read by the analogue read is multiplied by a factor (either to make it smaller or bigger). I hope I am making sense!
Yes, I do something like that with all of my lighting effects. I keep a 20-second moving-average, saving one reading per second. (Since I use a peak-detector/envelope follower it's an average of some "random peak" readings. It's not the average, but it works...
For some effects I also use the peak from that 20-element array. I have a "VU meter" effect where the bottom LED corresponds to the average and the top LED corresponds to the peak. That gives me lots of "meter action" no matter the volume level. It's obviously useless as a meter but it makes a good meter effect.
I also automatically switch to the 1.1V ADC reverence when the signals are low. (Then I have to appropriately scale the readings from the 20-second array.)
So I should just sum the values read by the chip and divide them by the number of frequency bands, or just sum them only?
Probably average but that depends on you want to handle it. With normal music there is an approximate 3dB per octave downward slope to the frequency content and if you decide to compensate for that (for a "better visual display") the high frequencies will have to be more sensitive than the low frequencies.
And which peak detector do you use (do you use the the active peak detector you mentioned above)? If so how can I make one without having a negative power source?
DVDdoug:
The problem with a passive diode envelope detector is the ~0.6V diode drop... I doesn't work with low-level signals. (I use an [u]active peak detector/envelope follower[/u], but I'm not using an MSGEQ7.)
How would I use this circuit without having a negative power source?