Go Down

Topic: MSGEQ7 and noise on audio jack (Read 466 times) previous topic - next topic

MoVo

Hi everyone,

I recently got an MSGEQ7 IC for my music reactive LED project. The wiring according to the datasheet worked perfectly and the circuit was working so far. I always used my PC speakers for testing and never had any issues. However, I currently cannot use them and decided to use my Bluetooth speakers for testing. I was surprised to see that it did not work at all, there was no data output on any channel (I'm using the MSGEQ7 library by NicoHood and the noise reduction).
I soon found out why it was not working. I did not have the GND of my Audio Jack connected to the ground of my ESP32 board. After I connected it to the GND pin it seemed to work fine. But now I have a different issue. I'm using an aux splitter cable and am hooking one end up to the speakers, the other one is connected to the audio jack on the breadboard. When I connect the GND of the audio jack to the pin of the ESP32 there is a constant audible noise on my speakers which gets really annoying, especially if there is no sound and the LEDs are idling.

Wiring of MSGEQ to my ESP is according to the datasheet. The pins are connected as following:
- STROBE -> D33
- OUT -> D34
- RESET -> D32
The ESP32 is currently powered by USB power. When the project is in a more final state I will power it from my 5V LED power supply. (This is the esp module I'm using)

Is there any way I can get rid of the noise on the audio jack?

Thank you in advance

Grumpy_Mike

Quote
The ESP32 is currently powered by USB power.
That might be the problem. And using the LED's power supply might not be any much better.

LEDs generate a lot of noise. You need careful attention to your ground wiring and supply decoupling, which I assume you don't have any of.

You should use star wiring, that is where all the grounds are joined at a single point and not chained.

MoVo

Thanks for your reply. I hope this will help getting rid of the noise. I did some searching and this star wiring seems not like a very beginner thing to do. Do you know any easy to follow guides for beginners like I am? Would really appreciate it.

Thank you in advance

Grumpy_Mike

#3
Sep 15, 2019, 08:07 am Last Edit: Sep 15, 2019, 08:09 am by Grumpy_Mike
Quote
I did some searching and this star wiring seems not like a very beginner thing to do.
What? I think you are not understanding what it means. It means wiring all the grounds physically to the same place instead of chaining them. Like this:-



It doesn't matter what point is chosen to be the star point. In the diagram above it is the LED strip but it could be the Arduino or the power supply.

MoVo

Oh sorry, the articles I found were from some audio magazine and were going really in-depth, so I got really confused. However, this is actually the way i wired everything up. I joined all ground pins in a single row of my breadboard and then made a ground connection to my power supply. However, this is the wiring that introduces the noise. Or did I get anything wrong?

Grumpy_Mike

Quote
I joined all ground pins in a single row of my breadboard
Yes but that is not star wiring is it.

The whole point of star wiring is that all the ground currents do not flow through the other components. By having them all on the same row you can still have the ground currents from for example from the LEDs flowing through the audio circuits and causing what is known as ground bounce.

So can you post a proper diagram and a photograph of your setup. Both please, one on its own is not much use.

DVDdoug

#6
Sep 16, 2019, 05:05 pm Last Edit: Sep 16, 2019, 05:08 pm by DVDdoug
I don't know if this will work for you but I had similar "ground loop noise problem" with some sound-activated lights in my van.   (I'm not using an MSGEQ7.)   

I solved the problem by adding a resistor between the audio-signal ground and the Arduino-input ground.   In my setup I have an RCA connector like this going into the Arduino box, so there's a resistor soldered to the ground tab instead of a direct connection to ground.   

Now....   Since there is a power-ground and apparently an apparently an actual ground loop,  I'm not sure why I didn't just leave that ground connection open...  I really don't remember if I had a reason for that...


Grumpy_Mike

This sort of thing is called a "ground lift" resistor. It is used a lot in effects pedal which can make running lots of peddle off one power supply a problem, what happens is these resistors can fry. But only having one might work.

DVDdoug

Quote
what happens is these resistors can fry.
I think I used 1K or 10K so that can't happen (with a 12V power supply).   This is only the audio ground.   The "power" has it's own ground (and that's why there is a ground loop in my setup. ;) )

Go Up