重力加速度陀螺仪传感器MPU-6050(一)

分类: 无人机 |
为可输出的数字量。为了精确跟踪快速和慢速的运动,传感器的测量范围都是用户可控的,陀螺仪可测范围为±250,±500,±1000,±2000°/秒(dps),加速度计可测范围为±2,±4,±8,±16g。
http://s6/mw690/8240cbefgd407aa69f055&690
VDD 供电电压为2.5V±5%、3.0V±5%、3.3V±5%;VDDIO 为1.8V± 5%
内建振荡器在工作温度范围内仅有±1%频率变化。可选外部时钟输入32.768kHz 或19.2MHz
找出几个重要的寄存器:
1)Register 25 – Sample Rate
Divider
http://s16/mw690/8240cbefgd377e467005f&690
1)SMPLRT_DIV
2)Register 26 –
Configuration
http://s11/mw690/8240cbefgd377e9e940aa&690
http://s9/mw690/8240cbefgd37a15e5bee8&690
数字低通滤波器是由DLPF_CFG来配置,根据下表中DLPF_CFG的值对加速度传感器和陀螺仪滤波
http://s3/mw690/8240cbefgd37a28636582&690
3)Register 27 – Gyroscope
Configuration
http://s15/mw690/8240cbefgd377edfe255e&690
1)XG_ST
设置此位,X轴陀螺仪进行自我测试。
2)YG_ST
设置此位,Y轴陀螺仪进行自我测试。
3)ZG_ST
设置此位,Z轴陀螺仪进行自我测试。
4)FS_SEL
2位无符号值。选择陀螺仪的量程。
http://s2/mw690/8240cbefgd37aacb02531&690
4)Register 28 – Accelerometer
Configuration
http://s4/mw690/8240cbefgd377f4c889c3&690
1)XA_ST
2)YA_ST
3)ZA_ST
4)AFS_SEL
http://s13/mw690/8240cbefgd37ac00dd9fc&690
5)Registers 59 to 64 – Accelerometer Measurements (ACCEL_XOUT_H, ACCEL_XOUT_L, ACCEL_YOUT_H, ACCEL_YOUT_L, ACCEL_ZOUT_H, and ACCEL_ZOUT_L)
http://s13/mw690/8240cbefgd377f961c90c&690
1)ACCEL_XOUT
2)ACCEL_YOUT
3)ACCEL_ZOUT
http://s11/mw690/8240cbefgd37af099bfaa&690
6)Registers 65 and 66 – Temperature
Measurement
http://s5/mw690/8240cbefgd377ffb72494&690
1)TEMP_OUT
16位有符号值。
7)Registers 67 to 72 – Gyroscope
Measurements
http://s13/mw690/8240cbefgd378059956fc&690
这个和加速度感应器的寄存器相似
对应的灵敏度:
http://s9/mw690/8240cbefgd37b08b34c98&690
8)Register 107 – Power Management
1
http://s4/mw690/8240cbefgd3780a74af83&690
该寄存器允许用户配置电源模式和时钟源。它还提供了一个复位整个器件的位,和一个关闭温度传感器的位
1)DEVICE_RESET
2)SLEEP
3)CYCLE
4)TEMP_DIS
5)CLKSEL
时钟源的选择:
http://s3/mw690/8240cbefgd404d40cb3a2&690
9)Register 117 – Who Am
I
http://s10/mw690/8240cbefgd3780f20eed9&690
上电复位的第6位到第1位值为:110100
为了让两个MPU-6050能够连接在一个I2C总线上,当AD0引脚逻辑低电平时,设备的地址是
(2013.01.24)
http://s14/mw690/8240cbefgd403af9f676d&690
MPU-6000可以使用SPI和I2C接口,而MPU-6050只能使用I2C,其中I2C的地址由AD0引脚决定;寄存器共117个,挺多的,下面的是精简常用的,根据具体的要求,适当的添加。
#define
#define
#define
#define
#define
#define
#define
#define
#define
#define
#define
#define
#define
#define
#define
#define
#define
#define
#define
#define
编程时用到的关于I2C协议规范:
http://s11/mw690/8240cbefgd407e61ebe4a&690