Arduino DRV 2667 Haptic Piezo Driver Control

by yurikleb in Circuits > Arduino

12336 Views, 30 Favorites, 0 Comments

Arduino DRV 2667 Haptic Piezo Driver Control

macro_pic.jpg
IMG_20160115_174452.jpg

During a project I was working on for my Masters at the RCA - Innovation Design Engineering, I was looking for a way to control Piezo transducers to create advanced haptic feedback and effects.

I found out TI have a wide variety of haptic drivers.

The DRV 2667 is a really cool driver for Piezo actuators: http://www.ti.com/product/drv2667

You can buy an EVM from them to test what it can do: http://www.ti.com/tool/drv2667evm-ct

But for the project I needed something smaller, and to be able to control it with an Arduino.

Apparently you can buy a small breakout board for the chip from "Fyber Labs" on Tindie:
https://www.tindie.com/products/Fyberlabs/piezo-ha...
they also sell an i2c switch in case you need to control several of those with one Arduino:
https://www.tindie.com/products/Fyberlabs/i2c-swit...

The only part I was missing is a library to control the driver, so I wrote one:
https://github.com/yurikleb/DRV2667

the wiring is pretty simple (see image above).

You can connect an analog input, but the really cool part is the digital Input.

Using the library you can send an array or wave forms to the chip.
Each waveform is described by an array of 4 variables: Amplitude, Frequerncy, Duration, and Envelope

The chips has a 2kb memory devided to 8 pages of 256 bytes each.
The current version of the library enables storing waveforms only on page 1 of the RAM, but that's enough to store up-to 60 waveform on the chip, and that's more than you will ever need if you control it with an Arduino.

The chip is using I2C protocol to communicate, which is easily done using the Wire library.
the Wiring is also quite straight forward (see image above):
Analog Pin 4 > SDA
Analog Pin 5 > SCL
+5V > VDD
GND > GND

for more information see the sample files in the library and the DRV2667 Datasheet.