mlvibrosens
2.1.0.0
|
ML Vibro Sens Click is a compact add-on board for motion sensing and vibration analysis. This board features the FXLS8974CF, a 3-axis low-g 12-bit digital accelerometer from NXP designed for precise motion detection and data collection. This Click boardâ„¢ represents a machine learning training tool that communicates with the host MCU over an I2C interface, with selectable addresses and dual operating modes for interrupt signaling or motion detection. It features two DC motors - a balanced motor for generating steady baseline vibrations and an unbalanced motor for customizable vibration patterns controlled via PWM or PDM signals.
We provide a library for the ML Vibro Sens Click as well as a demo application (example), developed using MikroElektronika compilers. The demo can run on all the main MikroElektronika development boards.
Package can be downloaded/installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.
This library contains API for ML Vibro Sens Click driver.
mlvibrosens_cfg_setup
Config Object Initialization function. mlvibrosens_init
Initialization function. mlvibrosens_default_cfg
Click Default Configuration function. mlvibrosens_get_int_pin
This function returns the interrupt pin logic state. mlvibrosens_get_data
This function reads accel X, Y, and Z axis data in g and temperature in degrees Celsius. mlvibrosens_set_vibro_state
This function sets the vibro motors state. This example demonstrates the use of the ML Vibro Sens Click board by capturing and logging
acceleration data on the X, Y, and Z axes, along with temperature readings. The data is output over USB UART and can be visualized in real-time using tools like SerialPlot. Additionally, the vibro motor state changes periodically, cycling through different vibration states for added feedback.
The demo application is composed of two sections :
Initializes the communication interface and configures the ML Vibro Sens Click board
with default settings. This setup enables an interrupt on the INT pin when data is ready, sets the acceleration sensitivity to a +/-4G range, and sets the output data rate to 100 Hz.
Monitors the data-ready interrupt, retrieves acceleration and temperature data when available,
and logs it over USB UART in the format X;Y;Z;TEMP. After every 1000 data readings, the vibro motor state cycles through predefined states to demonstrate the motor's functionality.
We recommend using the SerialPlot tool for data visualization. The temperature measurements
should be visualized independently. The data format for plotter is as follows: X;Y;Z;TEMP;
The full application code, and ready to use projects can be installed directly from NECTO Studio Package Manager(recommended way), downloaded from our LibStock™ or found on Mikroe github account.
Other Mikroe Libraries used in the example:
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 MikroElektronika compilers.