Electronic – Bidirectional DC motor driver from single analog pin

amplifierdc motordriver

I'd like to build about 12 units (too few to make custom PCBs, enough for time, cost and inexperience to be a concern) of a device mapping an analog (voltage, not PWM) input range of 0 to 5V to an output range of e.g. -12 to +12V, ~2W, with 0 output around 2.5V input. That probably has a name, but I have not found it.
Doesn't have to be exactly linear.

I can approximate such a device with a microcontroller (ATtiny85) and an H-bridge (L9110S), but with both input and output quantized at such a poor resolution (10 and 8 bit, typically), the result is too twitchy for what I'm driving (not motor, exactly, but a similar enough device using electromagnets).

Researching similar devices that are already being manufactured, I came across something almost perfect:digital audio amplifiers.
PAM8403-based boards are super cheap, assembled, efficient, have 2 H-bridges each, v.fast switching frequency, and drive stepper motors beautifully. And there are stronger amps available.
However, they achieve their functionality via AC coupling. So, a DC motor moves in response to voltage change, not absolute level. Without the input caps, they don't seem to work at all (at least, I couldn't make them)

What is the suggested solution? H-bridge-based motor driver + some magic on the 2 input pins? Modifying an amp's input? An analog circuit?

Best Answer

First, yes you do want to make PCBs. That will be easier and far more reliable than kludging up 12 units with flying leads or whatever.

Since your overall power requirements are low, you can afford to use class B amplifiers. Your maximum output is ±12V (so abs 24 V) and the load then draws 2 W, so the current at that point is only 83 mA. The worst case dissipation of the pass elements is when half the full voltage is applied to the load. Assuming a linear load, it will then draw ¼ the maximum power, or 500 mW. The total dissipated by the pass elements will also be 500 mW. This is split between two opposite legs of the two class B drivers, so 250 mW worst case per pass element. TO-220 cases in free air can easily handle that.

Here is what one of the two class B output drivers would look like:

The four transistors form a power stage with a voltage gain of about 2. You want some gain here so that the opamp doesn't have to drive its output too close to the power rails. But, you want to leave some of the overall gain to the opamp so that it is stable. R5 and R6 are the voltage divider for the overall negative feedback, and set the overall gain at 4. Since the output stage has a gain of 2, this means the opamp will also have a gain of 2, which is good.

You didn't say what accuracy and speed, but mentioned the load is like a motor and the circuit "doesn't have to be exactly linear". This output stage has a deadband at the crossover point. This allows for simplicity and guarantees both the high and low side drivers won't be on at the same time. It will also result in some crossover distortion. However, the opamp will compensate for that at low frequencies. This isn't for "HiFi" audio, but should be plenty good enough for driving a motor.

I didn't show the LM324 quad opamp power connections, but it should be powered directly from the ±12 V, with a proper bypass cap of course.

The functional block shown above is essentially a power amplifier that works down to DC. It is driven from a ±3 V control signal, and produces a ±12 V power output signal.

You use two copies of this block, each driven with a ±3 V control signal of opposite polarity. Use one of the remaining two opamps to convert your 0-5 V input signal to ±3 V, and the other to flip this around to the opposite polarity ±3 V to drive the other power block.

The load gets connected between the outputs of the two blocks. You can think of this sortof like a analog H bridge that can drive the load with nearly ±24 V.

Related Topic