# High side current sensing using differential amplifier

I would like to measure current making use of a shunt. Since the solution needs to be scalable I wanted to have a circuit that would be easily adjustable to various current ranges, and therefor opted to make use of a differential amplifier. It's also necesarry to measure on the high side, since there are a lot of components connected to common groud, which I dont want to disturb.

For my first test I wanted to measure currents up to 30Amps, neatly scaled to my 8bit 0-3v ADC(Not the best resolution, but plenty for my application) I did some online searching, and came across this simple circuit a lot. I calculated the resistor values to get a gain of 40, so the 75mV voltage drop at 30 amps through the shunt would get me 3V at the output of the op-amp.

However when I want to measure current on the high side of my circuit, I dont get the values I expect. When I put it at the low side it does work however. I'm in the dark on what's wrong with this circuit.

• What DO you get, when measuring on the high side? Feb 24 '20 at 10:54
• I was just getting a floating voltage around 1.2V with a lot of noise. Whenever I increased the power draw of the ESC it would spike, almost like an integrator. Feb 24 '20 at 11:16

You don't mention the battery voltage but I guess if you use 30A, you're probably using at least a bit more than 6V...

So, due to R3-R4 and R1-R2 dividers, voltage at the inputs of your opamp is above 5.5V which is the maximum allowed common mode voltage as per its datasheet. So it won't work.

A simpler solution is to use a "high side current sense amp" chip, this is the name of the category you have to search. These also include the precision resistors on chip so you'll have good CMRR without having to spend on 0.1% resistors.

Here's one: MAX4376

Important stuff to consider:

• Input common mode range is usually much wider than the power supply range. For example MAX4376 can use a shunt resistor sitting at +28V while using a +3V3 supply for the chip. This is the main feature that distinguishes these chips from the usual opamps.

• If you want a current sense amp that also senses a short circuit, with voltage going down to 0V, then you must check the minimum common mode voltage too. Some go down to 0V, some don't.

• Do you need it bidirectional or unidirectional?

• Check bandwidth, offset, etc. If you intend to use ADC sampling synchronized to your PWM then it needs to be fast enough to settle properly before the ADC samples.

• Check if CMRR depends on sense resistor value.

• Thank you for your reply. I'm using a 4s LiPo battery (14.8v), and I completely overlooked the fact that this exceeds the input voltage of the Op-amp. I took a look at the datasheet of the MAX4376 chip you suggested and that would be very suitable for this instance, thanks! Feb 24 '20 at 11:14