Spectrum analyzer and audio amplifier together

Synopsis: Using the headphone jack, I'd like to visualize sound using the MSGEQ7, the Arduino UNO, and an RGB LED strand, but at the same time I would like to listen to the sound via a LM380.

The Problem: Each works in isolation (i.e. I can see the MSGEQ7 doing the right thing on the oscilloscope, or I can listen to the audio in good quality, but not both.)

My Solution Idea: Use TL072 in single supply configuration (as the other two chips are single-supply) to (a) add the left and right stereo channel via an inverting summer, and (b) split the mono signal into two channels, one for the MSGEQ7 and one for the LM380. The signal for the MSGEQ7 needs to be amplified, ideally adjustably so so I can "dial in" the response of the MSGEQ7, but of course the LM380 only requires a voltage-follower buffer op-amp, it being an amplifier in its own right.

What are the general design principles for a situation like this, apart from faithfully AC-coupling the stages?

Post your annotated schematic showing how you propose to connect everything. Post links to technical information on the hardware devices.

Circuit sketch:

Edited to add: Hold on, a crazy thought just occurred to me: Should my pulldown resistors for the op-amp inputs to to VIRTUAL ground instead of REAL ground?

Spec sheets:

Not so crazy because yes you should.

All though they are not called pull down resistors, in this context. They are reference resistors.

Yeah, I didn't think of that. The only thing I remembered was: Always provide a DC path to ground, and none of the sample circuits showed these resistors at all, but then I thought: Hey, an op-amp's job is to make the voltages at both inputs equal, so if + is hooked up to 6V when it is normally connected to 0V, I probably shouldn't provide a DC path to 0V...

Okay, with that, I can now listen to audio after running the signal through the op-amp first, which I wasn't able to do. It's rather noisy, but maybe it'll get better once I soldered the thing.

Did you follow the schematic for Figure 16 in the data sheet?

Note you need a hefty 500uF or so to make it stable.

The LM380 is not really well suited for an output amplifier. Unless preceded by the operational amplifiers shown in your original circuit, which, by the way very difficult to read, due to the poor resolution it gives other people (that is people who are not you) to view.

I actually have a 1000uF available. I can't complain about the sound quality when the input comes directly from the source; i.e. without detour through a bunch of biasing-and-debiasing stages. It gets a bit noisy running through the summer, but I have not been able to hook up the MSGEQ7 at the same time without deteriorating the sound quality significantly.

Let me see how else I can share the circuit.

That is a lot better thanks.

Have you tried connecting to the MSEQ7 through a buffer operational amplifier?. That is just an op amp with the output connected to the -ve input and the +ve to ground.

Also that chip operates with switch capacitors, so it is vital to have good supply decoupling on that chip with a 0.1uF ceramic capacitor between power and ground as close tothe chip as you can get it and as short leads as possible.

Also the operational amplifiers need similar decoupling capacitors on each chip. You might want to put one from the supply to the virtual ground and another from the virtual ground tothe real ground.

If you are wiring this on strip board, remember the shortest leads are on a surface mount capacitor, and these can be soldered between the strips on the underside.

I think I'll put this project on the shelf. Anything combining audio and "digital" (anything with a clock) is an absolute nightmare for a casual project, something that starts its life on a solderless breadboard and at best will make its way to a soldered one.

All the chips I'm using do recommend an electrolytic and a ceramic capacitor between supply and ground, to filter out low- and high-frequency interferences However, before I switched the PWM frequency to 32kHz (I had it running at 7.8kHz just to get the LEDs flicker beyond the ability of the eye to notice) I had audible radiation interference at the PWM frequency (which I only noticed when I simplified the code to leave it at the original 400-or-so Hz).

I don't have the patience or the expertise to set up shielding and other more advanced means of noise- and interference protection just to get a toy application sort-of running.

So thank you for looking into it! I definitely at least learned something,