0

I wanted to know what should the values of accelerometer data should be and how should they be interpreted.

I used the snippet given at, http://androidgenuine.com/?tag=accelerometer-data-android

When I run this application, my Accel-X Accel-Y Zccel-Z

readings are constantly fluctuating when I keep the phone horizontally on the table. Is it supposed to do so?

From what I read on the internet a guy said on his blog that when kept horizontally, the readings of the accelerometer should read (0,0,-1). Mine is fluctuating in less than a second.

I understand what has been told here, Accelerometer data: How to interpret?

but it doesn't answer my question.

Am I doing something wrong here in the code? If not, if this is how the readings are supposed to be, then can anyone guide me on how do I read data using my accelerometer?

Basically, I want to keep the phone on table with the app running, tap my fingers on the table ( near the phone ) and read what accelerometer readings the vibrations caused by it provided.

Can someone guide me please? Any help is much appreciated.

Community
  • 1
  • 1
  • a basic tutorial on how to use accelerometer in android http://www.quicktips.in/get-accelerometer-readings-android/ – Deepak Swami Jun 29 '16 at 16:59

2 Answers2

2

Fluctuation of accelerometer is normal process. It depends from your device (sensor, etc). The my Huawey S7 has very strong gitter, also i observe this situation on HTC devices.

Silver
  • 12,437
  • 2
  • 14
  • 11
  • Okay, if fluctuation is normal, then how do I detect the vibration readings for the tapping of my fingers? How do I isolate them? –  Mar 06 '12 at 18:21
  • Filter it. But... My accelerometer resolution is 0.16 m/s^2. You most likely the same. The fluctuations reachs 2 LSB, or 0.32m/s^2. Also, the more filtration, the slower your measuring system. Is this situation suit for your...? May be you can connect external, more accurate sensor? – Silver Mar 06 '12 at 18:36
  • my Accel-X and Accel-Y readings are fluctuating between 0-0.30 and Accel-Z reading is between -9.5 and -9.6 (which i am guessing is due to the value of g? ) And my question still holds, how do I filter it? tapping fingers doesnt cause a strong enough vibration, very slight changes in the accelerometer readings. A filter would probably bypass it, if I am not wrong? Can you please explain it in more a dummy (me) friendly way? –  Mar 06 '12 at 18:42
  • If your ultimate goal to determine the impacts of fingers (ie, low vibration), a simple filtering does not help you, the sensor will be very slow. Maybe get to the complex "smart" filter. For example using a bandpass filter. But it's all so complicated... This is a topic for the mathematicians forum. – Silver Mar 06 '12 at 18:58
0

Modern day smartphones have high-precision accelerometers and gyroscopes. So even the slightest movement of your phone or its surroundings can already change the accelerometer data. That's the normal behaviour.

And unless you do not use the Linear (!) Accelerometer, there will always be one dimension with a value around +/- 8-10, e.g. (-0.1234567, 0.2345678, -10.234567)

keinabel
  • 1,002
  • 3
  • 15
  • 33