Blog

Improving Battery Life in Low Power Embedded Applications Part 2: Case Study

Improving Battery Life in Low Power Embedded Applications Part 2: Case Study

In Part 1, I talked about how battery capacity is rated and how certain conditions can affect relative battery capacity. This case study will specifically focus on a solution DMC provided for a low power embedded application designed around user interaction with a high base current draw. Many of its principles can be applied to all embedded applications.

Active/Sleep Programming

One of the first steps DMC took to help improve battery life was to use an active/sleep architecture for running the program. In this design, the microcontroller and any other high current devices are shutdown/put to sleep when they are not needed. This inherently created a variable current draw for the device, but ended up being much more efficient than having the hardware idly chewing up current without accomplishing anything (idle operations).

This was accoplished with a microcontroller by using hardware interrupts to bring the microcontroller out of a sleep state to process new data or actions. Specifically, DMC used a TI MSP430 that sat in an ultra-low power state that was interrupted by a couple conditions: a timer set to update the user display, a button action, or new data from an external chip. Once interrupted the microcontroller did all the necessary calculations and then went back to sleep. The microcontroller was also limited on how often it could be awoken, even when being constantly interacted with to guarantee a certain duty cycle of sleep vs. active. Using this in place of code that actively waited for those conditions reduced the microcontroller average current draw by orders of magnitude. 

DMC further increased battery life by optimizing the active/sleep timing and behavior for the customer’s exact application and was able to increase battery life of an inactive device from 160 to 240 hours. This was done by running all communications in parallel with processing using interrupts, and by reducing the display update frequency while keeping the user experience intact. Both of these allowed the microcontroller to get to sleep quicker and stay asleep longer.

Clockspeed Adjustments

The next step DMC took was to optimize the clock speed at which the microcontroller was operating. Almost all microcontrollers have the ability to change their clock speed, some even dynamically while running code. If running off of an external power source it is typical to just run the device at the highest clock speed and with a sleep/active architecture some may argue that the active clock speed is not important since a faster clock speed allows you to run your calculations quicker and get back to a sleep state.

However, remembering the conditions from the first post, a higher current draw has a bigger impact than a low current draw, even if they average to be the same. Therefore, DMC optimized the clock so that it only ran as fast as necessary to complete our code in the allotted amount of time. In this application DMC used an oscilloscope to time the processing of certain functions under specific conditions, allowing the clock speed to be changed for each case while still maintaining responsiveness and accuracy.

In the image above you can see the change in current draw when the clock speed in our application was reduced. In both cases the amount of computation is the same, as is the average current draw over time, but the higher clock rate has a much greater peak current draw. The results of decreasing this peak were an increase in idle battery life from 260 to 300 hours and dynamic life from 150 to 180 hours.

Capacitor smoothing

In addition to reducing the clock speed when actively processing data, DMC also added capacitance to the battery supply to further reduce the peak current draws seen by the battery. By placing a fairly large capacitor in parallel with the battery, the capacitor can act as a power source when high currents are required. The result is that the battery does not have to supply all of this current and the capacitor can be recharged during periods of low current draw. In the end the battery sees a much smoother current profile and gets closer to our ideal situation of constant low current draw.

In the image below, the addition of a 100 mfd capacitor dramatically reduced the peak current draw seen by the battery. This resulted in an increase in dynamic battery life from 180 to 210 hours.

Conclusion

By leveraging DMC’s knowledge in embedded software and hardware development, DMC was able to improve the customer’s battery life by almost 90% when inactive and 40% when active. This in the end will provide a better selling point for the device and reduce battery costs and down time for the end user.

Comments

There are currently no comments, be the first to post one.

Post a comment

Name (required)

Email (required)

CAPTCHA image
Enter the code shown above:

Related Blog Posts