EV3 Sensors – LEGO Engineering (2024)

Sensors provide robots with information about their environment. With the sensors that come with the EV3, you can make a robot respond to being touched, react when someone or something comes too close,follow a line, or measure how far they have turned.

The selection of sensors in your kit depends on whether you have the Education or Retail version of the EV3 set. See below for a summary of how many of each kind of sensor come with the Education or Retail sets. The EV3 sensors are also available separately (e.g. from your local LEGO Education distributor).

In addition to the standard LEGO EV3 sensors that come with the Education and Retail versions of the EV3 set, it’s worth noting that there are also many third-party sensors available.

Touch sensor

EV3 Sensors – LEGO Engineering (1)The touch sensor gives your robot a sense of touch. The touch sensor detects when it is being pressed or released. It can even be programmed to wait until it is both pressed and released (we call this bumped).

Challenge suggestions

  • Create a “cookie clicker”-style game that display the number of times a touch sensor has been pressed.
  • Build a robot hand (or venus fly trap!) that closes when something touches it.
  • With two touch sensors and a couple of long wires, create a simple remote control.
  • Make a robot begin its programmed action when a touch sensor is pressed. This is particularly useful if, for example, the buttons on the EV3 bricks are difficult to reach.

Colour sensor (colour, light)

EV3 Sensors – LEGO Engineering (2)The colour (or color) sensor can detect either the colour or intensity of light.

The colour sensor has three different modes: colour, reflected light intensity, and ambient light intensity.

  • ColourIn this mode, the colour sensor can differentiate up to seven different colours: black, blue, green, yellow, red, white, and brown. Each colour is also represented by a value (see “Colour and light data table” below).Note: For best results, the colour sensor needs to be 1-2 cm away from the colour you are trying to detect, and have consistent lighting.
  • Reflected light intensity – In this mode, the colour sensor emits a red light and measures the amount reflected back into itself from the surface you are testing. The intensity of the light is measured as a percentage from 0 to 100, with 0 being very dark, and 100 being very bright.
  • Ambient light intensity – In this mode, the colour sensor measures the amount of light in its environment, without producing its own light source. Ambient light intensity is measured as a percentage from 0 to 100, with 0 being very dark, and 100 being very bright.

Challenge suggestions

  • Sort LEGO bricks based on their colour.
  • Drive across different coloured pieces of paper, responding to each colour with a different action
  • Create a barcode reader.
  • Program your robot to respond to masking tape placed on dark carpet.
  • Program a robot to stop when it reaches the edge of a table (ie. it detects no reflected light)
  • Follow the edge of a black line on a light background. As with detecting colour, for best results, the colour sensor needs to be between 1-2 cm away from the surface you are trying to measure.
  • Program your robot to respond differently based on the amount of light in a room, or if another light source shone onto the robot, such as a torch.

Colour and light data table

DataTypeRangeNotes
ColourNumeric0-7Used in Colour mode.
0 = No Colour
1 = Black
2 = Blue
3 = Green
4 = Yellow
5 = Red
6 = White
7 = Brown
LightNumeric0-100Used in Reflected Light Intensity and Ambient Light Intensity modes. Measures light intensity as a percentage, 0 = darkest, 100 = brightest.

Ultrasonic sensor (distance)

EV3 Sensors – LEGO Engineering (3)The ultrasonic sensor measures distance to an object up to amaximum of 255cm (or 100 inches) away. It does this by sending out high frequency sound waves that bounce off any object in range, and measuring how long it takes the sound to return to the sensor. In the software, you can select whether the distance is given in centimetres or inches.

The ultrasonic sensor also has a“listen only” mode that can detect whether another robot is using an ultrasonic sensor nearby. In this mode, the sensor listens for signals but does not send them.

Challenge suggestions

  • Program a robot to move around a room, avoiding objects in its path.
  • Using “listen only” mode, program a robot to react when it detects another robot operating its ultrasonic sensor nearby.

Gyro sensor (rotation/orientation)

EV3 Sensors – LEGO Engineering (4)The gyro sensor detects rotational motion in the plane indicated by the arrows on the top of the sensor housing. The sensor measures the rate of rotation in degrees per second and keeps track of the total angle of rotation in degrees.

Note: When connecting the gyro sensor to your EV3 brick, you should hold it completely still in order to minimise drift. For best results, reset the angle using the reset mode of the gyro sensorblock before every angle of motion you want to measure.

Challenge suggestions

  • Program your robot to turn a specified angle.
  • Program a robot to detect if it has fallen over.
  • Display how far your robot has turned.
  • Create a balancing robot.

Large and medium motors (rotation)

EV3 Sensors – LEGO Engineering (5)Both the large and medium servo motors are equipped with internal rotation sensors. The rotation sensor is used to measure how far a motor has turned (or has been turned). Rotation sensors can detect an amount of rotation in degrees or full rotations. You can also use the rotation sensor to find out what power level a motor is currently running at.

Challenge suggestions

  • Create a combination lock.
  • Create a trundle wheel, by attaching a wheel to the motor and using it to display the distance travelled.
  • Attach a levers to two motors and create a tank-style remote control for another EV3 robot using bluetooth communication.

Infrared sensor (distance)

EV3 Sensors – LEGO Engineering (6)The infrared sensor can measure distance or detect signals that are sent from the infrared beacon (see below).

The infrared sensor can be used in three different modes: proximity, beacon, and remote.

  • Proximity– The infrared sensor sends an infrared signal and detects the reflection of this signal by an object in front of the sensor. The strength of the reflected signal can be used to estimate the distance to the object. Its maximum range is approximately 100 cm.
  • Beacon– In this mode, the infrared sensor can detect an infrared beacon, set to beacon mode. The infrared sensor can detect the beacon’s proximity (relative distance from the sensor) and its heading (angle from the direction the sensor is pointing). See the tablebelow for more information.
  • Remote – The infrared sensor can detect button presses on the IR beacon.The infrared sensor can detect which button on the remote infrared beacon is pressed. You can also detect when certain combinations of two buttons are pressed at the same time.

Infrared beacon

EV3 Sensors – LEGO Engineering (7)The Infrared (IR) beacon is an infrared transmitter, and can be used in beacon or remote mode.

  • Beacon modeIn this mode, the beacon transmits an infrared signal continuously until you press the beacon mode button again to turn it off.
  • Remote mode – In this mode, the beacon can be used as a remote control.

The infrared sensor will only detect a beacon on the channel specified in the software. If two robots are remote controlled by two different infrared beacons, they should use different channels, otherwise one beacon will control all of the robots on its channel. See “Infrared Sensor Remote Mode Data Table” below for more information.

Note: The beacon mode button acts differently to the other four buttons. When you press the beacon mode button, the beacon starts transmitting continuously until you press it again to turn it off. The other four buttons only transmit when they are held down and stop transmitting when you release them.

Challenge suggestions

  • Make your robot seek out and drive towards the infrared beacon.
  • Use the infrared beacon as a remote control for your robot.

Infrared sensor beacon mode data table

DataTypeValuesNotes
DetectedLogicTrue/FalseTrue if an IR beacon is detected on the specified channel, otherwise False.
ProximityNumeric0 to 100The relative distance to the beacon. 0 means very close, and 100 means far away. The proximity will be 100 if the beacon is not detected at all.
HeadingNumeric-25 to 250 means the beacon is directly in front of the sensor, negative values are to the left, and positive values are to the right.

Infrared sensor remote mode data table

DataTypeRangeNotes
Button IDNumeric0 – 11Identifies which button, or combination of buttons, is pressed on the IR beacon.

0 = No button (and beacon mode is off)
1 = Button 1
2 = Button 2
3 = Button 3
4 = Button 4
5 = Both button 1 and button 3
6 = Both button 1 and button 4
7 = Both button 2 and button 3
8 = Both button 2 and button 4
9 = Beacon mode is on
10 = Both button 1 and button 2
11 = Both button 3 and button 4

EV3 Sensors included in the core sets

Here’s a summary of the sensors included in the Education and Retail versions of the EV3 core set.

SensorEducation Core Set (45544)Retail Core Set (31313)
Touch sensor21
Colour sensor11
Ultrasonic sensor10
Gyro sensor10
Large motor (rotation)22
Medium motor (rotation)11
Infrared (IR) sensor01
Infrared (IR) beacon01

The following two tabs change content below.

  • Bio
  • Latest Posts

EV3 Sensors – LEGO Engineering (8)

John operates as a Science and STEAM Specialist for students in NSW Primary schools. He is also the founder of “Sci-riffic” – a business that provides Professional Development for teachers in Science and LEGO Robotics. John holds a Bachelor of Education (Primary), a Certificate IV in Training & Assessment and is a qualified electronics technician, with experience in avionics and special effects for film and television.

EV3 Sensors – LEGO Engineering (9)

Latest posts by John Burfoot (see all)

  • Harvey Mk II: Improved Quick EV3 Robot Build - 27 September 2018
  • EV3 Sensors - 22 March 2018
  • EV3 Simulator using RobotC: QEV3BotSim - 31 October 2016
  • Programming Bluetooth on EV3 - 13 April 2015
  • Building with RCX/NXT lamps and EV3 pieces - 5 April 2015

Related Posts

  1. Light and Dark Scavenger Hunt
  2. NXT Sensors
  3. WeDo Sensors
EV3 Sensors – LEGO Engineering (2024)
Top Articles
Latest Posts
Article information

Author: Gregorio Kreiger

Last Updated:

Views: 6038

Rating: 4.7 / 5 (77 voted)

Reviews: 84% of readers found this page helpful

Author information

Name: Gregorio Kreiger

Birthday: 1994-12-18

Address: 89212 Tracey Ramp, Sunside, MT 08453-0951

Phone: +9014805370218

Job: Customer Designer

Hobby: Mountain biking, Orienteering, Hiking, Sewing, Backpacking, Mushroom hunting, Backpacking

Introduction: My name is Gregorio Kreiger, I am a tender, brainy, enthusiastic, combative, agreeable, gentle, gentle person who loves writing and wants to share my knowledge and understanding with you.