This is a follow-up to the previous post on how you can create CCDF charts quickly, and for free. That post ended with a nice-looking CCDF chart, shown below.

Figure 1: CCDF Chart

While this chart is correct, it may be misleading to the reader, because the dramatic drop appears between -5 and -6. Although these current levels (1 to 10 µA) are where the device spends most of its time, they are NOT where the device spends most of its battery charge. Low current levels, even if sustained for relatively long periods of time, may be relatively insignificant. For example, a 10-mA current spends battery charge 10,000 times as fast as a 1-µA current. The purpose of this blog post is to continue the previous discussion and show you how to produce a CCDF-like chart that more accurately reflects how charge is consumed at different current levels.

## STEP 1: Compute the total charge consumed and count down from 100%

Begin by re-sorting the data by column A. Calculate the total current in column C in cell E1, using the formula =sum(c2:c48001). Make sure that you are using the original current data in column C, of course. In cell E2, enter the formula =E1-C2, and copy this to the bottom of the data set (row 48001). In cell F1, enter the formula =E1/E$1, and copy this formula to the bottom of the data set as well. Convert the formulas in columns E and F into values, and then convert the values in column C to their base 10 logarithms as described in the previous article. Your spreadsheet should appear as shown below.

Figure 2: Counting down total current, starting at 100%.

## Step 2: Create the chart

Sort the data by the Select and Sorted columns as described in the previous blog post to limit the amount of data to be graphed. Create an X-Y chart, using columns C and F as the X- and Y-axes, respectively.

Figure 3: Charge consumption chart

## Step 3: Zoom in by setting upper and lower limits on the X-axis

In the chart above, the graph is essentially flat to the left of -3 on the X-axis, and it is 0 to the right of -2. Therefore, we can zoom in by setting the X-axis limits to -3 and -1.9, as shown here.

Figure 4: Charge consumption chart zoomed in to show detail

## Step 4: Use the tooltips to precisely identify important current levels

Hover your mouse over areas where the charge curve drops quickly. In this case, you can see that much current is being consumed at 10^-2.03 A. This gives you insight as to where you have a good opportunity to improve the charge consumption of your device.

In conclusion, the CCDF chart is a very useful tool, and you do not need to spend money on special software to create one. By showing the charge consumption rather then the time consumption, you can get quick insights into your device's behavior that will help you to optimize your design for long battery life.