forward until sound program. nxt sound sensors how does the sound sensor detect sound? the sound...

Post on 13-Dec-2015

231 Views

Category:

Documents

1 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Forward Until Sound Program

NXT Sound Sensors

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.

Forward Until Sound Program

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

Establishing The Quiet Threshold

Establishing The Clap Threshold

Calculate The Threshold

Motor Block One Details

Sound Sensor Block Two Details

Motor Block Three Details

Test Your robot. Will it stop when you clap?

Forward Until Silence

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

Test your robot does it go Forward Until Silence

Calculating Thresholds Quiz

Would the robot classify the following Sound Sensor readings as Sound or Silence?

a. Sensor = 25 with Threshold = 40

b. Sensor = 65 with Threshold = 40

c. Sensor = 47 with Threshold = 54

d. Sensor = 42 with No talking =30 and Whisper = 70

e. Sensor = 85 with No Clap = 43 and Clap = 100

Calculating Thresholds Quiz Answers

a. Sensor = 25 with Threshold = 40Sensor value is less than Threshold therefore it is silenceb. Sensor = 65 with Threshold = 40Sensor value is greater than Threshold therefore it is soundc. Sensor = 47 with Threshold = 54Sensor 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.

top related