Gyro sensor - How does it work? Pro Preview

You've seen the gyro sensor. It has two arrow. How does it work? What does it do?

To access the full video please subscribe to FLLCasts.com

Subscribe

  • #1199
  • 12 Apr 2019

Measure degrees

The Gyro sensor is used to detect degrees of a turn. Compared to the rotation sensor, that also detects turn degrees, the Gyro sensor is not connected to a specific motor and is not measuring how much the motor has rotate. It measures how much the robot has rotated. The two arrows are used to show us how to rotate it. If we rotate it in a direction different from the one shown by the arrows then the sensor will not detect anything. Connect your Gyro sensor to your brick and check the value detected by the sensor.

Gyro drift

Maybe it has already happen to some of you, but it is possible for the sensor to show measurements as if it is constantly turning despite you holding it stationary. This "Gyro drift" happens because the Gyro sensor has several internal sensors that share information and give us a combined value. This sensors are not measuring degrees, they are measuring acceleration. They measure how fast are we turning the sensor. 

The "Gyro drift" happens when we connect the sensor to the brick and we are in the same time moving the sensor. The sensor things that moving it is its normal state and when we stop moving it, it measures a change in acceleration. To avoid this be very careful not to plug in the sensor while it is moving. Try to reproduce the "gyro drift" yourself and see how it happens!

Acceleration to Degrees

But if the sensor detects acceleration how could it give us degrees? It is not very difficult, we could just add a stopwatch, that measures the duration of the acceleration and with a couple of equations the sensor gives us degrees.

Courses and lessons with this Tutorial

This Tutorial is used in the following courses and lessons

Image for Level D2. "Seafaring". Robotics with LEGO
  • 24
  • 2:49
  • 107
Image for Lesson 1 - Pedalo for fishing
  • 4
  • 4
  • 10
  • 3d_rotation 1
Image for Robotics with LEGO - Level 2.5 - Maritime Journey
  • 42
  • 3:52
  • 133
Image for Robotics with LEGO - Level 4.0 - Kinesthetic and Memory Game (in development)
  • 59
  • 2:58
  • 200