Believe it or not, I'm working on the exact same project as you. I just installed my Deltec shunt today. You should have a look at this question.
In a nutshell, I think (and have heard) that an instrumentation amplifier would be better for this for many reasons. They have less error, better input impedance, CMRR
I will probably be going with an AD620 for the amp, and an MCP3301 for the ADC. Anyways, there is a nice list of instrumentation amplifiers in the question I linked.
As for using an instrumentation amp, yes you can find some that are single supply which would let you power it from USB.
For instance, the INA122 is a single supply amp that can be powered by anything from 2.2 to 36V. My only question would be: why? Are you going to route a wire from a cigarette to usb through the dash? You're creating a circuit to measure a car battery, why not use the car battery to power it? At least that's what I'm doing.
Here is my shunt inside a nice little box after hookup:
EDIT: I also just noticed you plan on placing the shunt on the high side. While I'm sure this would be fine for a decent instrumentation amp, it also seems unnecessary. Why add in additional common mode voltage when you don't need to? Hence why mine is on the low-side.
One of the best resources I have come across is Analog's Designer's Guide to Instrumentation Amplifiers
The amount of detail, graphs, charts, and ease of explanation is incredible. There are many useful things in this guide.
While it doesn't seem to specifically touch on low-side current sensing, I have read in several places that there are really only 2 disadvantages to low-side compared to high-side. Those are:
- Inability to detect a short
- Additional shunt resistance causes disturbance in ground path
The first one I don't see being much of a problem in a car, especially given that you've got a fuse box.
The second point I also do not see affecting a car too much, especially if your shunt is an extremely low value. Your starter certainly has a resistance much higher than your shunt so it shouldn't really affect its performance. Mine started just fine after hooking it up.
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:
- Use an op-amp to amplify the output of your current sensor
- Use a higher resolution external ADC
- 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).
Best Answer
The field from 2000A flowing in a conductor will be quite significant, and linear with the current. Just dangle an analogue output Hall effect IC close to the cable.
Better still, have two Hall effect ICs, one either side of the wire. Align one up, one down, so they both read the conductor field in the same direction, but read external fields in opposite directions. Add them together, and this arrangement will reject external fields. Feed detected voltage into the STM32's ADC.