
Chris Holden writes:
Steve Carpenter wants some wav playing boards, so I redesigned the circuit to use an integrated op-amp, so they just require power and a speaker. I’ve no idea which op-amp works best, a TL072 or an LM386 (I’ve not had much luck with the LM386 in the past, and Steve really rates the TL072 that is used in early versions of the Arduino wavshield) so here’s a circuit that can use either. This version also includes a low-pass filter, hopefully to eliminate that annoying clicking you can hear when it first starts up!

Nice work Steve..
The TL072 is a nice general purpose OPAMP but not a speaker/power amp. The LM386 is designed to drive a speaker at up to 1 Watt depending on the package used. I would be surprised if you can hear much with the TL072.
Are you using analog out (DAC) or high frequency PWM for your output? You may need to AC couple your audio output from the uC to the amp(s).
Hope this helps with your project..
Thanks for the input. I had favoured the LM386 and have used this in a little guitar-practice amp project, but someone at BuildBrighton suggested the TL072 as it appears on the Arduino wavshield. Having never used it before, I thought I’d allow for either in the design.
I’m using 125khz PWM for the audio out.
It works fine, but this revision includes a low-pass filter (at about 25khz) to take out the slightly noticable “clicking” you can hear if using cheap/low quality piezo speakers – it’s hardly noticeable using “proper” 8ohm speakers.
The TL072 is great for a buffer or filter, and would likely drive a 600Ohm headset OK, but would not be good for driving an 8Ohm speaker.
125Khz PWM will work great for an audio range DAC. As you note, filtering is probably only required in special cases as the speaker would effectively filter for you.
The PAM8403 is surprisingly good for a dead-cheap low-power amp. I would certainly consider it for jobs that would once have used the LM386. There are ebay sellers with it already mounted on a breakout board in various formats.
The PAM8403 looks great. It’s a Class D amp. Basically it take analog in, converts it to PWM and drives a push pull output as a switch so the dissipation is very low in the device while delivering good output power. I’ve not used this chip before, but I will the next time I need an audio amp.