... | @@ -21,11 +21,11 @@ The plan is to follow the instructions for Lesson 3 [1]. |
... | @@ -21,11 +21,11 @@ The plan is to follow the instructions for Lesson 3 [1]. |
|
Due to the similarity between exercise 1 and 2 the results have been joined together.
|
|
Due to the similarity between exercise 1 and 2 the results have been joined together.
|
|
In order to test the sound sensor we made a test setup were the LEGO car was placed next to a computer loudspeaker playing a monotone sound (440Hz sine wave). The leJOS data logger was used to collect the sound levels recorded by the sensor. The setup is seen in figure 1.
|
|
In order to test the sound sensor we made a test setup were the LEGO car was placed next to a computer loudspeaker playing a monotone sound (440Hz sine wave). The leJOS data logger was used to collect the sound levels recorded by the sensor. The setup is seen in figure 1.
|
|
|
|
|
|
![Figure 1 - Test setup](http://gitlab.au.dk/uploads/rene2014/lego/a6a24b2215/Exercise_2_-_Test_setup.jpg)
|
|
![Test setup](http://gitlab.au.dk/uploads/rene2014/lego/a6a24b2215/Exercise_2_-_Test_setup.jpg)
|
|
|
|
|
|
Initially the sound level of the computer was set to 100% and then manually lowered with a certain interval. By doing this we expected to see a constant decrease in the sound measurements. The results from this exercise is summarized in figure 2.
|
|
Initially the sound level of the computer was set to 100% and then manually lowered with a certain interval. By doing this we expected to see a constant decrease in the sound measurements. The results from this exercise is summarized in figure 2.
|
|
|
|
|
|
![Figure 2 - Sound level measurements](https://gitlab.au.dk/rene2014/lego/raw/ffd008e7c3df32eb42b20f306dc2ff655fd9a17b/Week5/Measurements/SoundLevelMeasurements.png)
|
|
![Sound level measurements](https://gitlab.au.dk/rene2014/lego/raw/ffd008e7c3df32eb42b20f306dc2ff655fd9a17b/Week5/Measurements/SoundLevelMeasurements.png)
|
|
|
|
|
|
According to figure 2 we can see the expected step wise decrease in the measurements from time = 0 to time = 25. We noticed that the step size is also decreasing as the sound level is lowered. There could be multiple reasons for this. At the moment of writing we are not sure that the lowering of sound on the computer is performed linearly. In order to test this we need a calibrated microphone which is able to provide us with the exact sound level in decibels. The small variations seen along the measurements are probably caused by quantization noise in the A/D converter.
|
|
According to figure 2 we can see the expected step wise decrease in the measurements from time = 0 to time = 25. We noticed that the step size is also decreasing as the sound level is lowered. There could be multiple reasons for this. At the moment of writing we are not sure that the lowering of sound on the computer is performed linearly. In order to test this we need a calibrated microphone which is able to provide us with the exact sound level in decibels. The small variations seen along the measurements are probably caused by quantization noise in the A/D converter.
|
|
At time = 28 a high peak is detected. This was caused by a nearby group making a sound which affected our measurements. At time = 35 we stopped the test and began to talk which caused irregularity in the measurements.
|
|
At time = 28 a high peak is detected. This was caused by a nearby group making a sound which affected our measurements. At time = 35 we stopped the test and began to talk which caused irregularity in the measurements.
|
... | @@ -64,7 +64,7 @@ Button.ESCAPE.addButtonListener(new ButtonListener() { |
... | @@ -64,7 +64,7 @@ Button.ESCAPE.addButtonListener(new ButtonListener() { |
|
### Exercise 5
|
|
### Exercise 5
|
|
The figure below shows four consecutive claps, measured with the NXT sound sensor. The pattern starts out at low amplitude and rises quickly (within the 25ms) to an amplitude above 85%. The length of the four claps varies between approximately 85ms and 175ms and then returns back to low (below 50%).
|
|
The figure below shows four consecutive claps, measured with the NXT sound sensor. The pattern starts out at low amplitude and rises quickly (within the 25ms) to an amplitude above 85%. The length of the four claps varies between approximately 85ms and 175ms and then returns back to low (below 50%).
|
|
|
|
|
|
![Figure 3 - Clap characteristics](https://gitlab.au.dk/rene2014/lego/raw/master/Week5/Measurements/ClapMeasurements.png)
|
|
![Clap characteristics](https://gitlab.au.dk/rene2014/lego/raw/master/Week5/Measurements/ClapMeasurements.png)
|
|
|
|
|
|
In the SoundCtrCar.java a state change occurs whenever a sound level is recorded as 90% or above. The duration of the sound is not taken into account thus a constant sound above this limit would also trigger a state change. A sleep functionality has been implemented in order to keep the program from running quickly through every state at high sounds.
|
|
In the SoundCtrCar.java a state change occurs whenever a sound level is recorded as 90% or above. The duration of the sound is not taken into account thus a constant sound above this limit would also trigger a state change. A sleep functionality has been implemented in order to keep the program from running quickly through every state at high sounds.
|
|
|
|
|
... | | ... | |