Skip to content

aysadic/drv2605l-arduino-matlab

Repository files navigation

DRV2605L Arduino Driver for MATLAB

I have written this MATLAB script for DRV2605L Haptic Motor Driver according to protocol documented in Texas Instruments DRV2605L datasheet.

I used Sparkfun DRV2605L Breakout Board HERE

For more info you can check out HERE

You can edit the parameters according to motor type, target frequency and immersion haptic library.

You should run ArduinoSystem.m as the main file. The script initial check for all connected devices. The script is designed to scan a I2C multiplexer (TCA9458A), an IMU (BNO055) and 8 DRV2605L ICs.

After the scan is done, the script initiates a test haptic feedback for all connected DRV2605Ls

In order to successfully control the DRV2605L IC you should initiate the scripts in the following order.

1) DRV2605L_install(drv);

This initiates the DRV2605L and checks for power and temperature protection flags

2) DRV2605L_calibrate(drv);

Here you have to configure and auto-calibrate the DRV2605L according to your setup. You can find more information at DRV2605L datasheet.

3) DRV2605L_library(drv);

Immersion provides individual libraries for ERM and LRA actuators.

4) DRV2605L_trigger(drv);

There are different trigger methods for DRV2605L, here we use the internal software trigger for haptic effects.

5) DRV2605L_effect(drv);

The desired haptic effect from the Immersion library is selected

6) DRV2605L_go(drv);

At this stage, you can run the "go script" as much as you want as you have configured the DRV2605L. It fires up the selected haptic effect

Warning

The code is a work-in-progress. Use at your discretion.

Credit

tcascanner.ino Arduino code belongs to Todd E. Kurt

About

DRV2605L Arduino Driver for MATLAB

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published