The very nice class D amp I use for driving speakers for basement square dances has locked up a couple of times, with the worst at Crown Point during C2 lessons with the terrible Moger recordings. It’s happened once or twice in Skokie.
The first time it happened, it was a mystery. I could see the audio player counter incrementing, indicating it was playing – and sound should have been coming from the speaker. But it was silent. Eventually, in desperation, I pulled the plug on the amp, waited several seconds for the amp’s LED to go out, and plugged it back in. And the music came back!
When it happened recently in Crown Point, I tried the power cycle trick, but plugged it in too soon and it didn’t work. We took a break, I messed with it under less pressure, and a longer unplug brought it back. My hardware isn’t supposed to fail during a dance. It did always seem to occur when there was a loud pop when I unpaused the music.
On the way home, it occurred to me I might be able to get a quicker power cycle by pulling the connector between the power brick and the amp, although that still wasn’t a proper solution.
Feature, not a bug
As I read the datasheet for the TPA3001 amplifier chip on the cheap Chinese amplifier module, I found the answer: When the chip detects an output short – or, presumably some overload – it goes into shutdown mode. A power cycle will reset that, but so will a shutdown cycle using the shutdown pin on the chip!
That pin is in fact brought out on the module I have (as “K”). I managed to reproduce the lockup/shutdown a couple of times on the bench (playing the nasty Moger recordings LOUD and rapidly pausing and unpausing. Shorting the pad of the shutdown pin and the conveniently placed adjacent ground pad, it came back to life. A couple of cycles of that convinced me I could undo/reset the lockup with just a button across those pins.
Recovery, not protection
I suspect the real problem is that sometimes the random place in the music when it unpauses is such a large voltage swing away from where it was when it paused that it triggers the lockup. (Maybe involving a cap in series with the signal somewhere?) Maybe I could provide some crude diode limiting on the input in the PCB. I investigated some back to back BAT-85 Schottky diodes, but (with 1K in series) they’d only clamp to ~425mV PP. That’s probably consistent with the 0.25V I measured with DC at 10mA. The Windows tablet I use didn’t seem to be able to put out more than ~250mV PP, so I gave up on that. If I could find some 150 or 200mV diodes, I’d try adding them. So I guess we just go with a reset button.
(I did order some 1N5817 Schottkys, which might fill the bill. It looks like there’s more variation in Vf than I might have guessed! I also ran across some specialty “smart diodes” like the LTC4412 and SM74611 which gate a MOSFET to provide effective Vf of ~25mV in the narrow power supply uses cases for which they’re designed, though they’re not useful as general replacements for Schottkys.)
I considered a small tact button (on wires on diagonally opposite pins for mechanical symmetry/strength) soldered directly to the K and G pads, but it would have been awkward to solder them into the amp module if they were as short as I’d like.
I found some other tact switches, and with the PCB unscrewed from the speaker cabinet, I could see solid ground pour large enough for the switch. I drilled 4 holes for the pins (of which I used 3), and isolated one pin. Two soldered to ground were fine. An air wire from that isolated pin to the “K” pin, and we were in business. A new interconnect pin connected the “K” pad on the module to the conveniently located “just-in-case” pad (which previously went nowhere) on my PCB. I had to shave down the button top to clear the 3.5mm input jack but that was easy. A quick test showed it worked. It’s clearly a workaround, but if the amp locks up again, fixing it is just a button press away.
I should also take away the lesson of reinforcing the conservative approach of having provided pads on the PCB for the shutdown pin even though I didn’t expect to use them.
Update ~12/4/17: The 5817s came in, and the same test showed they clamped at ~328mV, so they might provide a little protection, and it looks like they can’t hurt. I did a crude job of adding them under the PCB. I expect they’ll live there forever, maybe never being called on to conduct. Or maybe silently preventing a lockup. We’ll probably never know.