Vibra Sense 2 Click Board
Vibra Sense 2 Click Board
The Vibra Sense 2 Click Board™ is a compact add-on board that contains a piezo sensor suitable for vibration measurements. This board features the LDT0-028K, a flexible 28 μm thick piezoelectric PVDF polymer film with screen-printed silver ink electrodes, laminated to a 0.125 mm polyester substrate, and fitted with two crimped contacts from TE Connectivity Measurement Specialties. The sensing element of the LDT0-028K comprises a cantilever beam loaded by an additional mass to offer high sensitivity at low frequencies. Some features of this Click Board™ like flexibility, high sensitivity, and performance make it an excellent choice for vibrating sensing applications, security systems, body movement, and many more.
The Vibra Sense 2 Click Board™ is supported by a mikroSDK compliant library, which includes functions that simplify software development. This Click Board™ comes as a fully tested product, ready to be used on a system equipped with the mikroBUS™ socket.
Software Support
We provide a library for the Vibra Sense 2 Click Board™ 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 that enables the usage of the Vibra Sense 2 Click Board™. It offers reading from output register, calculations that result in relatively accurate measurement of output voltage and the vibration level of the piezo element.
Key Functions
uint16_t vibrasense2_read_data ( );
- Function is used to read raw data from MCP3221.uint16_t vibrasense2_read_voltage ( uint16_t v_ref );
- Function is used to calculate piezo voltage in millivolts.int8_t vibrasense2_vibration_level ( );
- Function is used to get vibration level.
Example Description
The application is composed of three sections :
- System Initialization - Initializes I2C module ans LOG structure.
- Application Initialization - Initalizes I2C driver and makes an initial log.
- Application Task - Demonstrates use of the Vibra Sense 2 Click Board™ by checking vibration levels and displaying changes via USART terminal.
void application_task ( ) { new_val = vibrasense2_vibration_level( ); if ( new_val != old_val ) { switch ( new_val ) { case VIBRASENSE2_VIBRA_LVL_0: { mikrobus_logWrite( "No Vibration", _LOG_LINE ); break; } case VIBRASENSE2_VIBRA_LVL_1: { mikrobus_logWrite( "Marginal Vibration", _LOG_LINE ); break; } case VIBRASENSE2_VIBRA_LVL_2: { mikrobus_logWrite( "Slight Vibration", _LOG_LINE ); break; } case VIBRASENSE2_VIBRA_LVL_3: { mikrobus_logWrite( "Enhanced Vibration", _LOG_LINE ); break; } case VIBRASENSE2_VIBRA_LVL_4: { mikrobus_logWrite( "Moderate Vibration", _LOG_LINE ); break; } case VIBRASENSE2_VIBRA_LVL_5: { mikrobus_logWrite( "High Vibration", _LOG_LINE ); break; } case VIBRASENSE2_VIBRA_LVL_6: { mikrobus_logWrite( "Severe Vibration", _LOG_LINE ); break; } default: { mikrobus_logWrite( "Error occured!", _LOG_LINE ); } } old_val = new_val; } }
The full application code, and ready to use projects can be found on our LibStock page.
Other mikroE Libraries used in the example:
- I2C
- UART
Additional Notes and Information
Depending on the development board you are using, you may need USB UART Click Board™, USB UART 2 Click Board™ or RS232 Click Board™ 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
The Vibra Sense 2 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.
Vibra Sense 2 Click Board
Frequently Asked Questions
Have a Question?
Be the first to ask a question about this.