How Auto Rotation On Mobile’s Work? || The Concept Of Accelerometer

          Accelerometer, The electronic component which measures tilt and motion is used in mobile’s to detect the rotation. The Accelerometer is also capable to detect gestures like shaking and swinging. Let me explain you the basic concept behind working of an Accelerometer.
          Imagine a “Box” in the shape of “Cube” and a ball inside it (See the below image to get an idea). If this arrangement is taken to zero gravitational force condition, then the inner ball just floats inside the box. In Normal gravitational force conditions, the inner ball acts according to the gravitational force (eg: The ball stay’s at the bottom regardless of the position of box since gravitational force always act downward’s.)
     Zero Gravitational Force:

          As i said above, if the gravity is zero, the ball floats inside the box. (see the image below).
     Normal Gravitational Force:
          If the gravitational force is normal (i.e: box is placed on the ground), then the ball stay’s at the bottom of the box since the gravity acts downwards.
     Gravitational Force On The Right:
          It doesn’t mean that the gravity is applied on the right, but the box is tilted 90′ to the right such that “X-” side is placed on the ground. Even now according to the gravitational force, the ball stay’s on the plane which is nearer to the ground and hence stay’s on “X-” side.
     Gravitational Force At The Corner:
          Applying gravitational force to the corner of the box (i.e: box is tilted 45′ to the right.). Now both the “Z-” and “X-” sides are on the ground and accordingly the ball moves to the corner which is on the ground.
          Now the concept is finished and assume that the box is fixed to the mobile and the ball is in free motion. What ever the side the mobile is moved, the box is also moved along with the mobile and the ball stay’s on the surface which is nearer to the ground. The values are are calculated accordingly and the image on the mobile is rotated automatically.

Leave a Reply

Your email address will not be published. Required fields are marked *