# Measure Battery Current via Shunt

I'm working on a project where I'm measuring the current into/out of a battery (currents may be as high as approximately 150A, and I'm not aware of any hall effect devices that are continuously rated for such currents and/or don't break the bank) via a shunt resistor in-line with the positive line of the battery. To measure that current, I have to measure the (comparatively small) voltage across that shunt somehow.

Normally, I would use a instrumentation amp to amplify the signal, then feed it straight into an ADC on my microcontroller. However, since current can flow both into and out of the battery, I'd have to deal with the voltage range across the two terminals of the shunt being $±150mV$. (I'm making up numbers here, but that's around what I'll be dealing with.)

My question here is as follows: How do I go about sampling this voltage from the shunt in the simplest way possible?

I'd like to keep the circuit as simple as possible, as I'll need to (eventually) expand this project to sense current on several batteries simultaneously.

What's the best approach to sampling this voltage?

I'm thinking that I could somehow apply a DC bias to the incoming signal to 'shift' it into the range of $0-300mV$ so it's easier to sample, but I don't do much work with analog electronics or op-amps to really know where to begin.

• There are such Hall sensors, many of them. Commented Oct 9, 2017 at 20:40

There are many "high-side" current monitoring amplifiers which make this task much more easy and avoid cutting the ground rail to insert shunts.

Figure 1. The INA219 Zerø-Drift, Bidirectional Current/Power Monitor With I2C Interface is one of many. (Click for larger view.)

There are numerous version of similar devices - some built on hobby boards, etc.

If you can use I2C then that should simplify your wiring, connections and reduce the amount of analog signal handling required significantly.

"Normally" Current shunts are 75mV to reduce dissipation and require either a high side amplifier that works at supply rail or a low side shunt amplifier that works below ground rail to some value like 150mV. These choices come in distributor tables and search engines. Then you can choose a gain to get full scale on your ADC.

I have applied this principle up to 10kA using massive copper pipe conduits with 2 screws in them calibrated for 1.0 mV at 100 A using a lab supply.

I would suggest putting the shunt on the ground return side and use an Instrument for best gain and CM rejection and works below 0V or +/-150mV, but one can do it either way, hi or low side.

INA199 < look up You will need twisted pairs, maybe shielded and maybe ferrite core sleeve (CM choke to reduce noise) depending on dI/dt value in A/us.