Re: Current Sense Recommendations

From: Jack Klein (jackklein_at_spamcop.net)
Date: 09/16/04


Date: Wed, 15 Sep 2004 21:00:11 -0500

On Tue, 14 Sep 2004 20:28:00 -0500, Jack Klein <jackklein@spamcop.net>
wrote in comp.arch.embedded:

> I'm looking for a good solution for high-side current monitoring of DC
> brush motors, clutches, and brakes driven with a 20 KHz PWM at 24 ~ 30
> volts.
>
> The motors are driven bi-directionally, that is to hold position the
> H-bridge is driven in one direction for 25 uS (minus a switching dead
> time delay), then in the other direction for the same time.
>
> Brakes, clutches, and probably solenoids are driven unidirectionally,
> that is in one direction only for some percentage of the PWM cycle and
> not at all for the other.
>
> I'd prefer to use a high-side switch, since the supply is chasis
> grounded and a low side switch will never see common cable problems,
> that is a power lead shorted to chasis somewhere.
>
> We've tried the Maxim MAX4080 and MAX4081 with very poor results.
> Despite a single line on the first page of the data *** that they
> are suitable for bidirectional motor drive sensing, they are not
> usable at all. They ring and oscillate like crazy 20 KHz, in addition
> to the response and settling times being too slow.
>
> Any recommendations appreciated.

A follow-up, and thanks for the surprising number of replies.

The cause of the ringing and oscillation was our fault. My colleague
Greg, who shall remain nameless, doesn't usually make mistakes but
must have been asleep when he put together this particular circuit.

First he put a MAX4081 across a shunt resistor in series with one of
the motor leads, to get 0 volts at -15 amps to 3 volts at +15 amps,
feeding the ADC inputs of a TI 2812 DSP. That's fine in one
direction, as the +RS line it one FET voltage drop below the motor
power supply. In the other direction, however, that same input is one
FET drop above ground. Even though the chip is powered separately
from a 5 volt supply, it is not spec'ed to work with +RS below +4.5
volts, and it most surely shuts down.

We found that one, when the output was screwy, and I went over the
data ***. We switched to the high side, between the positive motor
supply and the top of the H-bridge. We also changed to a 4080, since
there wouldn't be any reverse current other than a little regen that
didn't interest us.

But it oscillated at an almost perfect 100 KHz every time it turned
on.

Second, he clamped the output with a 3.3 or 3.6 volt zener, to protect
the ADC input in the event of a major over current, and that turned
out to be the cause of the oscillation. The data *** mentions a
maximum output capacitance of 500pf for "no continuous oscillations",
and the zener had a nominal capacitance of 495pf! The oscillations
might not have been continuous, but they lasted through the 50 uS PWM
period without noticeable decay.

We are now protecting the ADC with a very low capacitance (14pf max)
Schottky diode to the 3.3 volt supply rail, and the ringing went away.

For those who asked questions about the design and would like answers,
here are a few.

We are familiar with various hall-effect current sensors, and use them
on a companion board with the same DSP that drives a three phase
brushless motor at 250 ~ 300 volts. They work quite well, but are
both relatively large and relatively expensive, though absolutely
necessary to high performance space vector modulation control of the
three phase motor.

I have neither the space nor the budget for 8 of these four motors,
four brake/clutch/solenoid drivers per board. The system physical
layout and covers are too far advanced, and I can't expand the board
10 mm in any direction.

As for why the bidirectional drive, it's provided in hardware by the
DSP and needed for out application. Each of the DSP's event managers
(there are two) has three pairs of PWM outputs driven by a common
period register, needed for driving three phase motors. Each pair is
driven from a single compare register to set the duty cycle. Each
pair can also nicely drive a single servo motor. One output is set to
PWM active high, and is connected to AHI and BLO FETs, the other to
PWM active low and drives the ALO and BHI FETs. A dead time value is
programmed into another DSP register and it all works quite nicely.

As to why we want bidirectional drive, there are several advantages.
At 50/50 duty cycle, each side is driven for 24.7 uS (25 uS minus 300
nS dead band time). In situations where the control loop has to hold
position, one can respond to a disturbance quicker because the drive
circuit is already on, only the PWM compare register needs to be
changed to apply torque in one direction or the other.

The other important reason is much better control at very low power
levels. This is a medical imaging device, and very accurate velocity
control is a necessity during image acquisition. One of the
clinically most important drives has a velocity range of 200 to 1, and
the slowest velocity is used clinically in scanning.

With single side drive, very low duty cycles tend not to be precise,
as you are switching transistors on for an extremely short time, and a
few nanoseconds difference in rise and fall times is a significant
percentage of the on-time, and precise velocity control gets very
difficult.

With bidirectional drive, you apply low power in one direction by
setting the PWM compare register a little above or below the midpoint.
So instead of trying to deliver to turn a FET on and off to deliver a
200 nS pulse in one direction, you are applying a 24.8 uS pulse in one
direction and a 24.6 uS pulse in the other. No worries about narrow
pulses being different from one board to the next, or even varying
with board temperature.

Again, thanks for all the replies.

-- 
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://www.eskimo.com/~scs/C-faq/top.html
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++
http://www.contrib.andrew.cmu.edu/~ajo/docs/FAQ-acllc.html

Loading