首页 > 编程知识 正文

加速度传感器传感器,加速度传感器组成

时间:2023-05-03 09:18:42 阅读:252573 作者:3967

收藏的解析很好的文章 MPU6050原理详解及实例应用:https://blog.csdn.net/guosir_/article/details/78325208 数据手册 ADI ADXL345:https://www.analog.com/cn/products/adxl345.htmlMPU-60X0datasheet中文版和英文版V4.0: https://download.csdn.net/download/acktomas/11096370 加速度传感器灵敏度表示的几种方式LSB/g,count/g,V/g,V/°

给出几种方式之间的说明及转换公式:
1)、LSB的意思是最小有效位,为数字输出方式,一般我们可以用mg/LSB来表示灵敏度,举个例子来说,ADI的加速度传感器ADXL345量程为+/2g,输出的位数为10位(2的10次方共1024个LSB)对应满量程,那么灵敏度就为4g/1024LSB=3.9mv/g,取倒数为256LSB/g。
2)、count为计数单位,为数字输出方式,比如说我们的SCA820-D04,量程为+/-2g,灵敏度为900count/g,速度为0g是输出为0count,也就是说1g的时候对应输出应该为900count,-1g的时候输出为-900count。
3)、V/g为模拟电压输出的灵敏度表示方式。
4)、简单的介绍下V/g和V/°的换算公式,以SCA100T-D01为例,其灵敏度为4V/g换算成mV/°等于4sin1°=69.8mV/°,规格书上写的是70mV/°。此外SCA100T-D01传感器从零点转动15度,电压的变化=4sin15°=1.035V,对应15度输出电压=2.5+1.035=3.503V,对应-15度输出电压=2.5-1.035=1.465V。注意,转动15度的电压变化不能算成70mV/°*15,这样计算式错误的

知识 【翻译】加速度计和陀螺仪指南:https://blog.csdn.net/acktomas/article/details/88073345加速计/陀螺仪/磁力计是什么,3轴/6轴/9轴传感器又是什么?:https://blog.csdn.net/LEON1741/article/details/80831169ADXL345传感器详解
原文链接:https://blog.csdn.net/book_drabit/article/details/83963416 # How to Use a Three-Axis Accelerometer for Tilt Sensing

原文:https://wiki.dfrobot.com/How_to_Use_a_Three-Axis_Accelerometer_for_Tilt_Sensing

Introduction

How to describe the tilt using data from an accelerometer? We have many products about Accelerometer like ADXL345, BMA220, 10-Axis Accelerometer etc., they could offer the raw data, but how to deal with it?

This page will talk about some basic notes for these sensors and two methods, which are Yaw-Pitch-Roll and Tilt Angle respectively, for tilt calculation.
【翻译】
如何使用来自加速度计的数据描述倾斜? 我们有许多有关加速度计的产品,例如ADXL345,BMA220、10轴加速度计等,它们可以提供原始数据,但是如何处理呢?

本页将讨论这些传感器的一些基本注意事项以及两种用于倾斜计算的方法,分别是偏航-俯仰-滚动和倾斜角度。

Basic knowledge Accelerometer sensors measure the difference between any linear acceleration in the accelerometer’s reference frame and the earth’s gravitational field vector.

1.加速度计传感器测量加速度计参考系中的任何线性加速度与地球重力场矢量之间的差。

In the absence of linear acceleration, the accelerometer output is a measurement of the rotated gravitational field vector and can be used to determine the accelerometer pitch and roll orientation angles.

2.在没有线性加速度的情况下,加速度计的输出是对旋转的重力场矢量的测量,可用于确定加速度计的俯仰角和侧倾角。

The orientation angles are dependent on the order in which the rotations are applied. The most common order is the aerospace sequence of yaw then pitch and finally a roll rotation.

3.定向角度取决于旋转的顺序。最常见的顺序是航空航天的偏航,俯仰,最后是横滚旋转的顺序。

Accelerometer sensors are insensitive to rotation about the earth’s gravitational field vector. The equations for the roll and pitch angles therefore have mathematical instabilities when rotation axes happen to become aligned with gravity and point upwards or downwards. A workaround is  presented to prevent this instability occurring.

4.加速度计传感器对绕地球重力场矢量的旋转不敏感。因此,当旋转轴碰巧与重力对齐并指向上或下时,侧倾角和俯仰角的方程式就具有数学上的不稳定性。提出了一种解决方法,以防止这种不稳定性的发生。

Simple vector algebra expressions are derived for computing the tilt of the accelerometer from vertical or the rotation angle between any two accelerometer readings.

5.推导简单的矢量代数表达式,以计算加速度计从垂直方向或任意两个加速度计读数之间的旋转角度的倾斜度。

The most common application of accelerometers in consumer electronics is switching between portrait or landscape display modes. An algorithm is presented for controlling a tablet PC’s display orientation.

6.加速度计在消费类电子产品中最常见的应用是在纵向或横向显示模式之间切换。提出了一种用于控制Tablet PC的显示方向的算法。

Yaw-Pitch-Roll
Let’s take a look at what’s the Yaw-Pitch-Roll(ψ-θ-φ).

Description of roll-pitch-yaw

There are totally six suquences for any physical rotation:

任何物理旋转总共有六种顺次:

R-xyz
R-yxz
R-zxy
R-zyx
R-xzy
R-yzx
Different rotation suquence may result in the same posture, or saying that the same posture have different pitch and roll, that is why we have to define a default sequence: Yaw-Pitch-Roll(ψ-θ-φ).

不同的旋转序列可能导致相同的姿势,或者说相同的姿势具有不同的俯仰和横滚,这就是为什么我们必须定义默认序列:Yaw-Pitch-Roll(ψ-θ-φ)的原因。

Description of Yaw-Pitch-Roll

X - Roll - φ

Y - Pitch - θ


Z - Yaw - ψ

And the estimation of R-xyz is (From Freescale):

R-xyz的估计为(来自飞思卡尔):


Yaw-Pitch-Roll estimationSe.png

Tilt Angle
We have already studied the Yaw-Pitch-Roll angle, they could tell how to rotate an object by its X - Y axis to a specified posture. Actually, there is another method to expree the exact spatial position, that is Tilt angle showing in the picture below. How to understand the relationship between them? You may came to think the Cartesian coordinates and Polar coordinates, that’s it.

我们已经研究了Yaw-Pitch-Roll角,他们可以告诉如何将对象的X-Y轴旋转到指定的姿势。 实际上,还有另一种方法可以计算出确切的空间位置,即下图所示的倾斜角度。 如何理解它们之间的关系? 您可能会想到笛卡尔坐标和极坐标,仅此而已。


Tilt angle.png
And the estimation of the angles is (From Bosch Sensortec):角度估计为(来自Bosch Sensortec):

acc_x = 1g * sinθ * cosφ acc_y = - 1g * sinθ * sinφ acc_z = 1g * cosθ → acc_y/acc_x = - tanφ

Once we have the correct acceleration components, we can proceed to calculate the different angles using the following equations:

一旦有了正确的加速度分量,就可以使用以下方程式计算不同的角度:

p i t c h = arctan ⁡ ( G y G x 2 + G z 2 ) r o l l = arctan ⁡ ( − G x G z ) pitch = arctan{left(dfrac{G_y}{sqrt{G_{x}^2 + G_{z}^2}}right)} \[6pt] roll =arctan{left( dfrac{-G_x}{ G_{z}}right)} pitch=arctan(Gx2​+Gz2​ ​Gy​​)roll=arctan(Gz​−Gx​​)

Sample Sketch

This is a part of Roll-Pitch calculation sketch for DFRobot ADXL345. You could add this sub-function to your 3-axis Accelerometer sketch.

int x, y, z; //three axis acceleration datadouble roll = 0.00, pitch = 0.00;//Roll & Pitch are the angles which rotate by the axis X and y void RP_calculate(){ double x_Buff = float(x); double y_Buff = float(y); double z_Buff = float(z); roll = atan2(y_Buff , z_Buff) * 57.3; pitch = atan2((- x_Buff) , sqrt(y_Buff * y_Buff + z_Buff * z_Buff)) * 57.3;}

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。