Monitoring Mac Battery Levels, Temperature, and Motion with Freeware/Open Source Apps
I was sitting in an airport gate area last Thursday afternoon with two hours of waiting ahead of me. So, I popped open my MacBook to catch up on video podcasts. The MacBook was fully charged. Although the battery is two years old, it seems to be holding its charge pretty well for its advanced age. I wondered, though, how it was really holding up over the years. Fortunately, I had heard about an free utility on the MacBreak Weekly podcast and had the installer for it on the MacBook.
coconutBattery 2.6.1 provides much more information than than Apple's battery indicator. For example, it told me that the MacBook's battery originally had a maximum 5020 mAh (milli Amp hours) charge capacity and that it had dropped to 4596 mAh over the past 23 months (it also told me how old the MacBook is). So, my MacBook can only charge to 90% of its original capacity. That seemed pretty good for a two year old device. I'm hoping that coconutBattery can help me decide when the MacBook battery needs to be replaced.
Since the Apple MacBook and MacBook Pro are particularly sensor rich, it occurred to me that gathering a collection of freeware and Open Source utilities that provides this information might make for an interesting blog entry. So, here's a small collection of utilities you might find interesting and useful.
If you are still using Mac OS X 10.4 (Tiger), you might want to take a look at the freeware CoreDuoTemp 1.0. It didn't work for me on an Intel iMac running Leopard. However, I used it for a couple of weeks after buying a first generation MacBook running Tiger (10.4) two years ago.
The Apple Sudden Motion Sensor's (SMS) purpose is to help protect a spinning hard drive when a MacBook is dropped. You may not think of it this way, but everytime you place a MacBook down on a desk while running, it is essentially falling a short distance. So, this sensor is probably pretty busy. Amit Singh has an excellent chapter in his book Mac OS X Internals: Chapter 10 - The Sudden Motion Sensor. His AMSVIsualizer is a great freeware tool to help visualize the information the SMS detects. You can see a screenshot of it here.
Two other well known applications that use the SMS are MacSaber which emits Star Wars type light saber sounds as you move the MacBook around and SmackBook Pro which switches window views when you, umm, smack a MacBook on its side. If that seems a bit too dangerous for your MacBook, there is also a version that uses its light sensor instead called ShadowBook.
For even more fun with the SMS, Amit's article The Apple Motion Sensor As A Human Interface Device on his personal website describes using his AMS2HID prototype sensor application as a controller for the Open Source game NeverBall.
An Open Source application named iAlertU uses the SMS as an alarm in case someone moves your MacBook. It sounds an audio alarm, captures a photo, and, optionally, send an email if someone tries to move the MacBook. As you can see from my test photo, the image is not very clear is someone quickly moves a MacBook. However, this doesn't change the fact that it is an interesting and attention grabbing use of the SMS.
Here's something for the deskbound Macs with an APC consumer grade UPS: American Power Conversion (APC) PowerChute Personal Edition. You can see in the screenshot that it reports the battery level of my UPS and let me decide how to auto-shutdown the Mac in the event of power loss. I've got mine set to attempt a graceful shutdown when the UPS battery level goes below 25%. I wonder if Firefox will prevent the shutdown if two or more tabs are open. I hope not :-)
Finally, here's an interesting group MacBook activity for those of you who live in California: Stanford University's Quake-Catcher Network (QCN) uses a network of PowerBooks and MacBooks (with the motion sensor) as a seismic network (earthquake detector). You can read a detailed article about this research network in Wired Magazine: Turn Your MacBook Into a Seismometer.
Categories
MacComments (0)
Read More Entries by Todd Ogasawara.







Leave a comment