Apr 5 2009

Two Weeks of Standby?

Category: Joel Ivory Johnson @ 07:19

I was baselining the battery life in a  Windows Phone for so that I could see what affect that certain actions have on the batter life.  To do this I fully charged the battery and then let the phone sit in standby mode.  So how long was the phone in standby mode? Two weeks!  I started up this test on March 22, 2009. As of this morning the power indicator on the phone was blinking red instead of green signifying that the battery is almost dead.

I would have never guessed the phone was capable of such a long standby length.  The OEM had only rated this device as having a standby period that was 58% of what I'm actually getting. When I had used the phone on a day to day basis I would hardly get a day (because of heavy phone use).

Tags: ,

Mar 30 2009

Smart Phone Last Longer when Dumbed Down

Category: MobileJoel Ivory Johnson @ 07:45

If you are a long time mobile phone user then you've observed the reduced expectation of battery life with each new device released.  At one point you could go several days without needing to charge a device.  Presently your doing good to get over a day.

As a part of researching the affects of certain programming practices on the battery life of my phone I needed to baseline how long the battery will last when I'm not doing anything with the phone at all. To do so I've taken a Windows Mobile Professional and Windows Mobile Standard phone that I have and have done a factory reset to ensure all of my usual background programs are not running, gave the devices a full recharge, and then let them sit to see how long it will take for the battery to go dead.  The phones are essentially running as dumb phones. The maximum rated standby time on one of the phones is 200 hours. That's a little over 8 days. I'm on the 8th day and decided to breifly power up the device to see what the battery level looked like.  The phone reports that the battery is at 58% power.  If the power circuitry in the phone is reporting the correct battery level then this means the actual standby time is much longer than reported by the manufacturer.

Tags: ,

Mar 22 2009

Windows Mobile Power Management part 2 - Setup

Category: MobileJoel Ivory Johnson @ 07:10

Some time last year I wrote an article on Windows Mobile Power Management. Overall the article has been well received and I've seen it referenced by quite a bit of device developers on the MSDN forums and other forums.  Having been well received I'm going to spend some more time on adding to it (if you've seen the article you may have noticed a number '1' at the end of the URL.  That's a subtle expression that I planned to add another article).

This time around I'm going to measure how much certain tasks and programming concepts affect battery life. I've got both a Windows Mobile Standard and a Windows Mobile Professional phone that I'm not using. For both of them I'll first need to base line the total standby time I get while the devices are unused. Since the accuracy of the internal battery meter can varry I'm going to ignore it.  My measurement will be based on how many hours it takes for the device to shutdown due to insufficient power.  All other measurements will expressed in the percentage of the baseline time achieved when I use a certain programming practive.  So if a certain practice causes the device's running time to be reduced by 20% then I will record the the total battery life as being 0.80.

A known inadequacy of this analysis is that its applicability to other devices isn't absolute.  Different devices and firmware use different power management and so the results could vary.  But my expectation is that the variance of results won't be radical and the information will be sufficient for making expectations.

A potential problem in this experiment is that the results will be changed by measuring them (kinda reminds me of the Hesienburg Uncertainity Principle).  Since I don't have the necessary hardware for detecting the current being pulled by the device my only method for knowing that the battery is still alive is to occasionally wake up the device and write a time stamp to a file.  waking up the device and writing to a file both consume power.  If I wake up the device one every few minutes the impact on battery life will interfere with the battery life significantly.  If I were to to only wake up the device once a day then the affect on battery life is less significant but then my measurements are more crude. So I've decided to create time stamps once every 2 hours.

This initial baselining will be slow since both the professional and Standard device that I have can last for several days before the battery is dead. Once I get my baselines I'll post more details on what I will be measuring.

Update: I've put together the program I needed.  Only took a few minutes since I already had a system event class.

Tags: ,

Sep 18 2008

Native Coding and More Power Management

Category: Windows MobileJoel Ivory Johnson @ 14:20

Looks that a lot of people are interested in Power Management.  In the next 24 Hours of Windows Mobile webcast the top is "Developing Battery Friendly Programs."   The following week covers "Interoperability between Managed and Native Code."

Tags: , ,

Sep 5 2008

WE-DIG Power Management

Category: MobileJoel Ivory Johnson @ 22:40

 WE-DIG (Windows Embeded Developer Interest Group) was looking at power management this past month and had a few tibits of information that I need to add to my power management FAQ.  You can read more about WE-DIG's finding at the Windows Embeded Blog.  They did some of their test using an AT&T Tilt (my current phone).  Changing the backlight settings on the Tilt had a huge difference on the devices battery life.  Depending on the settings the devices life ranged from 11 to 34 hours. They also mentioned that writing a file to a memory card uses 32 times the power of writing it to the built in memory.

Tags: ,

Aug 27 2008

Power Management Article Published

Category: Article | Mobile | WindowsJoel Ivory Johnson @ 23:08

I've taken the discussion of the power button and have expanded upon it in the form of an article on power management in Widnows Mobile devices.  I've published it at my favorite online dev community site, codeproject.com.  Go over to http://www.codeproject.com/script/Articles/Article.aspx?aid=28886 and take a look at the article.  If you find the information usefule then please log in and rate it!

Tags: ,

Aug 22 2008

What Does the Power Button Do?

Category: Mobile | WindowsJoel Ivory Johnson @ 16:38

The iIimpact of unobservable events has long been a subject over which humans have pondered.    Some questions are either well known or commonly shared.

  • If a tree falls in the forest and no one hears it then does it make a sound?
  • When I close the door on the fridge does the light go out?
  • Is Schrodinger's cat dead or alive?
  • When I press the power button on my Windows Mobile phone do the programs stop running?

These are all questions will all be answered by the end of this blog post. Thanks to the availability of inexpensive electronics such as digital video and audio recorders we can show that falling tress make noises and that the lights in the fridge do go out.  Figuring out what happens when the power button is pressed on Windows Mobile was a little more difficult.

My first attempt at answering this question was based on programs that changed what they were displaying  over their execute cycles.  If the Windows Mobile device suspends when I press the power button then after pressing the button, waiting a few seconds, and pressing it again the program's display should show the same thing that it did before I pressed the button.  If the device continues to run when I press the power button then after the test I should see something that is noticably different. I ran my test and concluded that the processor continued to run after the power button was pressed.  As it turned out my initial conclusion was wrong.

After performing much more research on the matter I found that my conclusion contradicticted other material I found such as the "Power to the Programmers" post on the Windows Mobile Team Blog. I performed my tests again and increased the amount of time that I left the device in its alleged suspended state.  After successive test I achieved enlightenment.   Pressing the power button on a Windows Mobile Professional device powers down the display and some other hardware, but the processor continues to run.  After a certain amount of time has passed unless a program has indicated a desire to do otherwise the device's processor will halt until something wakes it up.  When the device is in this state it's not off; the programs are still in memory.  Windows Mobile Standard devices are always on, there's no questioning that.

In a forthcoming post I'll cover the details of power control on Windows Mobile devices.

So the only question that leaves open is whether or not Schrodinger's cat is alive. I will leave that question unanswerd and hope for the best for his cat.

Tags: ,