# current sensing when common-mode-voltage may be in range [-12V,+12V]

Discussion in 'Electronic Design' started by [email protected], Sep 29, 2012.

1. ### Guest

Hi,
I'd like to measure the current which a motor-controller is applying to a motor.
Current range is [-2A,+2A].
I imagine either
(a) "map" this current into 0-4V, which I can read with my ADC, or
(b) map this into a smaller output range, say [-0.02V,+0.02V], and I can feed my instrumentation-amplifier to map that into an ADC -appropriate range,say [0.1V,2.4V].
If I'm using a shunt resistor then I suppose that leads me to (b) over (a).

The motor-controller outputs a differential motor driving voltage.
So, whichever motor wire that I choose to splice a shunt resistor into,
the common-mode voltage might be as much as +12V when driving the motor oneway, and -12V when driving the other way.
(that is, the Vdiff applied to the motor can be in [-24,+24]).

How would you sense the current?
I searched "High-Side Current Sensing" and found an Analog Devices AD8210,
but that device, and its family of devices, permit common-mode voltage in range of [-2V,+65V].
So sounds great when I'm driving one direction, but i'll destroy it when reversing?

Or should I wind a coil of wire around a motor lead and try to sense it inductively? Then maybe I could ground one end of that coil and come away with a [-0.02V,+0.02V] signal that and I would calibrate it against a DMM. Maybe I'll reseach inductive current probes and see what I find...

Thanks for any pointers, advice, and success stories.

John

2. ### John SGuest

I am using the Touchstone TS-1101 in my design. It is a remarkable device.

John S

3. ### JoergGuest

and 24V or so. Then when reversing polarity they flip this to 24V and 0V
respectively.

Some high-side sensing devices can be set up to measure bidirectionally
but generally not (much) below 0V common mode. For example this one,
although at 24V I'd pick one with a little higher abs max limit:

If it's really +/-12V this kind of device won't work.

4. ### Spehro PefhanyGuest

On Fri, 28 Sep 2012 18:57:44 -0700 (PDT), the renowned
The LEM Hall-effect current sensors work beautifully.. 1%-ish accuracy
and bandwidth from DC to well into the 10's of kHz. Should be under
\$20 one-off. They're great for test rigs*.

Sine the input is galvanically isolated from the output you don't need

You'd probably use something cheaper if you were designing the motor
controller, but it sounds like you just want to test an existing
controller.

* Most of the specs on high-current BLDC motor controllers seem to be
rather "optimistic".

Best regards,
Spehro Pefhany

5. ### whit3rdGuest

[from +12V/ -12V supplies]

Does that mean the motor is connected from the controller to GND? That
would mean a small resistor in the ground lead will sense the current just dandy.
Surely, you mean wrap a magnetic core around a motor lead, and a second
coil of wire around the magnetic core, to make a current transformer?

Works for AC pretty well, of course. A reversible DC motor, not so much.

6. ### JamieGuest

What works well is if you take a donut large enough to pass a motor
lead through it, 2 wound coils 180 degrees from each other, you can form
a type of magnetic control, where the motor lead in the center will
effect the two coils. You energize one coil with a sine wave REF and use
the other to detect it.

Years ago we needed to monitor the current on a heavy DC path with
out making any connections to it. That is how we did it.. I am sure
today it
would be a big joke

Jamie

7. ### Guest

Summary:
I'm ordering "ACS712 Breakout" on a small pcb for \$10
https://www.sparkfun.com/products/8882?

Detail:
John Larkin recommends:
+ Avago chips
+ Hall-effect current sensors
+ a TI LMP8602
+ a flying-capacitor thing...

John, I looked at the TI LMP8602 data sheet after seeing your recommendation (thanks for the convenient
link). Yes I see CMVR -22V-+60V (at Vs=5V). The flying-capacitor is
beyond my ability right now. Didn't check Avago yet.

John S recommends Touchstone TS-1101 --
John S, sorry, I didn't explore this yet. I will, though, and thanks for responding.

Joerg wonders if I might be wrong about my motor controller outputting a differential voltage.
Joerg, I don't think so -- my reading of the Maxon LSC 30/2 "Operating Intructions" ( http://docs-europe.electrocomponents.com/webdocs/0220/0900766b80220404.pdf wow, so hard to find this online! Maxon, could you make it easier?)

Vladimir Vassilevsky suggests measuring voltage on both sides of the
shunt, then calculating.
Vladimir, let's say I am comfortable losing 1%, or 0.1V of 10V, at the shunt.
Won't I be giving up at least 6 bits of the ADCs to the common-mode voltage?
(now two ADCs, to measure both sides)
Right now that sounds like a lot to give away.

Spehro Pefhany recommends LEM Hall-effect current sensors.
Spehro, I went to the LEM website to explore.
I don't doubt that LEM has what I want, but I had a hard time navigating
that website to find what I want.

whit3rd asks if one side of the motor is grounded, giving a simple soln, and with great tact notes that I may have written nonsense about using a coilover a DC current.
whit3rd, Thanks for giving me a face-saving gentle reply
No, the motor is driven by a differential voltage, two leads from the
motor controller. At least that's how I read the Maxon doc I reference above.

Jaime describes the current transformer also,
Jaime, as whit3rd reminded me, I'm measuring a DC motor, so I'll go with one of the other options.

Thank you, all, for taking the time to reply.
So in conclusion, your suggestions led me to seach more on the Hall-effect sensors, and I found this part...
"ACS712 Breakout" on a small pcb for \$10
https://www.sparkfun.com/products/8882?
http://www.electronics-lab.com/blog/?p=15767

(See also the "ACS712 Low Current Sensor Breakout" for \$15 with op-amp on board,
https://www.sparkfun.com/products/8883 )

For the \$10 item:
Description: This is a breakout board for the fully integrated Hall Effect based linear ACS712 current sensor. The sensor gives precise current measurement for both AC and DC signals. Thick copper conductor and signal traces allows for survival of the device up to 5 times overcurrent conditions.

The ACS712 outputs an analog voltage output signal that varies linearly with sensed current. The device requires 5VDC for VCC and a couple of filter capacitors.

Features:

x05B (5 Amp) version
Low noise analog signal path
Device bandwidth is set via the FILTER pin
5us output rise time in response to input current
80kHz bandwidth
1.5% output error at 25 degrees C
1.2mOhm internal conductor resistance
2.1 kVRMS minimum isolation voltage from pins 1-4 to pins 5-8
5.0 VDC, single supply operation
66 to 185 mV/A output sensitivity
Output voltage proportional to AC or DC currents
Factory-trimmed for accuracy
Extremely stable output offset voltage
Nearly zero magnetic hysteresis
Ratiometric output from supply voltage

8. ### JoergGuest

Good medicine, as Phil Hobbs would have said. Although you can get the
bare ICs for less than \$4 and invest the saved \$6 into a couple of
brewkys at the local pub

Looking at the block diagram on page 14 it seems that it's unipolar. I
wouldn't know where any negative voltage for the motor terminals should
come from. AFAICS, the only voltage it can apply to either motor
terminal is between 0V and the positive voltage level of the externally
connected power supply.

When the motor reverses they seem to simply flip the connection around
in the bridge inside the controller, then a positive voltage is applied
to the minus motor terminal and ground is applied to the plus motor
terminal.

If that's true then a simple device like the INA21x plus shunt should
work. But mind that these should not be operated above 24V common-mode.
There are others that can go higher.

[...]

9. ### Nico CoeselGuest

Sense resistor, voltage divider followed by a bipolar instrumentation
opamp with an offset input so you can shift the signal.

10. ### Guest

yeh, it can't really be anything but a h-bridge output, TI list
several INA1x
that are rated for +36V common mode

looking at the block digram there's already current sense inside the
box, so
one could sneak a wire onto dip3 and get it for "free"

-Lasse

11. ### JoergGuest

Yes, but that one is most likely unidirectional, just measuring the
current into the lower input leg of the H-bridge. IIUC John.R would like
to have directional info as well. One could also pipe out the
directional info to the bridge controls but this would involve a bit of
hacking.

12. ### whit3rdGuest

[current sense resistor in H-bridge driver]
Offhand, that would only take a comparator driving a DPDT analog
switch (or maybe a relay). Motor output voltage is likely always
in phase with output current...

13. ### JoergGuest

Usually those current shunt resistors will not show the actual motor
current at all when braking, when there is no power fed into the bridge
but the upper two FETs are conducting.

14. ### Guest

Looking at the block diagram on page 14 it seems that it's unipolar. I
Yes, I took measurements and confirm you are correct above, the motor driving voltage is inside the supply rails, but ...
Not what I see.
The motor driving voltage has a common-mode of very close to halfway betw the supply rails.
In other words, I connect power supply 18V and GND to the controller, and it then provides a Motor driving voltage that is symmetric about 9V, like (5V,13V)

15. ### JoergGuest

That would be the deluxe edition, leather seats and all. Instead of a
simple bang-bang bridge it probably contains two synchonous buck
outputs. Those can either be real regulators with feedback or just
steered without feedback.

You are welcome. Looks like you could do it with such a current sense
device then. One of them in one of the motor leads should suffice,
provided you bias it so that it can sense current in both directions.