You are on page 1of 26

https://learn.sparkfun.

com/tutorials/gyroscope

Digital Gyroscopes
Brian Margosian
Connor Donker
Nick Tountasakis

Tuesday, November 5th, 2013

Agenda

What is a gyroscope?
Why are they useful?
Project usage
Error compensation
Types of gyroscopes / interfacing
Question / Answer

What is a Gyroscope?
Device used to measure rotational velocity

https://learn.sparkfun.com/tutorials/accelerometer-basics/all

Mechanical Gyro
Spinning wheel with fixed axle
Mounted in 2 or 3 gimbals to allow rotation
Resists external torque

http://en.wikipedia.org/wiki/File:Gyroscope_operation.gif

Detailed explanation of the physics involved in a mechanical gyroscope can be


found at.. http://www.real-world-physics-problems.com/gyroscope-physics.html
3

MEMS Gyro

Small oscillating mass

http://sensorwiki.org/doku.php/sensors/gyroscope

Low-current electric signals produced


One mass per axis
Utilize Coriolis force

http://electroiq.com/blog/2010/11/introduction-to-mems-gyroscopes/

MEMS Gyro Cont.

http://sensorwiki.org/doku.php/sensors/gyroscope
5

Why are they useful?


Measure angular velocity
Projects

Aviation
Stability control
Image on spinning disc
Motion detection

http://www.eecs.umich.edu

Sources of Error
Gyro Drift:
Defined as gyro at resting state producing non-zero values
Drift seen at all rotational velocities, on all axes
Caused by heating up of gyroscope during operation
Unsteady input power source voltages contributes

Visualization of Gyro Drift

http://nxttime.wordpress.com/category/sensors/gyro-sensor/

How to Compensate
Multiple Options:
More expensive (+$5 - $10) premium on-chip temperature
compensation
Wait until sensor reaches maximum temperature, calculate offset
Drift not exactly constant, high accuracy requires moving
average calculation
Run gyroscope off of quality power supply
Can get by with batteries and voltage regulator

Gyros vs. Accelerometers

https://learn.sparkfun.com/tutorials/accelerometer-basics/all

Gyroscopes
Rotational motion

https://learn.sparkfun.com/tutorials/accelerometer-basics/all

Accelerometers
Linear motion

10

Gyros vs. Accelerometers cont.


Gyros:

Integrate rotational velocity to determine angular displacement


Susceptible to gyro drift
More resistant to external noise than accelerometers

Accelerometers:

Integrate linear acceleration to determine linear displacement


Measures linear motion with inertial resistive forces
Must continually compensate for gravity

IMU (Inertial Measurement Unit) - combination plus magnetometer


Detailed explanation how to combine data to determine full orientation:
http://www.instructables.com/id/Accelerometer-Gyro-Tutorial/#step1
11

So you want to add a gyroscope?

Range
Interface
Number of axes
Power
Bonus features
Interrupts
Temperature sensing
Internal LPF

https://www.sparkfun.com/products/9446

12

Device comparison
Device

Range

Interface

Price

Axes

Power

Bonus Features

LPY503AL

30/s

Analog

$30

2.7-3.6

Self-test, power-down, 1x and 4x

(4x

V6.8mA

outputs

output) or

or

120/s

1-5uA

L3G4200D

ITG-3200

250/s,

SPI

500/s

and I2C

2.4-3.6

Power-down and sleep mode,

V6.1mA

temperature sensor, High shock

or 2000

or

survivability

/s

5uA

2000/s

I2C

$50

$20

2.1-3.6

Programmable low pass filter,

V6.5mA

optional external clock input for better

or

clock accuracy, 1 interrupt output,

5uA

temperature sensor

Images and data courtsey of sparkfun.com

13

Analog Interfacing
X axis ADC

Analog Gyro

Y axis ADC

Microcontroller

Z axis ADC

Pros:
Cheaper
Easier to interpret data
Precision

Cons:
More parts
More pin usage
(dependant on ADCs)
Often higher power

14

Digital Interfacing
X axis ADC
Digital Gyro

Y axis ADC

Microcontroller

Z axis ADC

Pros:
Smaller package
Less power use
(fewer running components)
Fewer pins

Cons:
Often marginally more
expensive
Can be harder to interface

15

Sample I2C Transaction


0x28

0x28

0x29

0x2A

0x2B

0x2C

X data

Y data

0x2D

Z data

16

Sample I2C Transaction


0x28

0x28

0x29

0x2A

0x2B

0x2C

X data

Y data

0x2D

Z data

16

Sample I2C Transaction


0x28

0x28

0x29

0x2A

0x2B

0x2C

X data

Y data

0x2D

Z data

16

Sample I2C Transaction


0x28

0x28

0x29

0x2A

0x2B

0x2C

X data

Y data

0x2D

Z data

16

Sample I2C Transaction


0x28

0x28

0x29

0x2A

0x2B

0x2C

X data

Y data

0x2D

Z data

16

Sample I2C Transaction


0x28

0x28

0x29

0x2A

0x2B

0x2C

X data

Y data

0x2D

Z data

16

IMUs
Gyro, accelerometer,
magnetometer on board
Always digital
Degrees of freedom
Some come with onboard
processors
Can be pricey ($50-$125)

http://www.pololu.com/product/1268/

17

Summary
Gyroscope basics
What is a gyro?
Mechanical vs MEMS

Uses of Gyroscopes in projects


Gyro drawbacks
Gyro drift
Compensation

Interfacing
Analog
Digital

Image from: http://www.eeherald.com/section/design-guide/mems_application.html

18

But wait, theres more! (References)


High-level gyro usage/description:
https://learn.sparkfun.com/tutorials/gyroscope

Low-level description of MEMS Gyro:


http://en.wikipedia.org/wiki/Vibrating_structure_gyroscope#MEMS_gyroscope

Explanation of gyro drift and how to


compensate:
http://nxttime.wordpress.com/category/sensors/gyro-sensor/

Detailed explanation how to combine data to


determine full orientation:
http://www.instructables.com/id/Accelerometer-Gyro-Tutorial/#step1
19

https://learn.sparkfun.com/tutorials/gyroscope

Digital Gyroscopes
Brian Margosian
Connor Donker
Nick Tountasakis

Tuseday, November 5th, 2013

You might also like