ULTRASONIC SENSOR – WALL-E or JOHNNY FIVE?

Screen Shot 2017 04 20 at 20.14.33 - ULTRASONIC SENSOR - WALL-E or JOHNNY FIVE?

INTRO AND LEARNING GOALS

Everyone’s favourite sensor – in terms of looks anyway! Here we will look at how you can easily attach the sensor and get it up and running quickly…
  • Understand how to attach the sensor to the robot
  • Explore how to use LEGO® MINDSTORMS® Education software
  • Create a program using the Ultrasonic Sensor block to get your robot to stop at objects
  • Explore what your robot can do!

THE BASICS OF HOW IT WORKS

The Ultrasonic Sensor emits high frequency sound waves – too high for the human ear to detect. Having emitted the sound wave, the sensor then measures the amount of time it takes the sound wave to come back from the surface that it has reflected off.

Screen Shot 2017 09 24 at 09.20.13 800x348 - ULTRASONIC SENSOR - WALL-E or JOHNNY FIVE? On the basis that we are going to work in centimetres – the Ultrasonic Sensor can measure distances from 0 to 255 cms. It has a stated accuracy of 1 cm or 0.3 inches – your experiences will define whether you deem this to be true or not! The sensor cannot detect objects that are very close to the sensor (closer than about 3 cm or 1.5 inches). So let’s get using it and find out just how good it is!

ATTACHING THE SENSOR…

IMG 0802 e1507468605755 - ULTRASONIC SENSOR - WALL-E or JOHNNY FIVE?
Here you can see that the Ultrasonic sensor is attached centrally at the front of the robot. It is not too near the ground (but if your object was low down this position might be too high), and there are no wires in the way. It is in the best position for it to function.
IMG 0799 - ULTRASONIC SENSOR - WALL-E or JOHNNY FIVE?
Here the Ultrasonic sensor is quickly attached using an axel – we did this because the school bell was about to go! It is not perfect but it gets the job done (but it may be triggered by the side of the robot being in its field of vision).

LET’S GET PROGRAMMING…

We are about to create a program to get our robot to stop when it senses a wall in front of it. There is one video as the block on the tablet and desktop are very similar…
john - ULTRASONIC SENSOR - WALL-E or JOHNNY FIVE?

SOME TEACHING THOUGHTS… from John

  • The sensor has a wide “field of view” and may detect a closer object off to the side instead of a farther object straight ahead.
  • The sensor cannot detect objects that are very close to the sensor (closer than about 3 cm or 1.5 inches). Why not get students to test this out?
  • LEGO states: “The Ultrasonic Sensor works best to detect objects with hard surfaces that reflect sound well. Soft objects, such as cloth, may absorb the sound waves and not be detected. Objects with rounded or angled surfaces are also harder to detect.” Get students to investigate this – don’t just believe LEGO!
Robot5 04 - ULTRASONIC SENSOR - WALL-E or JOHNNY FIVE?

ROBOT WORKOUT (WHERE NEXT?)

  • If you get your robot to stop and turn around when it detects a wall, you can then put the program inside a loop.loops - ULTRASONIC SENSOR - WALL-E or JOHNNY FIVE? Now your robot will keep on running, while detecting objects! Keep jumping in front of your robot – hours of fun and great exercise! 😉
  • Use the Ultrasonic sensor to get your robot to park – just like you would park your car in real life. Don’t forget to add some ‘parking beeper’ sound effects!
legoev3logo - ULTRASONIC SENSOR - WALL-E or JOHNNY FIVE?

GREAT SUPPORT FROM LEGO EDUCATION

DESKTOP: From the LOBBY (the starting page) go to ROBOT EDUCATOR and choose BASICS – STOP AT AN OBJECT. TABLET: On the front screen, click on the ROBOT EDUCATOR tab and choose STOP AT AN OBJECT.