How does it work?
Buzz 3 Click is based on the PAM8904, a piezo-sounder driver with an integrated Multi-Mode charge pump boost converter from Diodes Incorporated. The PAM8904 is a switching driver with a multi-mode charge pump for piezo-sounder. Operating at a fixed frequency of 1MHz, the PAM8904 can drive a sounder load of up to 15nF, providing a 9V output with a minimal component footprint. For adjusting the piezoelectric sounder sound volume, the charge pump can operate in either of a 1x, 2x, or 3x mode. It features thermal shutdown, over-current, and voltage protection, under-voltage lock-out, and provides a small inrush current, low EMI, and high efficiency.
The sounder driver helps to keep current consumption low and battery life long by employing built-in automatic shutdown and wake-up functions. For example, active current consumption is just 300µA in 1x mode, with an input voltage of 3V, input frequency of 4kHz, and driving a 15nF piezo. In shutdown mode, the quiescent current is less than 1µA.
The Charge Pump Mode pins, EN1 and EN2, are used to set the charge pump into mode 1xVDD, 2xVDD, 3xVDD, or they can be used to put the PAM8904 into a forced low-current Shutdown Mode. When one or both of the EN pins are pulled high, the device enters the Normal Operation Mode. Once the PAM8904 senses a valid signal on the DIN pin, the charge pump will start and provide the desired voltage on the VOUT pin, and the output drive lines labeled as VO1 and VO2 will become active after a period of between 270μs and 350μs depending on the selected Mode. If a valid signal on the DIN line disappears, the PAM8904 will detect that disappearance and then wait 42ms to ensure its disappearance. If even after this period there is no valid signal on the DIN line, the PAM8904 switches to low-current Standby Mode.
Buzz 3 Click establishes communication with MCU using several GPIO pins routed on the RST, AN, and PWM pins of the mikroBUS™ socket labeled as EN1, EN2, and DIN. There is also a jumper setting available labeled as INT BUZZ used to choose between single-ended and differential load configurations as well as between driving either the onboard piezo-sounder or an externally connected piezo-sounder.
This Click board™ is designed to operate with both 3.3V and 5V logic voltage levels selected via the VCC SEL jumper. It allows for both 3.3V and 5V capable MCUs to use the GPIO communication lines properly. However, the Click board™ comes equipped with a library that contains easy to use functions and an example code which can be used, as a reference, for further development.
Specifications
Type
Speakers
Applications
Can be used for a variety of battery-powered applications, including medical systems, alarm clocks, home appliances, and security devices.
On-board modules
Buzz 3 Click is based on the PAM8904, a piezo-sounder driver with an integrated Multi-Mode charge pump boost converter from Diodes Incorporated.
Key Features
Low power consumption, high flexibility, built-in automatic shutdown and wake-up features, higher sound pressure level sound output, integrated charge-pump boost converter, and more.
Interface
GPIO,PWM
Feature
No ClickID
Compatibility
mikroBUS™
Click board size
M (42.9 x 25.4 mm)
Input Voltage
3.3V or 5V
Pinout diagram
This table shows how the pinout on Buzz 3 Click corresponds to the pinout on the mikroBUS™ socket (the latter shown in the two middle columns).
Onboard settings and indicators
Label | Name | Default | Description |
---|---|---|---|
LD1 | PWR | – | Power LED Indicator |
JP1 | VCC SEL | Left | Power Supply Voltage Selection 3V3/5V: Left position 3V3, Right position 5V |
JP2 | INT BUZZ | Right | Internal Buzzer Activation Selection: Left position OFF, Right position ON |
PZ1 | INT BUZZER | – | Piezoelectric Buzzer |
BUZZ 3 Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | -0.3 | – | 3.6 | V |
Maximum Output Voltage | – | – | 15 | V |
Input Signal Frequency Range | 0.02 | 4 | 300 | kHz |
Operating Temperature Range | -40 | – | +85 | °C |
Software Support
We provide a library for the Buzz 3 Click on our LibStock page, as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
Library Description
The library covers all the necessary functions to control Buzz 3 Click board™. Library performs a standard GPIO interface communication.
Key functions:
BUZZ3_RETVAL_T buzz3_set_gain_operating_mode ( uint8_t op_mode )
– Set gain operating mode function.
Examples description
The application is composed of three sections :
- System Initialization – Initializes GPIO, set AN and RST pin as outputs, begins to write a log.
- Application Initialization – Initialization driver enables – GPIO and configures the appropriate MCU pin for sound generation, also write log.
- Application Task – (code snippet) This is an example that demonstrates the use of the Buzz 3 Click board™. This example plays the Imperial March using the sound library. Results are being sent to the Usart Terminal where you can track their changes.
void application_task ( ) { mikrobus_logWrite( " Play the music ", _LOG_LINE ); buzz3_melody( ); mikrobus_logWrite( "---------------------", _LOG_LINE ); Delay_ms( 1000 ); }
Additional Functions :
buzz3_sound_init( )
– Configures the appropriate MCU pin for sound generation.buzz3_melody( )
– Demo melody – plays Imperial March using Sound library.
The full application code, and ready to use projects can be found on our LibStock page.
Other mikroE Libraries used in the example:
- Sound
- UART
Additional notes and informations
Depending on the development board you are using, you may need USB UART click, USB UART 2 click or RS232 click to connect to your PC, for development systems with no UART to USB interface available on the board. The terminal available in all MikroElektronika compilers, or any other terminal application of your choice, can be used to read the message.
mikroSDK
This Click board™ is supported with mikroSDK – MikroElektronika Software Development Kit. To ensure proper operation of mikroSDK compliant Click board™ demo applications, mikroSDK should be downloaded from the LibStock and installed for the compiler you are using.
For more information about mikroSDK, visit the official page.