How does it work?
HAPTIC 2 Click as its foundation uses the LC898302AXA, a linear vibration motor driver dedicated to LRA (Linear Resonant Actuator) and ERM (Eccentric Rotating Mass) applications from ON Semiconductor. The original driving waveform enables low power consumption, and it is helpful to maintain battery lifetime. It allows crisp vibration thanks to automatic braking and over-driving feature. The drive frequency automatically adjusts to the resonance frequency of the linear vibrator without the use of other external parts.
As a result of this very effective drive, the vibration is as powerful as possible using minimal energy compared to classical solutions. It also ignores the deviation of resonance frequency thanks to auto-tuning function. This function can increase the perceived vibration force by over 20%, making it far more efficient than conventional haptic driving solutions. They require minimal power but are capable of maintaining a high level of vibration.
The LRA motors rely on a magnet attached to the case by a spring where a magnetic field from the coil causes vibration activity initiation. Compared to ERM, the LRA have better responsiveness improving system performance. The ERM type of haptic motor causes the off-balance mass to rotate. The mass movement results in an asymmetric centripetal force, leading to the motor’s displacement. Using ERM motor, ERM driving voltage can be adjusted through an adjustment resistor connected between OUT1 pin of Click board terminal and ERM motor pin.
HAPTIC 2 Click operates only with the PWM signal from the mikroBUS™ socket that drives the LC898302AXA and offers fully configurable drive and brake functions. Also, it has a jumper setting available labeled as MODE SEL used to choose between LRA or ERM motor to drive.
This Click board™ can be operated only with a 3.3V logic voltage level. The board must perform appropriate logic voltage level conversion before use with MCUs with different logic levels. However, the Click board™ comes equipped with a library containing functions and an example code that can be used, as a reference, for further development.
Specifications
Type
Haptic
Applications
Can be used for numerous everyday applications such as indicator systems, game consoles, training equipment/simulators with haptics function, robotics and mechatronics, and many more.
On-board modules
LC898302AXA – linear vibration motor driver dedicated to LRA (Linear Resonant Actuator) and ERM (Eccentric Rotating Mass) applications from ON Semiconductor
Key Features
Low power consumption, automatic adjustment to the resonance frequency for LRA, adjustable drive and brake voltage, low driving noise, available to drive a LRA and ERM, and more.
Interface
PWM
Feature
No ClickID
Compatibility
mikroBUS™
Click board size
S (28.6 x 25.4 mm)
Input Voltage
3.3V
Pinout diagram
This table shows how the pinout on HAPTIC 2 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 | MODE SEL | Left | Motor Selection LRA/ERM: Left position LRA, Right position ERM |
HAPTIC 2 Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | – | 3.3 | – | V |
Maximum Drive Current | – | – | 200 | mA |
PWM Frequency | 10 | – | 50 | kHz |
Operating Temperature Range | -30 | +25 | +85 | °C |
Software Support
We provide a library for the HAPTIC 2 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.
Library Description
This library contains API for HAPTIC 2 Click driver.
Key functions:
void haptic2_cfg_setup ( haptic2_cfg_t *cfg );
– Config Object Initialization function.HAPTIC2_RETVAL haptic2_init ( haptic2_t *ctx, haptic2_cfg_t *cfg );
– Initialization function.void haptic2_default_cfg ( haptic2_t *ctx );
– Click Default Configuration function.
Examples description
This app shows some of the functions that HAPTIC 2 click has.
The demo application is composed of two sections :
void application_task ( void ) { // Task implementation. log_printf( &logger, "--------------------------rn" ); for ( float duty = 0.1; duty < 0.9; duty += 0.1 ) { Delay_ms( 500 ); haptic2_set_duty_cycle ( &haptic2, duty ); log_printf( &logger, " PWM duty cycle : %.1f rn", duty ); } Delay_ms( 1000 ); for ( float duty = 0.8; duty >= 0; duty -= 0.1 ) { Delay_ms( 500 ); haptic2_set_duty_cycle ( &haptic2, duty ); log_printf( &logger, " PWM duty cycle : %.1f rn", duty ); } Delay_ms( 1000 ); }
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:
- MikroSDK.Board
- MikroSDK.Log
- Click.Haptic2
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.