Cov txheej txheem:

IOT123 - D1M BLOCK - GY521 Los Ua Ke: 8 Kauj Ruam
IOT123 - D1M BLOCK - GY521 Los Ua Ke: 8 Kauj Ruam

Video: IOT123 - D1M BLOCK - GY521 Los Ua Ke: 8 Kauj Ruam

Video: IOT123 - D1M BLOCK - GY521 Los Ua Ke: 8 Kauj Ruam
Video: D1M BLOCKS - Using the ADS1115 to add 4 analog sensors. 2024, Hlis ntuj nqeg
Anonim
IOT123 - D1M BLOCK - GY521 Los Ua Ke
IOT123 - D1M BLOCK - GY521 Los Ua Ke
IOT123 - D1M BLOCK - GY521 Los Ua Ke
IOT123 - D1M BLOCK - GY521 Los Ua Ke
IOT123 - D1M BLOCK - GY521 Los Ua Ke
IOT123 - D1M BLOCK - GY521 Los Ua Ke

D1M BLOCKS ntxiv cov teeb meem uas tsis yooj yim, cov ntawv lo, cov lus qhia tsis sib xws thiab kev tawg rau qhov nrov Wemos D1 Mini SOC/Shields/Clones. Qhov D1M BLOCK no muab kev sib txuas yooj yim ntawm Wemos D1 Mini thiab GY-521 tus qauv (Qhov Chaw Nyob thiab cuam tshuam pins tuaj yeem txuas rau koj tus kheej xav tau).

Kuv qhov kev txhawb siab thawj zaug rau kev txhim kho D1M BLOCK yog rau kev lees paub ywj pheej ntawm lub hnub ci tswj qhov ntsuas.

Qhov Gysoscope/Accelerometer (GY-521 module) tau tshaj tawm raws li muaj cov ntawv thov no:

  1. Kev ntsuas kev ua kis las ncaws pob
  2. Augmented kev muaj tiag
  3. Electron Duab (EIS: Electronic Image Stabilization)
  4. Duab kho qhov muag (OIS: Optical Image Stabilization)
  5. Cov neeg taug kev taug kev
  6. Xoom kov piav tes piav taw neeg siv interface
  7. Posture shortcut 8. Ntse xov tooj ntawm tes
  8. Cov ntsiav tshuaj
  9. Cov khoom siv game game
  10. 3D chaw taws teeb tswj
  11. Portable navigation khoom

Cov Lus Qhia no los ntawm kev sib dhos ntawm lub block thiab tom qab ntawd ntsuas Pitch, Roll thiab Yaw ntsuas siv D1M WIFI BLOCK.

Kauj Ruam 1: Cov Ntaub Ntawv thiab Cov Cuab Yeej

Cov Ntaub Ntawv thiab Cov Cuab Yeej
Cov Ntaub Ntawv thiab Cov Cuab Yeej
Cov Ntaub Ntawv thiab Cov Cuab Yeej
Cov Ntaub Ntawv thiab Cov Cuab Yeej
Cov Ntaub Ntawv thiab Cov Cuab Yeej
Cov Ntaub Ntawv thiab Cov Cuab Yeej

Tam sim no muaj tag Nrho Cov Nqi Ntawm Cov Khoom Siv thiab Cov Npe.

  1. Wemos D1 Mini Protoboard daim ntaub thaiv thiab tus pin poj niam ntev taub hau
  2. 3D luam qhov.
  3. Txheej D1M BLOCK - Nruab Jigs
  4. GY-521 tus qauv
  5. Hookup hlau.
  6. Muaj zog Cyanoachrylate Adhesive (nyiam dua txhuam rau)
  7. Cov kua nplaum kub thiab cov kua nplaum kub kub
  8. Solder thiab Iron

Kauj Ruam 2: Siv Lub Taub Hau Taub Hau (siv tus lej PIN JIG)

Image
Image
Soldering Header Pins (siv tus lej PIN JIG)
Soldering Header Pins (siv tus lej PIN JIG)
Soldering Header Pins (siv tus lej PIN JIG)
Soldering Header Pins (siv tus lej PIN JIG)
Soldering Header Pins (siv tus lej PIN JIG)
Soldering Header Pins (siv tus lej PIN JIG)

Muaj cov vis dis aus saum toj no uas sau los ntawm txheej txheem txheej txheem rau tus lej PIN JIG.

  1. Pub cov kab taub hau hla hauv qab ntawm lub rooj tsavxwm (TX sab xis-sab laug) thiab rau hauv cov laug cam.
  2. Nias tus pin nqes mus rau qhov tiaj tiaj.
  3. Nias lub rooj tsavxwm nqes mus rau lub jig.
  4. Ua tus kav 4 lub ces kaum pins.
  5. Reheat thiab rov ua haujlwm pawg thawj coj/tus pin yog xav tau (pawg thawj coj lossis tus pin tsis sib dhos lossis cov kav dej).
  6. Solder tus so ntawm tus pin

Kauj Ruam 3: Sib dhos Shield

Sib dhos cov ntaub thaiv npog
Sib dhos cov ntaub thaiv npog
Sib dhos cov ntaub thaiv npog
Sib dhos cov ntaub thaiv npog
Sib dhos cov ntaub thaiv npog
Sib dhos cov ntaub thaiv npog

Raws li GY-521 tus qauv yuav thaiv koj los ntawm kev xau los ntawm qhov nyob rau sab saum toj sab, cov tswv yim hauv qab no ua haujlwm: ntawm sab hauv qab, muab tshuaj txhuam hla dhau lub qhov, tom qab ntawd tshem tawm thiab thawb kawg ntawm xaim hla lub qhov thiab tshem tawm cua sov.

  1. Solder 8P header uas tuaj nrog cov qauv mus rau GY-521.
  2. Muab tus qauv tso rau ntawm daim ntaub thaiv thiab cov laug (kom ntseeg tau qhov sib npaug ntawm tus pin tshem tawm).
  3. Khoov 4 tus pin thiab txiav cov pins uas seem.
  4. Qhov chaw thiab cov laug 3V3 rau VCC (liab).
  5. Qhov chaw thiab cov laug GND rau GND (dub).
  6. Qhov chaw thiab cov laug D1 rau SCL (xiav).
  7. Qhov chaw thiab cov laug D2 rau SDA (ntsuab).

Yog tias koj yuav txuas qhov Chaw Nyob thiab cuam tshuam cov koob, tam sim no yog lub sijhawm los ua nws.

Kauj Ruam 4: Gluing Cheebtsam rau hauv paus

Image
Image
Gluing Cheebtsam rau Lub Hauv Paus
Gluing Cheebtsam rau Lub Hauv Paus
Gluing Cheebtsam rau Lub Hauv Paus
Gluing Cheebtsam rau Lub Hauv Paus
Gluing Cheebtsam rau Lub Hauv Paus
Gluing Cheebtsam rau Lub Hauv Paus

Tsis suav nrog hauv cov vis dis aus, tab sis pom zoo: muab lub dob loj ntawm cov kua nplaum kub tso rau hauv lub hauv paus khoob ua ntej tso lub rooj tsav xwm sai thiab ua kom sib haum - qhov no yuav tsim cov yuam sij rau ntawm ob sab ntawm lub rooj tsavxwm. Thov ua kom qhuav hauv qhov tso cov ntaub thaiv npog rau hauv qab. Yog tias cov gluing tsis raug, koj yuav tsum tau ua qee qhov teeb pom kev ntawm ntug ntawm PCB.

  1. Nrog lub hauv paus casing hauv qab qhov taw qhia taw qhia, tso cov khoom sib dhos ua ke yas lub taub hau hla lub qhov hauv qab; tus (TX tus pin yuav nyob ntawm sab nrog lub hauv paus zawj).
  2. Muab cov kua nplaum kub kub tso rau hauv qab lub hauv paus nrog cov yas yas tso los ntawm nws cov zawj.
  3. Zaum cov kua nplaum kub kub rau ntawm qhov chaw tiaj tiaj thiab ua tib zoo thawb lub PCB kom txog thaum cov yas taub hau tsoo saum npoo; qhov no yuav tsum muaj cov pins muab tso kom raug.
  4. Thaum siv cov kua nplaum kub ua kom nws nyob deb ntawm lub taub hau thiab tsawg kawg 2mm los ntawm qhov chaw uas lub hau yuav nyob.
  5. Siv cov kua nplaum rau txhua 4 lub ces kaum ntawm PCB kom ntseeg tau tias muaj kev sib cuag nrog cov phab ntsa hauv paus; pub nkag mus rau ob sab ntawm PCB yog tias ua tau.

Kauj Ruam 5: Kaw lub hau rau lub hauv paus

Image
Image
Gluing lub hau rau lub hauv paus
Gluing lub hau rau lub hauv paus
Gluing lub hau rau lub hauv paus
Gluing lub hau rau lub hauv paus
  1. Xyuas kom cov pins tsis muaj kua nplaum thiab sab saum toj 2mm ntawm lub hauv paus tsis muaj kua nplaum kub.
  2. Ua ntej haum lub hau (qhuav qhuav) ua kom ntseeg tau tias tsis muaj cov khoom cuav luam tawm.
  3. Ua tib zoo ceev faj thaum siv Cyanoachrylate nplaum.
  4. Thov Cyanoachrylate mus rau hauv qab cov ces kaum ntawm lub hau kom ntseeg tau tias muaj kev tiv thaiv ntawm ib sab toj ib sab.
  5. Ceev nrooj haum lub hau rau lub hauv paus; clamping kaw lub ces kaum yog ua tau (zam lub lens).
  6. Tom qab lub hau qhuav qhuav khoov txhua tus pin yog li nws yog qhov tseem ceeb hauv qhov khoob yog tias tsim nyog (saib video).

Kauj Ruam 6: Ntxiv Cov Ntawv Adhesive

Ntxiv cov ntawv nplaum
Ntxiv cov ntawv nplaum
Ntxiv cov ntawv nplaum
Ntxiv cov ntawv nplaum
Ntxiv cov ntawv nplaum
Ntxiv cov ntawv nplaum
Ntxiv cov ntawv nplaum
Ntxiv cov ntawv nplaum
  1. Thov pinout daim ntawv lo rau hauv qab ntawm lub hauv paus, nrog RST tus pin ntawm ib sab nrog zawj.
  2. Siv daim ntawv cim tus cim rau sab uas tsis yog qhov nqaim, nrog cov pins tsis muaj dab tsi yog sab saum toj ntawm daim ntawv lo.
  3. Nias cov ntawv sau kom ruaj khov, nrog cov cuab yeej tiaj tus yog xav tau.

Kauj Ruam 7: Xeem Nrog D1M WIFI BLOCK

Kev Xeem Nrog D1M WIFI BLOCK
Kev Xeem Nrog D1M WIFI BLOCK

Rau qhov kev xeem no koj yuav xav tau:

  1. D1M GY521 BLOCK
  2. D1M WIFI BLOCK

Kev npaj:

  1. Hauv Arduino IDE teeb tsa I2CDev thiab MPU6050 cov tsev qiv ntawv (zips txuas)
  2. Tshaj tawm qhov ntsuas kab kos mus rau theD1M WIFI BLOCK.
  3. Txuas lub USB ntawm lub PC.
  4. Txuas D1M GY521 BLOCK rau D1M WIFI BLOCK

Qhov kev xeem:

  1. Txuas lub USB rau lub PC.
  2. Qhib lub Arduino console window ntawm baud tau txheeb xyuas hauv daim duab.
  3. Tsiv cov BLOCKs ib puag ncig hauv qhov chaw thiab xyuas tias lub console qhov tseem ceeb cuam tshuam kev txav mus los.

Kev xeem kos duab uas teev lub hauv paus PITCH/ROLL/YAW rau KY-521 tus qauv

#suav nrog "I2Cdev.h"
#suav nrog "MPU6050_6Axis_MotionApps20.h"
#suav nrog "Wire.h"
MPU6050 mpu;
uint8_t mpuIntStatus;
uint16_t packetSize;
uint16_t fifoCount;
uint8_t fifoBuffer [64];
Quaternion q;
VectorFloat lub ntiajteb txawj nqus;
ntab ypr [3];
volatile bool mpuInterrupt = cuav;
void dmpDataReady () {mpuInterrupt = muaj tseeb;}
void teeb tsa () {
Hlau.begin ();
mpu.initialize ();
mpu.dmpInitialize ();
mpu.setDMPEnabled (muaj tseeb);
attachInterrupt (0, dmpDataReady, RISING);
mpuIntStatus = mpu.getIntStatus ();
packetSize = mpu.dmpGetFIFOPacketSize ();
Serial.begin (115200);
}
void voj () {
thaum (! mpuInterrupt && fifoCount <packetSize) {}
mpuInterrupt = cuav;
mpuIntStatus = mpu.getIntStatus ();
fifoCount = mpu.getFIFOCount ();
yog ((mpuIntStatus & 0x10) || fifoCount == 1024) {
mpu.resetFIFO ();
Serial.println (F ("FIFO txhoj puab heev!"));
}
lwm yog (mpuIntStatus & 0x02) {
thaum (fifoCount <packetSize) fifoCount = mpu.getFIFOCount ();
mpu.getFIFOBytes (fifoBuffer, pob ntawv loj);
fifoCount -= packetSize;
mpu.dmpGetQuaternion (& q, fifoBuffer);
mpu.dmpGetGravity (& lub ntiajteb txawj nqus, & q);
mpu.dmpGetYawPitchRoll (ypr, & q, & lub ntiajteb txawj nqus);
Serial.print ("ypr / t");
Serial.print (ypr [0]*180/M_PI);
Serial.print ("\ t");
Serial.print (ypr [1]*180/M_PI);
Serial.print ("\ t");
Serial.print (ypr [2]*180/M_PI);
Serial.println ();
}
}

saib rawd1m_MPU6050_pitch_roll_yaw.ini tuav nrog ❤ los ntawm GitHub

Kauj Ruam 8: Cov Kauj Ruam Tom ntej

  • Ua haujlwm rau koj D1M BLOCK nrog D1M BLOCKLY
  • Txheeb xyuas Thingiverse
  • Nug cov lus nug ntawm ESP8266 Lub Rooj Sib Tham Zej Zog

Pom zoo: