Robot Programming: Sound Sensor PDF
Document Details
Uploaded by WarmMaroon
2022
Tags
Summary
This document contains lesson plans and activities about programming a robot to use a sound sensor. Topics include explanations, hands-on exercises, and evaluation questions. Intended for secondary school students learning about robotics and programming.
Full Transcript
PROGRAMMING A ROBOT: SOUND SENSOR SESSION 1 LESSON 7 Session 1: PROGRAMMING A ROBOT: SOUND SENSOR Objectives At the end of the lesson, the students should be able to: Explain the use of sound sensors in robotics; Describe how sound sensor works; Use code blocks to program a sound sensor...
PROGRAMMING A ROBOT: SOUND SENSOR SESSION 1 LESSON 7 Session 1: PROGRAMMING A ROBOT: SOUND SENSOR Objectives At the end of the lesson, the students should be able to: Explain the use of sound sensors in robotics; Describe how sound sensor works; Use code blocks to program a sound sensor; and Create a device that makes use of a sound sensor as an alarm. TechFactors Copyright 2022 Session 1: PROGRAMMING A ROBOT: SOUND SENSOR Engage Identify the different sensors of a robot by supplying the missing letter TechFactors Copyright 2022 Session 1: PROGRAMMING A ROBOT: SOUND SENSOR Explore Question: 1. Is sound important? 2. Why or why not? 3. What does sound/music gives to us? TechFactors Copyright 2022 Session 1: PROGRAMMING A ROBOT: SOUND SENSOR Explain The Me Auriga board is equipped with an onboard sound sensor. This allows students to program the robot to measure sound waves without using an external sound sensor TechFactors Copyright 2022 Session 1: PROGRAMMING A ROBOT: SOUND SENSOR Explain The sound sensor is an input device that measures the intensity of sound waves and converts these sound waves into an electrical signal. It has a microphone that receives the sound signal. Both ultrasonic sensors and sound sensors are input devices. Still, the difference between the two is that the ultrasonic sensor measures distance of a nearby object through ultrasonic waves, and the sound sensor measures the sound loudness through the intensity of sound waves. In the previous lessons, you have learned some of the code blocks used in programming our target robot model. To program the sound sensor of the Land Raider, we need to use the following additional code blocks. TechFactors Copyright 2022 Session 1: PROGRAMMING A ROBOT: SOUND SENSOR Explain This block can be found in debug tab, and it is used [MKS1]Please include the unit of measure used. to open a small window or screen near the robot. [j2]Done When you use the open console block, this small window appears next to the robot. It shows the value of the sound intensity in decibels (dB) that the sound sensor measures. When the small window appears next to the robot, it is still blank because you still need to program what you want the robot to show in the window. You can use the print block to instruct the robot to view the value of the sound sensor. The sound sensor block measures the sound intensity or uses its value for the conditional statement in programming. TechFactors Copyright 2022 Session 1: PROGRAMMING A ROBOT: SOUND SENSOR Explain Key programming blocks Let us create a simple program for the robot to measure the sound waves from its surroundings. Programming steps: 1. Open the Miranda Simulator using this link (Insert link here) or open the desktop app of the Miranda simulator installed on your computer. If you are using the Miranda desktop app, make sure you enter the connection code, your username, and password. 2. Click the OPEN SCENE from the cloud icon. 3. Select the scene Creators 2: L7-S1-Programming a Robot: Sound Sensor to simulate the scenario. 4. Click the Land Raider model to open the programming pane on the left side of the simulator. 5. Click the program with the Scratch icon to start building the code for the scenario. Drag the command blocks according to the image shown below. Input the values indicated in each command block. 6. Click the RUN button to start the simulation and observe the behavior of the robot. TechFactors Copyright 2022 7. If you can, create a video or screen record of the output and send it to your teacher. Session 1: PROGRAMMING A ROBOT: SOUND SENSOR Explain What are the blocks that we need? TechFactors Copyright 2022 Session 1: PROGRAMMING A ROBOT: SOUND SENSOR Explain Using the codes, the robot will detect the sound intensity at the start of the simulation. It will be able to continuously measure the changes of the intensity because of the Forever Block. The Open Console and Print Blocks allow you to view the measurement. It is good to measure the sound intensity from the surroundings before you program the robot using a conditional statement. This will allow you to choose the right value of the sound intensity for the robot. Take note that in the Miranda simulator, the work pane represents a certain location as if in the real world; thus, every time you open a scene, the specific location of the robot is always different. TechFactors Copyright 2022 Session 1: PROGRAMMING A ROBOT: SOUND SENSOR Elaborate Therefore, the sound intensity is also different. The value of decibels in Miranda scenes is not fixed, so the value of decibels that you use in your program will not be the same value you will use in your next program. TechFactors Copyright 2022 Session 1: PROGRAMMING A ROBOT: SOUND SENSOR Evaluate A. True or False Direction: Write True on the blank before each number if the statement is correct. Otherwise, write False. _________1. The sound sensor can detect sound waves through its microphone. _________2. The sound sensor converts sound waves into electrical signal. _________3. The Forever Block allows the robot to read changes in sound intensity. _________4. We only need an external sound sensor to program the Land Raider to detect sound waves. _________5. The Print Block allows you to view the measurement of sound intensity. TechFactors Copyright 2022 Session 1: PROGRAMMING A ROBOT: SOUND SENSOR Evaluate Direction: Try each set of blocks in the Miranda simulator and observe the behavior of the robot. Write the letter of the combination of the correct blocks on the blank before each number. _______ 1. This program code only measures the sound intensity at the start of the simulation. A. B. TechFactors Copyright 2022 Session 1: PROGRAMMING A ROBOT: SOUND SENSOR Evaluate _______ 2. With this program code, the robot will show the measurement of sound intensity using the A key. A. B. TechFactors Copyright 2022 Session 1: PROGRAMMING A ROBOT: SOUND SENSOR Evaluate _______ 3. The robot shows the intensity of sound waves. A. B. TechFactors Copyright 2022 Session 1: PROGRAMMING A ROBOT: SOUND SENSOR Evaluate _______ 4. What is the output of the robot with this program code? A. The robot turns left, then stops and shows B. The robot turns left and shows the value of the value of sound intensity. sound intensity at the same time. TechFactors Copyright 2022 Session 1: PROGRAMMING A ROBOT: SOUND SENSOR Evaluate _______ 5. It prints the value of sound intensity. A. B. TechFactors Copyright 2022 PROGRAMMING A ROBOT: SOUND SENSOR SESSION 2 LESSON 7 Session 2: PROGRAMMING A ROBOT: SOUND SENSOR GUIDED ACTIVITY A. After you programmed the Land Raider to move to different directions automatically, it is time for you to program its Ultrasonic Sensor. The robot uses this sensor to avoid obstacles automatically and turns the other way when it detects objects in front of it. Your goal is to program the Land Raider to do the following outputs: When an object is closer than 15cm from the Land Raider: Stop for 1 second Move backward for 2 seconds Turn left for 1 second When an object is farther than 15cm from the Land Raider: Move forward TechFactors Copyright 2022 Session 2: PROGRAMMING A ROBOT: SOUND SENSOR GUIDED ACTIVITY Guide Questions 1. What does the robot do? 2. What are the components needed? 3. When does the robot react to avoid a collision? 4. How does the robot react when it comes closer to an obstacle? TechFactors Copyright 2022 Session 2: PROGRAMMING A ROBOT: SOUND SENSOR GUIDED ACTIVITY B. Assemble the programming blocks in the Miranda simulator. To do this, follow the steps below: 1. Open the Miranda app installed on your computer. Make sure you enter the connection code, your username, and password. 2. Click OPEN SCENE using the cloud icon. 3. Select the scene Creators 2: L7-S1-Programming a Robot: Sound Sensor to simulate the scenario. 4. Click the Land Raider model to open the programming pane on the left side of the simulator. 5. Click the program with the Scratch icon to start building the code for the scenario. Drag the command blocks according to the image shown below. Input the values indicated in each command block. TechFactors Copyright 2022 6. Click the RUN button to start the simulation and observe the behavior of your robot. Session 2: PROGRAMMING A ROBOT: SOUND SENSOR GUIDED ACTIVITY 8. In the space below, draw the codes you used to accomplish the task: TechFactors Copyright 2022 Session 2: PROGRAMMING A ROBOT: SOUND SENSOR INDEPENDENT ACTIVITY Direction: Read the situation carefully. The sound sensor is also used by emergency robots. These emergency robots can detect a noise to know where they should go to rescue people. Program the Land Raider and simulate an emergency robot that moves forward when it measures sound waves higher than 25 decibels. 1. What are the blocks needed? 2. How will you use these blocks? 3. What is the lowest and highest sound intensity detected by the sound sensor? 4. What is the conditional statement applied in this program? TechFactors Copyright 2022 Session 2: PROGRAMMING A ROBOT: SOUND SENSOR INDEPENDENT ACTIVITY B. Assemble the programming blocks in the Miranda simulator. To do this, follow the steps below: 1. Open the Miranda app installed on your computer. Make sure you enter the connection code, your username, and password. 2. Click OPEN SCENE using the cloud icon. 3. Select the scene Creators 2: L7-S1-Programming a Robot: Sound Sensor to simulate the scenario. 4. Click the Land Raider model to open the programming pane on the left side of the simulator. 5. Click the program with the Scratch icon to start building the code for the scenario. Drag the command blocks according to the image shown below. Input the values indicated in each command block. TechFactors Copyright 2022 6. Click the RUN button to start the simulation and observe the behavior of your robot. Session 2: PROGRAMMING A ROBOT: SOUND SENSOR INDEPENDENT ACTIVITY Answer the following guide questions. 1. What operator will you use? 2. What happens if you put the Move Forward Block outside the Forever Block? 3. Can we use the Less than Block for the conditional statement when programming the sound sensor? How? 4. What happens if the value of the sound sensor remains less than the declared value? 5. What happens if you change the declared value used in the conditional statement to the maximum value the sound sensor can receive? TechFactors Copyright 2022 Session 2: PROGRAMMING A ROBOT: SOUND SENSOR INDEPENDENT ACTIVITY Your final output will be graded using the following rubric: TechFactors Copyright 2022 Session 2: PROGRAMMING A ROBOT: SOUND SENSOR INDEPENDENT ACTIVITY Your final output will be graded using the following rubric: TechFactors Copyright 2022