Gyroscopes & Accelerometers Sensor fusion Using MPU-6050

Slides:



Advertisements
Similar presentations
Aaron Burg Azeem Meruani Michael Wickmann Robert Sandheinrich
Advertisements

CDL Inertial technology tutorial
What is Arduino?  Arduino is a ATMEL 168 micro-controller kit designed specially for small projects  User friendly IDE(Integrated Development Environment)
Outline quad-copter Abstract Quad-Copter Movement Hand movement
Using the MPU-6050 Inertia Measurement Systems
Ryan Roberts Gyroscopes.
Dr. Shanker Balasubramaniam
Initial Position Orientation Tracking System (IPOTS) Group Members: Keiichi McGuireHenry Pham Marc TakamoriScott Spiro.
Applications: Angular Rate Sensors CSE 495/595: Intro to Micro- and Nano- Embedded Systems Prof. Darrin Hanna.
Have a Safe Flight: Bon Voyage! Mariela Buchin, Wonron Cho, Scott Fisher.
Electrical and Computer Engineering Personal Heads-Up Display Ivan Bercovich Radu-Andrei Ivan Jeff Little Felipe Vilas-Boas Faculty: Dr. Tilman Wolf Preliminary.
Formal Report #2 – Special Sensor Matthew Thompson EEL5666.
IMU 1 MicroElectroMechanical Systems (MEMS) Inertial Measurement Unit (IMU) Attitude relative to gravity vector Magnetic heading Rotational velocity Translational.
Computer Vision Group Prof. Daniel Cremers Autonomous Navigation for Flying Robots Lecture 3.2: Sensors Jürgen Sturm Technische Universität München.
Slide # 1 Velocity sensor Specifications for electromagnetic velocity sensor Velocity sensors can utilize the same principles of displacement sensor, and.
Sérgio Ronaldo Barros dos Santos (ITA-Brazil)
Autonomous Helicopter James LydenEE 496Harris Okazaki.
INS: Inertial Navigation Systems An overview of 4 sensors.
Inertial Navigation System Overview – Mechanization Equation
Calibrated smart sensor module combining a 3 axis gyroscope, 3 axis accelerometer, 3 axis magnetometer, temperature sensor, pressure sensor, DMP, 16-bit.
Ship Computer Aided Design Displacement and Weight.
Current Works Corrected unit conversions in code Found an error in calculating offset (to zero sensors) – Fixed error, but still not accurately integrating.
Current Works Determined drift during constant velocity test caused by slight rotation which results in gravity affecting accelerometers Analyzed data.
Quadcopters A CEV Talk. Agenda Flight PreliminariesWhy Quadcopters The Quadcopter SystemStability: The NotionSensors and FusionControl AlgorithmsThe Way.
IN 1900 ICT Project Final Presentation. Group name : Code Squad.
6.111 Final Project A motion sensor baseball game By Chris Falling and JinHock Ong.
ECE 3450 M. A. Jupina, VU, 2016 Capacitance Sensor Project Goal: Creation of a digital capacitance sensor circuit where a variation in capacitance changes.
CONTENTS Objective Software &Hardware requirements Block diagram Mems technology Implementation Applications &Advantages Future scope Conclusion References.
Tiltmeter, Compass,Temperature modules for the PPM.
SP13 ECE 445: Senior Design Sign Language Teaching Glove Project #29: Reebbhaa Mehta, Daniel Fong, Mayapati Tiwari TA: Igor Fedorov.
 ACCELEROMETER  TRANSMITTER- BLOCK DIAGRAM  RECEIVER- BLOCK DIAGRAM  COMPONENTS DESCRIPTION- ENCODER TRANSMITTER RECEIVER OPTICAL SENSOR.
Magic Wand Battle Game Team 53 Shanoon Martin, Jialin Sun, Manfei Wu.
Final Report Idea and Overview 1 Scope 2 Hardware and software 3 Algorithm 4 Experiments & Results 5 Conclusion 6.
1 of 20 How to use the Compass A. Compass. 2 Compass: - Provides heading relative to Magnetic North, not true North HMC5883L V input - I2C (not.
CHAPTER 8 Sensors and Camera. Chapter objectives: Understand Motion Sensors, Environmental Sensors and Positional Sensors Learn how to acquire measurement.
The Equations of Motion Euler angle rate equations:
Arduino based Automatic Temperature Controlled Fan Speed Regulator.
Recall Our TWR-K60D100M Primary SW1 Connector SW2 SW3(Reset) Secondary
Obstacle avoiding robot { pixel }
Introduction to Smart Systems
Prototyping with Microcontrollers and Sensors
Temperature sensors Temperature is the most often-measured environmental quantity. This might be expected since most physical, electronic, chemical, mechanical,
ARDUINO BASED AUTOMATIC TEMPERATURE BASED FAN SPEED CONTROLLER
Environment Temperature Monitor
Automatic human detector garbage can.
DIGITAL CALCULATOR USING 8051
Arduino Uno and sensors
‘SONAR’ using Arduino & ultrasonic distance sensor
Personal Heads-Up Display
I2C PROTOCOL SPECIFICATION
Gyroscopes & Accelerometers Sensor fusion Using MPU-6050
Analog Input through POT
Arduino and Grove LET’S START.
Internet-of-Things (IoT)
MEMs Sensors Max Tesch.
MEMs Sensors Max Tesch.
Inertial Measurement Unit (IMU) Basics
Today’s Smart Sensors January 25, 2013 Randy Frank.
Welcome to Digital Electronics using the Arduino Board
Inertial Measurement Units
CSCI1600: Embedded and Real Time Software
In the land of the blind, the one eyed man is king
Image Acquisition and Processing of Remotely Sensed Data
Manual Robotics ..
Robotics System Lecture 4: Gyro Reading using Arduino
Chapter 10 Intelligent Sensor Systems Prof. Dehan Luo
gyroscope Prof Varsha Degaonkar Assistant Professor
UNIT 8 OTHER SENSORS.
Introduction to Arduino
CSCI1600: Embedded and Real Time Software
Presentation transcript:

Gyroscopes & Accelerometers Sensor fusion Using MPU-6050

Inertial Measurement Unit (IMUs) There are small devices indicating changing orientation in smart phones, video game remotes, quad-copters, etc. These devices contains gyroscopes combined with accelerometers and/or compasses and are referred to as an Inertial Measurement Unit (IMU) The number of sensor inputs in an IMU are referred to as “DOF” (Degrees of Freedom), so a chip with a 3-axis gyroscope and a 3-axis accelerometer would be a 6-DOF IMU.

MPU 6050 The MPU 6050 is a 6 DOF (Degrees of Freedom) or a six axis IMU sensor, which means that it gives six values as output. Three values from the accelerometer and three from the gyroscope. The MPU 6050 is a sensor based on MEMS (Micro Electro Mechanical Systems) technology. Both the accelerometer and the gyroscope is embedded inside a single chip. This chip uses I2C (Inter Integrated Circuit) protocol for communication.

MPU 6050 The MPU6050 has 6 built in 16 bit ADC channels, three for the gyroscope outputs and three for the accelerometer outputs. It communicates with  the microcontroller using the I2C protocol. The operating voltage range of MCU6050 is from 2.37v to 3.46V. A low drop out regulator is provided on the MPU 6050 board for providing this voltage. The full scale ranges of the acclelerometer and gyroscope are user programmable and they are +/- 2g, 4g, 8g and 16g for the accelerometer and +/- 250 °/S, 500 °/S, 1000 °/S and 2000 °/S.

How does an accelerometer work An accelerometer works on the principle of piezo electric effect. Here, imagine a cuboidal box, having a small ball inside it, like in the picture below:

How does an accelerometer work The walls of this box are made with piezo electric crystals. Whenever you tilt the box, the ball is forced to move in the direction of the inclination, due to gravity. The wall with which the ball collides, creates tiny piezo electric currents. There are totally, three pairs of opposite walls in a cuboid. Each pair corresponds to an axis in 3D space: X, Y and Z axes. Depending on the current produced from the piezo electric walls, we can determine the direction of inclination and its magnitude. 

Accelerometers Each accelerometer has a zero-g voltage level, you can find it in spec Accelerometers also have a sensitivity, usually expressed in mV/g Divide the zero-g level corrected reading by the sensitivity to produce the final reading Proof mass deflection is measured as a change in capacitance between the proof mass and sensing plates Internal circuitry converts the tiny capacitance to a voltage signal which is digitized and output

How does a Gyroscope work? A gyroscope measures angular velocity (the rate of change in orientation angle), not angular orientation itself . Gyroscopes work on the principle of Coriolis acceleration i.e. mass flow meter, also known as an inertial flow meter which measures mass flow rate of a fluid travelling through a tube.  Imagine that there is a fork like structure, that is in constant back and forth motion, as shown below:

How does a Gyroscope work? It is held in place using piezo electric crystals. Whenever, you try to tilt this arrangement, the crystals experience a force in the direction of inclination. This is caused as a result of the inertia of the moving fork. The crystals thus produce a current in consensus with the piezo electric effect, and this current is amplified. 

Gyroscope It must first initialize the sensor position with a known value (possibly from the accelerometer), then measure the angular velocity (ω) around the X, Y and Z axes at measured intervals (Δt)   ω × Δt = change in angle  The new orientation angle is the original angle plus this change This is integrating - adding up many small computed intervals - to find orientation   Repeatedly adding up increments of  ω × Δt results in small systematic errors becoming magnified over time  Gyroscopic drift---over long timescales the gyroscope data will become increasingly inaccurate

Gyroscope Uses Coriolis effect to transform an angular velocity into a displacement The Coriolis force acts perpendicular to the rotation axis and to the velocity of the body in the rotating frame Fc= -2m Ω x v The displacement induces a change in capacitance between the mass and the housing, thus transforming the angular rate input to the gyroscope into an electrical output

Gyroscopes Each gyroscope measures the rotation around one axis Axz – is the angle between the Rxz (projection of R on XZ plane) and Z axis Ayz – is the angle between the Ryz (projection of R on YZ plane) and Z axis Gyroscopes measure the rate of change of these angles.

Computing Rotation Angles Rotation from accelerometer data: tan(Axz) = Rx/Rz => Axz = atan2(Rx,Rz) Rotation from gyroscope data: Axz(n-1) = atan2( RxEst(n-1) , RzEst(n-1) ) Axz(n) = Axz(n-1) + RateAxz(n) * T

Sensor Fusion An accelerometer measures inertial force, such as gravity (and ideally only by gravity), but it might also be caused by acceleration (movement) of the device. Even if the accelerometer is relatively stable, it is very sensitive to vibration and mechanical noise. A gyroscope is less sensitive to linear mechanical movements, the type of noise that accelerometer suffers from. Gyroscopes have other types of problems like drift (not coming back to zero-rate value when rotation stops). Averaging the data that comes from accelerometers and gyroscopes can produce a better estimate of orientation than obtained using accelerometer data alone.

Fusion Algorithms Several choices: Kalman Filter, Complementary Filter, … Combine orientation estimated from Accelerometer readings with that estimated from the Gyroscope readings Racc – current readings from accelerometer Rgyro – obtained from Rest(n-1) and current gyroscope readings A weighted average: Rest(n) = (Racc * w1 + Rgyro * w2 ) / (w1 + w2)

Sensor Fusion

MPU-6050 The MPU-6050 is the world’s first integrated 6-axis Motion Tracking device/ It combines a 3-axis gyroscope, 3-axis accelerometer, and a Digital Motion Processor™ (DMP) all in a small 4x4x0.9mm package. It uses a standard I2C bus for data transmission. With it’s I2C bus, it can accepts inputs from an external 3-axis compass to provide a complete 9-axis Motion Fusion output.

A Read Example with MPU 6050 For MPU-6050: ACCEL_XOUT_H  register 3B ACCEL_XOUT_L  register 3C ACCEL_YOUT_H  register 3D ACCEL_YOUT_L  register 3E ACCEL_ZOUT_H  register 3F ACCEL_ZOUT_L  register 40

MPU-6050

The Physical Connection Connecting the MPU to the Pi MPU6050 Pi Pin ID Pin ID VDD --> 5V on UNO GND --> GND on UNO SCL --> A5 on UNO SDA --> A4 on UNO XDA XCL ADO INT --> Digital Pin 2 on UNO

MPU 6050

Interfacing the MPU 6050 with Arduino The MPU 6050 communicates with the Arduino through the I2C protocol. The MPU 6050 is connected to Arduino as shown in the following diagram:

Connections of MPU 6050 with Arduino Here, if your MPU 6050 module has a 5V pin, then you can connect it to your arduino’s 5V pin. Else, you will have to connect it to the 3.3V pin. Next, the GND of the arduino is connected to the GND of the MPU 6050. Connect arduino’s digital pin 2 (interrupt pin 0) to the pin labelled as INT on the MPU 6050. Next, we need to set up the I2C lines. For this connect the pin labelled as SDA on the MPU 6050 to the arduino’s analog pin 4 (SDA). And the pin labelled as SCL on the MPU 6050 to the arduino’s analog pin 5 (SCL). And that’s it, you have finished wiring up the Arduino MPU 6050.

Uploading the code and testing the Arduino MPU 6050 To test the Arduino MPU 6050, first download the arduino library for MPU 6050, developed by Jeff Rowberg. Next you have to unzip/extract this library. And then take the folder named “MPU6050” and paste it inside the arduino’s “library” folder. That is, go to the location where you have installed arduino (Arduino –> libraries) and paste it inside the libraries folder. You might also have to do the same thing to install the I2Cdev library as well, if you don’t already have it for your arduino.

If you have done this correctly, then when you open the arduino IDE, you can see “MPU6050” in File –> Examples. Next, open the example program from: File –> Examples –> MPU6050 –> Examples –> MPU6050_DMP6.

Now, you have to upload this code to arduino. After uploading the code, open up the serial monitor and set the baud rate as 115200. Next, check if you see stuff like “Initializing I2C devices…” on the serial monitor. If you don’t, just press the reset button. Now, you’ll see a line saying  “Send any character to begin DMP programming and demo: “. So just type in any character on the serial monitor and send it. And you will start seeing the yaw, pitch and roll values coming in from the MPU 6050. Like so:

DMP stands for Digital Motion Processing. Here, the Invense’s MPU 6050 has an inbuilt motion processor. It processes the values from the accelerometer and gyroscope to give us accurate 3D values. Also, you will need to wait about 10 secs before you get accurate values from the Arduino MPU 6050. After which, the values will begin to stabilize.