This is the DRV2605L Haptic Driver for LRA (Linear Resonant Actuator) and ERM (Eccentric Rotating Mass) with effect library and smart loop architecture. This device is licensed version of TouchSense 2200 software from Immersion which eradicates the need to design the haptic waveforms because the software includes over 100 licensed effects to 6 ERM libraries and 1 LRA library integrated with audio to vibe features.
Moreover the real-time playback mode allows the host processor to avoid the library playback engine. And drive a waveforms directly from the host through i2C serial interface.
The smart-loop architecture of the DRV2605 allows simple auto-resonant drive for the LRA as well as feedback-optimized ERM drive permitting for auto overdrive and braking. This manner makes a simplified input waveform interface together with reliable motor control and consistent motor performance. These device has also an automatic transition to an open-loop system in the event that an LRA actuator is not generating a valid back-EMF voltage. When the LRA generates a valid back-EMF voltage, the device is automatically synchronize with the LRA.
The DRV2605L also allow for openloop driving through the use of internal generated pulse with modulation. Additionally, the Audio to Vibe mode automatically converts an audio input signal to generate a sound wave to vibration effect. See below diagram how to wired-up to your microcontroller.
Required Components
- Arduino Microcontroller, NodeMCU, Teensy Board, TeensyDuino, ESP8266 12, 12E, ESP8266 NodeMCU, ESPDuino, ATMEGA328 16/12, ATMEGA32u4 16/8/ MHz, ESP8266, ATMEGA250 16 MHz, ATSAM3x8E, ATSAM21D, ATTINY85 16/8 MHz (Note: The Diagram below is using NANO. (please refer to the respective pin-outs)
- DRV2605 Haptic Driver for LRA and ERM / Module
- Jumper Wires / DuPont Wires
- Solder Less Bread Board
Wiring Guide
Source Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
#include <Wire.h> #include "Adafruit_DRV2605.h" // You can download this library below Adafruit_DRV2605 drv; // Set the DRV2605 i2C Address and Driver void setup() { Serial.begin(9600); Serial.println("14CORE | Test Code for DRV2605"); Serial.println("Initializing....."); delay(3000); drv.begin(); drv.selectLibrary(1); drv.setMode(DRV2605_MODE_INTTRIG); // Internal trigger sending to go command } uint8_t effect = 1; void loop() { Serial.print("Effect Number > "); Serial.println(effect); // set the effect to play drv.setWaveform(0, effect); // Set effect to play drv.setWaveform(1, 0); // End of end waveform drv.go(); //Set to play the wave effect delay(500); // Set to delay effect++; if (effect > 117) //If effect is equal to greeter than 117 then effect will set to 1 effect = 1; } |
Downloads
Download DRV2605 Code Library| Zip
Download DRV2605 Datasheet | PDF