Close

Audio-Amp Motor Driver Oddities...

A project log for Random Ridiculosities and Experiments

Sometimes yah's just gots tah try somethin', regardless of whether it'll become a full-fledged "project"...

eric-hertzEric Hertz 12/22/2015 at 09:303 Comments

I've been having some difficulty, I'll get to that in a second, but something *just now* occurred to me:



So I'm using it in NON-Bridge-Tied-Load method aka "Single-Ended" mode--wherein one output swings positive and negative WRT ground--with the intention of driving two motors...



I wonder if doing-so results in larger noise than using a full H-Bridge... With a full H-bridge we've got two outputs in "differential" mode... They're (almost) always opposite each other in polarity. Twisting the motor's wires would cause quite a bit of cancellation of the noise, right? Kinda like an ethernet cable, MIDI, or LVDS. But in single-ended mode, we've got one side connected to ground and the other side switching between positive and negative. Sure, the *current* has to flow back on ground, and current is what causes EMI (or at least magnetic), right? But something about this speaks to me of "more noisy". Not sure. Not that I've *noticed* an issue with it, yet.



-----------



The other issue was discussed a bit in the previous log-entry... The "Standby/Mute" input is doing something strange... (wherein we may visit one of the potential unknowns I kinda vaguely foresaw: are these chips' being designed for AC signals going to cause problems running a DC motor?).



The datasheet is *really* vague about what this pin does, just like the vast-majority of the chip's functions. As far as I understood, it's an input. It takes something like 5V to run normally, somewhere between 0 and 5V results in Mute (which presents itself as the PWM output running at 50% duty-cycle), and 0V results in Standby (which presents itself as PWM being disabled completely).



So the problem is, sometimes the standby/mute "input" *drops* quite-quickly (almost immediate) to the "Mute" level, the motor stops, then the "input" seems to release and the pull-up resistor and filter-capacitor result in its rising back to the "normal" mode in a fraction of a second. Sometimes this happens repeatedly, other times it just happens once or twice every few seconds.



So, my theory is that the mute/standby "input" is actually *also* tied to an internal transistor which pulls it into the mute-voltage-range via the "protection" circuitry. Which protection feature is triggering...? I have no idea. Thermally: it's occurring even when the chip is only hand-warm, and adding a fan doesn't seem to have a reliably-noticeable effect. But the triggering is quick (and releases quickly), so maybe the internal temp is much higher briefly). Overvoltage? Maybe the edges are spiking...? I don't see it on the 'scope. Though, now that I think about it I do remember seeing *quite a bit* of overshoot (nearly double the source-voltage!) in earlier tests (at the time I was using really long test-leads, now the motor's wired directly to the terminal-blocks with only a few inches of wire, which are twisted...). ACTUALLY (I'll revisit that). The third protection-circuit is over-current... I don't think that's the case, the meter was measuring only 150mA in earlier tests, and even when I stall the motor, it's only a little over an amp, the over-current threshold is something like 4A.



"ACTUALLY" Just occurred to me while writing this... Now that I think about it, I vaguely remember not having noticed this problem when I was running it at +/-12V, but when I tried to run it at ~+/-21V (my bench-supply's limit) I vaguely remember some unknown untested oddities (maybe this!) that I didn't explore too thoroughly. The thing's rated for something like 25V, and if I remember correctly, at 12V I was seeing nearly 25V peaks, so at 25V then maybe it's peaking way past the over-voltage threshold. (For the latest tests I've been running it off a different supply at +/- 18.5V).



That's probably the friggin' answer... Friggin' days of experimenting later. But, still, I don't *see* that overshoot on my 'scope like I did before. Huh. Well, to experiment.



On another tangent: The "potential unknown I vaguely-foresaw" before starting this experiment was something along the lines of... Audio-amps are designed for *audio* signals, which are inherently AC. So, it's quite-likely the chip isn't designed for DC input/output, especially those at the rails... E.G. Certainly "clipping" occurs in audio, so "railed" signals are probably expected to occur, but not expected to stay at those levels for very long durations. This rationale (again *vague* in my mind, especially up to this point) seemed to me to apply to *analog*/*linear* amplifiers more-so than switching/Class-D amplifiers since, for one thing, "DC 0V" output on this class-D amp results in 50% duty-cycle... So, even with no signal/mute the output is still switching full-swing between rails... So I guess I thought maybe a switching amplifier might be less susceptible to the potential problem. Again, it's all vague and likely even wrong, but audio-amps' being designed for AC signals was something I thought *might* have an effect on whether they could be used for DC output... (Especially one where it might be run at one of the rails).



And, lo-and-behold, there appears to be such a circumstance. And now I'm forgetting what it was, I'll have to reread above... But one prime example is this amp's "Bootstrap" inputs... A capacitor is tied between each output and a corresponding "bootstrap" input(?). The datasheet doesn't specify exactly what these do, but my guess is they're used in a charge-pump used to drive the high-side(?) internal MOSFETs. The end-result, as I see it, is the system doesn't actually output full-on or full-reverse (100% duty-cycle or 0% duty-cycle). I'm not sure where the limit is, but with my rough testing, the maximum is not really even close to 100% (or 0%) duty-cycle. Further, as it approaches 100%/0% the PWM frequency seems to drop to 1/2 or 1/3... That's fine for the *output*/load, but what's happening with those bootstrap inputs...?



I think, further, the load has an effect on the ability to "bootstrap" properly under those conditions... There's a feedback loop, like on an op-amp amplification circuit, so as the load increases (e.g. loading the motor's shaft) the "op-amp" attempts to maintain the same (average) output-voltage... So whereas it was already running at something near the limit of probably something like 90% duty-cycle, now the load has increased such that it would attempt to increase the duty-cycle plausibly to the point where it can no longer keep those bootstrap caps charged... On an audio input, this wouldn't be a problem, because the signal wouldn't be "clipping" for that long, but on a motor which is loaded, it may ride at this state long enough to cause trouble. (That said, I've used DC motor-driver H-Bridge chips that have similarly-wired bootstrap caps... surely used them at 100% PWM for long-durations without noticing a problem, and they don't mention pulsed-input/output as a requirement, so where does that fit into this logic?).



Then there was something else weird about the mute/standby input... connecting it directly to 5V without a capacitor seemed to cause random "booting"... (after that 'bootstrap ramble' I think I get why). I thought maybe I could get away with tying the mute/standby input to "on" with a lower-value resistor and ignoring the rest of its circuitry so it wouldn't be suceptible to noise from the rest of the circuitry... (This was before I realized that "input" probably has an internal transistor tied to it for protection...). So, E.G. with that pin tied high and with the same DC input (resulting in the motor spinning) sometimes the motor would spin upon power-up, and other times it wouldn't spin at all, despite the mute/standby pin being pulled to 5V. In the cases where it won't spin, I tried pulling the input low (standby) and releasing it to be pulled-up via 5V pull-up resistor with no effect. I thought maybe it was edge-triggered or something, but that didn't seem to be the case. However, if I connected the capacitor (briefly) between the mute/standby input and ground, that would almost always cause the motor to spin... This one boggled my mind until I wrote all that rambling about bootstrapping... My new theory is that it has to go through "mute" (which is somewhere between 0V and 5V, between standby and on, on the mute/standby input) *to* bootstrap... Mute, again, causes 50% PWM duty-cycle, which would likely allow for bootstrap capacitor-charging which might not happen otherwise.



Alright, so do we have a solution....?



One problem is the maximum duty-cycle... So it doesn't output 100% of the supply voltage... does it matter? Not really, though being somewhat "artificially" limited is a bit irritating, power-supplies of these voltages/currents aren't in high-supply 'round here, and the motors are rated for 24V. OK, so use BTL mode, and a single motor... doable, but a *lot* of circuitry (and power-supplies) for a single motor-driver. But, doable.



One problem is the (now determined likely?) case where voltage-spiking is causing overvoltage protection... This might be fixable with an L/C filter, as recommended for a *speaker*... This one I'm not sure about, but it's worth a try... That L/C filter would filter out the input *to* the speaker, rather than the output of the amplifier, no? But that spiking *might* be from the motor's windings... I can't quite wrap my head around that one... I did measure diodes on the outputs of the amplifier between +VCC and -VCC, so that should take care of flyback-voltages, right? Weird.



And the bootstraping ramblings... if it doesn't work at near-100% PWM for "long" durations that could be a problem, especially since we're already artifically-limited in our output voltage... Since a varying load varies the duty-cycle, that might mean an even more conservative "artificial" limit on the maximum output voltage... or maybe careful watching of the output signal via the microcontroller...



(wait, how does that make sense, again...? Why would varying the load change the output-voltage...? It's PWM, the on-resistance is minimal... what am I thinking or not thinking?)

I have some pics, why aren't (amn't?) I uploading 'em?

Discussions

K.C. Lee wrote 12/22/2015 at 12:27 point

Does the random shut down happens if you stall the motor? i.e. over current.
Also try a small LC filter between the amp and the motor and/or a snubber in parallel to the motor see if that helps with the spikes from the motor communication affecting the amp.

  Are you sure? yes | no

Eric Hertz wrote 12/22/2015 at 14:35 point

Oddly, putting a heavier load on the motor doesn't seem to affect the random-shut-down problem, but I haven't experimented with that for long-durations.

I'll have to try the LC filter, and "snubber" looks to be a handy term to look into, as well.

  Are you sure? yes | no

Eric Hertz wrote 12/22/2015 at 09:56 point

Blah... now running 'scope experiments, I'm not finding anything above 20ish volts, which is within-spec. Could be thermal... Today it started-up running fine and only started "stuttering" after a while... but really, it's friggin' 150mA, and the heatsink isn't getting *so* hot (can easily touch it). Oy.

Might be time to just call it quits and use it as an audio-amp as it was designed.

  Are you sure? yes | no