SlideShare a Scribd company logo
Vijay Kumar
Professor
Mechanical Engineering
Chitkara University
IMU Fundamental
Micro: Very small in size. Measured in micrometer(μm)
1 μm = 10-6 m
Electro: MEMS have electrical components
Mechanical: MEMS have moving parts
Systems: Refers to integration of components.
We find MEMS in
Automobiles (Air bag sensors)
Computer printers (Ink jet print heads)
Cell phones (RF devices)
Optical devices (Micromirrors)
MEMS
They have also found application in the healthcare domain in devices
such as blood pressure monitors, pacemakers, ventilators, and respirators.
Air bag crash sensors
Active suspension systems
Antilock brake systems
Ride control systems
V K Jadon, Prof., Mechanical Engineering, Chitkara University 2
Accelerometer
𝑥, 𝑎
𝑘
𝑚
𝑥, 𝑎
𝑘
𝑚
𝑥, 𝑎
−𝑘𝑥 = 𝑚𝑎
𝑘
𝑚 𝑚𝑎𝑠𝑠 𝑖𝑠 𝑑𝑖𝑠𝑝𝑙𝑎𝑐𝑒𝑑
𝑎 = −
𝑘
𝑚
𝑥
𝑎 = 𝑓(𝑥)
External Force in the direction of
displacement =mass×acceleration
𝑚
𝑘𝑥 𝑎
𝐶 = 𝑓(𝐴/𝑥)
𝐶 = 𝑓(𝐴/𝑎)
Accelerometer measures linear acceleration
Acceleration is opposite to
the displacement
𝐶 = 𝑐𝑎𝑝𝑎𝑐𝑖𝑡𝑎𝑛𝑐𝑒
𝐴 = surface area of
capacitor plates
V K Jadon, Prof., Mechanical Engineering, Chitkara University 3
Displacement of the frame changes the differential capacitance
Capacitive accelerometers offer high sensitivities and
are utilized for low-amplitude, low-frequency devices.
Accelerometer
𝒙
𝒛
𝒚
Internal moveable
assembly
Proof mass
Spring
External Fixed assembly
MPU6050 measures linear acceleration in terms of g force
Usefulness of accelerometer in
IMU will be discussed later
V K Jadon, Prof., Mechanical Engineering, Chitkara University 4
VCC
GND
SCL
SDA
XDA
XCL
ADO
INT
X
Y
I2C ProtocolGyro Accelerometer
MPU6050 Pinout
Clock pulse for I2C Communication
Data through I2C communication
Data to external sensors
Clock pulse to external sensors
I2C Slave Address
Interrupt digital output
The SCL line is the clock signal which synchronize the
data transfer between the devices on the I2C bus.
Clock signal is generated by the master device.
The full scale range of the digital output can be adjusted to ±2g,
±4g, ±8g, or ±16g.
Three-Axis MEMS Accelerometer with 16-bit ADCs and Signal Conditioning
MPU6050: MEMS Accelerometer
The MPU-60X0’s 3-Axis accelerometer uses separate proof masses for
each axis.
Acceleration along an axis induces displacement on the corresponding
proof mass, and capacitive sensors detect the displacement differentially.
When the device is placed on a flat surface, it will measure
0g on the X- and Y-axes and +1g on the Z-axis (upward).
Each sensor has a dedicated ADC for providing digital outputs.
V K Jadon, Prof., Mechanical Engineering, Chitkara University 6
UNO
Arduino
AREF
GND
13
12
~11
~10
~9
8
7
~6
~5
4
~3
2
TX-1
RX-0
IOREF
RESET
3.3V
5V
GND
GND
Vin
A0
A1
A2
A3
A4
A5
ON
TX
RX
L
Arduino Uno Pinout
master out slave in
master in slave out
Serial Clock
Slave Select
V K Jadon, Prof., Mechanical Engineering, Chitkara University 7
UNO
Arduino
AREF
GND
13
12
~11
~10
~9
8
7
~6
~5
4
~3
2
TX-1
RX-0
IOREF
RESET
3.3V
5V
GND
GND
Vin
A0
A1
A2
A3
A4
A5
ON
TX
RX
L
MPU6050 Connection
V K Jadon, Prof., Mechanical Engineering, Chitkara University 8
I2C Protocol
I2C Protocol
V K Jadon, Prof., Mechanical Engineering, Chitkara University 10
• Begins with a start bit
• 7 bit Address is transmitted
• 1 control bit to indicate Master to Read from or
write to slave
• If communicated slave send ack bit to Master
• Master to send 8 bit Internal Register Address
• Slave send back ack bit
• Master transmits data in 8 bits chunk
• Write request – Slave sends ack bit to Master
• Read request – Master sends ack bit to Slave
I2C addresses are generally 7 bits, yielding an
address between 0 and 127.
The addresses from 0 to 7 are not used because are
reserved. So, the first address that can be used is 8
S B6 B5 B4 B3 B2 B1 B0 R/W Ack
B7 B6 B5 B4 B3 B2 B1 B0 Ack
B7 B6 B5 B4 B3 B2 B1 B0 Ack S
7 bit Device Address sequence
8 bit internal Register Address sequence
8 bit data sequence
• Ends with a stop bit
V K Jadon, Prof., Mechanical Engineering, Chitkara University 11
<Wire.h> Library
Wire.begin(address) function initiates Wire library
Wire.beginTransmission(address) begins transmission to
the particular sensor
Wire.beginTransmission(0b1101000)
Wire.endTransmission(address) Transmits data in
buffer and return a status byte, 0 for success.
Wire.endTransmission(0b1101000)
write() buffers data for sending
Wire.write(value)
Wire.write(string)
Wire.write(data, length)
value: a value to send as a single byte
string: a string to send as a series of bytes
data: an array of data to send as bytes
length: the number of bytes to transmit
write() will return the number of bytes written, though
reading that number is optional
address: the 7-bit slave address (optional);
if not specified, join the bus as a master.
Start condition to the slave device with the given address.
It asks for data from the internal registers of the
slave device
S B6 B5 B4 B3 B2 B1 B0 R/W A B7 B6 B5 B4 B3 B2 B1 B0 A B7 B6 B5 B4 B3 B2 B1 B0 A S
V K Jadon, Prof., Mechanical Engineering, Chitkara University 12
<Wire.h> Library
requestFrom() Used by the master to request bytes
from a slave device..
The default value is true.
If true, requestFrom() sends a stop message after the
request, releasing the I2C bus.
If false, requestFrom() sends a restart message after
the request.
Wire.requestFrom(address, quantity)
Wire.requestFrom(address, quantity, stop)
If false, the bus will not be released, which prevents
another master device from requesting between
messages. This allows one master device to send
multiple requests while in control.
The Wire.available() function will return the number
of bytes available for retrieval and if that number
match with our requested bytes
Wire.read() function we will read the bytes from
the two registers of the X axis.
I2C Scanner
MPU6050-
Accelerometer
UNO
Arduino
AREF
GND
13
12
~11
~10
~9
8
7
~6
~5
4
~3
2
TX-1
RX-0
IOREF
RESET
3.3V
5V
GND
GND
Vin
A0
A1
A2
A3
A4
A5
ON
TX
RX
L
MPU6050 Connection
V K Jadon, Prof., Mechanical Engineering, Chitkara University 14
V K Jadon, Prof., Mechanical Engineering, Chitkara University 15
MPU6050 Setup Read Accelerometer data using Arduino
Start I2C Communication
― Use Wire.begin() to initiate wire.h
― Wire.beginTransmission(SDA)
Slave Device Address (SDA)=1101000 AD0=Low
Slave Device Address (SDA)=1101001 AD0=High
Reference – Product Specifications (Revision 3.4)
Section 9.2 pp33
― Wire.write(0x6B)
Internal Register Address Sequence to
access Power management register (0x6B)
― Wire.write(0b00000000)
Data Transfer Bit Sequence to awake MPU
― Wire.endTransmission(1101000)
FS Range AFS_SEL Register Bit LSB Sensitivity ADC Bits
±2g 0 0b00000000 16384 LSB/g 15 bit
±4g 1 0b00001000 8192 LSB/g 14 bits
±8g 2 0b00010000 4096 LSB/g 13 bits
±16g 3 0b00011000 2048 LSB/g 12 bits
𝑥 ≈ 0
𝑦 ≈ 0
𝑧 ≈ 1𝑔
𝑦 ≈ 0
𝑧 ≈ 0
𝑥 ≈ 1𝑔
𝑧 ≈ 0
𝑥 ≈ 0
𝑦 ≈ 1𝑔
V K Jadon, Prof., Mechanical Engineering, Chitkara University 16
Accelerometer Setup
The MPU-60X0 features three 16-bit ADCs for digitizing the accelerometer outputs.
For precision tracking of both fast and slow motions, the parts feature a user-
programmable accelerometer full-scale range of ±2g, ±4g, ±8g, and ±16g.
Reference – Product Specifications (Revision 3.4)
Section 6.2 pp13
― Wire.beginTransmission(0b1101000)
― Wire.write(0b00000000)
― Wire.endTransmission(0b1101000)
― Wire.write(0x1C)Reference – Register Map and Description (Revision 4.2)
Section 4.5 pp15
Reference – Product Specifications (Revision 3.4)
Section 3.1 pp7
V K Jadon, Prof., Mechanical Engineering, Chitkara University 17
Read Accelerometer Data
Reference – Register Map (Revision 4.2)
Section 3 pp7
Wire.beginTransmission(0b1101000)
3B and 3C stores Acceleration data along x-axis
3D and 3E stores Acceleration data along y-axis
3F and 40 stores Acceleration data along z-axis
We should give starting Internal Register Address to access
all Read only registers after that.
To transmit all acceleration data, we should write to 0x3B
register.
― Wire.write(0x3B)
Slave device transmit data in 8 bits(1 byte)
Master store integers in 16 bits.
― Wire.endTransmission(0b1101000)
V K Jadon, Prof., Mechanical Engineering, Chitkara University 18
Read Accelerometer Data
For getting hold of the data available in buffer, master has to request using Wire.requestFrom(address, quantity)
Wire.requestFrom(0b1101000, 6)Check availability of the data requested by the master Wire.available()
It returns the number of received bytes from receive-buffer.
Reads a byte that was transmitted from a slave device to a master after a call to requestFrom()
using Wire.read() function.
The each acceleration data is stored in two register (2 bytes)
The data read is to be stored in one variable of int datatype.
Every repeated Wire.read() gives the next byte available.
accel_rawX = Wire.read()<<8|Wire.read();
00001010
00001111
00001010-00000000
00001010-00001111
00001010
V K Jadon, Prof., Mechanical Engineering, Chitkara University 19
Arduino Pseudo Code
Set-Up MPU6050
Configure Accelerometer
Read Accelerometer Data
Every task starts with beginning communication with slave device
and ends with terminating communication with slave device
begin communication – Slave device address sequence
access power management register – internal register address sequence
Update power management register to disable SLEEP mode – data
transfer sequence
terminate communication – stop bit
(one time execution)
(one time execution)
begin communication – Slave device address sequence
access accelerometer configure register – internal register
address sequence
update accelerometer register to set full scale range – data
transfer sequence
terminate communication – stop bit
(data needed continuously)
Disable SLEEP mode
Set Full Scale range
Read accelerometer data
V K Jadon, Prof., Mechanical Engineering, Chitkara University 20
Arduino Pseudo Code
Set-Up MPU6050 Configure Accelerometer
Read Accelerometer Data
Every task starts with beginning communication with slave device
and ends with terminating communication with slave device
(data needed continuously)
Disable SLEEP mode Set Full Scale range
Access Register Read Data
begin communication
stop communication
access accelerometer first data
register
Read accelerometer data
begin communication
stop communication
Request data
Check availability Read 8 bits and
store in 16 bits data
V K Jadon, Prof., Mechanical Engineering, Chitkara University 21
Angle Measurement
𝐹𝑥
𝒙
𝒚
𝒛
𝐹𝑦
𝐹𝑧
𝐹𝑥
2
+ 𝐹𝑦
2
+ 𝐹𝑧
2
𝐹𝑥
2
+ 𝐹𝑦
2
𝐹𝑦
2
+ 𝐹𝑧
2
𝐹𝑥
2
+ 𝐹𝑧
2
𝒙
𝒚
𝒛
𝐹𝑥
2
+ 𝐹𝑦
2
𝐹𝑦
2
+ 𝐹𝑧
2
𝐹𝑥
2
+ 𝐹𝑧
2
V K Jadon, Prof., Mechanical Engineering, Chitkara University 22
There are six possible orderings of these three rotation
matrices and, in principle, all are equally valid
Angle Measurement
𝜓, ∅, 𝜃 are called as Roll, Pitch, and Yaw Angles
𝑅 𝑥 =
1 0 0
0 𝑐𝑜𝑠𝜓 −𝑠𝑖𝑛𝜓
0 𝑠𝑖𝑛𝜓 𝑐𝑜𝑠𝜓
𝑅 𝑦 =
𝑐𝑜𝑠∅ 0 𝑠𝑖𝑛∅
0 1 0
−𝑠𝑖𝑛∅ 0 𝑐𝑜𝑠∅
𝑅 𝑧 =
𝑐𝑜𝑠𝜃 −𝑠𝑖𝑛𝜃 0
𝑠𝑖𝑛𝜃 𝑐𝑜𝑠𝜃 0
0 0 1
Initial force vector=
0
0
1
𝑮 𝒑 =
𝑮 𝒑𝒙
𝑮 𝒑𝒚
𝑮 𝒑𝒛
= 𝑹
0
0
1
𝑹 𝒙𝒚𝒛
0
0
1
= 𝑹 𝒙(𝜓)𝑹 𝒚(∅) 𝑹 𝒛(𝜃)
0
0
1
𝑹 𝒚𝒛𝒙
0
0
1
= 𝑹 𝒚(∅) 𝑹 𝒛(𝜃)𝑹 𝒙(𝜓)
0
0
1
𝑹 𝒚𝒙𝒛
0
0
1
= 𝑹 𝒚(∅) 𝑹 𝒙(𝜓)𝑹 𝒛(𝜃)
0
0
1
𝑹 𝒛𝒙𝒚
0
0
1
= 𝑹 𝒛(𝜃)𝑹 𝒙(𝜓)𝑹 𝒚(∅)
0
0
1
𝑹 𝒙𝒛𝒚
0
0
1
= 𝑹 𝒙(𝜓)𝑹 𝒛(𝜃)𝑹 𝒚(∅)
0
0
1
𝑹 𝒛𝒚𝒙
0
0
1
= 𝑹 𝒛(𝜃)𝑹 𝒚(∅)𝑹 𝒙(𝜓)
0
0
1
V K Jadon, Prof., Mechanical Engineering, Chitkara University 23
The last four rotation sequences result in the accelerometer
output being function of all three rotation angles and cannot
therefore be solved.
It is conventional therefore to select either the rotation
sequence 𝑅 𝑥𝑦𝑧 or the sequence 𝑅 𝑦𝑥𝑧 to eliminate the yaw
rotation ψ and allow solution for the roll φ and pitch θ angles.
Angle Measurement
𝑮 𝒑 =
𝑮 𝒑𝒙
𝑮 𝒑𝒚
𝑮 𝒑𝒛
=
𝟏
𝐺 𝑝𝑥
2
+ 𝐺 𝑝𝑦
2
+ 𝐺 𝑝𝑧
2
𝐺 𝑝𝑥
𝐺 𝑝𝑦
𝐺 𝑝𝑧
=
𝐺 𝑝𝑥
𝐺 𝑝𝑦
𝐺 𝑝𝑧 𝑅 𝑥𝑦𝑧
0
0
1
= 𝑅 𝑥(𝜓)𝑅 𝑦(∅) 𝑅 𝑧(𝜃)
0
0
1
𝑅 𝑥𝑦𝑧 =
𝑐𝑜𝑠∅𝑐𝑜𝑠𝜃 𝑐𝑜𝑠∅𝑠𝑖𝑛𝜃 −𝑠𝑖𝑛∅
𝑐𝑜𝑠𝜃𝑠𝑖𝑛∅𝑠𝑖𝑛𝜓 − 𝑐𝑜𝑠𝜓𝑠𝑖𝑛𝜃 𝑐𝑜𝑠𝜓𝑐𝑜𝑠𝜃 + 𝑠𝑖𝑛∅𝑠𝑖𝑛𝜓𝑠𝑖𝑛𝜃 𝑐𝑜𝑠∅𝑠𝑖𝑛𝜓
𝑐𝑜𝑠𝜓𝑐𝑜𝑠𝜃𝑠𝑖𝑛∅ + 𝑠𝑖𝑛𝜓𝑠𝑖𝑛𝜃 𝑐𝑜𝑠𝜓𝑠𝑖𝑛∅𝑠𝑖𝑛𝜃 − 𝑐𝑜𝑠∅𝑠𝑖𝑛𝜓 𝑐𝑜𝑠∅𝑐𝑜𝑠𝜓
𝑅 𝑥𝑦𝑧 =
−𝑠𝑖𝑛∅
𝑐𝑜𝑠∅𝑠𝑖𝑛𝜓
𝑐𝑜𝑠∅𝑐𝑜𝑠𝜓
𝑅 𝑦𝑥𝑧 = 𝑅 𝑦(∅) 𝑅 𝑥(𝜓)𝑅 𝑧(𝜃)
0
0
1
=
−𝑠𝑖𝑛𝜓𝑠𝑖𝑛𝜃
𝑠𝑖𝑛𝜓
𝑐𝑜𝑠∅𝑐𝑜𝑠𝜓
𝑅 𝑥𝑧𝑦 = 𝑅 𝑥(𝜓)𝑅 𝑧(𝜃)𝑅 𝑦(∅)
0
0
1
=
−𝑐𝑜𝑠𝜃𝑠𝑖𝑛∅
𝑐𝑜𝑠∅𝑠𝑖𝑛𝜓 + 𝑐𝑜𝑠𝜓𝑠𝑖𝑛∅𝑠𝑖𝑛𝜃
𝑐𝑜𝑠𝜓𝑐𝑜𝑠∅ − 𝑠𝑖𝑛∅𝑠𝑖𝑛𝜓𝑠𝑖𝑛𝜃
𝑅 𝑥𝑧𝑦 = 𝑅 𝑥(𝜓)𝑅 𝑧(𝜃)𝑅 𝑦(∅)
0
0
1
=
𝑐𝑜𝑠∅𝑠𝑖𝑛𝜓𝑠𝑖𝑛𝜃 − 𝑐𝑜𝑠𝜓𝑠𝑖𝑛∅
𝑐𝑜𝑠𝜃𝑠𝑖𝑛𝜓
𝑐𝑜𝑠∅𝑐𝑜𝑠𝜓 + 𝑠𝑖𝑛∅𝑠𝑖𝑛𝜓𝑠𝑖𝑛𝜃
𝑅 𝑧𝑦𝑥 = 𝑅 𝑧(𝜃)𝑅 𝑦(∅)𝑅 𝑥(𝜓)
0
0
1
=
𝑠𝑖𝑛𝜓𝑠𝑖𝑛𝜃 − 𝑐𝑜𝑠𝜓𝑐𝑜𝑠𝜃𝑠𝑖𝑛∅
𝑐𝑜𝑠𝜃𝑠𝑖𝑛𝜓 + 𝑐𝑜𝑠𝜓𝑠𝑖𝑛𝜃𝑠𝑖𝑛∅
𝑐𝑜𝑠∅𝑐𝑜𝑠𝜓
𝑅 𝑧𝑥𝑦 = 𝑅 𝑧(𝜃) 𝑅 𝑥(𝜓)𝑅 𝑦(∅)
0
0
1
=
𝑐𝑜𝑠∅𝑠𝑖𝑛𝜓𝑠𝑖𝑛𝜃 − 𝑐𝑜𝑠𝜃𝑠𝑖𝑛∅
𝑐𝑜𝑠𝜃𝑐𝑜𝑠∅𝑠𝑖𝑛𝜓 + 𝑠𝑖𝑛∅𝑐𝑜𝑠𝜃
𝑐𝑜𝑠∅𝑐𝑜𝑠𝜓
Accelerometer Readings
V K Jadon, Prof., Mechanical Engineering, Chitkara University 24
Angle Measurement
Solving 𝑅 𝑥𝑦𝑧 for the Roll (𝜓) and Pitch (∅) Angles
The rotation sequence 𝑅 𝑥𝑦𝑧 is widely used in the aerospace
industry and is termed the 'aerospace rotation sequence‘.
𝐺 𝑝𝑥
𝐺 𝑝𝑦
𝐺 𝑝𝑧
=
−𝑠𝑖𝑛∅
𝑐𝑜𝑠∅𝑠𝑖𝑛𝜓
𝑐𝑜𝑠∅𝑐𝑜𝑠𝜓
𝐺 𝑝𝑥 = −𝑠𝑖𝑛∅
𝐺 𝑝𝑦 = 𝑐𝑜𝑠∅𝑠𝑖𝑛𝜓
𝐺 𝑝𝑧 = 𝑐𝑜𝑠∅𝑐𝑜𝑠𝜓
tan 𝜓 𝑥𝑦𝑧 =
𝐺 𝑝𝑦
𝐺 𝑝𝑧
tan ∅ 𝑥𝑦𝑧 =
−𝐺 𝑝𝑥
𝐺 𝑝𝑦
2
+ 𝐺 𝑝𝑧
2
𝜋
4
−
3𝜋
4
𝑠𝑖𝑛
𝜋
4
=
1
2
𝑐𝑜𝑠
𝜋
4
=
1
2
𝑡𝑎𝑛
𝜋
4
= 1
𝑠𝑖𝑛 −
3𝜋
4
= −
1
2
𝑐𝑜𝑠 −
3𝜋
4
= −
1
2
𝑡𝑎𝑛 −
3𝜋
4
= 1
𝑡𝑎𝑛−1
1
1
= 𝑡𝑎𝑛−1
−1
−1
atan function does not distinguish
between opposite angles
atan2 function takes into account the ratio
and sign of 𝑦 and 𝑥
𝑎𝑡𝑎𝑛2 1, 1 =
𝜋
4
𝑎𝑡𝑎𝑛2 −1, −1 = −
3𝜋
4
Gyroscope
𝝎
𝑿𝒁
𝒀
MEMS gyroscopes measure the angular
rate of rotation of one or more axes
V K Jadon, Prof., Mechanical Engineering, Chitkara University
Gyroscope
𝒗 𝑨 = 𝝎 × 𝒓 𝑨
𝝎
𝒙
𝒛
𝒚
Path of the ball as seen by an
observer moving with table
Path of the ball as
seen from fixed frame
𝒗 𝑪
𝒙
𝒛
𝒚
Position of ball
after some time ∆𝑡
𝒗 𝑩
𝑩
𝑩
Point B after time∆𝑡
𝒗 𝑨
𝒗 𝒃𝒂𝒍𝒍
Ball has two velocities
V K Jadon, Prof., Mechanical Engineering, Chitkara University
Gyroscope
𝒗 𝑨 = 𝝎 × 𝒓 𝑨
𝒗 𝒃𝒂𝒍𝒍
𝝎
𝒙
𝒛
𝒚
𝝎 𝒗 𝒃𝒂𝒍𝒍
MEMS gyroscopes use vibrating
mechanical elements (proof-mass) to
sense rotation caused by Coriolis
acceleration.
The ADC sample rate is programmable from 8,000 samples per second,
down to 3.9 samples per second, and user-selectable low-pass filters
enable a wide range of cut-off frequencies.
Three-Axis MEMS Gyroscope with 16-bit ADCs and Signal Conditioning
Gyroscope Setup-MPU6050
V K Jadon, Prof., Mechanical Engineering, Chitkara University 28
The MPU-60X0 consists of three independent vibratory MEMS rate
gyroscopes, which detect rotation about the X-, Y-, and Z- Axes.
When the gyros are rotated about any of the sense axes, the Coriolis
Effect causes a vibration that is detected by a capacitive pickoff.
The signal is amplified, demodulated, and filtered to produce a voltage
that is proportional to the angular rate.
This voltage is digitized using individual on-chip 16-bit Analog-to-
Digital Converters (ADCs) to sample each axis.
The full-scale range of the gyro sensors may be digitally programmed
to ±250, ±500, ±1000, or ±2000 degrees per second (dps).
𝑟𝑝𝑚 =
𝑟𝑎𝑛𝑔𝑒(°/𝑠)
360
× 60
Range Condition 𝒅𝒆𝒕𝒆𝒄𝒕𝒂𝒃𝒍𝒆 𝒓𝒑𝒎 Register Bit
±250 0 41.67 0x00000000
±500 1 83.33 0x00001000
±1000 2 166.7 0x00010000
±2000 3 333.3 0x00011000
Gyroscope Setup
V K Jadon, Prof., Mechanical Engineering, Chitkara University 29
V K Jadon, Prof., Mechanical Engineering, Chitkara University
For a FS_SEL =1
LSB Sensitivity = 65.5
Register Bit = 0x00001000
𝜔(𝑦𝑎𝑤 𝑟𝑜𝑡𝑎𝑡𝑖𝑜𝑛) = 1 0
𝑠 𝑔𝑦𝑟𝑜 𝑧 = 65.5
𝜔(𝑦𝑎𝑤 𝑟𝑜𝑡𝑎𝑡𝑖𝑜𝑛) = 5 0
𝑠 𝑔𝑦𝑟𝑜 𝑧 = 327.5
At any
particular
time
To convert Gyro values into instantaneous angular rate
𝑖𝑛𝑠𝑡𝑎𝑛𝑡𝑎𝑛𝑒𝑜𝑢𝑠 𝑎𝑛𝑔𝑢𝑙𝑎𝑟 𝑟𝑎𝑡𝑒 =
𝑔𝑦𝑟𝑜 𝑥,𝑦,𝑧
𝐿𝑆𝐵 𝑆𝑒𝑛𝑠𝑖𝑡𝑖𝑣𝑖𝑡𝑦
=
327.5
65.5
= 5 0
𝑠
To measure total angle travelled
add all instantaneous angles obtained for
small time duration, ∆𝑡
𝜔 =
𝑑𝜃
𝑑𝑡
𝑑𝜃 = 𝜔𝑑𝑡 𝜃 =
𝑡1
𝑡2
𝜔𝑑𝑡
Gyroscope Data
V K Jadon, Prof., Mechanical Engineering, Chitkara University
𝜃 =
𝑡1
𝑡2
𝜔𝑑𝑡
𝜔
𝑡
𝜔
𝑡
∆𝑒
Drift error
Drift error is gradual divergence between the true
orientation and estimated orientation by gyro due to error
in measurement.
𝑒
𝑡
Use other sensors to bring down the drift error to
zero. Take angles with reference to world frame.
Gradually apply corrections.
• These correction are to be fast enough to fully
compensate the drift error.
• Slow enough to avoid jerky compensations
Tilt Error or (roll and pitch angle error)
Yaw Error
Linear accelerometer
Magnetometer
The noise part is
also integrated
V K Jadon, Prof., Mechanical Engineering, Chitkara University
gyro_pitch_angle=gyro_pitch_angle+ gyro_roll_angle * sin(gyro_z)
gyro_roll_angle=gyro_roll_angle- gyro_pitch_angle * sin(gyro_z)
Transfer of Yaw angles
V K Jadon, Prof., Mechanical Engineering, Chitkara University
The gyroscope drift is mainly due to the integration of two components: a slow changing, near-dc variable
called bias instability and a higher frequency noise variable called angular random walk (ARW).
The yaw axis is most sensitive to this drift. A good portion of the pitch (attitude) and roll axis gyroscope drift
can be removed within an IMU through the use of accelerometer feedback to monitor position relative to
gravity.
Ideally, two references are needed to correct for gyroscope drift on all axes.
An IMU with nine degrees of freedom typically provides additional magnetometer sensors - about 3 axes.
A magnetometer senses field strength relative to the Earth’s magnetic North. These sensors can be used
together with accelerometer data, as another external reference, to mitigate the impact of gyroscope drift
error on the yaw axis.
V K Jadon, Prof., Mechanical Engineering, Chitkara University
However, design of proper spatial magnetometers can be a less reliable vector than an
accelerometer, as there are many things that create magnetic fields within the same order of
magnitude as that of the Earth.
Another one of the more effective methods for cancelling long-term drift is to implement a zero
angular velocity update to the gyroscope. Any time the device is known to be completely stationary,
the gyroscope offset can be nulled to zero for that respective axis.
This opportunity can vary wildly depending on the application. But any instance that the system is at a
recurring resting state can be used for nulling, such as an idling car, a stationary autonomous robot,
or the time between human foot steps.
Of course, using a state-of-the-art IMU that has minimal bias instability within the design at the onset
may offer the most immediate impact on gyroscope drift.
The constant bias error of a gyroscope can be measured by taking the average of the output over a
long period of time while the device is not rotating.
Thanks
V K Jadon, Prof., Mechanical Engineering, Chitkara University 35

More Related Content

What's hot

Signal descriptors of 8086
Signal descriptors of 8086Signal descriptors of 8086
Signal descriptors of 8086aviban
 
Assignment #4-Ch5-6-7-8-Data Communications.pdf
Assignment #4-Ch5-6-7-8-Data Communications.pdfAssignment #4-Ch5-6-7-8-Data Communications.pdf
Assignment #4-Ch5-6-7-8-Data Communications.pdfSoyallRobi
 
An Introduction to Precision Motion Control
An Introduction to Precision Motion ControlAn Introduction to Precision Motion Control
An Introduction to Precision Motion ControlZaber Technologies
 
8086 microprocessor instruction set by Er. Swapnil Kaware
8086 microprocessor instruction set by Er. Swapnil Kaware8086 microprocessor instruction set by Er. Swapnil Kaware
8086 microprocessor instruction set by Er. Swapnil KawareProf. Swapnil V. Kaware
 
Voice controlled spy robot for security system
Voice controlled spy robot for security systemVoice controlled spy robot for security system
Voice controlled spy robot for security systemMayank Prajapati
 
Project II Report on Patient Monitoring System
Project II Report on Patient Monitoring SystemProject II Report on Patient Monitoring System
Project II Report on Patient Monitoring SystemShivam Sharma
 
Lec 04 intro assembly
Lec 04 intro assemblyLec 04 intro assembly
Lec 04 intro assemblyAbdul Khan
 
INTEL 8086 MICROPROCESSOR
INTEL 8086 MICROPROCESSORINTEL 8086 MICROPROCESSOR
INTEL 8086 MICROPROCESSORSagar Kuntumal
 
Advanced Topics In Digital Signal Processing
Advanced Topics In Digital Signal ProcessingAdvanced Topics In Digital Signal Processing
Advanced Topics In Digital Signal ProcessingJim Jenkins
 
Chapter 3 INSTRUCTION SET AND ASSEMBLY LANGUAGE PROGRAMMING
Chapter 3 INSTRUCTION SET AND ASSEMBLY LANGUAGE PROGRAMMINGChapter 3 INSTRUCTION SET AND ASSEMBLY LANGUAGE PROGRAMMING
Chapter 3 INSTRUCTION SET AND ASSEMBLY LANGUAGE PROGRAMMINGFrankie Jones
 
8086 labmanual
8086 labmanual8086 labmanual
8086 labmanualiravi9
 

What's hot (20)

8086 microprocessor lab manual
8086 microprocessor lab manual8086 microprocessor lab manual
8086 microprocessor lab manual
 
Embedded System-design technology
Embedded System-design technologyEmbedded System-design technology
Embedded System-design technology
 
Signal descriptors of 8086
Signal descriptors of 8086Signal descriptors of 8086
Signal descriptors of 8086
 
Pic18f458
Pic18f458Pic18f458
Pic18f458
 
Embedded System Networking
Embedded System NetworkingEmbedded System Networking
Embedded System Networking
 
what is IoT
what is IoTwhat is IoT
what is IoT
 
Assignment #4-Ch5-6-7-8-Data Communications.pdf
Assignment #4-Ch5-6-7-8-Data Communications.pdfAssignment #4-Ch5-6-7-8-Data Communications.pdf
Assignment #4-Ch5-6-7-8-Data Communications.pdf
 
An Introduction to Precision Motion Control
An Introduction to Precision Motion ControlAn Introduction to Precision Motion Control
An Introduction to Precision Motion Control
 
8086 microprocessor instruction set by Er. Swapnil Kaware
8086 microprocessor instruction set by Er. Swapnil Kaware8086 microprocessor instruction set by Er. Swapnil Kaware
8086 microprocessor instruction set by Er. Swapnil Kaware
 
8086 ppt
8086 ppt8086 ppt
8086 ppt
 
Voice controlled spy robot for security system
Voice controlled spy robot for security systemVoice controlled spy robot for security system
Voice controlled spy robot for security system
 
Project II Report on Patient Monitoring System
Project II Report on Patient Monitoring SystemProject II Report on Patient Monitoring System
Project II Report on Patient Monitoring System
 
Lec 04 intro assembly
Lec 04 intro assemblyLec 04 intro assembly
Lec 04 intro assembly
 
IoT in Health Care
IoT in Health CareIoT in Health Care
IoT in Health Care
 
INTEL 8086 MICROPROCESSOR
INTEL 8086 MICROPROCESSORINTEL 8086 MICROPROCESSOR
INTEL 8086 MICROPROCESSOR
 
Advanced Topics In Digital Signal Processing
Advanced Topics In Digital Signal ProcessingAdvanced Topics In Digital Signal Processing
Advanced Topics In Digital Signal Processing
 
Ec8791 lpc2148 pwm
Ec8791 lpc2148 pwmEc8791 lpc2148 pwm
Ec8791 lpc2148 pwm
 
Chapter 3 INSTRUCTION SET AND ASSEMBLY LANGUAGE PROGRAMMING
Chapter 3 INSTRUCTION SET AND ASSEMBLY LANGUAGE PROGRAMMINGChapter 3 INSTRUCTION SET AND ASSEMBLY LANGUAGE PROGRAMMING
Chapter 3 INSTRUCTION SET AND ASSEMBLY LANGUAGE PROGRAMMING
 
ppt
pptppt
ppt
 
8086 labmanual
8086 labmanual8086 labmanual
8086 labmanual
 

Similar to Inertial Measurement Unit-Accelerometer and Gyroscope MPU6050

Motorized pan tilt(Arduino based)
Motorized pan tilt(Arduino based)Motorized pan tilt(Arduino based)
Motorized pan tilt(Arduino based)kane111
 
Short Range Radar System using Arduino Uno
Short Range Radar System using Arduino UnoShort Range Radar System using Arduino Uno
Short Range Radar System using Arduino UnoIRJET Journal
 
Netzer ds 247-128-specsheet
Netzer ds 247-128-specsheetNetzer ds 247-128-specsheet
Netzer ds 247-128-specsheetElectromate
 
Netzer ds 37-16-specsheet
Netzer ds 37-16-specsheetNetzer ds 37-16-specsheet
Netzer ds 37-16-specsheetElectromate
 
Gesture Controlled Chair
Gesture Controlled ChairGesture Controlled Chair
Gesture Controlled Chairtheijes
 
Design of Counter Using SRAM
Design of Counter Using SRAMDesign of Counter Using SRAM
Design of Counter Using SRAMIOSRJECE
 
Meeting w10 chapter 3 part 3
Meeting w10   chapter 3 part 3Meeting w10   chapter 3 part 3
Meeting w10 chapter 3 part 3Hattori Sidek
 
UAV Presentation
UAV PresentationUAV Presentation
UAV PresentationRuyyan
 
IMPLEMENTING A DIGITAL MULTIMETER
IMPLEMENTING A DIGITAL MULTIMETERIMPLEMENTING A DIGITAL MULTIMETER
IMPLEMENTING A DIGITAL MULTIMETERVijay Elavunkal
 
Design and Implementation of Schmitt Trigger using Operational Amplifier
Design and Implementation of Schmitt Trigger using Operational AmplifierDesign and Implementation of Schmitt Trigger using Operational Amplifier
Design and Implementation of Schmitt Trigger using Operational AmplifierIJERA Editor
 
Hand Gesture Control Robot
Hand Gesture Control RobotHand Gesture Control Robot
Hand Gesture Control RobotIRJET Journal
 
MaxBotix Code Examples
MaxBotix Code ExamplesMaxBotix Code Examples
MaxBotix Code ExamplesMaxBotix Inc
 
Xbee Wireless Throttle Position Sensor And Control
Xbee Wireless Throttle Position Sensor  And ControlXbee Wireless Throttle Position Sensor  And Control
Xbee Wireless Throttle Position Sensor And Controlkians64
 
Wireless Microcontroller (IEEE802.15.4 and ZigBee): JN5139
Wireless Microcontroller  (IEEE802.15.4 and ZigBee): JN5139Wireless Microcontroller  (IEEE802.15.4 and ZigBee): JN5139
Wireless Microcontroller (IEEE802.15.4 and ZigBee): JN5139Premier Farnell
 
Training Report on embedded Systems and Robotics
Training Report on embedded  Systems and RoboticsTraining Report on embedded  Systems and Robotics
Training Report on embedded Systems and RoboticsNIT Raipur
 
Scaling Down Instrumentation Deploying Analog Mixed Signal Technology
Scaling Down Instrumentation Deploying Analog Mixed Signal TechnologyScaling Down Instrumentation Deploying Analog Mixed Signal Technology
Scaling Down Instrumentation Deploying Analog Mixed Signal TechnologyShivaprasad Tilekar
 
Radio Astronomy and electronics
Radio Astronomy and electronicsRadio Astronomy and electronics
Radio Astronomy and electronicsFlavio Falcinelli
 

Similar to Inertial Measurement Unit-Accelerometer and Gyroscope MPU6050 (20)

Motorized pan tilt(Arduino based)
Motorized pan tilt(Arduino based)Motorized pan tilt(Arduino based)
Motorized pan tilt(Arduino based)
 
Short Range Radar System using Arduino Uno
Short Range Radar System using Arduino UnoShort Range Radar System using Arduino Uno
Short Range Radar System using Arduino Uno
 
Ee24832835
Ee24832835Ee24832835
Ee24832835
 
Netzer ds 247-128-specsheet
Netzer ds 247-128-specsheetNetzer ds 247-128-specsheet
Netzer ds 247-128-specsheet
 
Ju2416921695
Ju2416921695Ju2416921695
Ju2416921695
 
Assembler4
Assembler4Assembler4
Assembler4
 
Netzer ds 37-16-specsheet
Netzer ds 37-16-specsheetNetzer ds 37-16-specsheet
Netzer ds 37-16-specsheet
 
Gesture Controlled Chair
Gesture Controlled ChairGesture Controlled Chair
Gesture Controlled Chair
 
Design of Counter Using SRAM
Design of Counter Using SRAMDesign of Counter Using SRAM
Design of Counter Using SRAM
 
Meeting w10 chapter 3 part 3
Meeting w10   chapter 3 part 3Meeting w10   chapter 3 part 3
Meeting w10 chapter 3 part 3
 
UAV Presentation
UAV PresentationUAV Presentation
UAV Presentation
 
IMPLEMENTING A DIGITAL MULTIMETER
IMPLEMENTING A DIGITAL MULTIMETERIMPLEMENTING A DIGITAL MULTIMETER
IMPLEMENTING A DIGITAL MULTIMETER
 
Design and Implementation of Schmitt Trigger using Operational Amplifier
Design and Implementation of Schmitt Trigger using Operational AmplifierDesign and Implementation of Schmitt Trigger using Operational Amplifier
Design and Implementation of Schmitt Trigger using Operational Amplifier
 
Hand Gesture Control Robot
Hand Gesture Control RobotHand Gesture Control Robot
Hand Gesture Control Robot
 
MaxBotix Code Examples
MaxBotix Code ExamplesMaxBotix Code Examples
MaxBotix Code Examples
 
Xbee Wireless Throttle Position Sensor And Control
Xbee Wireless Throttle Position Sensor  And ControlXbee Wireless Throttle Position Sensor  And Control
Xbee Wireless Throttle Position Sensor And Control
 
Wireless Microcontroller (IEEE802.15.4 and ZigBee): JN5139
Wireless Microcontroller  (IEEE802.15.4 and ZigBee): JN5139Wireless Microcontroller  (IEEE802.15.4 and ZigBee): JN5139
Wireless Microcontroller (IEEE802.15.4 and ZigBee): JN5139
 
Training Report on embedded Systems and Robotics
Training Report on embedded  Systems and RoboticsTraining Report on embedded  Systems and Robotics
Training Report on embedded Systems and Robotics
 
Scaling Down Instrumentation Deploying Analog Mixed Signal Technology
Scaling Down Instrumentation Deploying Analog Mixed Signal TechnologyScaling Down Instrumentation Deploying Analog Mixed Signal Technology
Scaling Down Instrumentation Deploying Analog Mixed Signal Technology
 
Radio Astronomy and electronics
Radio Astronomy and electronicsRadio Astronomy and electronics
Radio Astronomy and electronics
 

More from Vijay Kumar Jadon

More from Vijay Kumar Jadon (16)

Co jan22
Co jan22Co jan22
Co jan22
 
Session 2 jan17
Session 2 jan17Session 2 jan17
Session 2 jan17
 
Outcome Based Education and Assessment
Outcome Based Education and AssessmentOutcome Based Education and Assessment
Outcome Based Education and Assessment
 
Analysis and design eccentric loading
Analysis and design eccentric loadingAnalysis and design eccentric loading
Analysis and design eccentric loading
 
Program outcome maping
Program outcome mapingProgram outcome maping
Program outcome maping
 
Concept of state of stress and strain
Concept of state of stress and strainConcept of state of stress and strain
Concept of state of stress and strain
 
Free Body Diagram - FBD
Free Body Diagram - FBDFree Body Diagram - FBD
Free Body Diagram - FBD
 
tensile test - stress strain curve
tensile test - stress strain curvetensile test - stress strain curve
tensile test - stress strain curve
 
Design equation for static load
Design equation for static loadDesign equation for static load
Design equation for static load
 
Introduction to Aerial Robotics
Introduction to Aerial RoboticsIntroduction to Aerial Robotics
Introduction to Aerial Robotics
 
Aerial Robotics
Aerial RoboticsAerial Robotics
Aerial Robotics
 
Tensile test
Tensile testTensile test
Tensile test
 
Design equation for static load
Design equation for static loadDesign equation for static load
Design equation for static load
 
Machine design philosophy
Machine design philosophyMachine design philosophy
Machine design philosophy
 
quadcopter modelling and controller design
quadcopter modelling and controller designquadcopter modelling and controller design
quadcopter modelling and controller design
 
Mechanics of Quadcopter
Mechanics of QuadcopterMechanics of Quadcopter
Mechanics of Quadcopter
 

Recently uploaded

Online blood donation management system project.pdf
Online blood donation management system project.pdfOnline blood donation management system project.pdf
Online blood donation management system project.pdfKamal Acharya
 
HYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generationHYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generationRobbie Edward Sayers
 
Online resume builder management system project report.pdf
Online resume builder management system project report.pdfOnline resume builder management system project report.pdf
Online resume builder management system project report.pdfKamal Acharya
 
ASME IX(9) 2007 Full Version .pdf
ASME IX(9)  2007 Full Version       .pdfASME IX(9)  2007 Full Version       .pdf
ASME IX(9) 2007 Full Version .pdfAhmedHussein950959
 
School management system project report.pdf
School management system project report.pdfSchool management system project report.pdf
School management system project report.pdfKamal Acharya
 
Scaling in conventional MOSFET for constant electric field and constant voltage
Scaling in conventional MOSFET for constant electric field and constant voltageScaling in conventional MOSFET for constant electric field and constant voltage
Scaling in conventional MOSFET for constant electric field and constant voltageRCC Institute of Information Technology
 
AI for workflow automation Use cases applications benefits and development.pdf
AI for workflow automation Use cases applications benefits and development.pdfAI for workflow automation Use cases applications benefits and development.pdf
AI for workflow automation Use cases applications benefits and development.pdfmahaffeycheryld
 
Halogenation process of chemical process industries
Halogenation process of chemical process industriesHalogenation process of chemical process industries
Halogenation process of chemical process industriesMuhammadTufail242431
 
Arduino based vehicle speed tracker project
Arduino based vehicle speed tracker projectArduino based vehicle speed tracker project
Arduino based vehicle speed tracker projectRased Khan
 
ENERGY STORAGE DEVICES INTRODUCTION UNIT-I
ENERGY STORAGE DEVICES  INTRODUCTION UNIT-IENERGY STORAGE DEVICES  INTRODUCTION UNIT-I
ENERGY STORAGE DEVICES INTRODUCTION UNIT-IVigneshvaranMech
 
Introduction to Machine Learning Unit-4 Notes for II-II Mechanical Engineering
Introduction to Machine Learning Unit-4 Notes for II-II Mechanical EngineeringIntroduction to Machine Learning Unit-4 Notes for II-II Mechanical Engineering
Introduction to Machine Learning Unit-4 Notes for II-II Mechanical EngineeringC Sai Kiran
 
Peek implant persentation - Copy (1).pdf
Peek implant persentation - Copy (1).pdfPeek implant persentation - Copy (1).pdf
Peek implant persentation - Copy (1).pdfAyahmorsy
 
Construction method of steel structure space frame .pptx
Construction method of steel structure space frame .pptxConstruction method of steel structure space frame .pptx
Construction method of steel structure space frame .pptxwendy cai
 
NO1 Pandit Amil Baba In Bahawalpur, Sargodha, Sialkot, Sheikhupura, Rahim Yar...
NO1 Pandit Amil Baba In Bahawalpur, Sargodha, Sialkot, Sheikhupura, Rahim Yar...NO1 Pandit Amil Baba In Bahawalpur, Sargodha, Sialkot, Sheikhupura, Rahim Yar...
NO1 Pandit Amil Baba In Bahawalpur, Sargodha, Sialkot, Sheikhupura, Rahim Yar...Amil baba
 
Introduction to Machine Learning Unit-5 Notes for II-II Mechanical Engineering
Introduction to Machine Learning Unit-5 Notes for II-II Mechanical EngineeringIntroduction to Machine Learning Unit-5 Notes for II-II Mechanical Engineering
Introduction to Machine Learning Unit-5 Notes for II-II Mechanical EngineeringC Sai Kiran
 
Automobile Management System Project Report.pdf
Automobile Management System Project Report.pdfAutomobile Management System Project Report.pdf
Automobile Management System Project Report.pdfKamal Acharya
 
ONLINE CAR SERVICING SYSTEM PROJECT REPORT.pdf
ONLINE CAR SERVICING SYSTEM PROJECT REPORT.pdfONLINE CAR SERVICING SYSTEM PROJECT REPORT.pdf
ONLINE CAR SERVICING SYSTEM PROJECT REPORT.pdfKamal Acharya
 
KIT-601 Lecture Notes-UNIT-4.pdf Frequent Itemsets and Clustering
KIT-601 Lecture Notes-UNIT-4.pdf Frequent Itemsets and ClusteringKIT-601 Lecture Notes-UNIT-4.pdf Frequent Itemsets and Clustering
KIT-601 Lecture Notes-UNIT-4.pdf Frequent Itemsets and ClusteringDr. Radhey Shyam
 
Top 13 Famous Civil Engineering Scientist
Top 13 Famous Civil Engineering ScientistTop 13 Famous Civil Engineering Scientist
Top 13 Famous Civil Engineering Scientistgettygaming1
 
Pharmacy management system project report..pdf
Pharmacy management system project report..pdfPharmacy management system project report..pdf
Pharmacy management system project report..pdfKamal Acharya
 

Recently uploaded (20)

Online blood donation management system project.pdf
Online blood donation management system project.pdfOnline blood donation management system project.pdf
Online blood donation management system project.pdf
 
HYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generationHYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generation
 
Online resume builder management system project report.pdf
Online resume builder management system project report.pdfOnline resume builder management system project report.pdf
Online resume builder management system project report.pdf
 
ASME IX(9) 2007 Full Version .pdf
ASME IX(9)  2007 Full Version       .pdfASME IX(9)  2007 Full Version       .pdf
ASME IX(9) 2007 Full Version .pdf
 
School management system project report.pdf
School management system project report.pdfSchool management system project report.pdf
School management system project report.pdf
 
Scaling in conventional MOSFET for constant electric field and constant voltage
Scaling in conventional MOSFET for constant electric field and constant voltageScaling in conventional MOSFET for constant electric field and constant voltage
Scaling in conventional MOSFET for constant electric field and constant voltage
 
AI for workflow automation Use cases applications benefits and development.pdf
AI for workflow automation Use cases applications benefits and development.pdfAI for workflow automation Use cases applications benefits and development.pdf
AI for workflow automation Use cases applications benefits and development.pdf
 
Halogenation process of chemical process industries
Halogenation process of chemical process industriesHalogenation process of chemical process industries
Halogenation process of chemical process industries
 
Arduino based vehicle speed tracker project
Arduino based vehicle speed tracker projectArduino based vehicle speed tracker project
Arduino based vehicle speed tracker project
 
ENERGY STORAGE DEVICES INTRODUCTION UNIT-I
ENERGY STORAGE DEVICES  INTRODUCTION UNIT-IENERGY STORAGE DEVICES  INTRODUCTION UNIT-I
ENERGY STORAGE DEVICES INTRODUCTION UNIT-I
 
Introduction to Machine Learning Unit-4 Notes for II-II Mechanical Engineering
Introduction to Machine Learning Unit-4 Notes for II-II Mechanical EngineeringIntroduction to Machine Learning Unit-4 Notes for II-II Mechanical Engineering
Introduction to Machine Learning Unit-4 Notes for II-II Mechanical Engineering
 
Peek implant persentation - Copy (1).pdf
Peek implant persentation - Copy (1).pdfPeek implant persentation - Copy (1).pdf
Peek implant persentation - Copy (1).pdf
 
Construction method of steel structure space frame .pptx
Construction method of steel structure space frame .pptxConstruction method of steel structure space frame .pptx
Construction method of steel structure space frame .pptx
 
NO1 Pandit Amil Baba In Bahawalpur, Sargodha, Sialkot, Sheikhupura, Rahim Yar...
NO1 Pandit Amil Baba In Bahawalpur, Sargodha, Sialkot, Sheikhupura, Rahim Yar...NO1 Pandit Amil Baba In Bahawalpur, Sargodha, Sialkot, Sheikhupura, Rahim Yar...
NO1 Pandit Amil Baba In Bahawalpur, Sargodha, Sialkot, Sheikhupura, Rahim Yar...
 
Introduction to Machine Learning Unit-5 Notes for II-II Mechanical Engineering
Introduction to Machine Learning Unit-5 Notes for II-II Mechanical EngineeringIntroduction to Machine Learning Unit-5 Notes for II-II Mechanical Engineering
Introduction to Machine Learning Unit-5 Notes for II-II Mechanical Engineering
 
Automobile Management System Project Report.pdf
Automobile Management System Project Report.pdfAutomobile Management System Project Report.pdf
Automobile Management System Project Report.pdf
 
ONLINE CAR SERVICING SYSTEM PROJECT REPORT.pdf
ONLINE CAR SERVICING SYSTEM PROJECT REPORT.pdfONLINE CAR SERVICING SYSTEM PROJECT REPORT.pdf
ONLINE CAR SERVICING SYSTEM PROJECT REPORT.pdf
 
KIT-601 Lecture Notes-UNIT-4.pdf Frequent Itemsets and Clustering
KIT-601 Lecture Notes-UNIT-4.pdf Frequent Itemsets and ClusteringKIT-601 Lecture Notes-UNIT-4.pdf Frequent Itemsets and Clustering
KIT-601 Lecture Notes-UNIT-4.pdf Frequent Itemsets and Clustering
 
Top 13 Famous Civil Engineering Scientist
Top 13 Famous Civil Engineering ScientistTop 13 Famous Civil Engineering Scientist
Top 13 Famous Civil Engineering Scientist
 
Pharmacy management system project report..pdf
Pharmacy management system project report..pdfPharmacy management system project report..pdf
Pharmacy management system project report..pdf
 

Inertial Measurement Unit-Accelerometer and Gyroscope MPU6050

  • 2. Micro: Very small in size. Measured in micrometer(μm) 1 μm = 10-6 m Electro: MEMS have electrical components Mechanical: MEMS have moving parts Systems: Refers to integration of components. We find MEMS in Automobiles (Air bag sensors) Computer printers (Ink jet print heads) Cell phones (RF devices) Optical devices (Micromirrors) MEMS They have also found application in the healthcare domain in devices such as blood pressure monitors, pacemakers, ventilators, and respirators. Air bag crash sensors Active suspension systems Antilock brake systems Ride control systems V K Jadon, Prof., Mechanical Engineering, Chitkara University 2
  • 3. Accelerometer 𝑥, 𝑎 𝑘 𝑚 𝑥, 𝑎 𝑘 𝑚 𝑥, 𝑎 −𝑘𝑥 = 𝑚𝑎 𝑘 𝑚 𝑚𝑎𝑠𝑠 𝑖𝑠 𝑑𝑖𝑠𝑝𝑙𝑎𝑐𝑒𝑑 𝑎 = − 𝑘 𝑚 𝑥 𝑎 = 𝑓(𝑥) External Force in the direction of displacement =mass×acceleration 𝑚 𝑘𝑥 𝑎 𝐶 = 𝑓(𝐴/𝑥) 𝐶 = 𝑓(𝐴/𝑎) Accelerometer measures linear acceleration Acceleration is opposite to the displacement 𝐶 = 𝑐𝑎𝑝𝑎𝑐𝑖𝑡𝑎𝑛𝑐𝑒 𝐴 = surface area of capacitor plates V K Jadon, Prof., Mechanical Engineering, Chitkara University 3
  • 4. Displacement of the frame changes the differential capacitance Capacitive accelerometers offer high sensitivities and are utilized for low-amplitude, low-frequency devices. Accelerometer 𝒙 𝒛 𝒚 Internal moveable assembly Proof mass Spring External Fixed assembly MPU6050 measures linear acceleration in terms of g force Usefulness of accelerometer in IMU will be discussed later V K Jadon, Prof., Mechanical Engineering, Chitkara University 4
  • 5. VCC GND SCL SDA XDA XCL ADO INT X Y I2C ProtocolGyro Accelerometer MPU6050 Pinout Clock pulse for I2C Communication Data through I2C communication Data to external sensors Clock pulse to external sensors I2C Slave Address Interrupt digital output The SCL line is the clock signal which synchronize the data transfer between the devices on the I2C bus. Clock signal is generated by the master device.
  • 6. The full scale range of the digital output can be adjusted to ±2g, ±4g, ±8g, or ±16g. Three-Axis MEMS Accelerometer with 16-bit ADCs and Signal Conditioning MPU6050: MEMS Accelerometer The MPU-60X0’s 3-Axis accelerometer uses separate proof masses for each axis. Acceleration along an axis induces displacement on the corresponding proof mass, and capacitive sensors detect the displacement differentially. When the device is placed on a flat surface, it will measure 0g on the X- and Y-axes and +1g on the Z-axis (upward). Each sensor has a dedicated ADC for providing digital outputs. V K Jadon, Prof., Mechanical Engineering, Chitkara University 6
  • 7. UNO Arduino AREF GND 13 12 ~11 ~10 ~9 8 7 ~6 ~5 4 ~3 2 TX-1 RX-0 IOREF RESET 3.3V 5V GND GND Vin A0 A1 A2 A3 A4 A5 ON TX RX L Arduino Uno Pinout master out slave in master in slave out Serial Clock Slave Select V K Jadon, Prof., Mechanical Engineering, Chitkara University 7
  • 10. I2C Protocol V K Jadon, Prof., Mechanical Engineering, Chitkara University 10 • Begins with a start bit • 7 bit Address is transmitted • 1 control bit to indicate Master to Read from or write to slave • If communicated slave send ack bit to Master • Master to send 8 bit Internal Register Address • Slave send back ack bit • Master transmits data in 8 bits chunk • Write request – Slave sends ack bit to Master • Read request – Master sends ack bit to Slave I2C addresses are generally 7 bits, yielding an address between 0 and 127. The addresses from 0 to 7 are not used because are reserved. So, the first address that can be used is 8 S B6 B5 B4 B3 B2 B1 B0 R/W Ack B7 B6 B5 B4 B3 B2 B1 B0 Ack B7 B6 B5 B4 B3 B2 B1 B0 Ack S 7 bit Device Address sequence 8 bit internal Register Address sequence 8 bit data sequence • Ends with a stop bit
  • 11. V K Jadon, Prof., Mechanical Engineering, Chitkara University 11 <Wire.h> Library Wire.begin(address) function initiates Wire library Wire.beginTransmission(address) begins transmission to the particular sensor Wire.beginTransmission(0b1101000) Wire.endTransmission(address) Transmits data in buffer and return a status byte, 0 for success. Wire.endTransmission(0b1101000) write() buffers data for sending Wire.write(value) Wire.write(string) Wire.write(data, length) value: a value to send as a single byte string: a string to send as a series of bytes data: an array of data to send as bytes length: the number of bytes to transmit write() will return the number of bytes written, though reading that number is optional address: the 7-bit slave address (optional); if not specified, join the bus as a master. Start condition to the slave device with the given address. It asks for data from the internal registers of the slave device S B6 B5 B4 B3 B2 B1 B0 R/W A B7 B6 B5 B4 B3 B2 B1 B0 A B7 B6 B5 B4 B3 B2 B1 B0 A S
  • 12. V K Jadon, Prof., Mechanical Engineering, Chitkara University 12 <Wire.h> Library requestFrom() Used by the master to request bytes from a slave device.. The default value is true. If true, requestFrom() sends a stop message after the request, releasing the I2C bus. If false, requestFrom() sends a restart message after the request. Wire.requestFrom(address, quantity) Wire.requestFrom(address, quantity, stop) If false, the bus will not be released, which prevents another master device from requesting between messages. This allows one master device to send multiple requests while in control. The Wire.available() function will return the number of bytes available for retrieval and if that number match with our requested bytes Wire.read() function we will read the bytes from the two registers of the X axis. I2C Scanner
  • 15. V K Jadon, Prof., Mechanical Engineering, Chitkara University 15 MPU6050 Setup Read Accelerometer data using Arduino Start I2C Communication ― Use Wire.begin() to initiate wire.h ― Wire.beginTransmission(SDA) Slave Device Address (SDA)=1101000 AD0=Low Slave Device Address (SDA)=1101001 AD0=High Reference – Product Specifications (Revision 3.4) Section 9.2 pp33 ― Wire.write(0x6B) Internal Register Address Sequence to access Power management register (0x6B) ― Wire.write(0b00000000) Data Transfer Bit Sequence to awake MPU ― Wire.endTransmission(1101000)
  • 16. FS Range AFS_SEL Register Bit LSB Sensitivity ADC Bits ±2g 0 0b00000000 16384 LSB/g 15 bit ±4g 1 0b00001000 8192 LSB/g 14 bits ±8g 2 0b00010000 4096 LSB/g 13 bits ±16g 3 0b00011000 2048 LSB/g 12 bits 𝑥 ≈ 0 𝑦 ≈ 0 𝑧 ≈ 1𝑔 𝑦 ≈ 0 𝑧 ≈ 0 𝑥 ≈ 1𝑔 𝑧 ≈ 0 𝑥 ≈ 0 𝑦 ≈ 1𝑔 V K Jadon, Prof., Mechanical Engineering, Chitkara University 16 Accelerometer Setup The MPU-60X0 features three 16-bit ADCs for digitizing the accelerometer outputs. For precision tracking of both fast and slow motions, the parts feature a user- programmable accelerometer full-scale range of ±2g, ±4g, ±8g, and ±16g. Reference – Product Specifications (Revision 3.4) Section 6.2 pp13 ― Wire.beginTransmission(0b1101000) ― Wire.write(0b00000000) ― Wire.endTransmission(0b1101000) ― Wire.write(0x1C)Reference – Register Map and Description (Revision 4.2) Section 4.5 pp15 Reference – Product Specifications (Revision 3.4) Section 3.1 pp7
  • 17. V K Jadon, Prof., Mechanical Engineering, Chitkara University 17 Read Accelerometer Data Reference – Register Map (Revision 4.2) Section 3 pp7 Wire.beginTransmission(0b1101000) 3B and 3C stores Acceleration data along x-axis 3D and 3E stores Acceleration data along y-axis 3F and 40 stores Acceleration data along z-axis We should give starting Internal Register Address to access all Read only registers after that. To transmit all acceleration data, we should write to 0x3B register. ― Wire.write(0x3B) Slave device transmit data in 8 bits(1 byte) Master store integers in 16 bits. ― Wire.endTransmission(0b1101000)
  • 18. V K Jadon, Prof., Mechanical Engineering, Chitkara University 18 Read Accelerometer Data For getting hold of the data available in buffer, master has to request using Wire.requestFrom(address, quantity) Wire.requestFrom(0b1101000, 6)Check availability of the data requested by the master Wire.available() It returns the number of received bytes from receive-buffer. Reads a byte that was transmitted from a slave device to a master after a call to requestFrom() using Wire.read() function. The each acceleration data is stored in two register (2 bytes) The data read is to be stored in one variable of int datatype. Every repeated Wire.read() gives the next byte available. accel_rawX = Wire.read()<<8|Wire.read(); 00001010 00001111 00001010-00000000 00001010-00001111 00001010
  • 19. V K Jadon, Prof., Mechanical Engineering, Chitkara University 19 Arduino Pseudo Code Set-Up MPU6050 Configure Accelerometer Read Accelerometer Data Every task starts with beginning communication with slave device and ends with terminating communication with slave device begin communication – Slave device address sequence access power management register – internal register address sequence Update power management register to disable SLEEP mode – data transfer sequence terminate communication – stop bit (one time execution) (one time execution) begin communication – Slave device address sequence access accelerometer configure register – internal register address sequence update accelerometer register to set full scale range – data transfer sequence terminate communication – stop bit (data needed continuously) Disable SLEEP mode Set Full Scale range Read accelerometer data
  • 20. V K Jadon, Prof., Mechanical Engineering, Chitkara University 20 Arduino Pseudo Code Set-Up MPU6050 Configure Accelerometer Read Accelerometer Data Every task starts with beginning communication with slave device and ends with terminating communication with slave device (data needed continuously) Disable SLEEP mode Set Full Scale range Access Register Read Data begin communication stop communication access accelerometer first data register Read accelerometer data begin communication stop communication Request data Check availability Read 8 bits and store in 16 bits data
  • 21. V K Jadon, Prof., Mechanical Engineering, Chitkara University 21 Angle Measurement 𝐹𝑥 𝒙 𝒚 𝒛 𝐹𝑦 𝐹𝑧 𝐹𝑥 2 + 𝐹𝑦 2 + 𝐹𝑧 2 𝐹𝑥 2 + 𝐹𝑦 2 𝐹𝑦 2 + 𝐹𝑧 2 𝐹𝑥 2 + 𝐹𝑧 2 𝒙 𝒚 𝒛 𝐹𝑥 2 + 𝐹𝑦 2 𝐹𝑦 2 + 𝐹𝑧 2 𝐹𝑥 2 + 𝐹𝑧 2
  • 22. V K Jadon, Prof., Mechanical Engineering, Chitkara University 22 There are six possible orderings of these three rotation matrices and, in principle, all are equally valid Angle Measurement 𝜓, ∅, 𝜃 are called as Roll, Pitch, and Yaw Angles 𝑅 𝑥 = 1 0 0 0 𝑐𝑜𝑠𝜓 −𝑠𝑖𝑛𝜓 0 𝑠𝑖𝑛𝜓 𝑐𝑜𝑠𝜓 𝑅 𝑦 = 𝑐𝑜𝑠∅ 0 𝑠𝑖𝑛∅ 0 1 0 −𝑠𝑖𝑛∅ 0 𝑐𝑜𝑠∅ 𝑅 𝑧 = 𝑐𝑜𝑠𝜃 −𝑠𝑖𝑛𝜃 0 𝑠𝑖𝑛𝜃 𝑐𝑜𝑠𝜃 0 0 0 1 Initial force vector= 0 0 1 𝑮 𝒑 = 𝑮 𝒑𝒙 𝑮 𝒑𝒚 𝑮 𝒑𝒛 = 𝑹 0 0 1 𝑹 𝒙𝒚𝒛 0 0 1 = 𝑹 𝒙(𝜓)𝑹 𝒚(∅) 𝑹 𝒛(𝜃) 0 0 1 𝑹 𝒚𝒛𝒙 0 0 1 = 𝑹 𝒚(∅) 𝑹 𝒛(𝜃)𝑹 𝒙(𝜓) 0 0 1 𝑹 𝒚𝒙𝒛 0 0 1 = 𝑹 𝒚(∅) 𝑹 𝒙(𝜓)𝑹 𝒛(𝜃) 0 0 1 𝑹 𝒛𝒙𝒚 0 0 1 = 𝑹 𝒛(𝜃)𝑹 𝒙(𝜓)𝑹 𝒚(∅) 0 0 1 𝑹 𝒙𝒛𝒚 0 0 1 = 𝑹 𝒙(𝜓)𝑹 𝒛(𝜃)𝑹 𝒚(∅) 0 0 1 𝑹 𝒛𝒚𝒙 0 0 1 = 𝑹 𝒛(𝜃)𝑹 𝒚(∅)𝑹 𝒙(𝜓) 0 0 1
  • 23. V K Jadon, Prof., Mechanical Engineering, Chitkara University 23 The last four rotation sequences result in the accelerometer output being function of all three rotation angles and cannot therefore be solved. It is conventional therefore to select either the rotation sequence 𝑅 𝑥𝑦𝑧 or the sequence 𝑅 𝑦𝑥𝑧 to eliminate the yaw rotation ψ and allow solution for the roll φ and pitch θ angles. Angle Measurement 𝑮 𝒑 = 𝑮 𝒑𝒙 𝑮 𝒑𝒚 𝑮 𝒑𝒛 = 𝟏 𝐺 𝑝𝑥 2 + 𝐺 𝑝𝑦 2 + 𝐺 𝑝𝑧 2 𝐺 𝑝𝑥 𝐺 𝑝𝑦 𝐺 𝑝𝑧 = 𝐺 𝑝𝑥 𝐺 𝑝𝑦 𝐺 𝑝𝑧 𝑅 𝑥𝑦𝑧 0 0 1 = 𝑅 𝑥(𝜓)𝑅 𝑦(∅) 𝑅 𝑧(𝜃) 0 0 1 𝑅 𝑥𝑦𝑧 = 𝑐𝑜𝑠∅𝑐𝑜𝑠𝜃 𝑐𝑜𝑠∅𝑠𝑖𝑛𝜃 −𝑠𝑖𝑛∅ 𝑐𝑜𝑠𝜃𝑠𝑖𝑛∅𝑠𝑖𝑛𝜓 − 𝑐𝑜𝑠𝜓𝑠𝑖𝑛𝜃 𝑐𝑜𝑠𝜓𝑐𝑜𝑠𝜃 + 𝑠𝑖𝑛∅𝑠𝑖𝑛𝜓𝑠𝑖𝑛𝜃 𝑐𝑜𝑠∅𝑠𝑖𝑛𝜓 𝑐𝑜𝑠𝜓𝑐𝑜𝑠𝜃𝑠𝑖𝑛∅ + 𝑠𝑖𝑛𝜓𝑠𝑖𝑛𝜃 𝑐𝑜𝑠𝜓𝑠𝑖𝑛∅𝑠𝑖𝑛𝜃 − 𝑐𝑜𝑠∅𝑠𝑖𝑛𝜓 𝑐𝑜𝑠∅𝑐𝑜𝑠𝜓 𝑅 𝑥𝑦𝑧 = −𝑠𝑖𝑛∅ 𝑐𝑜𝑠∅𝑠𝑖𝑛𝜓 𝑐𝑜𝑠∅𝑐𝑜𝑠𝜓 𝑅 𝑦𝑥𝑧 = 𝑅 𝑦(∅) 𝑅 𝑥(𝜓)𝑅 𝑧(𝜃) 0 0 1 = −𝑠𝑖𝑛𝜓𝑠𝑖𝑛𝜃 𝑠𝑖𝑛𝜓 𝑐𝑜𝑠∅𝑐𝑜𝑠𝜓 𝑅 𝑥𝑧𝑦 = 𝑅 𝑥(𝜓)𝑅 𝑧(𝜃)𝑅 𝑦(∅) 0 0 1 = −𝑐𝑜𝑠𝜃𝑠𝑖𝑛∅ 𝑐𝑜𝑠∅𝑠𝑖𝑛𝜓 + 𝑐𝑜𝑠𝜓𝑠𝑖𝑛∅𝑠𝑖𝑛𝜃 𝑐𝑜𝑠𝜓𝑐𝑜𝑠∅ − 𝑠𝑖𝑛∅𝑠𝑖𝑛𝜓𝑠𝑖𝑛𝜃 𝑅 𝑥𝑧𝑦 = 𝑅 𝑥(𝜓)𝑅 𝑧(𝜃)𝑅 𝑦(∅) 0 0 1 = 𝑐𝑜𝑠∅𝑠𝑖𝑛𝜓𝑠𝑖𝑛𝜃 − 𝑐𝑜𝑠𝜓𝑠𝑖𝑛∅ 𝑐𝑜𝑠𝜃𝑠𝑖𝑛𝜓 𝑐𝑜𝑠∅𝑐𝑜𝑠𝜓 + 𝑠𝑖𝑛∅𝑠𝑖𝑛𝜓𝑠𝑖𝑛𝜃 𝑅 𝑧𝑦𝑥 = 𝑅 𝑧(𝜃)𝑅 𝑦(∅)𝑅 𝑥(𝜓) 0 0 1 = 𝑠𝑖𝑛𝜓𝑠𝑖𝑛𝜃 − 𝑐𝑜𝑠𝜓𝑐𝑜𝑠𝜃𝑠𝑖𝑛∅ 𝑐𝑜𝑠𝜃𝑠𝑖𝑛𝜓 + 𝑐𝑜𝑠𝜓𝑠𝑖𝑛𝜃𝑠𝑖𝑛∅ 𝑐𝑜𝑠∅𝑐𝑜𝑠𝜓 𝑅 𝑧𝑥𝑦 = 𝑅 𝑧(𝜃) 𝑅 𝑥(𝜓)𝑅 𝑦(∅) 0 0 1 = 𝑐𝑜𝑠∅𝑠𝑖𝑛𝜓𝑠𝑖𝑛𝜃 − 𝑐𝑜𝑠𝜃𝑠𝑖𝑛∅ 𝑐𝑜𝑠𝜃𝑐𝑜𝑠∅𝑠𝑖𝑛𝜓 + 𝑠𝑖𝑛∅𝑐𝑜𝑠𝜃 𝑐𝑜𝑠∅𝑐𝑜𝑠𝜓 Accelerometer Readings
  • 24. V K Jadon, Prof., Mechanical Engineering, Chitkara University 24 Angle Measurement Solving 𝑅 𝑥𝑦𝑧 for the Roll (𝜓) and Pitch (∅) Angles The rotation sequence 𝑅 𝑥𝑦𝑧 is widely used in the aerospace industry and is termed the 'aerospace rotation sequence‘. 𝐺 𝑝𝑥 𝐺 𝑝𝑦 𝐺 𝑝𝑧 = −𝑠𝑖𝑛∅ 𝑐𝑜𝑠∅𝑠𝑖𝑛𝜓 𝑐𝑜𝑠∅𝑐𝑜𝑠𝜓 𝐺 𝑝𝑥 = −𝑠𝑖𝑛∅ 𝐺 𝑝𝑦 = 𝑐𝑜𝑠∅𝑠𝑖𝑛𝜓 𝐺 𝑝𝑧 = 𝑐𝑜𝑠∅𝑐𝑜𝑠𝜓 tan 𝜓 𝑥𝑦𝑧 = 𝐺 𝑝𝑦 𝐺 𝑝𝑧 tan ∅ 𝑥𝑦𝑧 = −𝐺 𝑝𝑥 𝐺 𝑝𝑦 2 + 𝐺 𝑝𝑧 2 𝜋 4 − 3𝜋 4 𝑠𝑖𝑛 𝜋 4 = 1 2 𝑐𝑜𝑠 𝜋 4 = 1 2 𝑡𝑎𝑛 𝜋 4 = 1 𝑠𝑖𝑛 − 3𝜋 4 = − 1 2 𝑐𝑜𝑠 − 3𝜋 4 = − 1 2 𝑡𝑎𝑛 − 3𝜋 4 = 1 𝑡𝑎𝑛−1 1 1 = 𝑡𝑎𝑛−1 −1 −1 atan function does not distinguish between opposite angles atan2 function takes into account the ratio and sign of 𝑦 and 𝑥 𝑎𝑡𝑎𝑛2 1, 1 = 𝜋 4 𝑎𝑡𝑎𝑛2 −1, −1 = − 3𝜋 4
  • 26. 𝝎 𝑿𝒁 𝒀 MEMS gyroscopes measure the angular rate of rotation of one or more axes V K Jadon, Prof., Mechanical Engineering, Chitkara University Gyroscope 𝒗 𝑨 = 𝝎 × 𝒓 𝑨 𝝎 𝒙 𝒛 𝒚 Path of the ball as seen by an observer moving with table Path of the ball as seen from fixed frame 𝒗 𝑪 𝒙 𝒛 𝒚 Position of ball after some time ∆𝑡 𝒗 𝑩 𝑩 𝑩 Point B after time∆𝑡 𝒗 𝑨 𝒗 𝒃𝒂𝒍𝒍
  • 27. Ball has two velocities V K Jadon, Prof., Mechanical Engineering, Chitkara University Gyroscope 𝒗 𝑨 = 𝝎 × 𝒓 𝑨 𝒗 𝒃𝒂𝒍𝒍 𝝎 𝒙 𝒛 𝒚 𝝎 𝒗 𝒃𝒂𝒍𝒍 MEMS gyroscopes use vibrating mechanical elements (proof-mass) to sense rotation caused by Coriolis acceleration.
  • 28. The ADC sample rate is programmable from 8,000 samples per second, down to 3.9 samples per second, and user-selectable low-pass filters enable a wide range of cut-off frequencies. Three-Axis MEMS Gyroscope with 16-bit ADCs and Signal Conditioning Gyroscope Setup-MPU6050 V K Jadon, Prof., Mechanical Engineering, Chitkara University 28 The MPU-60X0 consists of three independent vibratory MEMS rate gyroscopes, which detect rotation about the X-, Y-, and Z- Axes. When the gyros are rotated about any of the sense axes, the Coriolis Effect causes a vibration that is detected by a capacitive pickoff. The signal is amplified, demodulated, and filtered to produce a voltage that is proportional to the angular rate. This voltage is digitized using individual on-chip 16-bit Analog-to- Digital Converters (ADCs) to sample each axis. The full-scale range of the gyro sensors may be digitally programmed to ±250, ±500, ±1000, or ±2000 degrees per second (dps).
  • 29. 𝑟𝑝𝑚 = 𝑟𝑎𝑛𝑔𝑒(°/𝑠) 360 × 60 Range Condition 𝒅𝒆𝒕𝒆𝒄𝒕𝒂𝒃𝒍𝒆 𝒓𝒑𝒎 Register Bit ±250 0 41.67 0x00000000 ±500 1 83.33 0x00001000 ±1000 2 166.7 0x00010000 ±2000 3 333.3 0x00011000 Gyroscope Setup V K Jadon, Prof., Mechanical Engineering, Chitkara University 29
  • 30. V K Jadon, Prof., Mechanical Engineering, Chitkara University For a FS_SEL =1 LSB Sensitivity = 65.5 Register Bit = 0x00001000 𝜔(𝑦𝑎𝑤 𝑟𝑜𝑡𝑎𝑡𝑖𝑜𝑛) = 1 0 𝑠 𝑔𝑦𝑟𝑜 𝑧 = 65.5 𝜔(𝑦𝑎𝑤 𝑟𝑜𝑡𝑎𝑡𝑖𝑜𝑛) = 5 0 𝑠 𝑔𝑦𝑟𝑜 𝑧 = 327.5 At any particular time To convert Gyro values into instantaneous angular rate 𝑖𝑛𝑠𝑡𝑎𝑛𝑡𝑎𝑛𝑒𝑜𝑢𝑠 𝑎𝑛𝑔𝑢𝑙𝑎𝑟 𝑟𝑎𝑡𝑒 = 𝑔𝑦𝑟𝑜 𝑥,𝑦,𝑧 𝐿𝑆𝐵 𝑆𝑒𝑛𝑠𝑖𝑡𝑖𝑣𝑖𝑡𝑦 = 327.5 65.5 = 5 0 𝑠 To measure total angle travelled add all instantaneous angles obtained for small time duration, ∆𝑡 𝜔 = 𝑑𝜃 𝑑𝑡 𝑑𝜃 = 𝜔𝑑𝑡 𝜃 = 𝑡1 𝑡2 𝜔𝑑𝑡 Gyroscope Data
  • 31. V K Jadon, Prof., Mechanical Engineering, Chitkara University 𝜃 = 𝑡1 𝑡2 𝜔𝑑𝑡 𝜔 𝑡 𝜔 𝑡 ∆𝑒 Drift error Drift error is gradual divergence between the true orientation and estimated orientation by gyro due to error in measurement. 𝑒 𝑡 Use other sensors to bring down the drift error to zero. Take angles with reference to world frame. Gradually apply corrections. • These correction are to be fast enough to fully compensate the drift error. • Slow enough to avoid jerky compensations Tilt Error or (roll and pitch angle error) Yaw Error Linear accelerometer Magnetometer The noise part is also integrated
  • 32. V K Jadon, Prof., Mechanical Engineering, Chitkara University gyro_pitch_angle=gyro_pitch_angle+ gyro_roll_angle * sin(gyro_z) gyro_roll_angle=gyro_roll_angle- gyro_pitch_angle * sin(gyro_z) Transfer of Yaw angles
  • 33. V K Jadon, Prof., Mechanical Engineering, Chitkara University The gyroscope drift is mainly due to the integration of two components: a slow changing, near-dc variable called bias instability and a higher frequency noise variable called angular random walk (ARW). The yaw axis is most sensitive to this drift. A good portion of the pitch (attitude) and roll axis gyroscope drift can be removed within an IMU through the use of accelerometer feedback to monitor position relative to gravity. Ideally, two references are needed to correct for gyroscope drift on all axes. An IMU with nine degrees of freedom typically provides additional magnetometer sensors - about 3 axes. A magnetometer senses field strength relative to the Earth’s magnetic North. These sensors can be used together with accelerometer data, as another external reference, to mitigate the impact of gyroscope drift error on the yaw axis.
  • 34. V K Jadon, Prof., Mechanical Engineering, Chitkara University However, design of proper spatial magnetometers can be a less reliable vector than an accelerometer, as there are many things that create magnetic fields within the same order of magnitude as that of the Earth. Another one of the more effective methods for cancelling long-term drift is to implement a zero angular velocity update to the gyroscope. Any time the device is known to be completely stationary, the gyroscope offset can be nulled to zero for that respective axis. This opportunity can vary wildly depending on the application. But any instance that the system is at a recurring resting state can be used for nulling, such as an idling car, a stationary autonomous robot, or the time between human foot steps. Of course, using a state-of-the-art IMU that has minimal bias instability within the design at the onset may offer the most immediate impact on gyroscope drift. The constant bias error of a gyroscope can be measured by taking the average of the output over a long period of time while the device is not rotating.
  • 35. Thanks V K Jadon, Prof., Mechanical Engineering, Chitkara University 35