The Piezo Speaker Bricklet can be used to extend Bricks by the possibility to generate beeps with different frequencies and volume.
The available frequency range is 50Hz to 15000Hz. You can control the volume with a sound pressure level range of 85dB(A) to 110dB(A).
Additionally the Bricklet has support for alarm/siren sounds. In this mode it will sweep through a frequency range with configurable range, step size and duration.
Below you can find an audio file with samples of different sounds and alarams that have been generated with a Piezo Speaker Bricklet 2.0:
Property | Value |
---|---|
Buzzer | PT-4532PLQ |
Current Consumption | 55mW (11mA at 5V) |
Frequency Range | 50Hz - 15000Hz (configurable) |
Sound Pressure | 85dB(A) - 110dB(A) @50cm/1kHz (configurable) |
Dimensions (W x D x H) | 55 x 45 x 20mm (2.2 x 1.8 x 0.8") |
Weight | 20g |
To test a Piezo Speaker Bricklet 2.0 you need to have Brick Daemon and Brick Viewer installed. Brick Daemon acts as a proxy between the USB interface of the Bricks and the API bindings. Brick Viewer connects to Brick Daemon. It helps to figure out basic information about the connected Bricks and Bricklets and allows to test them.
Connect the Piezo Speaker Bricklet 2.0 to a Brick with a Bricklet Cable.
If you connect the Brick to the PC over USB, you should see a new tab named "Piezo Speaker Bricklet 2.0" in the Brick Viewer after a moment. Select this tab. If everything went as expected you can now generate beep and alarm sounds.
After this test you can go on with writing your own application. See the Programming Interface section for the API of the Piezo Speaker Bricklet 2.0 and examples in different programming languages.
The Bricklet has 11 different volume levels (volume value 0 to 10).
We measured the sound pressure level with the test setup below. We used the average of three different sound pressure level meters at 50cm distance. The frequency of the Piezo Speaker Bricklet 2.0 was set to 1kHz.
The result is a range of 85dB(A) to 110dB(A):
You can use the volume range of 0-4 for different notification beep loudness levels and the volume range of 5-10 for loud and annoying alarm sounds.
Warning
Please note: At 110 dB(A) the recommended permissible exposure time (according to NIOSH and CDC) is only about 1.5 minutes.
A laser-cut case for the Piezo Speaker Bricklet 2.0 is available.
The assembly is easiest if you follow the following steps:
Below you can see an exploded assembly drawing of the Piezo Speaker Bricklet 2.0 case:
Hint: There is a protective film on both sides of the plates, you have to remove it before assembly.
See Programming Interface for a detailed description.
Language | API | Examples | Installation |
---|---|---|---|
C/C++ | API | Examples | Installation |
C/C++ for Microcontrollers | API | Examples | Installation |
C# | API | Examples | Installation |
Delphi/Lazarus | API | Examples | Installation |
Go | API | Examples | Installation |
Java | API | Examples | Installation |
JavaScript | API | Examples | Installation |
LabVIEW | API | Examples | Installation |
Mathematica | API | Examples | Installation |
MATLAB/Octave | API | Examples | Installation |
MQTT | API | Examples | Installation |
openHAB | API | Examples | Installation |
Perl | API | Examples | Installation |
PHP | API | Examples | Installation |
Python | API | Examples | Installation |
Ruby | API | Examples | Installation |
Rust | API | Examples | Installation |
Shell | API | Examples | Installation |
Visual Basic .NET | API | Examples | Installation |
TCP/IP | API | ||
Modbus | API |