5
\$\begingroup\$

I'm working on a project where I want to make the software the most power efficient it can be on the system. What ways can I do performance analysis of my system?

I'd like to run the system off AAA batteries but would like to estimate how long between the batteries needing to be changed.

My system mainly consists of a MSP430G2553 with a nordic nRF24L01+.

Are there any commercially available devices that I can hook up that'll monitor the power performance so then I can relate this to the firmware and work out how to redevelop the software to become more power efficient?

\$\endgroup\$

3 Answers 3

7
\$\begingroup\$

Yes, it's called an ammeter. It measures current. Any common "multimeter" will have ammeter capability. For the test, run the unit from a fixed voltage supply and put the ammeter in series. Since voltage is fixed, current is proportional to power. You can then experiment with different software options to see what draws what current.

However, while I've worked on a number of power-sensitive microcontroller designs, I don't recall measuring current during the design phase. At most this was done as part of verification to make sure the current was within the range that I already knew it would be.

Actually measuring current only tells you what that unit at that temperature with that voltage is doing right now. It doesn't tell you what the worst case could be, which is usually what you need to design for.

Designing a system for low power shouldn't be a trial and error procedure. You look at the datasheets carefully to see what draws what power under what conditions, then sit down and actually design the system deliberately to exploit those characteristics to minimize power. Measurements should only be to verify that you didn't screw up or that something unexpected isn't happening.

When designing for low power, make sure to consider the whole system, not just the load. Minimizing power usage of the load is important, but how the power supply delivers that power can also be important.

\$\endgroup\$
5
  • \$\begingroup\$ I thought about an ammeter, but was wondering if there was something like a kill-a-watt meter built that will do the calculations as well. \$\endgroup\$
    – Dean
    Apr 9, 2013 at 12:47
  • 1
    \$\begingroup\$ @Dean: Do what calculations? With a fixed voltage supply and assuming the ammeter drops a small fraction of the total voltage (both of which are fairly easy to ensure), current is power. In some cases, current is actually more relevant than power anyway. However, again, poking around by trial and error trying to minimize current or power is the wrong way to design a low power microcontroller system. \$\endgroup\$ Apr 9, 2013 at 12:51
  • 2
    \$\begingroup\$ Must say I'm rather disappointed in this answer - these are not issues that can all be brushed under the rug of "read the data sheet" nor is it necessarily as trivial as grabbing a "multimeter" to measure - consider that a system may consume microamperes or less in some phases of program operation, but milliamperes in others and the ranging problem gets interesting. Additionally, the burden voltage of some multimeters on their most sensitive scale may make them inapplicable. \$\endgroup\$ Apr 9, 2013 at 20:25
  • \$\begingroup\$ @ChrisStratton - I think you're splitting hairs, the OP is clearly not at the level of being able or expecting to count microamps for a hobby project. The fact he wants something to calculate watts for him suggests that Olin struck more than the appropriate level of seriousness here. \$\endgroup\$
    – John U
    Sep 20, 2013 at 9:08
  • \$\begingroup\$ @JohnU - I strongly disagree - the poster describes a battery powered design using low capacity cells. Measurements of a fraction of a milliamp may be quite important, if the device only enters a sleep or powerdown mode, rather than having a physical disconnect switch. For coin cells, microamps matter. Something I'm working on currently draws 32 mA peak, but time averages to 200 uA - can't measure that with a normal meter, only with a sense resistor and scope. \$\endgroup\$ Sep 20, 2013 at 14:00
2
\$\begingroup\$

This answer might come a bit late, but iSYSTEM makes an I/O add-on for their MSP430-friendly IC5000 "BlueBox" debugger that allows current measurements as part of (and correlated with) the debugging process. Note that if this is a personal project, the startup costs for the system are prohibitive. If it's a commercial project, the expense of the system may be justified by its versatility. Here's the link to the I/O module documentation:

http://isystem.com/files/docs/IO_Module_V12.02.pdf

\$\endgroup\$
1
\$\begingroup\$

There's a tool for this for ARM and renesas, but i don't know something for TI MSP.

[1]http://www.iar.com/en/Products/IAR-Embedded-Workbench/Power-debugging/Power-Debugging-in-IAR-Embedded-Workbench/

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.