MSGEQ7 - frequency response - Page 1
Forum section: electronics / projects

author: DzAnej
author_rank: Contributor
timestamp: December 10, 2016, 04:42:32 pm
content: Hello.I'm working on a LED Matrix bar vu meter and I am using MSGEQ7 as a spectrum analyzer. The problem is in the last two bands (6,2kHz and 16kHz) - they are not working on their range...I am using the datasheet schematic (I've changed the 33pF capacitor with 22pF because I don't have the other one):On the first picture I am feeding in a 600Hz signal and you can see that the last two bands not low (which they should be).On the second picture I am feeding in a 16kHz signal and the 16kHz band should be at its max but isn't...I figured out that the last two bands are following the first two (6,2kHz = 63Hz and 16kHz = 160Hz).What would be the cause of this?p.s. I am using a online tone generator to generate the frequencies, because I don't have a function generator.

author: PA0PBZ
author_rank: Super Contributor
timestamp: December 10, 2016, 04:59:37 pm
content: Did you look at the input signal with the scope?Did you try an FFT on the scope?Are you feeding it with the correct signal level?

author: DzAnej
author_rank: Contributor
timestamp: December 10, 2016, 05:26:06 pm
content: Quote from: PA0PBZ on December 10, 2016, 04:59:37 pmYes, I've looked at the input signal and it was a nice 16 kHz sine wave.I haven't yet tried the FFT because i am not familiar with it quite yet...I think I have the right input signal level because the other bands are working. In what way could the input level be wrong? amplitude?

author: PA0PBZ
author_rank: Super Contributor
timestamp: December 10, 2016, 07:16:45 pm
content: According to the datasheet (which is not very clear) it should work with an input amplitude of about 100 mVpp. If you input a lot more I can understand that the thing will be overloaded and the output distorted. Also, you should try to get the 33pF cap right, because everything else is referenced to the clock frequency.But I noticed something else: if you keep feeding it strobe pulses the output will wrap around, so after the 16Khz band it will output the 63Hz band again. Do you send a reset pulse before you start strobing? Otherwise it could be that it is not outputting the sequence you expect.One other question: what are you showing on channel 2 of the scope?

author: DzAnej
author_rank: Contributor
timestamp: December 10, 2016, 07:52:48 pm
content: I've just measured the input amplitide and it was around 2 Vpp - so that is much more. I have then lowered the volume so that it was about 200 mVpp but then it barely picked up that frequency...Yes, i send a reset pulse and that is on the 2nd channel. You can see a slight pulse on the beginning on CH2.

author: PA0PBZ
author_rank: Super Contributor
timestamp: December 10, 2016, 08:07:41 pm
content: Quote from: DzAnej on December 10, 2016, 07:52:48 pmWhat is the 2-3V 'grass' on the left and right side?And since you say that the other bands are working, do you have a picture of let's say the 1KHz?

author: DzAnej
author_rank: Contributor
timestamp: December 10, 2016, 08:25:40 pm
content: This is at 1kHz.The 'grass' I would not know where it comes from. Here is the shot of it:EDIT: well, i've just noticed that the 400Hz band is the max and not 1kHz...

author: PA0PBZ
author_rank: Super Contributor
timestamp: December 10, 2016, 10:07:21 pm
content: Please post the full schematics you are using.

author: Fungus
author_rank: Super Contributor
timestamp: December 10, 2016, 10:35:30 pm
content: Where did you get them? I bought a batch of those chips on eBay and some of them had missing/broken bands. Some others had broken clocks, no signal on the clock pin.Overall about 50% non-working. Swapping the chips magically fixed the problems.(yes I got a refund)

author: DzAnej
author_rank: Contributor
timestamp: December 11, 2016, 05:24:29 pm
content: Here is the schematic:Yes, the IC's are from eBay.

author: DzAnej
author_rank: Contributor
timestamp: December 11, 2016, 05:38:34 pm
content: Here is another interesting screenshot, this is @100Hz:

author: DzAnej
author_rank: Contributor
timestamp: December 11, 2016, 06:32:51 pm
content: Ok, so I figured out where did that noise (reset pin - CH2) came from... I didn't put it in the schematic but I have the LED Strip connected to pin5 and when i disabled it whe noise was gone...The frequencies were a bit closer to their range but the last two bands still didn't work (still following the firs and the second one).

author: PA0PBZ
author_rank: Super Contributor
timestamp: December 11, 2016, 07:00:11 pm
content: Ok, more questions- did you measure the clock frequency (pinIt should be around 160KHz.- I still haven't seen a screenshot where the thing is working, the 1 KHz is not good.- Did you look at the timing in the datasheet, like reset minimal 100 nS, reset to first strobe minimal 72 uS?- Can you post a picture of the output with the strobe on channel 2?- How do you do the timing? The schematic you posted just shows terminals...

author: DzAnej
author_rank: Contributor
timestamp: December 14, 2016, 02:05:15 pm
content: So I checked the clock pin and it is at 33.6 kHz - so not at all lose to 160 kHz. And yes, I have changed the capacitor to 33pF at the clock pin...On the other image i captured the output (CH1), reset (CH2) and strobe (CH3).And here is the code for it:Code:digitalWrite(resetPin, HIGH);digitalWrite(resetPin, LOW);for (int i=0;i<7;i++){digitalWrite(strobePin, LOW);delay(1);spectrumValue=analogRead(analogPin);digitalWrite(strobePin, HIGH);}

author: PA0PBZ
author_rank: Super Contributor
timestamp: December 14, 2016, 06:39:37 pm
content: Hi,Thanks for posting the information. First, your clock does not look right, did you measure this on pin 8 with the probe set to 1:10? Otherwise it could change the frequency a lot.Then for the code, can you try this?Code:digitalWrite(resetPin, HIGH);digitalWrite(resetPin, LOW);delayMicroseconds(100)for (int i=0;i<7;i++){digitalWrite(strobePin, LOW);delayMicroseconds(50)spectrumValue=analogRead(analogPin);digitalWrite(strobePin, HIGH);delayMicroseconds(50)}Also, I don't understand why your first strobe pulse seems stretched. If this is because of the delay until the read routine is started again shouldn't the reset be at the end of that high period?At what input frequency was the last picture taken?

author: DzAnej
author_rank: Contributor
timestamp: December 16, 2016, 07:57:13 pm
content: I re-measured the clock pin 8 with the probe set to x10 and it was around 120kHz - why is that so much of a difference?I then edited the code and added the microseconds delay and the resoult was still the same...At this point I think that the IC may not be working properly, so I'm gonna order a new one (or a few of them) and try again.Oh, and the frequency of the signal was 1kHz...

author: PA0PBZ
author_rank: Super Contributor
timestamp: December 16, 2016, 08:09:27 pm
content: Probing makes a lot of difference since the clock frequency is set by the RC constant (33pF/200K) so see the documentation for the probe you are using, you will find out that it probably has a capacitance equal to what is in your circuit, and the resistance will be influencing the frequency too. I agree to get a few more ICs, that will tell if you have a faulty one. If they all act the same it's probably time to look at the schematics and software again

author: SzuPe
author_rank: Newbie
timestamp: February 28, 2017, 11:49:39 pm
content: Hi Everyone!I have exactly the same problem. The last 2 bands are not working according to MSGEQ7 specs.Background:-I am new in electronics, doing it only for hobby-No osscilloscope-Circuit is the same as the typical application in the datasheethttps://www.sahinelectronic.com/assets/uploads/files/parts/msgeq7.pdf.-Tested the ICs with simple Arduino test code (using MSGEQ7 library) and I have used a tone geneator web pageObservation:-last 2 bands are not doing what is described in MSGEQ7 spec-last 2 bands are just repeating the first 2-frequency "boundaries" are different compared to MSGEQ7 specI have a very simple theory:My ICs are fake MSGEQ7s and maybe these are something with 5 bandpass filters, e.g.: MSGEQ5ahttps://www.sahinelectronic.com/assets/uploads/files/parts/d9739-msgeq5a.pdfWhat do you think?Yes, I have bought them from ebay... "Original MSI MSGEQ7"... at least these are doing something useful, the previous ones from ebay were totally cr*p.

author: Audioguru
author_rank: Super Contributor
timestamp: March 01, 2017, 03:34:17 am
content: You are wasting your time and our time by buying CCC (Cheap Chinese Crap) on ebay. Fakes or factory rejects.

author: senso
author_rank: Frequent Contributor
timestamp: March 01, 2017, 08:11:41 pm
content: I hvae done that, but instead I used ELM-CHAN FFT Lib, and just a simple op-amp to center the audio signal to 2.5v and to clip it to 0-5v and buffer said signal.