User Tools

Site Tools


supp:sensors:mpu-6050

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
supp:sensors:mpu-6050 [2024/04/23 12:07] rolfsupp:sensors:mpu-6050 [2025/05/07 08:34] (current) – [5. Interfacing with Microcontrollers] tasio
Line 1: Line 1:
 ~~NOTOC~~ ~~NOTOC~~
  
-===== Accelerometer  MPU-6050 by Invensense / TDK =====+====== Accelerometer and Gyroscope: MPU-6050 by InvenSense/TDK ======
  
-This MEMS device combines a 3-axis accelerometer and a 3-axis gyroscope.+{{ :supp:sensors:mpu6050.png?direct&400 |}}
  
-On the [[https://invensense.tdk.com/products/motion-tracking/6-axis/mpu-6050/|official MPU-6050 website]] you find a link to the documentation including datasheet. +Figure 1by ElectroniCats, git hub
  
-  * {{https://invensense.tdk.com/wp-content/uploads/2015/02/MPU-6000-Datasheet1.pdf|MPU-6000/MPU-6050 Datasheet}} (pdf)+===== 1Introduction=====
  
-Some information is also provided in the [[https://playground.arduino.cc/Main/MPU-6050/|Arduino Playground]]+The **MPU-6050** is a **6-axis** MEMS (Micro-Electro-Mechanical Systems) sensor that integrates a **3-axis accelerometer** and a **3-axis gyroscope** into a single compact package. This combination allows for comprehensive motion tracking and orientation detection, making it a popular choice in various applications, from robotics to wearable devices.
  
-The GY521 Module is a breakout board for the MPU-6050. It is also part of the Elegoo kit we are using in class.+===== 2Internal Working Principles =====
  
 +{{ :supp:sensors:mpu6050_diagram.png?direct&600 |}}
  
 +Figure 2: The MPU6050 Explained, available in: https://mjwhite8119.github.io/Robots/mpu6050
  
-==== Tutorial by DroneBot Workshop ====+The **MPU-6050** operates based on the principles of MEMS technology, utilizing microscopic mechanical structures to sense motion.
  
 +**Accelerometer:**
 +  * **Capacitive Sensing:** Detects linear acceleration by measuring changes in capacitance caused by the displacement of a micro-machined proof mass within the sensor.
 +  * **Axes Measurement:** Provides acceleration data along the X, Y, and Z axes, enabling detection of movement and orientation changes.
  
 +**Gyroscope:**
 +  * **Coriolis Effect:** Measures angular velocity by detecting the Coriolis force acting on vibrating elements within the sensor as it rotates.
 +  * **Axes Measurement:** Captures rotational movement around the X, Y, and Z axes, essential for understanding orientation and rotational dynamics.
  
-The tutorial by **Bill Jamshedji** of [[https://dronebotworkshop.com/|DroneBot Workshop]] is an excellent point to start withBill is explaining **[[https://dronebotworkshop.com/mpu-6050-level/|how to build an electronic levelmeter]]** based on the MPU-6050+**Digital Motion Processor (DMP):** 
 +  * **Sensor Fusion:** Integrates data from the accelerometer and gyroscope to provide more accurate motion tracking. 
 +  * **Offloading Computation:** Processes complex calculations internally, reducing the computational load on the host microcontroller.
  
 +===== 3. Output Data =====
  
-^  **Bill Jamshedji, DroneBot Workshop**  ^^ +The **MPU-6050** communicates via the **I2C** protocol, providing:
-| **1. Tutorial \\ Website** | **:!:  [[https://dronebotworkshop.com/mpu-6050-level/]]** +
-**2. Video \\ Tutorial** | {{youtube>XCyRXMvVSCw?medium}} |+
  
-==== Tutorial by Michael Schoeffler ====+1. **Accelerometer Data:** Raw acceleration values for X, Y, and Z axes.
  
-https://mschoeffler.com/2017/10/05/tutorial-how-to-use-the-gy-521-module-mpu-6050-breakout-board-with-the-arduino-uno/+2. **Gyroscope Data:** Raw angular velocity values for X, Y, and Z axes.
  
-==== Exercises ====+3. **Temperature Data:** Internal temperature readings, useful for calibration and compensation.
  
-=== 1Build ===+The sensor's output is typically in raw digital values, which require scaling and conversion to physical units (e.g., g for acceleration, °/s for angular velocity).
  
-Follow the tutorial and build the device+===== 4Applications =====
  
-Remarks+The versatility of the **MPU-6050** makes it suitable for a wide range of applications:
  
-  - The I2C bus is a serial bus for inter-IC communication (ICintegrated circuit)There are other busses such as SPI and 1Wire.  +  * **Robotics:** Enables balance control, navigation, and motion tracking. 
-  - The LED character display pins (several) are connected to an interface hardware which provides an I2C bus interfaceYou find such an interface in the cardbox I sent to youIt is a black PCB (printed circuit boardwith 16 pins on one long side and 4 pins on a short side named GND, VCC, SDA, SCL. Use the second breadboard to connect display and I2C display interface.+  * **Drones and UAVs:** Assists in flight stabilization and orientation control
 +  * **Wearable Devices:** Facilitates activity monitoring and gesture recognition. 
 +  * **Gaming Controllers:** Enhances user interaction through motion sensing. 
 +  * **Virtual Reality (VR):** Provides head tracking for immersive experiences.
  
 +===== 5. Interfacing with Microcontrollers =====
  
-=== 2Exercises on Git ===+The **MPU-6050** can be interfaced with microcontrollers like the **ESP32-S3** using the I2C protocolHere's a brief overview:
  
-I will push the second exercise sheet on GitWe have a problem with an expired certificateTherefore I will push the repo elsewhere and let you know.+**Wiring:** 
 +  * **VCC:** Connect to 3.3V (ensure voltage compatibility). 
 +  * **GND:** Connect to ground. 
 +  * **SDA:** Connect to the microcontroller's I2C data line. 
 +  * **SCL:** Connect to the microcontroller's I2C clock line.
  
 +**Programming:**
 +  * Utilize libraries such as ``Wire.h`` for I2C communication and ``MPU6050.h`` for sensor interaction.
  
 +  * Initialize the sensor and configure settings like sensitivity and filter bandwidth.
  
 +  * Read and process data from the accelerometer and gyroscope registers.
  
 +**Note:** While the **ESP32-S3** operates at 3.3V logic levels, ensure that the **MPU-6050** module used is compatible with 3.3V to prevent damage.
  
 +===== 6. Examples =====
 +
 +*This section is reserved for practical examples and code snippets demonstrating the use of the **MPU-6050** with various microcontrollers and applications.*
 +
 +===== 7. Troubleshooting and Optimization =====
 +
 +To ensure accurate and reliable data from the **MPU-6050**, consider the following:
 +
 +**Calibration:**
 +  * Perform initial calibration to correct for sensor biases and offsets.
 +  * Utilize available libraries or write custom routines to determine and apply calibration values.
 +
 +**Filtering:**
 +  * Implement filters (e.g., complementary or Kalman filters) to reduce noise and improve data stability.
 +  * Adjust filter parameters based on the specific application's dynamics and requirements.
 +
 +**Power Supply:**
 +  * Ensure a stable and clean power supply to minimize voltage fluctuations that can affect sensor performance.
 +
 +**Physical Placement:**
 +  * Mount the sensor securely to prevent vibrations and mechanical noise.
 +  * Isolate the sensor from sources of electromagnetic interference.
 +
 +**Temperature Compensation:**
 +  * Account for temperature-induced variations by monitoring the internal temperature sensor and applying compensation algorithms if necessary.
 +
 +===== 8. Resources and Diagrams =====
 +
 +For detailed diagrams and further information, consider the following resources:
 +
 +- **Official Datasheet:** MPU-6050 Datashee     https://invensense.tdk.com/wp-content/uploads/2015/02/MPU-6000-Datasheet1.pdf
 +
 +- __**LastMinuteEngineers** Clear explanation and examples__     https://lastminuteengineers.com/mpu6050-accel-gyro-arduino-tutorial/
 +
 +- **Arduino Playground:** MPU-6050 on Arduino Playground     https://playground.arduino.cc/Main/MPU-6050/
 +
 +- **DroneBot Workshop Tutorial:** Building an Electronic Level Meter     https://dronebotworkshop.com/mpu-6050-level/
 +
 +- **Michael Schoeffler's Tutorial:** Using GY-521 Module with Arduino Uno     https://mschoeffler.com/2017/10/05/tutorial-how-to-use-the-gy-521-module-mpu-6050-breakout-board-with-the-arduino-uno/   {{youtube>XCyRXMvVSCw?medium}}
  
  
supp/sensors/mpu-6050.1713874067.txt.gz · Last modified: 2024/04/23 12:07 by rolf