Tasker 'detect if moved' trigger could save battery on location events

1,309 views
Skip to first unread message

william smith

unread,
Dec 6, 2012, 6:56:19 PM12/6/12
to tas...@googlegroups.com
There's often people asking for a trigger on movement. The usual workaround is to look for location changing.

I'm imagining the opposite - if the power to monitor the accelerometer sensor is very low, it might be a good trick to save power.

My argument is simply - if the device has never moved, it cant possibly be in a new location.

If we then had a trigger on 'movement detected', that could be combined with location triggers, so the location tests weren't even needed whenever the device was stationary.

Anyone got any thoughts on this? How much power does it take to examine the accelerometer values?

Richard Davis

unread,
Dec 6, 2012, 8:21:00 PM12/6/12
to tas...@googlegroups.com

Unfortunately the accelerometer is first on the power hungry list..
From the user manual..

Tasker rates contexts for power-hungriness in the following (ascending) order:

Other State
Day / Time
Calendar Entry
State Cell Near
State App
Network Location
Wifi Near
State GPS Location
Proximity Sensor / Gesture Event / Orientation State (accelerometer activation)

GermainZ

unread,
Dec 7, 2012, 4:57:57 AM12/7/12
to tas...@googlegroups.com
Without mentioning that would require the accelerometer being checked 24/7, otherwise you could move from point A to point B without it knowing (having a delay between checks can allow you to move and get back to the same position, which would make your phone think you didn't move), and it can completely miss some events (e.g. car on a highway).

William Smith

unread,
Dec 7, 2012, 7:07:49 AM12/7/12
to tas...@googlegroups.com

Agreed. It would only work if accessing the sensors was essentially 'free'.

I've found a research paper where they measure the exact current draw of accessing the compass and accelerometer vs GPS on an HTC dream. They are proposing a lower power location service which uses GPS only occasionally then integrates 'distance moved' frequently using the compass ands accelerometer to derive location at lower power.

See www.mpi-inf.mpg.de/~mamir/mamir_masters_thesis.pdf page 25

They say
GPS on = 135mA
Compass+Accelerometer on = 11mA to 90mA depending on mode

The compass+accel use varying power according to the frequency with which you want to get notifications, the highest mode is for in-game use, the lowest mode (11mA) would be suitable for our purpose here.

Unfortunately they didn't measure the 'cell near' or 'WiFi near' type of power draw.

There's lots of 'sensor detect' apps on the android marketplace.  When I run them the claim the power draw of most of my sensors are ~5mA, and 0 (?) for the accelerometer.

Regards

Will Smith

--
http://www.linkedin.com/in/willsmithorg

Wes Stacey

unread,
Dec 7, 2012, 9:53:55 AM12/7/12
to tas...@googlegroups.com
The issue with using the accelerometer doesn't really work.

Let's say i'm at home and walk around my house all evening. How does Tasker distinguish between that and the road bumps from driving. I'd say you can't use the accelerometer for location based stuff.

Accelerometer can't really tell you much at all.

TomL

unread,
Dec 7, 2012, 10:19:20 AM12/7/12
to tas...@googlegroups.com
Depends if by "motion" people mean:

1. moving a distance from point to point, like a moving map app
2. movements of the phone, like working out with a pedometer app

Totally difference scenarios.

Tom

Will Smith

unread,
Dec 7, 2012, 4:30:24 PM12/7/12
to tas...@googlegroups.com
When I say 'device has moved' I mean anything more than absolutely at rest on a still surface.

So I agree, when you are carrying it around, or when you are driving, it would have then do the location based checking.

But when it's sitting on your desk at work, or in your bag/handbag at work, it could potentially use the complete lack of movement to save on a location check.  I'd guess a typical phone is completely at rest maybe 1/3 of the day for men (typically in pocket), 2/3 of the day for women (typically in handbag), and a tablet maybe 3/4 of the day or more.


I've done a bit more digging, and the recent MEMs sensors that include the accelerometer have EXTREMELY low power for the accelerometer if you only enable that and only enable it in 'low frequency updates' mode (around 1Hz).

For example the Nexus 4 and Nexus 7 includes a Invensense MPU-6050 chip has a low power accelerometer mode that draws 10 µA  (microamps) in lower power mode or 0.5 mA in normal power mode, provided the other sensors are not enabled.  The gyroscope consumes a lot more - around 4mA.

The Nexus 4's GPS - I guess a lot more modern that the one tested below - consumes ~15 mA.

http://www.ifixit.com/Teardown/Nexus+4+Teardown/11781/3
http://www.invensense.com/mems/gyro/documents/PS-MPU-6000A.pdf page 14
http://www.avagotech.com/docs/AV02-3026EN


Regards
Will
Reply all
Reply to author
Forward
0 new messages