# Measuring Supply Current Accurately

The current measurement mode in most multimeters is sufficient for many applications.  However, when measuring the supply current of loads that draw current infrequently in small bursts, it becomes difficult to measure the real, average current consumption accurately due to the slow sample rate of the multimeter.  Many wireless telemetry nodes present exactly such a situation and calculating expected battery life relies on an accurate measurement.  Fortunately, physics comes to our rescue (along with a few widgets to make things easier…).

# Theory

One of the fundamental equations in electronics relates the current out of a capacitor to the rate of change of voltage across the capacitor ( ) and the capacitance ( ): If you know the capacitance and can measure the change in voltage over a known period of time, you can calculate the average current.  Charge conservation dictates that any current draw by the load, regardless of how bursty or irregular it is, must result in a predictable change in the voltage across the capacitor.  With a large enough capacitor, the capacitor can act in place of a battery to power the device being measured for the duration of the measurement.

# Wonderful Widgets A colleague of mine developed a widget exactly for this purpose.  It uses two 20F (yes, Farad) supercapacitors, connected in series resulting in an equivalent of 10F of storage.  Each capacitor is rated for 2.5V, so connecting them in series increases the usable voltage range to ~5V.  While one might be tempted to just connect the two capacitors together, apply 5V across the stack, and hope for the best, you most likely will run into problems since the capacitors won’t equally share the charge, possibly overvoltaging one of them, not to mention the inrush current caused by connecting a huge capacitor to a voltage source.  Have no fear…  the LTC4425 comes to our rescue.  This device is a supercapacitor charger that provides inrush limiting and automatic charge balancing between the two capacitors.

In addition to the capacitors and LTC4425, the board also contains a precision 10k resistor and some switches to make calibration easier.  The feedback network to the LTC4425 can also be modified to terminate the charging process at any voltage, allowing the circuit to accommodate a variety of load supply voltages.  In the example below, the final voltage was set to 2.7V (1.35V across each cap) to mimic a pair of AA batteries.

The complete schematic for the Coulomb Counting Power Supply can be found here.

# Measurement System

To use the coulomb counter, an accurate voltage meter is needed.  While I could have used a 34401A precision benchtop multimeter, why do that when I could hack something else together?  (Not to mention that I don’t personally own a 34401A and Nathan seems to think his doesn’t belong on my workbench…)  So, instead, I used an ARD-LTC2499 and wrote a simple sketch to read and send voltage measurements over the serial port. On the right is the Coulomb Counting Power Supply.  On the left is the ARD-LTC2499 sitting on top of a Linduino (Linear Technology’s enhanced Arduino UNO).  The combination of the LTC2499 ADC and the LT6654 voltage reference creates a measurement system with accuracy comparable to a 34401A, though with a much less flexible front end.  For example, since the input voltage range of the LTC2499 is limited to 2.048V (50% of the 4.096V reference voltage), I used two input channels, each in differential mode, to measure the voltage across each capacitor individually.  Wires were soldered to the capacitor leads and connected to the ARD-LTC2499 screw terminals. The Arduino sketch used to measure and record the voltages is listed below.  It uses our Ard2499 software library, performs some additional filtering of the voltages, and sums them together to produce the full output voltage before “printing” the output in CSV format to the serial port.  Software running on a PC then dumps the serial stream to a file where it can be analyzed later.

#include <Wire.h>
#include <Ard2499.h>
#include <stdio.h>

Ard2499 ard2499board;

void setup() {
// initialize serial communications at 9600 bps:
Serial.begin(9600);
Wire.begin();
ard2499board.ltc2499ChangeConfiguration(LTC2499_CONFIG2_60_50HZ_REJ);

ard2499board.ltc2499ChangeChannel(LTC2499_CHAN_DIFF_1P_0N);
}

int32_t filter01, filter23;

void loop() {

filter01 = ((adcVal + 15*filter01)+8) / 16;

Serial.print("Ch01,");
Serial.print(",");
Serial.print(((filter01*2.048) / 16777216.0), 6);
Serial.print(",");

filter23 = ((adcVal + 15*filter23)+8) / 16;

Serial.print("Ch23,");
Serial.print(",");
Serial.print(((filter23*2.048) / 16777216.0), 6);
Serial.print(",");

Serial.print("Total,");
Serial.print((((filter01+filter23)*2.048) / 16777216.0), 6);

Serial.println("");
}

# Results

My initial test was to measure the supply current of an MRBW-TH wireless temperature/humidity sensor.  Before doing so, though, two calibration measurements are required.  Each measurement was run for ~1 hour, recording the voltage across the caps at the beginning and the end of the time period.  These calibration measurements allow you to extract the inherent leakage in the coulomb counter board and the actual capacitance of the supercapacitor stack, both of which are required for accurate measurements.

To extract the inherent leakage of the board, the capacitors are first charged.  Then, the LTC4425 is disabled by taking its EN pin low (CHARGE switch in the schematic).  At this point, the initial voltage is recorded.  After waiting ~1 hour, the final voltage is recorded, as is the exact time interval.

V1 = 2.673489V
V2 = 2.644174V
dt = 3687s The second measurement extracts the capacitance.  This is done by applying a known resistance as a load.  From the current (based on the known resistance), the drop in voltage over a known time interval, and the leakage measurement above, the capacitance can be calculated:

V1 = 2.673833V
V2 = 2.539236V
dt = 3791s
R = 9.97847k   Finally, we can measure something real!  The MRBW-TH was connected to the load terminals.  The capacitors were then charged, the charge controller disabled, and the voltages measured at both the beginning and the end of the measurement period. Initially, the MRBW-TH was configured to broadcast every 5 minutes.  Between broadcasts, it powers down the XBee radio module and puts the AVR into sleep mode to conserve power.

V1 = 2.67334V
V2 = 2.575632V
dt = 5482s  To sanity check the measurements, some additional conditions were used.  First, the jumper that enables the LEDs on the MRBW-TH was installed.  This should increase the current draw to several milliamps.

V1 = 2.672794V
V2 = 2.254696V
dt = 1897s  Next, we change the transmit interval from 5 minutes to 1 minute:

V1 = 2.673136V
V2 = 2.579317V
dt = 3746s  Finally, we change the transmit interval to the maximum (6553.5s):

V1 = 2.67289V
V2 = 2.624869V
dt = 2905s  # Summary

Measuring supply current of bursty of irregular loads can be difficult using traditional methods, but using some basic physics and a few widgets can simplify the process and provide much more accurate results.  If you are interested in learning more about the Coulomb Counting Power Supply, please let us know and we will put you in contact with the designer.

1. Enrique Aguado says:

This is really cool! Is there a chance I could buy one of these boards? You don’t sell them in your store?

Thanks

Enrique

1. Michael Petersen says:

We don’t have these as a product currently. It is something we might consider in the future if there is enough interest, though.

2. Roopesh says:

Hai ,
I am trying to read single ended input voltages ,so do we actually need to connect the +REF and -REF to +V cc and COM respectively as mentioned in the datasheet.I see you are not connected in the above case. So shall we assume 4.096 as ref voltage.

1. Michael Petersen says:

When using the ARD-LTC2499 board, you do not need to connect anything to the reference. The board contains a 4.096V precision reference already connected to the ADC.