Electronic – Sensing current upto 2A w/ high resolution

adccurrent measurementhall-effectshuntstm32f4

I'm trying to sense a current that will flow in a motor (current shouldn't exceed 2Amps), and I'd like to have a high resolution on this measurement.
I was hoping on using the ACS712, but it says the precision is 185mV/A.
Since the current in my applicaiton won't exceed 2A, it means 185*2 = 370mV (right?)

I'm using a STM32F4 with 12bit ADC which means with a Vref of 3.3V it's an increment each 0.8mV. So in the end I'll get a resolution of 463 steps.

Is there a way to get a higher resolution ? I don't really like the idea of a shunt resistor, maybe an amplificator could do the trick but will I be able to get a precise measurement ?
enter image description here
(iA is the measurement)

Btw, I'm trying to replace it with an ACS711 which operates on 3.3V but it'll give me only 110mV/A resolution

Here's the Vref+/- connection
enter image description here

Best Answer

Most micro-controllers with ADC's have an internal bandgap reference with a voltage of ~1V (see datasheet for more precise values and tolerances; ex.: the STM32F415xx series has a bandgap reference of 1.21V). This effectively increases your resolution to 1253 steps full scale by flipping a software switch.

If you want to do even better, you have a few options:

  1. Use an op-amp to amplify the output of your current sensor
  2. Use a higher resolution external ADC
  3. Use a lower voltage external reference (for example, something like this). Note that a simple voltage divider directly into the vref pin is almost never a good idea.

In none of these cases do you need to change the voltage supply to your microcontroller.

As a side note, I don't understand your aversion to using a shunt resistor. For moderately low currents (few amps) it is the most accurate way to measure currents. For example, the ACS712 chip you've listed has an accuracy of 1%. That means you get an accuracy of 6.64 bits (~100 steps). It is very easy to get shunt resistors with 0.5% accuracy, giving an accuracy of 7.64 bits (~200 steps). Using a 0.1% accurate shunt gives you 9.97 bits of accuracy (~1000 steps).

If you use a very small shunt resistor with an instrumentation amplifier the burden voltage will be negligible. For example, say you have an in-amp with a gain of 100x (very do-able). An appropriate shunt resistor to get 0-1.21V full scale needs a shunt resistor of 6.05mOhms, and will have a burden voltage of 12.1mV. For all intensive purposes this is negligible. You can reduce this even more by using a 1000x in-amp circuit (also very do-able).