NOTE: The compatible piezo sounder comes in the same package as this Click board™.
How does it work?
Piezo Driver Click is based on the PAM8906, a piezo sounder driver with self-excitation mode from Diodes Incorporated. It features automatic shutdown and wake-up control, low operating current, very short turn ON/OFF, over-voltage protection, over-current protection, and more. This driver operates with an external PWM input. It can drive a two-terminal or three-terminal piezo sounder, and selection can be made over the TERMINAL SEL jumper. The piezo sounder can be connected over the 3-pin screw terminal, labeled differently for both available options. In addition, you can use VOUT to power up the piezo sounder.
Piezo Driver Click uses a PWM input pin to communicate with the host MCU. If used as an external PWM control, the PWM input will be amplified and driven to the output terminal. It can also be used for automatic wake-up and shutdown control.
This Click board™ can operate with either 3.3V or 5V logic voltage levels selected via the VCC SEL jumper. This way, both 3.3V and 5V capable MCUs can use the communication lines properly. Also, this Click board™ comes equipped with a library containing easy-to-use functions and an example code that can be used as a reference for further development.
Specifications
Type
Speakers
Applications
Can be used for the development of smoke, gas, water alarms, industrial security alarms, air humidifiers or ultrasonic-related piezo driver applications, security devices, home applications, and more
On-board modules
PAM8906 – piezo sounder driver with self-excitation mode from Diodes Incorporated
Key Features
Piezo driver with self-excitation mode, can drive two-terminal or three-terminal piezo sounders, automatic shutdown, and wake-up, high-speed driver with very short turn ON/OFF times, integrated boost converter, and more
Interface
PWM
Feature
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 Piezo Driver 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/Logic Voltage Level Selection 3V3/5V: Left position 3V3, Right position 5V |
JP2-JP3 | TERMINAL SEL | Left | Piezo Sounder Type Selection 2T/3T: Left position 2T, Right position 3T |
Piezo Driver Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | 3.3 | – | 5 | V |
Driver Output Voltage | – | – | 12 | V |
Piezo Input Signal Frequency | 0.2 | – | 10 | kHz |
Software Support
We provide a library for the Piezo Driver Click as well as a demo application (example), developed using MIKROE compilers. The demo can run on all the main MIKROE development boards.
Package can be downloaded/installed directly from NECTO Studio Package Manager (recommended), downloaded from our LibStock™ or found on Mikroe github account.
Library Description
This library contains API for Piezo Driver Click driver.
Key functions
-
piezodriver_pwm_stop
Piezo Driver stop PWM module. -
piezodriver_pwm_start
Piezo Driver start PWM module. -
piezodriver_play_sound
Piezo Driver play sound function.
Example Description
This example demonstrates the use of Piezo Driver Click board™.
void application_task ( void )
{
log_printf( &logger, "Playing the Imperial March melody ...rn" );
imperial_march( );
Delay_ms( 10000 );
}
The full application code, and ready to use projects can be installed directly from NECTO Studio Package Manager (recommended), downloaded from our LibStock™ or found on Mikroe github account.
Other Mikroe Libraries used in the example:
- MikroSDK.Board
- MikroSDK.Log
- Click.PiezoDriver
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. UART terminal is available in all MIKROE compilers.
mikroSDK
This Click board™ is supported with mikroSDK – MIKROE 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.