Cov txheej txheem:

MPU6050 Teeb thiab Kev Qhia Ua Ntej: 3 Kauj Ruam
MPU6050 Teeb thiab Kev Qhia Ua Ntej: 3 Kauj Ruam

Video: MPU6050 Teeb thiab Kev Qhia Ua Ntej: 3 Kauj Ruam

Video: MPU6050 Teeb thiab Kev Qhia Ua Ntej: 3 Kauj Ruam
Video: Reading four MPU6050 accelerometers on a Teensy 3 2024, Kaum ib hlis
Anonim
MPU6050 Teeb thiab Phau Ntawv Qhia Kev Ntsuas
MPU6050 Teeb thiab Phau Ntawv Qhia Kev Ntsuas

MPU6050 yog 6 DoF (Qib ntawm kev ywj pheej) IMU uas sawv rau chav ntsuas inertial, lub ntsuas zoo tiag tiag kom paub Angular acceleration los ntawm 3 Axis Gyroscope thiab Kev Tawm Tsam dhau los ntawm Linear Accelerometers.

Nws tuaj yeem nyuaj rau lub sijhawm kom pib thiab teeb tsa, tshawb cov tsev qiv ntawv thiab cov haujlwm thoob plaws hauv is taws nem, tab sis tsis txhob txhawj tam sim no, cov lus qhia no thiab cov vis dis aus qhia txuas hauv qab no yuav ua rau koj pib tsis muaj sijhawm.

Kauj Ruam 1: Cov Ntaub Ntawv Yuav Tsum Tau

Cov Ntaub Ntawv Yuav Tsum Tau
Cov Ntaub Ntawv Yuav Tsum Tau
Cov Ntaub Ntawv Yuav Tsum Tau
Cov Ntaub Ntawv Yuav Tsum Tau
Cov Ntaub Ntawv Yuav Tsum Tau
Cov Ntaub Ntawv Yuav Tsum Tau
Cov Ntaub Ntawv Yuav Tsum Tau
Cov Ntaub Ntawv Yuav Tsum Tau

1.) MPU6050 lossis GY521 IMU

2.) Arduino (Kuv siv Nano)

3.) Khoos phis tawj nrog Arduino IDE teeb tsa hauv

4.) USB Cable rau Arduino

5.) 4 F rau F Jumper Cables txuas Arduino rau MPU6050

Txhua lub Cheebtsam, thawj thiab zoo tshaj tuaj yeem nrhiav tau ntawm www. UTsource.net

Kauj Ruam 2: MPU6050 Lub Tsev Qiv Ntawv

MPU6050 Lub Tsev Qiv Ntawv
MPU6050 Lub Tsev Qiv Ntawv

Yog tias koj muaj teeb meem ua raws cov kauj ruam no, Kuv pom zoo kom saib cov vis dis aus txuas nrog hauv cov lus qhia.

Lub tsev qiv ntawv yog cov cuab yeej yooj yim uas ua rau nws yooj yim rau cov pib siv cov khoom sib xws xws li MPU6050 hauv qhov yooj yim tiag tiag, nws yog txheej uas twb tau saib xyuas ntau ntau yam nyuaj kom peb tuaj yeem tsom mus rau ntau qhov kev siv lub tswv yim xwb ntawm teeb tsa txhua yam.

Qhib Arduino IDE

Mus rau Cov Cuab Yeej thiab nyem rau ntawm Tswj Cov Tsev Qiv Ntawv

Lub qhov rai tshiab yuav qhib uas yuav muaj kab tshawb nrhiav, nyob rau hauv no hom MPU6050, koj yuav tau txais tos nrog ntau dua ib qho txiaj ntsig, tab sis teeb tsa ib qho uas yog bt Electronic Cats.

Koj ua tiav, tam sim no cia ntsuas!

Kauj ruam 3: Calibration

Calibration
Calibration
Calibration
Calibration
Calibration
Calibration

Txhua lub ntsuas hluav taws xob sib txawv thiab txawv, yog li peb yuav tsum nrhiav qhov tshwj xeeb Offset Tus nqi rau lub sensor peb muaj.

Qhib Cov Ntaub Ntawv thiab mus rau Piv Txwv hauv Arduino IDE.

Nyob ntawd, koj yuav pom lub tsev qiv ntawv tshiab uas hais tias MPU6050 uas muaj qhov program hu ua - IMU_Zero qhib nws.

Rub nws mus rau arduino thiab xyuas kom qhov kev sib txuas los ntawm Arduino rau Sensor tau ua tiav raws li hauv qab no -

TSO - A5

SDA - A4

Tswv yim - 5V

GND - NCO

Tom qab ua tiav qhov kev tso tawm, qhib Cov Cuab Yeej Thiab Tom Qab Saib Xyuas, tab sis nco ntsoov khaws lub ntsuas kab rov tav thiab tseem tseem muaj peev xwm ua tau thaum lub sijhawm txheej txheem no.

Ib txoj kab "----- ua tiav -----" yuav qhia tias nws tau ua tiav qhov zoo tshaj plaws. Ntawm tam sim no cuam tshuam txog qhov cuam tshuam (NFast = 1000, NSlow = 10000), nws yuav siv ob peb feeb los txog ntawd.

Nrog txoj kev, nws yuav tsim kaum ob lossis ntau kab ntawm cov zis, qhia tias rau txhua ntawm 6 qhov xav tau offsets, nws yog * thawj zaug, sim nrhiav ob qhov kwv yees, ib qho qis dhau thiab ib qho siab dhau, thiab * tom qab ntawd, kaw hauv kom txog thaum lub bracket tsis tuaj yeem ua kom me dua.

Kab kab saum toj kab "ua" yuav zoo ib yam li [567, 567] [-1, 2] [-2223, -2223] [0, 1] [1131, 1132] [16374, 16404] [155, 156] [-1, 1] [-25, -24] [0, 3] [5, 6] [0, 4] Raws li yuav tau pom nyob rau hauv kab lus sib luag ntawm kab lus, 6 pawg ua kab ntawv no piav qhia qhov zoo tshaj tawm rau X nrawm, Y nrawm, Z nrawm, X gyro, Y gyro, thiab Z gyro, feem. Hauv qhov piv txwv uas tau hais los saum toj no, kev sim tau pom tias +567 yog qhov zoo tshaj rau X nrawm, -2223 yog qhov zoo tshaj rau Y nrawm, thiab ntxiv rau. Nco tseg txhua qhov offset los siv hauv cov haujlwm uas koj ua!

Qhov ntawd yog nws! yooj yim thiab ncaj!

Ua tsaug rau kev nyeem ntawv!

Pom zoo: