NXT Sound Sensor Block

The NXT Sound Sensor block gets data from the NXT Sound Sensor. You can measure the sound level as a percentage (0-100) and get a Numeric output. You can also compare the sound level to a Threshold Value to get a Logic (True or False) output.

See Using the NXT Sound Sensor for more information about what the NXT Sound Sensor does, the data that it provides, and programming examples.
Choose the Sensor Port and Mode


Port Selector
Mode Selector
Inputs
Outputs

Use the Port Selector on the top of the block to make sure that the sensor port number (1, 2, 3, or 4) matches the port on the EV3 Brick that the NXT Sound Sensor is connected to.

Use the Mode Selector to select the mode for the block. The Inputs and Outputs available will change depending on the mode.
Modes
Measure Modes


The Measure – dB and Measure - dBa modes each output the sound level in the Sound Level output. In the Measure – dBa mode, the sound level is filtered to approximate the sensitivity of the human ear over different frequencies.

The sound level is measured as a percentage (0-100). If the sound sensor has been calibrated, the sound level value is adjusted so that 0 corresponds to the minimum calibrated sound level and 100 corresponds to the maximum calibrated sound level.
Compare Modes


The Compare – dB and Compare - dBa modes each measure the sound level as in the Measure modes. The Compare modes then compare the sound level to the Threshold Value using the selected Compare Type. The True/False result is output in Compare Result, and the sound level is output in Sound Level.
Calibrate Modes


The Calibrate modes allow you to calibrate the NXT Sound Sensor from within a program.

The Calibrate – Minimum mode allows you to specify the minimum sound level in the Value input. After calibration, the NXT Sound Sensor will report this sound level as 0 or the specified value.

The Calibrate – Maximum mode allows you to specify the maximum sound level in the Value input. After calibration, the NXT Sound Sensor will report this sound level as 100 or the specified value.

The Calibrate – Reset mode restores the NXT Sound Sensor calibration to its default state.
Inputs and Outputs
The inputs available for the NXT Sound Sensor block will depend on the mode selected. You can enter the input values directly into the block. Alternatively, the input values can be supplied by Data Wires from the outputs of other Programming Blocks.
InputTypeAllowed ValuesNotes
Compare Type Numeric0 - 50: = (Equal to)
1: ≠ (Not Equal to)
2: > (Greater than)
3: ≥ (Greater than or Equal to)
4: < (Less than)
5: ≤ (Less than or Equal to)
Threshold Value NumericAny numberValue to compare sensor data to
Value Numeric0 – 100Sound level for Calibrate modes
The outputs available will depend on the mode selected. To use an output, use a Data Wire to connect it to another Programming Block.
OutputTypeNotes
Sound Level NumericSound intensity (volume), 0-100.
Compare Result LogicTrue/False result of a Compare mode.
NXT Sound
Quick links