The Adafruit DRV2605L is a versatile haptic motor controller designed to provide tactile feedback in electronic projects. This controller is capable of driving a wide range of haptic devices including Eccentric Rotating Mass (ERM) motors and Linear Resonant Actuators (LRAs). It is commonly used in wearable devices, gaming controllers, and touch-enabled devices to enhance the user experience through vibration feedback.
Pin Number | Name | Description |
---|---|---|
1 | SCL | I2C clock line |
2 | SDA | I2C data line |
3 | GND | Ground connection |
4 | VDD | Power supply (2.0V - 5.2V) |
5 | LRA/ERM | Output to the haptic motor |
6 | IN/TRIG | Trigger input for activating pre-defined waveforms |
7 | EN | Enable pin for the driver (active high) |
#include <Wire.h>
#include <Adafruit_DRV2605.h>
Adafruit_DRV2605 drv;
void setup() {
Serial.begin(9600);
Serial.println("DRV2605 test");
drv.begin();
drv.selectLibrary(1); // Select a haptic motor library.
drv.setMode(DRV2605_MODE_INTTRIG); // Set mode to internal trigger.
}
void loop() {
Serial.println("Playing effect #1");
drv.setWaveform(0, 1); // Set waveform sequence.
drv.setWaveform(1, 0); // End waveform sequence with a zero.
drv.go(); // Play the effect!
delay(1000); // Wait a bit between haptic feedback.
}
Q: Can the DRV2605L drive multiple motors simultaneously? A: No, it is designed to drive a single haptic motor at a time.
Q: Is it necessary to use an external trigger? A: No, you can use the I2C interface to trigger waveforms internally.
Q: How do I change the I2C address? A: The I2C address is fixed and cannot be changed.
Q: Can the DRV2605L be used with motors that require a different voltage? A: The DRV2605L can only be used within its specified voltage range. Motors requiring voltages outside this range are not compatible.
For further assistance, consult the Adafruit DRV2605L datasheet and the Adafruit support forums.