How does it work?
Haptic 3 Click as its foundation uses the DA7282, a haptic driver capable of driving both LRA and ERM actuators from Renesas. The power-optimized architecture and advanced closed-loop digital algorithms achieve a high-fidelity haptic drive. The DA7282 features frequency control within an onboard Waveform Memory and three distinct general-purpose inputs for triggering up to six specific sequences, which helps with emulating button pressing in many applications.
The device controls drive levels based on the sequence selected by the I2C interface across the load and senses the movement of the actuator. The driven waveform is generated by a current regulated loop using a high-frequency PWM modulation. The differential output drive features a switching regulator architecture with an H-bridge differential drive across the load at 187.5kHz. The DA7282 is also capable of closed-loop actuator monitoring while driving to enable calibration-free playback, frequency tracking (LRA only), Active Acceleration, Rapid Stop, and actuator diagnostics.
Resonant frequency tracking can be enabled while driving an LRA to track the mechanical resonance of the actuator through closed-loop control or can be disabled to operate DA7282 in open-loop wideband frequency operation while driving LRAs with a broader bandwidth frequency response. Also, Active Acceleration and Rapid Stop features enable automated driving of both ERM and LRA loads (when frequency tracking is enabled), which reduces the time to reach the target acceleration level and the time for the actuator to come to a complete stop.
Although it can use both mikroBUS™ power rails for regular power supply, its digital part requires a voltage level of 1.8V to work correctly. Therefore, a small regulating LDO is used, the BH18PB1WHFV, providing a 1.8V out of both 5V and 3.3V mikroBUS™ power rails, alongside Enable feature through the EN pin routed to the CS pin of the mikroBUS™ socket offering a switch operation to turn ON/OFF power delivery to the connected load.
Haptic 3 Click communicates with MCU using the standard I2C 2-Wire interface with a maximum clock frequency of 400kHz. Since the sensor for communication requires a logic level of 1.8V, this Click board™ also features the PCA9306 voltage-level translator. The I2C interface bus lines are routed to the voltage-level translators allowing this Click board™ to work with both 3.3V and 5V MCUs properly. Also, it uses an interrupt pin, marked as IRQ and routed to the INT pin of the mikroBUS™ socket, used for when a different fault condition occurs to alert the MCU.
This Click board™ can operate with both 3.3V and 5V logic voltage levels selected via the VCC SEL jumper. This way, it is allowed for both 3.3V and 5V capable MCUs to use the communication lines properly. However, the Click board™ comes equipped with a library that contains easy-to-use functions and an example code that can be used, as a reference, for further development.
Specifications
Type
Haptic
Applications
Can be used for indicator systems, training equipment/simulators with haptics function, robotics and mechatronics, and more
On-board modules
DA7282 – haptic driver capable of driving both LRA and ERM actuators from Renesas
Key Features
LRA or ERM drive capability, automatic LRA resonant frequency tracking, wideband LRA support, three GPI pins for triggering of up to six independent haptic sequences, Active Acceleration and Rapid Stop
technology for high-fidelity haptic feedback, low power consumption, and more
Interface
I2C
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 Haptic 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 | Logic Level Voltage Selection 3V3/5V: Left position 3V3, Right position 5V |
J1 | GPIO | Unpopulated | External General-Purpose Sequence Trigger Signals Header |
Haptic 3 Click electrical specifications
Description | Min | Typ | Max | Unit |
---|---|---|---|---|
Supply Voltage | 3.3 | – | 5 | V |
Maximum Output Current | – | 250 | 500 | mA |
LRA Wideband Frequency Range | 25 | – | 1000 | Hz |
LRA Frequency Tracking Range | 50 | – | 300 | Hz |
Operating Temperature Range | -40 | +25 | +85 | °C |
Software Support
We provide a library for the Haptic 3 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 3 Click driver.
Key functions
-
haptic3_set_vibration_level
This function sets the motor vibration level. -
haptic3_get_vibration_level
This function reads the motor vibration level. -
haptic3_write_register
This function writes a desired data to the selected register by using I2C serial interface.
Example Description
This example demonstrates the use of Haptic 3 Click board™ by controlling the attached motor vibration level.
void application_task ( void )
{
float vibration_level;
if ( HAPTIC3_OK == haptic3_set_vibration_level ( &haptic3, HAPTIC3_VIBRATION_LEVEL_MAX ) )
{
if ( HAPTIC3_OK == haptic3_get_vibration_level ( &haptic3, &vibration_level ) )
{
log_printf( &logger, " Vibration level: %.3f rnn", vibration_level );
}
}
Delay_ms ( 2000 );
if ( HAPTIC3_OK == haptic3_set_vibration_level ( &haptic3, HAPTIC3_VIBRATION_LEVEL_MIN ) )
{
if ( HAPTIC3_OK == haptic3_get_vibration_level ( &haptic3, &vibration_level ) )
{
log_printf( &logger, " Vibration level: %.3f rnn", vibration_level );
}
}
Delay_ms ( 2000 );
}
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.HAPTIC3
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.
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.