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.

ATTACHING THE SENSOR…


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…
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!

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.
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!

You must be logged in to post a comment.