Search code examples
iphoneobjective-caccelerometer

iPhone : Does a rapidly updating (60Hz) accelerometer drain battery?


I'm making an accelerometer-based app using cocos2d, and I noticed that it's possible to set the accelerometer update interval.

[[UIAccelerometer sharedAccelerometer] setUpdateInterval: (1.0f / 60.0f)];

Is updating the accelerometer very often like this (60 times a second) a significant battery drain?


Solution

  • According to the LIS302DL accelerometer data sheet, it consumes ~0.75 mWatts of power at an update rate of 100Hz, and 0.0025 mWatts of power when in stand-by mode (i.e., no readings taking place).

    So, the short answer is "Yes", but off the top of my head, I can't put those numbers in perspective to give you an idea of, say, "how many minutes of on time" it drains from the battery.

    My recommendation would be to do a bit of testing. Find the lowest update rate that provides satisfactory results.