Robofun 機器人論壇

 找回密碼
 申請會員
搜索
熱搜: 活動 交友 discuz
查看: 3736|回復: 2
打印 上一主題 下一主題

mpu6050 靈敏度調整

[複製鏈接]
跳轉到指定樓層
1#
發表於 2014-7-12 01:39:12 | 只看該作者 回帖獎勵 |倒序瀏覽 |閱讀模式
各位 大家好
想請問大家一下 關於mpu6050的問題在這款mpu6050的加速度計部分  有 ±2g, ±4g, ±8g, and ±16g 四種範圍可以選擇
原本以為這四種靈敏度 如果不動放在桌上(如果是z軸朝桌面)則會呈現 1g
但經過我更改靈敏度範圍  則分別是 1g, 2g, 4g, and 8g
想請問這個狀況是正確的嗎?
根據我查到的資料更改方式是 arduino 比如輸出x軸加速度是ax
依datasheet 除以lab (ax/16384.0) 這樣的方式去更改靈敏度
有神人可以幫我解答嗎?  感謝
2#
發表於 2014-7-12 03:34:21 | 只看該作者
回復 1# x10532x
不動放在桌上(如果是z軸朝桌面)則會呈現 1g
設定±2g, ±4g, ±8g, and ±16g 四種範圍 只是輸出值不同(依各人喜好) 都是最多1g(Full Scale Range)
比如輸出x軸加速度是ax 除以lab
設定為±2g -----> ax/16384.0
設定為±4g -----> ax/8192.0
設定為±8g -----> ax/4096.0
設定為±16g -----> ax/2048.0
---------------------------------------------------------------------
#define MPU6050_ACCEL_FULL_SCALE   0
Configure the full scale range of accelerometer outputs.

Select the full scale range of accelerometer outputs according to the following table.

AFS_SEL
Full Scale Range
0
+-2 g
1
+-4 g
2
+-8 g
3
+-16 g
returned result is a 16bit signed integer, so if you want to get the gravity (g). the result need to be divided by 65536/full scale range.
for example:

MPU6050_ACCEL_FULL_SCALE set to 2 (+-8 g)
65536/16.0 = 4096.0
the read Accel_X result is 3863
which means the angle velocity is 3863/4096.0 ≒ 0.943 g
3#
 樓主| 發表於 2014-7-13 02:16:04 | 只看該作者
回復 2# vegewell


   感謝你!!!!
您需要登錄後才可以回帖 登錄 | 申請會員

本版積分規則

小黑屋|手機版|Archiver|機器人論壇 from 2005.07

GMT+8, 2024-9-30 17:32 , Processed in 0.212555 second(s), 7 queries , Apc On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回復 返回頂部 返回列表