Android accelerometer max values
Asked Answered
D

2

6

So I have been searching for about 3 hours and I have not come up with a good answer/solution.

My Question is: Why am I getting a max acceleration value of only about 34 m/s^2 or about 3.5 Gs (34/9.81).

Is it because hardware restrictions or software restrictions? If it is hardware I know I can't do nothing about it(or at least not easily). If it is software restriction then how can I remove that restriction, is there any way of doing that? Like an API or something?

I would appreciate any help, Thanks.

Note: I am using a Galaxy S, if that makes a difference. I have also taking a look at this question but that does not helps me: What is android accelerometer min and max range

Dorcus answered 5/10, 2012 at 3:39 Comment(7)
Can you explain what you mean by "restriction"? That sort of implies you expect to get a higher value. You might want to mention whether or not you are including the gravitational force of 9.8m/s^2 or if you've already applied the high-pass filter, and also mention what sort of motion you are applying to the Galaxy S. And finally, why you assume that the number should be higher than 3.5G. Not saying you are right or wrong about that, but why are you assuming there are "restrictions".Perigynous
For the record, accelerometer is theoretically purely hardware-based: developer.android.com/guide/topics/sensors/sensors_motion.htmlPerigynous
@Perigynous well according to this the range should be higher. I don't know if that helps or not...Also 3.5 Gs just sounds to low and I know I am swinging my phone harder. That is why I think it my be a restriction of some kind.Dorcus
@Perigynous Also on your second comment. The accelerometer might be purely hardware-based but maybe google is restricting the values somewhere...I don't know. That is why I asked the question :)Dorcus
check out my answer below. It looks like the sensors can typically be calibrated to different ranges of sensitivity. I doubt Google is imposing a limit. Their API does not mention anything like that: developer.android.com/reference/android/hardware/…Perigynous
edited my answer a couple times. Upshot is that it looks like Google API doesn't allow for change of range, unfortunately.Perigynous
#26294139 @Perigynous can you help me here?Zillah
P
4

Take a look at this: https://electronics.stackexchange.com/questions/11372/samsung-galaxy-s-accelerometer-details The question includes what appears to be the datasheet for the accelerometer used in the Galaxy S. Apparently there are three possible ranges +/-2g, +/-4g, and +/-8g. I'm not an electronics expert so won't provide any more interpretation than that.

According to developer.android.com, the accelerometer readings are hardware-dependent only: developer.android.com/guide/topics/sensors/sensors_motion.html Thus, you'd probably have a better shot at getting an expert answer on the Electrical Engineering stackexchange forum already referenced above: electronics.stackexchange.com.

Good luck with your project!

EDIT: In reference to comments on original question: I see, because it says on the page you reference -

"My understanding is that the default for Android accelerometers is to operate in a predefined range of +-2g. How can I programmatically change this range via a public API? There is a getMaximumRange() method, but no corresponding setMaximumRange() method."

You are wondering if there is a software-based method for changing the pre-selected range. Again, I would think that Android API docs would mention that. Try asking on electronics.stackexchange.com what "dynamically selectable ranges" are and if they are set by physical hardware switches (or something like that) or if they can be changed programmatically.

SECOND EDIT: I read the page I referred you to more thoroughly, and notice that the original questioner checked the Google API and concluded that it is not possible to change the range through it:

API dosen't allow to change them. I think that i can find this data in the api source, but it is not simple. Now i'll try. – MarcoBiagi Mar 13 '11 at 10:36

Perigynous answered 5/10, 2012 at 4:8 Comment(1)
+1 Thanks for the answer. It gave me some ideas/insight of what to search for.Dorcus
V
3

Given the max acceleration magnitude you are reading from your Galaxy S is 3.5 g, your Galaxy S accelerometer appears to be setup to have a per axis accelerometer range of +/- 2g (i.e., sqrt(2.0*2.0 + 2.0*2.0 + 2.0*2.0) = 3.5). For reference, here are the per axis accelerometer ranges of your Galaxy S, the Moto G, and the Nexus Android devices:

Galaxy S: +/- 2g
Moto G: +/- 2g
Nexus 1: +/- 2g
Nexus S: +/- 2g
Nexus 4: +/- 4g
Nexus 5: +/- 2g

The per axis accelerometer range is typically not given in a phone's specification sheet. Therefore, if other readers happen to know the max range of their phone's accelerometer, please feel free to add it to this list.

Unfortunately, the accelerometer Sensor.getMaximumRange() API is inconsistent: returns "zero to peak" values on most devices but "peak to peak" on some (e.g., the Moto G) as described in this tracked Android OS issue. One approach to knowing whether a particular device returns Sensor.getMaximumRange() as "zero to peak" or "peak to peak" is to run a free sensor data plot application like ftNote and vigorously shake the device to see where the accelerometer readings clip in the plotted sensor values.

Vasily answered 14/11, 2013 at 15:10 Comment(1)
i have lg g3, getMaximumRange() is 39, what it is mean max range is 69G?it is real?Garbe

© 2022 - 2024 — McMap. All rights reserved.