Editing Team3 imu

Jump to navigation Jump to search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
= '''WT901B | AHRS IMU Sensor''' =
+
test
 
 
With the WT901B IMU sensor device one can detect acceleration, angle, angular velocity, magnetic filed and air pressure. The both robust and small product is perfectly suitable for smartwatches.
 
 
 
 
 
== Product Features ==
 
=== Built-in sensors ===
 
[[File:Accelerometer.png|50px|Accelerometer]]
 
Accelerometer: Acceleration X Y Z, 3-axis
 
 
 
 
 
[[File:Gyroscope.png|50px|Gyroscope]]
 
Gyroscope: Angular Velocity X Y Z, 3-axis
 
 
 
 
 
[[File:Magnetometer.png|50px|Magnetometer]]
 
Magnetometer: Magnetic Field X Y Z, 3-axis
 
 
 
 
 
[[File:Barometer.png|50px|Barometer]]
 
Barometer: Air Pressure 1-Axis
 
 
 
 
 
=== Board Dimensions ===
 
[[File:BoardSize.png|100px|WT901B Size]]
 
Size: 15mm x 15mm x 2mm, Weight: 1g
 
 
 
Tolerance Size & Weight: +/- 0.1
 
 
 
=== Board Pin Definition ===
 
[[File:BoardPinDefinition.png|300px|WT901B Pin Definition]]
 
* VCC: 3.3-5V input supply
 
* RX: Serial data input, TTL interface
 
* TX: Serial data output, TTL interface
 
* GND: Ground
 
* DO: Analog input, digital input and output, PWM
 
* D1: Analog input, digital input and output, PWM, connect GPS
 
* D2: Analog input, digital input and output, PWM
 
* D3: Analog input, digital input and output, PWM
 
* SDA: I2C signal line
 
* SCL: I2C clock line
 
 
 
 
 
 
 
== How to get it to work ==
 
=== Connecting to an ESP32 ===
 
We need to connect the four pins VCC, RX, TX and GND of the WT901B to the corresponding pins of the ESP32. Therefore, we need to connect WT901B …
 
* ...VCC to the power supply (3-5V works) of our microcontroller’s 3.3V pin
 
* ...GND to one of the GND pins on our microcontroller
 
* ...TX to one of the corresponding pins on our microcontroller
 
* ...RX to one of the corresponding pins on our microcontroller
 
 
 
'''[https://joy-it.net/files/files/Produkte/SBC-NodeMCU-ESP32/SBC-NodeMCU-ESP32-Anleitung-2021-06-29.pdf Pin-Out Joy-it NodeMCU-ESP32 ]'''
 
 
 
=== Required Library ===
 
* Download and save JY901.h:
 
** Go to: '''[https://drive.google.com/drive/folders/1F2oTeQccvxNKxq6nW6isxhYecPMagr8M]'''
 
** Download Sample Code zip folder
 
** Unzip the folder and navigate to Arduino > Arduino > JY901SerialMega2560
 
** Add folder with files to the library folder of your project
 
* import library in your main file: #include <JY901.h>
 
 
 
=== Code Example ===
 
<syntaxhighlight lang="python" line='line'>
 
 
 
#include <Arduino.h>
 
#include <Wire.h>
 
#include <JY901.h>
 
 
 
void setup() {
 
  Serial.begin(115200);
 
  JY901.StartIIC();
 
}
 
void loop() {
 
 
 
  //print received data. Data was received in serialEvent;     
 
  JY901.GetAcc();
 
  Serial.print((float)JY901.stcAcc.a[0]/32768*16);
 
 
 
  JY901.GetGyro(); 
 
  Serial.print((float)JY901.stcGyro.w[0]/32768*2000);
 
 
 
  JY901.GetAngle();
 
  Serial.print((float)JY901.stcAngle.Angle[0]/32768*180);
 
 
 
  JY901.GetMag();
 
  Serial.print(JY901.stcMag.h[0]);
 
}
 
</syntaxhighlight>
 
 
 
For more Code Examples, use the drive folder provided by WITMOTION: '''[https://drive.google.com/drive/folders/1F2oTeQccvxNKxq6nW6isxhYecPMagr8M]'''
 
 
 
 
 
== Instructional Video ==
 
Please insert video from uni2work
 
 
 
== Additional links ==
 
==== Official GitHub Page Witmotion ====
 
https://github.com/WITMOTION/
 
==== Official GitHub Page Witmotion WT901B Sensor ====
 
https://github.com/WITMOTION/WT901B
 
==== Datasheet ====
 
https://raw.githubusercontent.com/WITMOTION/WT901B/master/WT901B%20Datasheet.pdf
 
==== Manual ====
 
https://raw.githubusercontent.com/WITMOTION/WT901B/master/WT901B%20Manual.pdf
 
==== Official Google Drive Folder ====
 
https://drive.google.com/drive/folders/1F2oTeQccvxNKxq6nW6isxhYecPMagr8M
 
==== Sources of the Pictures ====
 
All the pictures where taken from the official WT901B Datasheet by WITMOTION.
 

Please note that all contributions to Sketching with Hardware at LMU Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see My wiki:Copyrights for details). Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)