# AD8211 Current Shunt Monitor for AC signal?

#### nanok66

Joined Jul 14, 2016
72
Hi,

I am confused to whether the AD8211 (current shunt monitor) is good for measuring AC sine wave current. The AC sine wave is actually created by the AD9837, a programmable waveform generator. The resulting sine wave (~400Hz, 100mV pp) is fed into an audio amplifier STA540 (attached photo below --> IN_L) to amplify the sine wave to about 6V pp. I am using the amplifier in bridge mode as shown below but instead of the OUT_L speaker, I simply have a 4ohm shunt resistor. The AD8211 inputs would of course be connected to each side of the shunt resistor.

Since the signal is a true AC (0V centered) sine wave, I was unsure if this is an ok signal for the AD8211 to measure. Especially since a lot of current sensing applications talk about "high side" and "low side" sensing. Neither side of the shunt resistor is connected to GND so I'm really not sure if this could be classified as either high or low side. With AC signals is there such thing as a high or low side? Any help is appreciated!

STA540 Datasheet

#### Attachments

• 26.1 KB Views: 15

#### nanok66

Joined Jul 14, 2016
72
Upon doing more reading I think I have answered part of my question. In the AD8211 datasheet it says "The AD8211 performs unidirectional current measurements across a shunt resistor". My guess is that would make an AC wave that dips below 0V no good for measurement?

I also happen to have some "bidirectional" current shunt monitors in my stash: INA181 datasheet Does anyone know if the INA181 would work for AC current sensing like I described?

#### ericgibbs

Joined Jan 29, 2010
10,487
hi nano,
Have you used an oscilloscope to check the voltage swing on the AD9837 output sine wave.
I would say that it does not swing below zero??? , if so, the bi-directional current sensor will be OK.
E

#### nanok66

Joined Jul 14, 2016
72
The AD9837 does not swing below zero, but the STA540 audio amplifier bridge circuit uses a coupling capacitor on its input (my attached photo). Since it's meant for speakers I'm pretty sure it normally outputs a 0V centered AC wave. And yes looked on the scope and it is zero centered.

Ok will attempt to use this bidirectional current sensor.

#### ericgibbs

Joined Jan 29, 2010
10,487
hi,
If the sine wave is swinging above and below zero volts at the point at which it is being measured, I would say a 'regular' current sensor will not give a usable reading for the half cycle below zero.
E

EDIT: Looked at your photo, at which point on that circuit will the sensor be connected.?

#### nanok66

Joined Jul 14, 2016
72
Shunt monitor INA181 is attached to both sides of shunt resistor. I drew up a diagram and attached it.

#### Attachments

• 33.7 KB Views: 11

Joined Dec 4, 2009
328
INA181 is a bidirectional current sense amplifier.
STA540 output is AC, overriding on DC. Does not go below 0. In single ended mode to speaker output, DC is removed with capacitor. In bridge mode, the top and bottom outputs swing to produce AC, but both the outputs are positive only.

The output of INA181 can only be positive. A bias voltage can be applied to the reference input, which will be the output voltage for a zero input voltage. The output will have this reference voltage superimposed. And the output voltage will be restricted to the Vcc to the INA181. 6V p-p output will not be possible, as INA181 max Vcc is only 5.5V.

If you connect Vcc of 5V, Reference voltage of 2.5V, the output will be swinging about the 2.5V, giving you a maximum of 5V p-p output.

#### nanok66

Joined Jul 14, 2016
72
RamaD, thanks for making me check! Duh, yes the output of the STA540 is actually 6V pp but I had my scope in AC mode so I did not realize that the true waveform is a sine wave going from 6V to 12V!!

I just thought since the STA540 is an audio amplifier it would be 0V centered. How would a DC biased sine wave make speakers work?? If a speaker is essentially an electromagnet interacting with a permanent magnet, it would seem that an AC wave swinging from 6V to 12V would alternate between pushing the speaker cone softly in one direction and harder in the same direction!? Not understanding some core concept here...

Either way that is enlightening. I will have to dig deeper into these datasheets to make this circuit work for me.

#### ericgibbs

Joined Jan 29, 2010
10,487
hi nano.
There should not be a 9V DC voltage on the speakers, swinging 6v/12v.
Recheck the wiring and re-scope the project.
If possible post a complete circuit of the project.
E

#### nanok66

Joined Jul 14, 2016
72
In first photo, I positioned the GND trace to the center horizontal line and at 2V per division this AC wave looks to bottom out ~5.8V

Second photo I moved the signal into view and it looks to be 5V pp, good correction.

I probed both pins 1 and 2 of the STA540 amp and got the same results on the scope (pins 1 and 2 are each side of the amp's bridge output)

#### nanok66

Joined Jul 14, 2016
72
I think I fixed the floating high voltage issue! It was the point from the AD9837 waveform generator to the STA540 amp. I am connecting the 2 devices with just a series 470nF capacitor (as it shows in the STA540 amp datasheet), but I just added a 20k resistor after the capacitor at the amp's input and now the bottom of the AC wave has nearly lowered to 0V!

#### ericgibbs

Joined Jan 29, 2010
10,487
Hi,
If I follow your description correctly, are you measuring say +9V DC on both wires to the same speaker.? relative to 0V/Common
Ref the bridge connection.
E

Joined Dec 4, 2009
328
RamaD, thanks for making me check! Duh, yes the output of the STA540 is actually 6V pp but I had my scope in AC mode so I did not realize that the true waveform is a sine wave going from 6V to 12V!!

I just thought since the STA540 is an audio amplifier it would be 0V centered. How would a DC biased sine wave make speakers work?? If a speaker is essentially an electromagnet interacting with a permanent magnet, it would seem that an AC wave swinging from 6V to 12V would alternate between pushing the speaker cone softly in one direction and harder in the same direction!? Not understanding some core concept here...
When it's single ended output, the series capacitor in series to the speaker removes DC.
In bridge mode the top & bottom outputs are out of phase, providing only ac to the speaker. The same can be seen in 2 channels of the scope (out of phase, I mean). With A-B of channels, the clean AC signal can be seen without any DC.

Joined Feb 20, 2016
3,595

#### nanok66

Joined Jul 14, 2016
72
Eric, the measurement is the photos in post #10. A sine wave that is DC biased to 9V (swings from 6-12V). I had my probe on pin 1 of the STA540 and the GND connector to GND.

dendad, cool yeah I have seen those and they are perhaps next on my list of things to try. I am attempting to go with the most inexpensive products first and most of those hall sensor chips are ~$5 but the current sense amplifiers are under$1 (if you buy 500+). I've also read that the current sense method can be more accurate. If I cannot get the current sense chips to work I will definitely try out the hall sensors.

#### nanok66

Joined Jul 14, 2016
72
Also RamaD, the first page of the INA181 datasheet says that this chip is good for signals with common mode voltages from -0.2V to 26V (way above the 5V power supply). I think I should still be able to get this chip to work.

#### nanok66

Joined Jul 14, 2016
72
Update - I kept trying the current sense amp INA181 with smaller and smaller sense resistors. 380mOhms was the smallest resistor I had until I finally just tried sensing across a wire on my solderless breadboard. It seems to finally work! I am now getting a sine wave output from the INA181. Previously I could only get a rail to rail square wave which was obviously maxing out the chip. I'm not even sure how to measure ohms this small but regardless I think I solved my original issue!