While LEDs are common in voltage detection applications, I have never seen an LED circuit that is dedicated to indicating the presence of low values of current flow. This simple LED current sensor measures a low voltage drop across a sensing (shunt) resistor. When the voltage exceeds about 10mV, the LED comes on.
Two circuits are provided: One for sensing current in the positive rail and the other for the negative rail. Applications include both battery charge (including solar) and/or discharge current sensing.
Positive or negative rail?
Due to circuit constraints, it may be necessary to put the shunt resistor in the positive supply (rail) so that the load may be grounded directly to the negative rail (battery negative terminal or chassis). This is also known as “high side” current sensing. A shunt resistor in the negative rail is known as “low side” sensing.
10mV is about as low as I recommend for this application due to the range of input offset voltage (±4mV over the entire range of operating conditions for the LM358A and ±5mV for the TL071B or TL081B).
Op amp selection
The op amp common mode input voltage range must extend to either the positive or negative rail depending upon the location of the shunt. While there are numerous single supply op amps that can sense at the negative rail, the LM358 is the most common. Op amps that can sense at the positive rail are relatively uncommon—I recommend the TL071B or TL081B single op amps, or the TL072B or TL082B dual op amps. The “A” or “B” versions have lower input offset voltage and are recommended. However, if you do not have an “A” or “B” version device, simply try a number of ICs in the circuit until you find one that works as expected. Note that the venerable LM741 will not work in this circuit.
Op amp parameters to understand for this circuit
Input offset voltage: The difference in voltage between the inverting and non-inverting inputs (zero V is perfect, 1mV is generally considered low, and anything above 10mV is poor).
Common-mode input range: The range of absolute input voltage under which normal operation may be expected (rail to rail is perfect and some advanced op amps achieve this miracle, I believe. Zero to Vcc-2V is common and 2V to Vcc is relatively uncommon (requires BI-FET differential amplifier pair). A simple voltage follower circuit requires a high common mode voltage range, while an inverting amplifier requires minimal common-mode voltage range.
How it works
The circuit is essentially an op amp wired as a comparator. The voltage reference (diode connected transistor) is quite crude, but high accuracy is not required. It is a self-biased NPN transistor that runs at about 600mV. This is reduced to about 10mV via a resistor divider. For the negative rail circuit, when the voltage across the shunt resistor exceeds 10mV ±5mV the output swings high and turns on the LED. There is no signal conditioning or hysteresis so if the signal is at the threshold, the output will be noisy and the LED could flicker or run at half brightness.
Shunt resistor calculation
Rshunt = 10mV /current threshold. e.g. if the threshold current is 100mA, R = 10mV /100mA = 0.1Ω. Shunt power rating: P = I²R where I is the maximum load current and R is the shunt resistance. Note that the resistor power rating should be derated by a factor of 2 in order to reduce temperature rise—at their rated power, power resistors literally run stinking hot! The goal is to drop as little voltage as possible and keep power dissipation low.
In some cases where there is a high transient load, the shunt resistor may be shunted by a schottky diode in order to prevent the instantaneous voltage from exceeding about 500mV.
This should work over the range of about 6 to 20V. At 20V, it could measure the output current of a solar panel. In the case of a 24V battery, I recommend adding a 6.2V zener in series with the supply to the op amp in order to reduce potential voltage stress—that way at maximum charging voltage (29V), the op amp is not running close to its voltage rating.
The circuit is quite efficient—Until the LED comes on, the load current is about 2mA—then add another 1 or 2mA when the LED comes on. Ultrabright LEDs are recommended because they are easily visible at only 1mA. This lends itself well to efficient battery operation.
No photos for this project — someone borrowed my USB to Mini-B camera cord and forgot to return it—Boo! @#$%^&*!!!
For the future
‘Lossless’ Hall effect LED current sensor—yes, there are devices that can do this, but complexity is higher.