If you have control over both ends and the middle of the system, you can probably design around the need for the isolation OR it’s understood to be incorporated from the start. When I use use the Motorola radio with the Motorola speaker and Moto wiring harness, no problem. But my brilliant idea of wiring the 2way radio to the vehicle’s factory AM/FM speakers breaks the radio since doing so grounds the audio output.
Suppose we take two telephone devices in a closed circuit intercom and set them up to talk to each other on the bench, fully compatible, but without isolation. Next, wire them up 2000 meters from each other and you’ll find that noise is naturally present but, worse, the grounds that are to be tied together are 2 volts apart. Wait, 3 volts. Now it’s zero. Back to 2 volts, wtf? (wobbly transfer function, hehe) Even though we can fully control the devices, the unpredictable path between them is causing noise and shifting earth grounds and problems. The isolation decouples the signal from the power. The noise will still be there but the fixed signal basis (audio here) can be used by the telephone pioneer to focus on amplification and signal processing.
Can I isolate the grounds with a diode? I’m not sure how to isolate them. The two are tied together on the sleeve on the TRRS connector. I may just throw a diode in from the amp negative to sleeve on the connector and see what happens.
A lot of electronics is getting things to talk to each other and never more literally than in the field of audio where there is a particularly diverse body of work. It’s solidly 100+ years old, there have been countless types and standards, each type and standard has countless products to get lost in (microphones, speakers, cables, vacuum tubes, DAC, storage media, connectors, wireless gadgets, effects), there’s infinity room for improvement. It took household name-level geniuses like Alexander Graham Bell and Thomas Edison to even begin to sort out what audiophiles today do for fun.
For OP, I’d check all the wires. I’m still suspicious there’s something in there.
Some test equipment is helpful and it doesn’t need to be lab-grade: a commercial audio mixer would be handy and could use a cooldown from your set at the club. So would a little probe ‘playing’ a tone or music that you can touch to various points and see what happens on the output with and without, for example, the proposed diode.
Thanks! Haven’t had a chance to fiddle much with the setup… It’s 100% a bridged amplifier after looking at the diagram. Cannot share a ground… Interesting thanks for sharing. An audio transformer might be enough to decouple the grounds so I could use a TRRS plug. I think but am not sure how to verify these little MAX amps are probably popular in cell phones? In which case they’d have some elegant way to decouple the grounds as well… but I don’t know how to lookup cell phone circuitry if any of that is open design.
Putting some notes here fiddling with the breakout boards some more.
Stereo is working: I used a 100k ohm pot to divide 5V (power line to amps) to Gnd and input sweeper to SD on right channel. I need to get measurement for correct resistor. The datasheet was quite confusing there. I saw the voltage but couldn’t understand if there’s an internal resistor to ground, or if that’s what I was supposed to connect. I could never get the jumper to work on the SparkFun board either. Broke several of them trying.
Cleaned up audio much of the popping I found was due to too little power input. The 5V power line needs more power than the USB port seems to supply. I plugged in a 1300mAh battery to the battery connector on my Thing Plus. It stabilized the inputs to the amps. You can probe the inputs, say SD, and see them fluctuating if too little power is supplied to the board. Once you have enough power the lines stabilize and don’t fluctuate.
Powered with 18650 Batteries hooked up a 5V buck regulator. Then connected two flashlight batteries.
//////////////// Next Step
Play Controls I need to hookup buttons for play controls
Volume Knob need to take the 100k Ohm pot and hookup to gain input. Have been a bit confused if I can use the same volume knob on both channels. I would think so but will find out.
Charge Controller I want a port for power (usb and or wall wart) that can charge the flashlight batteries. Haven’t studied that much yet.
Additional Program memory & RTOS Ultimately, I want to be able to do SD MP3, HandsFree Protocol, A2DP, all on one ESP32. I’ve got A2DP & SD MP3 figured out but the codec for MP3 took up all the program memory so I cannot have both. Sorted about an external MP3 codec chip. I do prefer codec’s in software.
Anybody know of an example project with RTOS that can load programs from an EEPROM?
Thought I’d post this up. I’m sourcing power from the AP63357 powered by a MOSFET / variable DC power supply at 14.5V (to mimic a alternator in a vehicle where I hope to employ this circuit).
Just noting… I see around 50mA current draw w/o any audio output. With max volume and the 15dB gain configured (100k ohms from SD to ground) I’m hitting as high as 340mA with the two amps playing pretty punchy music (still well under 3 watts so decent headroom).
I may need to add some sort of filter on to the power supply / buck regulator. It’s really wreaking havoc on the 5V line.
Been playing with this for quite a while. I also ordered some diodes which came in today to try and isolate the grounds (eliminate feedback when using TRRS plug). The diodes didn’t work. Then searching for “common ground for speakers with class d amplifier”.
Wish he’d have drawn what he was talking about. But sounds like the guy recommended 470nF caps instead of diodes. Not sure if was for the signal wire or the ground…?
Ah okay that makes since. They use the caps to filter out the DC from the audio waveform.
I’m still struggling to convert my L & R channels to a common ground. My design has a ground, left signal, and right signal. There’s no left ground and right ground. It’s as in the schematic below.
If I cross the left and right negative connections all goes haywire. I’m sure there’s a way to do it. Tried to decouple the negative signals with diodes but was terribly noisy.
IIRC I was able to use a MAX98357A in “single-ended mode” by leaving one pin disconnected and the other to the speaker through a large capacitor like you would a LM386. It wasn’t quite as loud, but it’s probably worth a try.
THANKS! That worked as in your drawing stepped up to a 100uF and then a 1000uF. It’s a high pass filter (remembering my old EE courses from over two decades ago now).
I notice on the other website they did this… but I tried the caps neg outputs on amps to shared ground through a cap (low pass?) that did not work. I got no audio even after calculating the cap size to ensure there was ample bandwidth for the audio signal (4ohms and 10uF approx. 40k bandwidth).
Introduced Noise hooked up my scope with audio signal off yet amps on and get some noise. I think rejecting that noise must be the trick with the configuration of these caps.
Lower power I went from around 350mA down to 120mA
Volume switch behavior changed: it behaves very weirdly… my ultimate design won’t need a volume switch though. It’ll operate at lowest power output. I’ll need to see what signal to noise ratio is like at that lowest power setting.
Reading up a bit more on Class D amps. Wikipedia says many of them recycle energy through the negative side of the amp. I’m guessing that’s why the power is less.
Otherwise, I see these do some sweet Fourier stuff to transform square wave freq to same frequency signal as original audio. Wish my math wasn’t 25 years rusty…
This is updated schematic. It works with 4ohm speakers although a bit of noise.
Not on the diagram is how I tested hooking the negative amp output up to ground as well. I tried both a low pass and a high pas filter w/ 100kohm and 1mF cap. It didn’t feedback but didn’t really seem to do much of anything.
I think the pure Class D output must be so noise free due to it’s self reference… I presume there’s some noise on the power inputs to the amps that’s carrying through to the single side output of the amp?
I got these little amps working AWESOME. I think I’m going to finalize my design and order some breakout boards to be made but with four amps instead of one and the SD as well as gain wired into trim pots.
Balance and Face: I need to change the Volume to somehow let me adjust Balance (R versus L) and Fade (CH1 versus CH2). Perhaps break that out into a screw terminal so I can hookup pots for volume knobs.
TRRS Connector: still noisy as heck. Would like to clean this up somehow.
Detect TRRS connection: I need to figure out how to detect the TRRS connection and turn off the speakers.
NOTES:
SD Line Noise: You have to be VERY careful about noise on SD line. Currently I have a janky through hole resistor voltage divider I rigged up for channel selection. If I get anywhere near that it introduces a bunch of noise in the speaker.
@TS-Russell thanks! I ordered an assortment of mosfets. Hopefully I can brush up on how to do that…
I’m designing a speaker box. There are two 4 ohm speakers from a car door I put in the box… I want to affix the surface speaker I ordered from SparkFun Store below…
I cannot figure out how to affix this thing though? Bolts through top? It sounds AWESOME (works as a mini low range speaker). However, it needs to be secured to the speaker box somehow. I don’t see many details in the datasheet or the video on the sales page…