How to use the acceleration sensor to measure the tilt angle of an object?

Description

Measuring the tilt angle of an object is a common application of the acceleration sensor. Although the test principle is very simple, there are still many problems encountered in the implementation process, such as the accuracy of the tilt angle and the environmental interference problem. This article will discuss the accuracy problem and give a simplified calculation.

Fundamental

Since the acceleration sensor is subjected to gravity when it is placed at rest, there is a gravitational acceleration of 1 g . Using this property, the tilt angle in the vertical plane can be calculated by measuring the component of the gravitational acceleration on the X/Y axis.

As shown, there are Ax=gsinα and Ay=gcosα . Then Ax / Ay = tanα , that is, α = arctan ( Ax / Ay ).

According to the above principle , the tilt angle on the plane of XY can be measured according to the 2- axis acceleration sensor .

However, in practical applications, it is difficult to ensure that the tilt only occurs in the XY plane. Therefore, the formula for calculating the inclination of the three-axis sensor can be extended as follows:

The above formula basically solves the dip angle calculation in the static environment. We consider a more complicated scene. To calculate the dip angle under the motion condition, we need to add another qualification condition, namely:

Hardware implementation

At present, the acceleration used in consumer products is mainly digital output ( I2C/SPI ), which can communicate with the MCU very simply and realize the measurement function. ST offers products in accordance with precision into LIS2DH12TR (12bit), LIS2HH12TR (16bit ), car rules acceleration AIS328DQTR (12bit).

The relationship between the accuracy of the tilt angle and the resolution of the acceleration value:

The 8bit ADC can be 3.4. Above accuracy

The 10bit ADC can be 0.8. Above accuracy

The 12bit ADC can be 0.2. Above accuracy

The 14bit ADC can get 0.05. Above accuracy

The 16bit ADC can be 0.0124. Above accuracy

Tempered Glass Screen Protector

The JJT Tempered Glass Screen Protective Film is protected by specially treated glass, and the Tempered Glass Screen Protector brings excellent scratch resistance to the screen. The Tempered Glass Protective Film is made of shockproof technology, which has the characteristics of anti-scratch, anti-fingerprint and anti-oil, which can greatly reduce the damage to the screen due to strong collision. The adhesive force of the silicon adhesive ensures that there is nothing between the screen protector and the screen, thereby improving touch sensitivity. Ultra-transparent glass can ensure a better clear image quality than ordinary Screen Protectors.

The surface hardness of the Tempered Glass Screen Protection Film is 9H, which is 4 times that of ordinary PET Film. Sharp objects (such as knives and keys) will not scratch the surface.

The Screen Protector has an "oleophobic and waterproof" coating to prevent fingerprints and other contaminants, making the screen protector easy to clean.

It has unparalleled touch and high responsiveness to touch, 99.9% transparency, transparent without bubbles.

Tempered Screen Protector, Tempered Glass Screen Protector, Tempered Glass Protective Film, Tempered Glass Film, Tempered Glass Screen Protective Film

Shenzhen Jianjiantong Technology Co., Ltd. , https://www.jjthydrogelmachine.com