If you want to measure the current taken by some circuitry, the normal way is to use a small resistance in the circuit and measure the voltage drop across the resistor. For AC currents, you can use a current transformer, but that is a bulky approach for AC applications. For DC current, particularly where you may want to measure down to microamps, amplifying the voltage drop across a current sense resistor is more common.
In some cases, you can measure current on the “low side” i.e. relative to ground. For example, if you wanted to measure the current in an N channel MOSFET you could put a small resistor in the source and measure the voltage across that.
With this approach, as well as making sure you use a small sense resistor to minimize power loss and the effect on your load current, you also need to bear in mind that the voltage drop across the sense resistor reduces your gate-source voltage, so you will not be driving the MOSFET quite as hard as with no resistor. For example, with no sense resistor, if you apply 5V to the gate, you will get 5V from gate to source. However, with 100m ohm for the current sense, at 5A you will lose 0.5V of your gate voltage, so the gate-source voltage will only be 4.5V. This may not be a problem, but you should check it.
Also, bear in mind the power drop across the resistor. A 100m ohm resistor sounds small, but at 5A it will dissipate 2.5W. While that is not a lot of power compared to the power taken from the power supply under load, it means a physically larger resistor will be required. So, for high currents, smaller value current sense resistors are preferred. I have used resistors as low as 500µ ohms in the past for very high currents, and even smaller values are available.
So, assuming you use something like 10m ohms to minimize power dissipation and the effect on you load current. How, then, would you use the 50mV signal produced by this circuit, and what if you cannot sense the current to ground but must measure it at the high voltage side (“high side” current measurement)?
For amplifying the current sense resistor voltage shown above you need an amplifier which includes ground in its common mode input voltage range, and preferably slightly below ground. Also, with very small resistors you need to make sure that your results aren’t affected by PCB track resistances and amplifier input offset voltages. So, you will need to use a differential amplifier and amplify the voltage directly from the resistor.
However, a common problem is that of measuring the high side current and where the voltage is higher than the operating voltage of your analog and digital circuitry, which may only be 3.3V or even less. Rather than trying to do it with an opamp which can run from a high voltage supply, there are handy chips aimed at this specific problem such as the Linear Technology LT6106 or LT1999. The LT6106 block diagram is shown below. The LT6107 is similar but with a higher temperature range (to 150C).
The advantage of such a device is simplicity, space, and cost. The LT6106 is $0.82 in 1k quantities, only needs two resistors plus the current sense resistor and is in TSOT-23/5 package. It works up to 36V, and the gain is set by the ratio of two resistors. Linear Technology lists useful gains up to x100, but I have used them at higher gains. You need to be aware of the input offset voltage when selecting your current sense resistor depending on your required accuracy and also ensure that the input resistor Rin is large compared to the sense resistor. LTspice includes models for the devices so you can check with that if your chosen values are suitable. If you use too low a sense resistor and hence need high gain, you will see the zero offset affecting results.
For example, taking the LTspice jig for the LT6106 and adjusting the values to get the same output as their jig but with a lower current sense resistor (shown above – with 2m ohm compared to 20m ohm for R2) you will see simulated results like this:
So, for zero current you don’t see zero output. This is due to the input offset voltage which is significant compared to the small voltage being developed across the current sense resistor. You are amplifying the input offset voltage.
The LT1999 is different in that it has a fixed gain – you choose 10, 20 or 50V/V of gain depending on which variant you buy. The other significant difference is that it is bi-directional. The LT6106 can only measure current in one direction which is fine for sensing the current consumed by a device or circuit.
The LT1999 can measure current flowing in either direction through the sense resistor. So, you could measure the current flowing through a motor in an H-Bridge for example. You could measure current into and out of a rechargeable battery. You can check which devices are bi-directional in the manufacturer’s selection tables. Similarly, with the Analog Devices current sense amplifiers (found under “Amplifiers/Specialty Amplifiers/Current Sense Amplifiers” on their web site), their selection guide also lists “Vin Direction” as uni- or bi-directional.
If you wanted to build a unidirectional high side current sense amplifier using an opamp, you would first need an opamp which works with input voltages up to the positive supply rail. It would need a low offset and work up to a high voltage if you are sensing high voltages. The Texas Instruments OPA191, for example, will work from 36V and meets the other requirements. You also need to add components to amplify the signal and shift it down to be relative to zero volts and also ensure the output voltage doesn’t exceed the input voltage of your ADC or whatever you use to detect the output voltage. You could construct a circuit which uses a lower voltage opamp and uses the voltage drop across resistors to bring the opamp voltages within a lower working range. This would probably be a better solution than a high voltage opamp but will still use more components and cost more than a simple current sense amplifier which will do all the hard work for you.
Some instrumentation amplifiers have precision input resistor networks which allow common mode voltages above and below the supply rails, but it would be an expensive solution compared to a dedicated current sense amplifier.