Look carefully at the specs for a digital pot, since they often are quite different than what you expect. For example, look closely at these issues:
- Noise: Digital Potentiometers (DPs) often have terrible noise performance. Rarely better than -80 dB THD+N, and often only -60dB or worse. Many pots don't even put noise figures in the datasheets. DPs are often only suitable for the worst quality consumer audio gear, or applications where noise isn't much of an issue (like LCD contrast adjustments).
- Accuracy: Many DPs only have a 20-30% accuracy on the total resistance from chip to chip (and sometimes between two pots on a single chip). The MAX5460 has a nominal resistance of 100K, but can vary between 75K and 125K. If you need two DPs to match, then you are out of luck.
- Minimum resistance: DPs often do not go down to 0 ohms. Some only go down to 1K, or higher. This can be super important if you are using the DP in the feedback path of an op-amp, to give you good gain control.
I looked into using digital pots for gain control in audio applications and found them to be largely useless. Instead I use relays (low noise, low resistance), Analog CMOS switches (good noise, small-ish), or even JFETs (cheapest, reasonable noise, hard to use).
How hard this is depends a lot on the details of exactly what you're trying to do.
For example, what is the minimum current you want to be able to measure. 100mA? 1A? 10A?
Presumably you want to be able measure cranking current, which may be more than your shunt is rated for (so the output voltage may exceed 50mV). That part is easy (lots of signal, and probably a fair bit of noise too). An offset voltage of 100uV represents 500mA. 100mA would require an offset of less than 20uV, which is challenging in the environment of an engine compartment, even with so-called "zero-drift" amplifiers. If you're looking for one part in 1000 of a 300A or 500A range, that's 300mA to 500mA.
Something like an INA331IDGK will have a 500uV maximum offset, so the error could be +/-2.5A. That could be calibrated out. The drift is typically 5uV/°C, so for a 30°C change you could see 0.75A change. That's harder to compensate for.
In general the overall strategy is usually to look at all the sources of error you can identify and calculate the input-referred error (i.e. the error in amperes measured at the shunt). Then compare those to your error budget.
I expect you'll put the shunt in the low side (between battery and auto chassis) so then the voltage across the shunt will be near or below ground, so you'll likely need a negative supply for your in-amp.
The in-amp, perhaps with some external gain setting parts, will give you a voltage relative to a reference (perhaps a ground on some external circuit). You have not mentioned what you want to do with that signal. If you just wanted to read the current on a display, you might not need an instrumentation amplifier at all- just isolate the measuring circuit and connect it across the shunt sense terminals.
Be careful of output range with the in-amp if you're going into an ADC that has a range that's a good part of the supply voltage-- depending on the type and the amplifier's supply voltage they can saturate internally. There's good information in the application notes and data sheets if you look for it.
Also consider what happens under various situations of missing connections and so on- probably the sense wires from the shunt could go -12 and maybe +12 under some conditions and those situations should not damage the front end. To some extent, that requirement degrades the available accuracy because you will have to put some resistance in series with the sense terminals, and that will increase errors due to bias current.
CMRR could be a factor if you're trying to measure currents really accurately, and for noise rejection. You can put the shunt in place and use a scope to measure the common mode voltages. Since they tend to be proportional to the current you're measuring, it's probably not a big concern.
There's a good overview here (Word Doc). Note the examples that use a regular op-amp.
Best Answer
This circuit does not amplify.
At best, the ratio of input delta_voltage to output delta_voltage, in absence of that first large capacitor (1.59F), will be
If you need that feedback time constant, then use 10Meg Ohm, and 31nF.