Search
Filters
Close

Sound Generator

Make sounds by giving this sensor a pitch, volume, and duration.
SKU: 45-2016
$32.95

The Sound Generator can generate a sound based on volume, pitch, and duration. This sensor can also overwrite settings during a tone to change how it sounds, change the volume, or to extend the duration of the tone.

Sensor Type: Four Wire I2C Sensor
Default I2C Address: 0x34
Sensor ID Code: 0x53
Dimensions: 32 mm x 32 mm x 19 mm
Mounting Holes: 24 mm x 24 mm
Power: 5 V DC, 20 mA max.

Register

Function
0x00 Sensor Firmware Revision
0x01 Manufacturer Code
0x02 Sensor ID Code
0x04 Sound Level
0x05/0x06 Pitch (lsb/msb)
0x07 Duration

 

The order if the 4 control bytes, Sound Level, Pitch low, Pitch high and Duration are arranged such that a signal 4-byte write can be used to initiate a tone.


Sound Level:
Controls the amplitude of the output signal from 0 to 3 where 0 is the quietest and 3 is the loudest.

Pitch:
Consisting of 2 bytes to make a word, the Pitch controls the frequency of the output in increments of 1Hz. The frequencies range from 1Hz to 65kHz, although operation over 5kHz is not recommended and may damage the device. The speaker resonates at about 2kHz, so the speaker will sound much louder at this frequency.

Duration:
This controls the duration of the tone in increments of 10mS. The duration of the tone can range from 10mS – 2.55S. The duration of the tone begins a countdown and will stop when the counter reaches 0. The duration may be updated at any time to extend the length of a tone past 2.55S.

Android Studio Example Program

You will need both of the below files in the same program folder.

Android Studio Class MRISoundGenerator.java    --Driver/Class

Android Studio Class MRI_Sound_Generator.java     --Example Program

PDF

Sensor Documentation

All the information you need about
Modern Robotics Sensors in one document.

PDF File

The Sound Generator can generate a sound based on volume, pitch, and duration. This sensor can also overwrite settings during a tone to change how it sounds, change the volume, or to extend the duration of the tone.

Sensor Type: Four Wire I2C Sensor
Default I2C Address: 0x34
Sensor ID Code: 0x53
Dimensions: 32 mm x 32 mm x 19 mm
Mounting Holes: 24 mm x 24 mm
Power: 5 V DC, 20 mA max.

Register

Function
0x00 Sensor Firmware Revision
0x01 Manufacturer Code
0x02 Sensor ID Code
0x04 Sound Level
0x05/0x06 Pitch (lsb/msb)
0x07 Duration

 

The order if the 4 control bytes, Sound Level, Pitch low, Pitch high and Duration are arranged such that a signal 4-byte write can be used to initiate a tone.


Sound Level:
Controls the amplitude of the output signal from 0 to 3 where 0 is the quietest and 3 is the loudest.

Pitch:
Consisting of 2 bytes to make a word, the Pitch controls the frequency of the output in increments of 1Hz. The frequencies range from 1Hz to 65kHz, although operation over 5kHz is not recommended and may damage the device. The speaker resonates at about 2kHz, so the speaker will sound much louder at this frequency.

Duration:
This controls the duration of the tone in increments of 10mS. The duration of the tone can range from 10mS – 2.55S. The duration of the tone begins a countdown and will stop when the counter reaches 0. The duration may be updated at any time to extend the length of a tone past 2.55S.

Android Studio Example Program

You will need both of the below files in the same program folder.

Android Studio Class MRISoundGenerator.java    --Driver/Class

Android Studio Class MRI_Sound_Generator.java     --Example Program

PDF

Sensor Documentation

All the information you need about
Modern Robotics Sensors in one document.

PDF File