Rotation sensor - How does it work? Pro Preview

You should already know we can command motors for time, rotations and degrees. It is very clear what happens when we command the motor to move for 3 seconds forward – the brick transmits electric current to the motor which starts spinning and after 3 seconds the brick switches off the current and the motor stops.

However, what happens when we command the motor to move 3 rotations forward? Are there a group of little elves in the motor who count the rotations or is there another explanation?

To access the full video please subscribe to FLLCasts.com

Subscribe

  • #1092
  • 07 Jan 2019

The story about the elves is not far from true. Their role is performed by a rotation sensor. The rotation sensor is built in every EV3 or NXT motor. Thanks to that sensor the motor knows how many degrees it has rotated. But how does that happen?

How does the rotation sensor work?

To understand how the rotation sensor works, we should first disassemble the motor. It is not advisable you to do that which is why we have done it for you. You can see where the “magic” comes from:

The electric motor inside the motor uses a gear to rotate a special gear wheel:

As you can see, this gear wheel has a lot of holes:

Moreover, the motor is also equipped with a photocell:

When the gear wheel rotates, the photocell detects each hole. How does it work? With every rotation there is light going through each hole which the photocell detects. Between two consecutive holes, the gear wheel is opaque, so no light passes through it. 

Each hole corresponds to a half degree of a motor rotation. Therefore, if the photocell counts 300 holes, the motor has rotated 150 degrees.

Courses and lessons with this Tutorial

This Tutorial is used in the following courses and lessons

Image for Robotics with LEGO - Level 4.0 - Kinesthetic and Memory Game (in development)
  • 59
  • 2:58
  • 200
Image for Remember how to work with the rotation sensor
  • 3
  • 0
  • 0
  • 3d_rotation 0
Image for Level D1. "Animals". Robotics with LEGO
  • 23
  • 0:00
  • 102
Image for Lesson 1 - Clam
  • 7
  • 4
  • 15
  • 3d_rotation 1
Image for Robotics with LEGO - Level 2.5 - Maritime Journey
  • 42
  • 3:52
  • 133