180 likes | 203 Views
Forward Until Sound Program. NXT Sound Sensors. NXT Sound Sensors.
E N D
NXT Sound Sensors • How does the Sound Sensor detect sound?The Sound Sensor has a diaphragm membrane that is struck by sound waved, and vibrates them. The vibrating diaphragm contains magnets, whose vibrations induces (creates) an electrical current in a surrounding coil of wire. The NXT detects this current and interprets it into a Sound Sensor reading.
Establishing The Threshold • On the NXT • Select the View Mode • Select Sound DB • Select Port 2 • Position the robot in an area that is quiet to acquire the two sound readings as shown in the next two slides
Forward Until SilenceSound Sensor Block Two Details Wait for the Sound Sensor on Port 2 to get a Silent reading Silence/Quiet=Sound Sensor value<Threshold value
Calculating Thresholds Quiz Would the robot classify the following Sound Sensor readings as Sound or Silence? • Sensor = 25 with Threshold = 40 • Sensor = 65 with Threshold = 40 • Sensor = 47 with Threshold = 54 • Sensor = 42 with No talking =30 and Whisper = 70 • Sensor = 85 with No Clap = 43 and Clap = 100
Calculating Thresholds Quiz Answers a. Sensor = 25 with Threshold = 40 Sensor value is less than Threshold therefore it is silence b. Sensor = 65 with Threshold = 40 Sensor value is greater than Threshold therefore it is sound c. Sensor = 47 with Threshold = 54 Sensor value is less than Threshold therefore it is silence
Calculating Thresholds Quiz Answers d. Sensor = 42 with No Talking =30 and Whisper = 70 The threshold is (30+70)/2=50 The Sensor Value is less than Threshold, therefore it is No Talking. Intuitively - the Sensor value is closer to No Talking than Talking, therefore it is No Talking e. Sensor = 85 with No Clap = 43 and Clap = 100 The threshold is (43+100)/2=72 The Sensor Value is greater than Threshold, therefore it is a Clap. Intuitively - the Sensor value is closer to Clapping than No clapping therefore it is clap.