FIRST LEGO League Challenge Sensors: Difference between revisions

From ORTOP Wiki
(→‎Gyro sensor: Added links to lessons)
 
(16 intermediate revisions by 2 users not shown)
Line 1: Line 1:
Sensors are used to serve as the "eyes and ears" of the robot to allow it to navigate on the playing field. Both the Mindstorms EV3 set and the SPIKE Prime set contain a collection of sensors that can be plugged into sockets (called ports) on the robot's hub. Team members can write programs that use the sensors to control the turns of the robot, keep it driving relatively straight, detect collisions or pending collision with obstacles, detect colors on the playing field, follow lines, etc. Using sensors can make the difference between a robot that sometimes reaches its goal and one that almost always does, allowing it to rack up points much more consistently.   
Sensors are used to serve as the "eyes and ears" of the robot to allow it to navigate on the playing field. Both the Mindstorms EV3 set and the SPIKE Prime set contain a collection of sensors that can be plugged into sockets (called ports) on the robot's hub. Team members can write programs that use the sensors to control the turns of the robot, keep it driving relatively straight, detect collisions or pending collision with obstacles, detect colors on the playing field, follow lines, etc. Using sensors can make the difference between a robot that sometimes reaches its goal and one that only sometimes does. In other words, using sensors can help a robot rack up more points more consistently.   


= SPIKE Prime Sensors =
= SPIKE Prime Sensors =


== Force sensor ==
== [https://le-www-live-s.legocdn.com/sc/media/files/support/spike-prime/techspecs_technicforcesensor-90c0fbe3fa0da1ff44b4759f4a6cae78.pdf Force sensor] ==
The force sensor allows the robot to measure newtons of force. This could allow the robot to use a lever arm to detect that it is getting close to a wall and adjust its course. Alternatively, the sensor can used as an on-off switch to determine what part of a program should be used, or it can be used to detect a tap or a bump.


The force sensor allows the robot to measure newtons of force. This could allow the robot to use a lever arm to detect that it is getting close to a wall and adjust its course. Alternatively, the sensor can used as an on-off switch to determine what part of a program should be used.  
== [https://le-www-live-s.legocdn.com/sc/media/files/support/spike-prime/techspecs_techniccolorsensor-745f78a43ab95084b0f387ece6422805.pdf Color sensor] ==
The color sensor can measure either the amount of reflected light that comes back when its built-in LED is pointed at an object or it can determine the color of the light that it receives. Reflected light is measured in percentage with a low number being no light and 100 being almost all the light was reflected. When used to detect a color you can choose black, magenta, blue, cyan, green, yellow, red, white or no color. These colors may not match the colors on the annual challenge mat. In that case, using the reflected light mode of the sensor may be a more accurate way to detect or follow a line.


== [https://education.lego.com/en-us/products/lego-technic-color-sensor/45605 Color sensor] ==
== [https://le-www-live-s.legocdn.com/sc/media/files/support/spike-prime/techspecs_technicdistancesensor-0c8e0242c7a21506a56240e73092ed93.pdf Distance Sensor] ==
 
The Distance Sensor returns the distance to an object in centimeters or inches. It gives the most accurate readings when it is mounted low on the robot and it takes readings to flat objects that are at right angles to the direction that the sensor is pointing. It will be less accurate when it is pointed at an object that is at an oblique angle or is round or cylindrical.
== Ultrasonic sensor ==


== Gyro sensor ==
== Gyro sensor ==
 
The gyro sensor is built into the [https://le-www-live-s.legocdn.com/sc/media/files/support/spike-prime/techspecs_techniclargehub-fba3b469ecb9eaafbde5f24d34ba090e.pdf SPIKE Prime hub]. While it can measure angular acceleration in three dimensions, the most common use is to measure how far the robot has turned to allow it to execute more precise turns.
The gyro sensor is built into the SPIKE Prime hub. While it can measure angular acceleration in three dimensions, the most common use is to measure how far the robot has turned to allow it to execute more precise turns.
* Gyro Turn: [https://education.lego.com/en-us/lessons/prime-competition-ready/training-camp-1-driving-around#coding-tips Training Camp 1] lesson from LEGO Education]
* Gyro Move Straight: [https://primelessons.org/en/ProgrammingLessons/GyroMoveStraight.pdf Move Straight] lesson from PrimeLessons.com


= Mindstorms EV3 Sensors =
= Mindstorms EV3 Sensors =
* Sample EV3 project files that feature use of sensors. These files can be downloaded and then opened using EV3-G.
** [https://drive.google.com/file/d/1Y-dzdcYEMJRamW-8BUG72ghUarkTDoyZ/view?usp=sharing Sensors Project from ORTOP EV3 Programming Workshop]


== [https://education.lego.com/en-us/products/ev3-touch-sensor/45507?gclid=CjwKCAjw4MP5BRBtEiwASfwAL17fJAYXA-zjYHOpyTyr9gly5RL02d1aIvTaOet6yT1AREf537feHBoCPTwQAvD_BwE&ef_id=CjwKCAjw4MP5BRBtEiwASfwAL17fJAYXA-zjYHOpyTyr9gly5RL02d1aIvTaOet6yT1AREf537feHBoCPTwQAvD_BwE:G:s&s_kwcid=AL!790!3!445977090943!b!!g!!&Buffer&cmp=KAC-INI-GOOGUS-GO-US-EN-RE-PS-BUY-CREATE-DSA-SHOP-XX-XX-RN-XX Touch sensor] ==
== [https://education.lego.com/en-us/products/ev3-touch-sensor/45507?gclid=CjwKCAjw4MP5BRBtEiwASfwAL17fJAYXA-zjYHOpyTyr9gly5RL02d1aIvTaOet6yT1AREf537feHBoCPTwQAvD_BwE&ef_id=CjwKCAjw4MP5BRBtEiwASfwAL17fJAYXA-zjYHOpyTyr9gly5RL02d1aIvTaOet6yT1AREf537feHBoCPTwQAvD_BwE:G:s&s_kwcid=AL!790!3!445977090943!b!!g!!&Buffer&cmp=KAC-INI-GOOGUS-GO-US-EN-RE-PS-BUY-CREATE-DSA-SHOP-XX-XX-RN-XX Touch sensor] ==
The touch sensor will report whether it is currently pressed or released. It can also be programmed to report whether it has been bumped or tapped.
== [https://education.lego.com/en-us/products/ev3-color-sensor/45506?gclid=CjwKCAjw4MP5BRBtEiwASfwALwELNY2AQNM3rGHGPZ5zit0wSCZxLRK1ezudZzWxxakFcv7NySie2RoCmOgQAvD_BwE&ef_id=CjwKCAjw4MP5BRBtEiwASfwALwELNY2AQNM3rGHGPZ5zit0wSCZxLRK1ezudZzWxxakFcv7NySie2RoCmOgQAvD_BwE:G:s&s_kwcid=AL!790!3!445977090943!b!!g!!&Buffer&cmp=KAC-INI-GOOGUS-GO-US-EN-RE-PS-BUY-CREATE-DSA-SHOP-XX-XX-RN-XX Color sensor] ==
== [https://education.lego.com/en-us/products/ev3-color-sensor/45506?gclid=CjwKCAjw4MP5BRBtEiwASfwALwELNY2AQNM3rGHGPZ5zit0wSCZxLRK1ezudZzWxxakFcv7NySie2RoCmOgQAvD_BwE&ef_id=CjwKCAjw4MP5BRBtEiwASfwALwELNY2AQNM3rGHGPZ5zit0wSCZxLRK1ezudZzWxxakFcv7NySie2RoCmOgQAvD_BwE:G:s&s_kwcid=AL!790!3!445977090943!b!!g!!&Buffer&cmp=KAC-INI-GOOGUS-GO-US-EN-RE-PS-BUY-CREATE-DSA-SHOP-XX-XX-RN-XX Color sensor] ==
The color sensor can measure amount of ambient light, the amount of reflected light that comes back when its built-in LED is pointed at an object or it can determine the color of the light that it receives. Reflected light is measured in percentage with a low number being no light and 100 being almost all the light was reflected. When the sensor is used to detect a color you can choose black, brown, blue, green, yellow, red, white or no color. These colors may not match the colors on the annual challenge mat. In that case, using the reflected light mode of the sensor may be a more accurate way to detect or follow a line.


== Ultrasonic sensor ==
== [https://education.lego.com/en-us/products/lego-mindstorms-education-ev3-ultrasonic-sensor/45504 Ultrasonic sensor] ==
The Ultrasonic Sensor returns the distance to an object in centimeters or inches. It gives the most accurate readings when it is mounted low on the robot and it takes readings to flat objects that are at right angles to the direction that the sensor is pointing. It will be less accurate when it is pointed at an object that is at an oblique angle or is round or cylindrical.


== [https://education.lego.com/en-us/products/lego-mindstorms-education-ev3-gyro-sensor-/45505 Gyro sensor] ==
== [https://education.lego.com/en-us/products/lego-mindstorms-education-ev3-gyro-sensor-/45505 Gyro sensor] ==
Line 28: Line 36:
**** [https://ev3lessons.com/en/ProgrammingLessons/advanced/GyroDriftTest.ev3 Code to test gyro drift]
**** [https://ev3lessons.com/en/ProgrammingLessons/advanced/GyroDriftTest.ev3 Code to test gyro drift]
**** [https://ev3lessons.com/en/ProgrammingLessons/advanced/GyroRevisited.ev3 Code to test which type of sensor you have]  
**** [https://ev3lessons.com/en/ProgrammingLessons/advanced/GyroRevisited.ev3 Code to test which type of sensor you have]  
**** Note: To use the test code, download it and import it into EV3-G.
**** Note: To use the test code, download it and open it using EV3-G.
*** [https://ev3lessons.com/en/ProgrammingLessons/advanced/scratch-GyroDrift.pdf EV3 Classroom]
*** [https://ev3lessons.com/en/ProgrammingLessons/advanced/scratch-GyroDrift.pdf EV3 Classroom]
** Gyro Turns
** Gyro Turns
*** [https://ev3lessons.com/en/ProgrammingLessons/advanced/GyroTurn.pdf EV3-G]
*** [https://ev3lessons.com/en/ProgrammingLessons/advanced/GyroTurn.pdf EV3-G]  
*** Note: The lesson above uses an older technique to calibrate the gyro, which may not work for newer gyro sensors. See the "Introduction to Gyro..." lesson above for a more reliable way to calibrate the gyro.
*** [https://ev3lessons.com/en/ProgrammingLessons/advanced/scratch-GyroTurn.pdf EV3 Classroom]
*** [https://ev3lessons.com/en/ProgrammingLessons/advanced/scratch-GyroTurn.pdf EV3 Classroom]
** Gyro Move Straight  
** Gyro Move Straight  
*** [https://ev3lessons.com/en/ProgrammingLessons/advanced/GyroMoveStraight.pdf EV3-G]
*** [https://ev3lessons.com/en/ProgrammingLessons/advanced/GyroMoveStraight.pdf EV3-G]
*** [https://ev3lessons.com/en/ProgrammingLessons/advanced/scratch-GyroMoveStraight.pdf EV3 Classroom]
*** [https://ev3lessons.com/en/ProgrammingLessons/advanced/scratch-GyroMoveStraight.pdf EV3 Classroom]
[[Category: FIRST LEGO League Challenge]]

Latest revision as of 01:34, 15 October 2020

Sensors are used to serve as the "eyes and ears" of the robot to allow it to navigate on the playing field. Both the Mindstorms EV3 set and the SPIKE Prime set contain a collection of sensors that can be plugged into sockets (called ports) on the robot's hub. Team members can write programs that use the sensors to control the turns of the robot, keep it driving relatively straight, detect collisions or pending collision with obstacles, detect colors on the playing field, follow lines, etc. Using sensors can make the difference between a robot that sometimes reaches its goal and one that only sometimes does. In other words, using sensors can help a robot rack up more points more consistently.

SPIKE Prime Sensors

Force sensor

The force sensor allows the robot to measure newtons of force. This could allow the robot to use a lever arm to detect that it is getting close to a wall and adjust its course. Alternatively, the sensor can used as an on-off switch to determine what part of a program should be used, or it can be used to detect a tap or a bump.

Color sensor

The color sensor can measure either the amount of reflected light that comes back when its built-in LED is pointed at an object or it can determine the color of the light that it receives. Reflected light is measured in percentage with a low number being no light and 100 being almost all the light was reflected. When used to detect a color you can choose black, magenta, blue, cyan, green, yellow, red, white or no color. These colors may not match the colors on the annual challenge mat. In that case, using the reflected light mode of the sensor may be a more accurate way to detect or follow a line.

Distance Sensor

The Distance Sensor returns the distance to an object in centimeters or inches. It gives the most accurate readings when it is mounted low on the robot and it takes readings to flat objects that are at right angles to the direction that the sensor is pointing. It will be less accurate when it is pointed at an object that is at an oblique angle or is round or cylindrical.

Gyro sensor

The gyro sensor is built into the SPIKE Prime hub. While it can measure angular acceleration in three dimensions, the most common use is to measure how far the robot has turned to allow it to execute more precise turns.

Mindstorms EV3 Sensors

Touch sensor

The touch sensor will report whether it is currently pressed or released. It can also be programmed to report whether it has been bumped or tapped.

Color sensor

The color sensor can measure amount of ambient light, the amount of reflected light that comes back when its built-in LED is pointed at an object or it can determine the color of the light that it receives. Reflected light is measured in percentage with a low number being no light and 100 being almost all the light was reflected. When the sensor is used to detect a color you can choose black, brown, blue, green, yellow, red, white or no color. These colors may not match the colors on the annual challenge mat. In that case, using the reflected light mode of the sensor may be a more accurate way to detect or follow a line.

Ultrasonic sensor

The Ultrasonic Sensor returns the distance to an object in centimeters or inches. It gives the most accurate readings when it is mounted low on the robot and it takes readings to flat objects that are at right angles to the direction that the sensor is pointing. It will be less accurate when it is pointed at an object that is at an oblique angle or is round or cylindrical.

Gyro sensor