Texas Instruments | DRV2605 Device | Application notes | Texas Instruments DRV2605 Device Application notes

Texas Instruments DRV2605 Device Application notes
Application Report
SLOA189 – July 2014
DRV2605 Setup Guide
Brian Burk .................................................................................................................. Haptic Products
ABSTRACT
The DRV2605 is an ERM and LRA driver that simplifies haptics integration for any application. This
document provides instructions for configuring and operating the DRV2605.
1
2
3
Contents
Initialization ................................................................................................................... 2
1.1
Device Startup and Power ......................................................................................... 2
1.2
Standby .............................................................................................................. 2
1.3
Device I2C Address ................................................................................................ 2
1.4
Rated and Overdrive Voltage ..................................................................................... 3
1.5
Setting the Control Registers ...................................................................................... 4
1.6
Examples ............................................................................................................ 5
Auto-Calibration .............................................................................................................. 7
2.1
Auto-Calibration Verification ....................................................................................... 7
2.2
Examples ........................................................................................................... 11
Waveform Library .......................................................................................................... 13
3.1
Select the Waveform Library..................................................................................... 14
3.2
Examples ........................................................................................................... 16
List of Figures
1
LRA - Single Click – Effect 1 ............................................................................................... 8
2
LRA – Double Click – Effect 10 ............................................................................................ 8
3
LRA – Triple Click – Effect 12 .............................................................................................. 8
4
LRA – Alert 750 ms – 15.................................................................................................... 9
5
LRA – Transition Ramp Down Medium Smooth 2 – 100% to 0% ................................................... 10
6
Waveform Sequencer and ROM Library ................................................................................ 13
7
DRV2605 ROM Libraries .................................................................................................. 14
List of Tables
1
Standby Control Settings ................................................................................................... 2
2
I2C Register Settings ........................................................................................................ 2
3
Required ERM Registers
4
5
6
7
8
9
10
11
12
................................................................................................... 4
LRA Control Registers ...................................................................................................... 4
ERM Initialization Example ................................................................................................. 5
LRA Initialization Example .................................................................................................. 6
ERM Auto-Calibration Example .......................................................................................... 11
LRA Auto-Calibration Example ........................................................................................... 12
DRV2605 ROM Library Actuator Properties ............................................................................ 14
Sequence Registers with Effect 4, 7, and 5 ............................................................................ 16
Sequence Registers Playing 5 Waveforms ............................................................................. 16
Sequence Registers Playing 3 Waveforms with Delay Using I2C .................................................... 17
SLOA189 – July 2014
Submit Documentation Feedback
DRV2605 Setup Guide
Copyright © 2014, Texas Instruments Incorporated
1
Initialization
1
www.ti.com
Initialization
This section describes the required steps for initializing the DRV2605.
1.1
Device Startup and Power
To
1.
2.
3.
4.
start the device and begin an I2C transaction:
Apply power to the VDD pin.
Set the ENABLE pin high or tie the ENABLE pin to VDD.
The device will perform a quick startup sequence (250 µs) and go into STANDBY mode.
Exit STANDBY mode by setting the STANDBY bit in register 0x01 to zero. A single write to register
0x01 can disable STANDBY and enable the device MODE.
Internal to the device, a startup sequence will occur every time power is applied. During the startup
sequence the device will automatically set several internal registers. This power-up cycle takes less than
250 µs, once power is stable. After the initial 250 µs, the device is ready for operation and will default to
the STANDBY state (STANDBY = 1).
If an attempt to send an I2C transaction to the device occurs prior to the device completing the internal
startup sequence, the device will return a nACK. If a nACK occurs, retry the transaction until a successful
ACK occurs.
1.2
Standby
The device has a low power mode that can be enabled or disabled by hardware or software. In order to
control the actuator, the ENABLE pin must be high and the STANDBY bit (register 0x01, bit 6) must be
low.
Table 1. Standby Control Settings
EN Pin
STANDBY Bit
High
0
Device State
Enabled
Low
X
Low-Power Mode
X
1
Low-Power Mode
If the ENABLE pin is low or the STANDBY bit is “1”, the device will enter a low power mode. When in the
low power mode, the internal circuitry will be disabled and some registers will be inaccessible; however,
data in the device registers and ROM will remain. To exit STANDBY, the ENABLE pin must be high and
the STANDBY bit must be low.
To access registers via I2C, the ENABLE pin must be high. The ENABLE pin activates the internal clock
to allow the device to act on I2C transactions. The device may ACK some I2C transactions if ENABLE is
low; however, any updates will not be stored in the register as expected.
1.3
Device I2C Address
The DRV2605 is controlled by a series of I2C registers. To access these registers, first set the EN pin high
and then use the 7-bit I2C address 0x5A. Table 2 shows the 7-bit address, the I2C read address, and the
I2C write address.
Table 2. I2C Register Settings
Hex
Binary
7-bit I2C Address
0x5A
101 1010
7-bit Address + Write Bit
0xB4
1011 0100
7-bit Address + Read Bit
0xB5
1011 0101
All trademarks are the property of their respective owners.
2
DRV2605 Setup Guide
SLOA189 – July 2014
Submit Documentation Feedback
Copyright © 2014, Texas Instruments Incorporated
Initialization
www.ti.com
1.4
Rated and Overdrive Voltage
The rated and overdrive voltage registers set the full-scale and overdrive voltages used in the waveform
data. For example, if the rated voltage is set to 3.3 V and a waveform calls for 100% output, then the
output voltage will be 3.3 V. For the overdrive voltage, if the overdrive voltage is set to 4 V and the
actuator is starting from zero acceleration or is in a transition from low acceleration to high acceleration,
the driver will indicate overdrive and use 4 V.
1.4.1
1.
2.
3.
4.
ERM – Rated and Overdrive Voltages
Decide if closed-loop or open-loop mode will be used. If you are using the waveform libraries
embedded in the DRV2605, use open-loop as the waveforms are tuned using open-loop mode.
Closed-loop should be used for other modes.
For closed-loop, continue to step 3. For open-loop, skip to step 5.
Closed-Loop Rated Voltage: Set the RatedVoltage register (0x16) to the rated voltage specified in
the actuator datasheet. Use the following equation to convert the voltage to the appropriate binary
value:
VRatedVoltage ´ 255
RatedVoltage (0x16) =
5.36 V
(1)
Closed-Loop Overdrive Voltage: Set the Overdrive Clamp (ODClamp) Voltage (0x17) to the actuator
overdrive voltage specified in the actuator datasheet. Use the following equation to convert the voltage
to the appropriate binary value.
DriveTime + IDissTime + BlankingTime
Vpeak = Voverdrive ´
DriveTime - 300 ms
ODClamp(0x17) =
Vpeak ´ 255
5.44 V
(2)
Voverdrive – the maximum allowable DC voltage on the ERM
5. Open-Loop Rated Voltage: In open-loop mode, the rated voltage is not referenced by the control
engine. Unlike closed-loop where 100% output equals the rated voltage, in open-loop mode, 100%
output equals the overdrive voltage. A calculation for open-loop rated voltage is not necessary.
Continue to step 6.
6. Open-Loop Overdrive Voltage: Set the Overdrive Clamp (ODClamp) Voltage (0x17) to the actuator
overdrive voltage specified in the actuator datasheet. Use the following equation to convert the voltage
to the appropriate binary value.
´ 255
V
ODClamp(0x17) = overdrive
5.6 V
(3)
1.4.2
LRA — Rated and Overdrive Voltages
1. Convert the Rated Voltage from the LRA data sheet to an “average of the absolutes” voltage using the
following equation. If the overdrive voltage is not listed, contact the actuator manufacturer or use the
Rated Voltage.
Vavg _ abs = Vrms ´ 1 - (4 ´ SampleTime + 300 ms)ƒLRA
(4)
Default Values:
SampleTime = 300 µs
ƒLRA = 175 Hz
2. Using the "average of the absolutes" voltage from the Equation 4, convert it to the appropriate binary
value using Equation 5.
Vavg _ abs ´ 255
RatedVoltage (0x16) =
5.3 V
(5)
Insert the binary value into the Rated Voltage (0x16) register.
SLOA189 – July 2014
Submit Documentation Feedback
DRV2605 Setup Guide
Copyright © 2014, Texas Instruments Incorporated
3
Initialization
www.ti.com
3. The overdrive voltage for an LRA is specified as a peak voltage. Use Equation 6 to convert the
overdrive voltage to the appropriate binary value.
Vpeak ´ 255
ODClamp(0x17) =
5.6 V
Insert the binary value into the Overdrive Clamp Voltage (0x17) register.
1.5
(6)
Setting the Control Registers
Select the appropriate values for the Feedback, Control 1, Control 2, and Control 3 registers based on
your actuator. See the DRV2605 datasheet (SLOS825) for a detailed description of each register.
Section 1.5.1 and Section 1.5.2 describe the recommendations for using the ERM and LRA libraries.
1.5.1
ERM Control Registers
The required register settings for the ERM libraries are shown in Table 3. All other registers can typically
use default settings.
Table 3. Required ERM Registers
Register
Name
1.5.2
Register Bits
Address
Name
Feedback Control
0x1A
nERM_LRA
Control 3
0x1D
ERM_OpenLoop
Library Selection
0x03
LibrarySel
Bits
Setting
[7]
0 - ERM (default)
[5]
1 - Open Loop
[2:0]
1 - TS2200C Library A With Overdrive
LRA Control Registers
For LRA actuators, register settings are shown in Table 4. All other registers can typically use default
settings.
Table 4. LRA Control Registers
Register
Name
Name
Bits
Setting
Feedback Control
0x1A
nERM_LRA
[7]
1 - LRA
Control 3
0x1D
LRA DriveMode
[2]
0 - Once per cycle
(default)
LRA_OpenLoop
[0]
0 - Auto Resonance On
(default)
Library Selection
4
Register Bits
Address
0x03
LibrarySel
DRV2605 Setup Guide
[2:0]
6 - LRA Library
SLOA189 – July 2014
Submit Documentation Feedback
Copyright © 2014, Texas Instruments Incorporated
Initialization
www.ti.com
1.6
1.6.1
Examples
ERM Initialization
Table 5 is an example initialization for ERM using ERM Library 1. Most of the default settings were used in
the Feedback Control, Control 1, Control 2, and Control 3 registers.
Table 5. ERM Initialization Example
Register
Parameter Selection
Name
Addr
Value
(Hex)
Name
Bits
Setting
Rated Voltage
0x16
Overdrive Clamp Voltage
0x17
90
RatedVoltage
[7:0]
3
A4
ODClamp
[7:0]
3.6
Feedback Control
0x1A
36
nERM_LRA
[7]
0 – ERM (default)
FBBrakeFactor
[6:4]
3 – 4x (default)
LoopGain
[3:2]
1 – Medium (default)
BEMFGain
[1:0]
2 – 1.8x / 20x (default)
Auto-calibration Compensation
Results
0x18
—
ACalComp
[7:0]
Write value obtained from auto-calibration
Auto-calibration Back-EMF
Result
0x19
—
ACalBEMF
[7:0]
Write value obtained from auto-calibration
Control 1
0x1B
93
StartupBoost
[7]
1 – ON (default)
AC_Couple
[5]
0 – DC Coupling / Digital Input Modes
DriveTime
[4:0]
19
BiDir_Input
[7]
1 – Bi-directional (default)
BrakeStabilizer
[6]
0 – OFF (default)
SampleTime
[5:4]
3 – 300 µs (default)
BlankingTime
[3:2]
1 – 25 µs, 75 µs (default)
IDissTime
[1:0]
1 – 25 µs, 75 µs (default)
NG_Thresh
[7:6]
2 – 4% (default)
ERM_OpenLoop
[5]
0 – Closed Loop (default)
SupplyCompDis
[4]
0 – ON (default)
DataFormat_RTP
[3]
0 – Signed (default)
LRADriveMode
[2]
0 – Once per cycle (default)
nPWM_Analog
[1]
0– PWM Input (default)
LRA_OpenLoop
[0]
0 – Auto Resonance On (default)
HiZ
[4]
0 – OFF (default)
LibrarySel
[2:0]
1 – TS2200C Library A - With Overdrive
Dev_Reset
[7]
0 – OFF (default)
STANDBY
[6]
0 – Device Ready
Mode
[2:0]
0 – Internal Trigger (default)
Control 2
Control 3
0x1C
0x1D
F5
80
Library Selection
0x03
1
Mode
0x01
0
SLOA189 – July 2014
Submit Documentation Feedback
DRV2605 Setup Guide
Copyright © 2014, Texas Instruments Incorporated
5
Initialization
1.6.2
www.ti.com
LRA Initialization
Table 6 is an example of LRA initialization.
Table 6. LRA Initialization Example
Register
Name
Addr
Rated Voltage
0x16
Overdrive Clamp Voltage
0x17
Feedback Control
0x1A
Name
Bits
Setting
53
RatedVoltage
[7:0]
2 Vrms
89
ODClamp
[7:0]
3 Vpeak
B6
nERM_LRA
[7]
1 – LRA
FBBrakeFactor
[6:4]
3 – 4x (default)
LoopGain
[3:2]
1 – Medium (default)
BEMFGain
[1:0]
2 – 1.8x / 20x (default)
Auto-calibration Compensation
Results
0x18
—
ACalComp
[7:0]
Write value obtained from auto-calibration
Auto-calibration Back-EMF
Result
0x19
—
ACalBEMF
[7:0]
Write value obtained from auto-calibration
Control 1
0x1B
13
StartupBoost
[7]
0 – OFF
AC_Couple
[5]
0 – DC Coupling / Digital Input Modes
DriveTime
[4:0]
19
BiDir_Input
[7]
1 – Bi-directional (default)
BrakeStabilizer
[6]
0 – OFF (default)
SampleTime
[5:4]
3 – 300 µs (default)
BlankingTime
[3:2]
1 – 25 µs, 75 µs (default)
IDissTime
[1:0]
1 – 25 µs, 75 µs (default)
NG_Thresh
[7:6]
2 – 4% (default)
ERM_OpenLoop
[5]
0 – Closed Loop (default)
SupplyCompDis
[4]
0 – ON (default)
DataFormat_RTP
[3]
0 – Signed (default)
LRADriveMode
[2]
0 – Once per cycle (default)
nPWM_Analog
[1]
0 – PWM Input (default)
LRA_OpenLoop
[0]
0 – Auto Resonance On (default)
HiZ
[4]
0 – OFF (default)
LibrarySel
[2:0]
6 – LRA Library
Dev_Reset
[7]
0 – OFF (default)
STANDBY
[6]
0 – Device Ready
Mode
[2:0]
0 – Internal Trigger (default)
Control 2
Control 3
Library Selection
Mode
6
Parameter Selection
Value
(Hex)
0x1C
0x1D
0x03
0x01
F5
80
6
0
DRV2605 Setup Guide
SLOA189 – July 2014
Submit Documentation Feedback
Copyright © 2014, Texas Instruments Incorporated
Auto-Calibration
www.ti.com
2
Auto-Calibration
Auto-calibration is a unique feature that allows the DRV2605 to tune the feedback and drive algorithm to
any particular ERM or LRA. This allows for better control, response time, and acceleration.
Auto-calibration is not the same as the LRA auto-resonance function. Instead, auto-calibration is an
algorithm that identifies and then tunes the driver based on the "amplitude" of the back-EMF. All ERM and
LRAs vary slightly in construction and likewise will have unique back-EMF. Once auto-calibration is
performed, the back-EMF of each ERM or LRA becomes normalized so it looks the same to the drive
engine.
To
1.
2.
3.
4.
5.
6.
7.
8.
2.1
perform auto-calibration:
Connect the actuator to the output pins and power the device.
Exit Standby mode.
Set the following registers to the appropriate values:
• Rated Voltage (0x16)
• Overdrive Voltage (0x17)
• Feedback Control (0x1A) – Bits [1:0] can be left blank and will be populated by the auto-calibration
engine
• Control 1 (0x1B), Control 2 (0x1C), and Control 3 (0x1D)
• Mode (0x01) – Set mode to Auto-Calibration
• Auto-calibration Memory Interface (0x1E) – the auto-calibration time can be increased to improve
calibration, but can be left as default for the initial calibration
Set the GO bit in register 0x0C to begin Auto-calibration.
Poll the GO bit until it changes to zero, indicating Auto-calibration has completed or wait until the
actuator stops vibrating. It should take no more than 2 s.
Read the Diag_Results bit in the Status Register (0x00). Diag_Result should be set to “0” if Autocalibration is successful. If “1”, then ensure the actuator is connected correctly and try again.
Read and save register values from ACalComp[7:0] (0x18), ACalBEMF[7:0] (0x19), and
BEMFGain[1:0] of the Feedback Control Register (0x1A). These are the values returned by the Autocalibration engine.
Auto-calibration is complete. Ensure that the performance of the actuator is acceptable and do one of
the following:
• Store the values on the host processor and reload into the registers after each power-cycle.
• Repeat auto-calibration process at startup (from power cycle).
• Permanently program the results in the non-volatile memory of the DRV2605. See the datasheet
(SLOS825) for more information.
Auto-Calibration Verification
Verify auto-calibration was successful and the actuator is being driven correctly by comparing the following
waveforms with the same waveforms taken using your actuator.
Click Waveforms
Verify the click waveforms look correct. Test clicks using the following effects:
Effect Number
Description
Figure
1
Strong Click – 100%
Figure 1
10
Double Click – 100%
Figure 2
12
Triple Click – 100%
Figure 3
SLOA189 – July 2014
Submit Documentation Feedback
DRV2605 Setup Guide
Copyright © 2014, Texas Instruments Incorporated
7
Auto-Calibration
www.ti.com
Clicks are tested because they are a special category of effect; they are short in duration and typically do
not reach maximum acceleration. When multiple clicks are put in a sequence it is important to make sure
that the braking is working correctly.
The following list provides the key features to look for in the click waveforms:
• (OUT+) - (OUT–) should have three distinct segments; overdrive, sustain, and braking. These three
components create the click feel.
• The acceleration waveform should rise with no distortion.
• Watch for repeating skipped sine wave half-cycles in the (OUT+) – (OUT–) waveform. You may see a
few skipped half-cycles at the beginning and end of very low acceleration waveforms, which is
expected.
Figure 1. LRA - Single Click – Effect 1
Figure 2. LRA – Double Click – Effect 10
Figure 3. LRA – Triple Click – Effect 12
8
DRV2605 Setup Guide
SLOA189 – July 2014
Submit Documentation Feedback
Copyright © 2014, Texas Instruments Incorporated
Auto-Calibration
www.ti.com
Buzz Waveform
The buzz effect is a staple of haptic vibration applications and often used as an alert. Test the buzz using
the following effects:
Effect Number
Description
Figure
15
750 ms Alert
Figure 4
16
1000 ms Alert
Not Shown
The alert and buzz effects are best for testing steady-state response. The key features to look at are
steady acceleration and steady output voltage. There should not be spikes or oscillations in the output or
acceleration waveform.
Figure 4 shows a 750 ms buzz. The color distortion in the waveform is a result of oscilloscope aliasing.
Figure 4. LRA – Alert 750 ms – 15
SLOA189 – July 2014
Submit Documentation Feedback
DRV2605 Setup Guide
Copyright © 2014, Texas Instruments Incorporated
9
Auto-Calibration
www.ti.com
Ramp Waveforms
The ramp up and ramp down waveforms show how the actuator and driver interact during constantly
changing peak output voltages. To test ramp effects, use the following:
Effect Number
Description
Figure
73
Transition Ramp Down Medium Smooth 2 – 100% to 0%
Figure 5
The key features to look for are skipping pulses in the ramp. At the beginning and end of the waveform in
Figure 5 there will sometimes be a skipped pulse to overcome the coefficient of friction on the mass inside
the LRA.
Figure 5. LRA – Transition Ramp Down Medium Smooth 2 – 100% to 0%
10
DRV2605 Setup Guide
SLOA189 – July 2014
Submit Documentation Feedback
Copyright © 2014, Texas Instruments Incorporated
Auto-Calibration
www.ti.com
2.2
2.2.1
Examples
ERM Auto-Calibration
The example in Table 7 shows results of ERM Auto-Calibration.
Table 7. ERM Auto-Calibration Example
Register
Parameter Selection
Name
Addr
Rated Voltage
0x16
Overdrive Clamp Voltage
0x17
Feedback Control
0x1A
36
Control 1
Control 2
Control 3
Mode
Auto-Calibration Memory
Interface
0x1B
0x1C
0x1D
0x01
0x1E
GO
0x0C
Status
0x00
Value
(Hex)
Name
Bits
Setting
90
RatedVoltage
[7:0]
3
A4
ODClamp
[7:0]
3.6
nERM_LRA
[7]
0 – ERM (default)
FBBrakeFactor
[6:4]
3 – 4x (default)
LoopGain
[3:2]
1 – Medium (default)
BEMFGain
[1:0]
2 – 1.8x / 20x (default)
StartupBoost
[7]
0 – OFF
AC_Couple
[5]
0 – DC Coupling / Digital Input Modes
DriveTime
[4:0]
19
BiDir_Input
[7]
1 – Bi-directional (default)
BrakeStabilizer
[6]
0 – OFF (default)
SampleTime
[5:4]
3 – 300 µs (default)
BlankingTime
[3:2]
1 – 25 µs, 75 µs (default)
IDissTime
[1:0]
1 – 25 µs, 75 µs (default)
NG_Thresh
[7:6]
2 – 4% (default)
ERM_OpenLoop
[5]
1 – Open Loop
SupplyCompDis
[4]
0 – ON (default)
DataFormat_RTP
[3]
0 – Signed (default)
LRADriveMode
[2]
0 – Once per cycle (default)
nPWM_Analog
[1]
0– PWM Input (default)
LRA_OpenLoop
[0]
0 – Auto Resonance On (default)
Dev_Reset
[7]
0 – OFF (default)
STANDBY
[6]
0 – Device Ready
Mode
[2:0]
7 – Auto Calibration
AutoCalTime
[5:4]
2 – 500 ms (default)
OTP_Status
[2]
Read-Only
OTP_Program
[0]
0 – OFF (default)
GO
[0]
1– ON
13
F5
A0
07
20
1
Poll Go bit for “0”
Read DeviceID
(0xA8)
Diag_Result
[7:5]
Read – 101
[3]
Read – 1
Feedback_Status
[2]
Read – 0 / 1
OverTemp
[1]
Read – 0
OC_Detect
[0]
Read – 0
Auto-calibration
Compensation Results
0x18
Read
ACalComp
[7:0]
Read value and store
Auto-calibration Back-EMF
Result
0x19
Read
ACalBEMF
[7:0]
Read value and store
Feedback Control
0x1A
Read
BEMFGain
[1:0]
Read bits [1:0] and store
SLOA189 – July 2014
Submit Documentation Feedback
DRV2605 Setup Guide
Copyright © 2014, Texas Instruments Incorporated
11
Auto-Calibration
2.2.2
www.ti.com
LRA Auto-Calibration
The example shown in Table 8 runs auto-calibration on a 2 Vrms LRA actuator with overdrive set to 2.82
Vp (or 2 Vrms).
Table 8. LRA Auto-Calibration Example
Register
Parameter Selection
Name
Addr
Rated Voltage
0x16
Overdrive Clamp Voltage
0x17
Feedback Control
0x1A
B6
Control 1
Control 2
Control 3
Mode
Auto-Calibration Memory
Interface
0x1B
0x1C
0x1D
0x01
0x1E
GO
0x0C
Status
0x00
Value
(Hex)
Name
Bits
Setting
53
RatedVoltage
[7:0]
2 Vrms
A0
ODClamp
[7:0]
2.82 Vpeak
nERM_LRA
[7]
1 – LRA
FBBrakeFactor
[6:4]
3 – 4x (default)
LoopGain
[3:2]
1 – Medium (default)
BEMFGain
[1:0]
2 – 1.8x / 20x (default)
StartupBoost
[7]
1 – ON (default)
AC_Couple
[5]
0 – DC Coupling / Digital Input Modes
DriveTime
[4:0]
19
BiDir_Input
[7]
1 – Bi-directional (default)
BrakeStabilizer
[6]
0 – OFF (default)
SampleTime
[5:4]
3 – 300 µs (default)
BlankingTime
[3:2]
1 – 25 µs, 75 µs (default)
IDissTime
[1:0]
1 – 25 µs, 75 µs (default)
NG_Thresh
[7:6]
2 – 4% (default)
ERM_OpenLoop
[5]
0 – Closed Loop (default)
SupplyCompDis
[4]
0 – ON (default)
DataFormat_RTP
[3]
0 – Signed (default)
LRADriveMode
[2]
0 – Once per cycle (default)
nPWM_Analog
[1]
0– PWM Input (default)
LRA_OpenLoop
[0]
0 – Auto Resonance On (default)
Dev_Reset
[7]
0 – OFF (default)
STANDBY
[6]
0 – Device Ready
Mode
[2:0]
7 – Auto Calibration
AutoCalTime
[5:4]
2 – 500 ms (default)
OTP_Status
[2]
Read-Only
OTP_Program
[0]
0 – OFF (default)
GO
[0]
1– ON
93
F5
80
07
20
01
Poll Go bit for “0”
12
Read DeviceID
(0xA8)
Diag_Result
[7:5]
Read – 101
[3]
Read – 1
Feedback_Status
[2]
Read – 0 / 1
OverTemp
[1]
Read – 0
OC_Detect
[0]
Read – 0
Auto-calibration
Compensation Results
0x18
Read
ACalComp
[7:0]
Read value and store
Auto-calibration Back-EMF
Result
0x19
Read
ACalBEMF
[7:0]
Read value and store
Feedback Control
0x1A
Read
BEMFGain
[1:0]
Read bits [1:0] and store
DRV2605 Setup Guide
SLOA189 – July 2014
Submit Documentation Feedback
Copyright © 2014, Texas Instruments Incorporated
Waveform Library
www.ti.com
3
Waveform Library
The DRV2605 waveform library is stored in non-volatile memory (ROM). The waveforms can be played by
inserting the desired effect ID into the waveform sequencer. When waveforms are placed in the waveform
sequencer and the GO bit is set to "1", then the waveform or waveform sequence will begin playback. The
trigger signal can either be controlled by I2C or an external GPIO.
Waveform Sequencer
Effect 4
WavfrmSeq1
Effect 7
WavfrmSeq2
WavfrmSeq3
ROM Library
WavfrmSeq4
Effect 1
WavfrmSeq5
Effect 2
WavfrmSeq6
Effect 3
WavfrmSeq7
Effect 4
WavfrmSeq8
Effect 5
Effect 6
Effect 7
Effect 8
‡
‡
‡
Effect 121
Effect 122
Effect 123
Figure 6. Waveform Sequencer and ROM Library
To play a waveform or waveform sequence:
1. Exit STANDBY mode by setting the EN pin HIGH and the STANDBY bit in register 0x01 to “0”.
2. Initialize the device to the appropriate settings (ERM/LRA, Open-Loop / Closed-loop, and so forth).
Follow the steps in the Initialization section.
3. Select the trigger mode (0 = Internal Trigger, 1 = external edge trigger, 2 = external level trigger) in
register 0x01.
4. Write the first waveform index number into the first Waveform Sequence Register (0x04).
5. Write additional waveforms into the subsequent waveform sequence registers as desired (0x05 –
0x0B).
6. If the sequence contains less than eight waveforms, then write the termination value 0x00 in the
waveform sequence register following the last waveform.
7. To play the sequence, set the trigger high according to the trigger mode selected in step 3.
8. After the sequence has finished, place the device in STANDBY.
SLOA189 – July 2014
Submit Documentation Feedback
DRV2605 Setup Guide
Copyright © 2014, Texas Instruments Incorporated
13
Waveform Library
3.1
www.ti.com
Select the Waveform Library
There are six ROM libraries in the DRV2605 and each contains 123 effects. Libraries 1–5 are for ERM
motors and were designed to support various ERM motor types and characteristics. Library 6 is the LRA
library and uses closed-loop feedback to auto-tune to any LRA actuator. The effects in each library were
created to achieve the same feel, but the output will appear slightly different to account for differences in
motor characteristics like startup time, acceleration, and brake time.
0x00
ERM Library A
LibrarySel = 1
ERM Library E
LibrarySel = 5
LRA Library
LibrarySel = 6
Auxillary Library
{Empty}
LibrarySel = 7
0x7FF
Figure 7. DRV2605 ROM Libraries
The ERM libraries can be chosen based on the startup and stop times of the actuator. Library A is for
motors that have faster start and stop times and Library E is for ERMs that have slower start and stop
times.
Table 9. DRV2605 ROM Library Actuator Properties
Actuator Properties
Number
Library
Start Time (ms)
Stop Time (ms)
1
Library A
40-60
20-40
2
Library B
40-60
5-15
3
Library C
60-80
10-20
4
Library D
100-140
15-25
5
Library E
>140
>30
Test the ERM to choose a library:
1. Mount the actuator on a similar size mass as the final application.
2. Mount an accelerometer to the mass.
3. Run the actuator at its Overdrive Voltage for 1 s.
4. Measure the time from the waveform start to 90% of the maximum acceleration.
14
DRV2605 Setup Guide
SLOA189 – July 2014
Submit Documentation Feedback
Copyright © 2014, Texas Instruments Incorporated
Waveform Library
www.ti.com
5. Run the actuator at the Overdrive voltage for 1 s and then the brake voltage for 1 s immediately
after.
6. Measure the time from the start of braking to 10% of the maximum acceleration.
7. Compare the measured times to Table 9.
8. Most actuators will use Library C or D.
Use the two measurements to select the most appropriate ERM waveform library from Table 9.
The following table lists three ROM library effects that can be used to measure the startup and braking of
an ERM.
Effect Number
Description
15
750 ms Alert
16
1000 ms Alert
118
Long buzz for programmatic stopping – 100%
SLOA189 – July 2014
Submit Documentation Feedback
DRV2605 Setup Guide
Copyright © 2014, Texas Instruments Incorporated
15
Waveform Library
3.2
3.2.1
www.ti.com
Examples
Play 3 Waveforms Using I2C
The sequence in Table 10 inserts effect 4, 7, and 5 into the sequence registers and triggers the playback
using I2C. This sequence assumes the part was previously initialized.
Table 10. Sequence Registers with Effect 4, 7, and 5
Register
Addr
Value (Hex)
Mode
0x01
0x00
Waveform
Sequencer
GO
3.2.2
Parameter Selection
Name
Name
Bits
Setting
Dev_Reset
[7]
0 – OFF (default)
STANDBY
[6]
0 – Device Ready
Mode
[2:0]
0 – Internal Trigger (default)
0x04
0x04
Wait +
WavfrmSeq1
[7:0]
0x05
0x07
Wait +
WavfrmSeq2
[7:0]
0x06
0x05
Wait +
WavfrmSeq3
[7:0]
0x07
0x00
Wait +
WavfrmSeq4
[7:0]
0x08
—
Wait +
WavfrmSeq5
[7:0]
0x09
—
Wait +
WavfrmSeq6
[7:0]
0x0A
—
Wait +
WavfrmSeq7
[7:0]
0x0B
—
Wait +
WavfrmSeq8
[7:0]
0x0C
0x01
GO
[0]
Write waveform identifier or wait time
1 – ON
Play 5 Waveforms using External Trigger (GPIO) Mode
The sequence in Table 11 inserts five effects into the sequence registers and triggers the playback using
the external trigger pin. This sequence assumes the part was previously initialized.
Table 11. Sequence Registers Playing 5 Waveforms
Register
Parameter Selection
Name
Addr
Value (Hex)
Mode
0x01
01
Waveform
Sequencer
Name
Bits
Setting
Dev_Reset
[7]
0 – OFF (default)
STANDBY
[6]
0 – Device Ready
Mode
[2:0]
0 – External Trigger (Edge Mode)
0x04
0x07
Wait + WavfrmSeq1
[7:0]
0x05
0x7B
Wait + WavfrmSeq2
[7:0]
0x06
0x10
Wait + WavfrmSeq3
[7:0]
0x07
0x01
Wait + WavfrmSeq4
[7:0]
0x08
0x02
Wait + WavfrmSeq5
[7:0]
0x09
0x00
Wait + WavfrmSeq6
[7:0]
0x0A
—
Wait + WavfrmSeq7
[7:0]
0x0B
—
Wait + WavfrmSeq8
[7:0]
Write waveform identifier or wait time
Apply a low to high edge to the IN/TRIG pin
16
DRV2605 Setup Guide
SLOA189 – July 2014
Submit Documentation Feedback
Copyright © 2014, Texas Instruments Incorporated
Waveform Library
www.ti.com
3.2.3
Play 3 Waveforms with Delay Using I2C
The sequence in Table 12 inserts the same three effects as Section 3.2.1 into the sequence registers, but
separates them with a 40 ms delay. The delay can be used to create pauses between effects.
Table 12. Sequence Registers Playing 3 Waveforms with Delay Using I2C
Register
Parameter Selection
Name
Addr
Value (Hex)
Mode
0x01
0x00
Waveform
Sequencer
GO
Name
Bits
Setting
Dev_Reset
[7]
0 – OFF (default)
STANDBY
[6]
0 – Device Ready
0 – Internal Trigger (default)
Mode
[2:0]
0x04
0x04
Wait + WavfrmSeq1
[7:0]
0x05
0x84
Wait + WavfrmSeq2
[7:0]
0x06
0x07
Wait + WavfrmSeq3
[7:0]
0x07
0x84
Wait + WavfrmSeq4
[7:0]
0x08
0x05
Wait + WavfrmSeq5
[7:0]
0x09
0x00
Wait + WavfrmSeq6
[7:0]
0x0A
—
Wait + WavfrmSeq7
[7:0]
0x0B
—
Wait + WavfrmSeq8
[7:0]
0x0C
0x01
GO
[0]
SLOA189 – July 2014
Submit Documentation Feedback
Write waveform identifier or wait time
1 – ON
DRV2605 Setup Guide
Copyright © 2014, Texas Instruments Incorporated
17
IMPORTANT NOTICE
Texas Instruments Incorporated and its subsidiaries (TI) reserve the right to make corrections, enhancements, improvements and other
changes to its semiconductor products and services per JESD46, latest issue, and to discontinue any product or service per JESD48, latest
issue. Buyers should obtain the latest relevant information before placing orders and should verify that such information is current and
complete. All semiconductor products (also referred to herein as “components”) are sold subject to TI’s terms and conditions of sale
supplied at the time of order acknowledgment.
TI warrants performance of its components to the specifications applicable at the time of sale, in accordance with the warranty in TI’s terms
and conditions of sale of semiconductor products. Testing and other quality control techniques are used to the extent TI deems necessary
to support this warranty. Except where mandated by applicable law, testing of all parameters of each component is not necessarily
performed.
TI assumes no liability for applications assistance or the design of Buyers’ products. Buyers are responsible for their products and
applications using TI components. To minimize the risks associated with Buyers’ products and applications, Buyers should provide
adequate design and operating safeguards.
TI does not warrant or represent that any license, either express or implied, is granted under any patent right, copyright, mask work right, or
other intellectual property right relating to any combination, machine, or process in which TI components or services are used. Information
published by TI regarding third-party products or services does not constitute a license to use such products or services or a warranty or
endorsement thereof. Use of such information may require a license from a third party under the patents or other intellectual property of the
third party, or a license from TI under the patents or other intellectual property of TI.
Reproduction of significant portions of TI information in TI data books or data sheets is permissible only if reproduction is without alteration
and is accompanied by all associated warranties, conditions, limitations, and notices. TI is not responsible or liable for such altered
documentation. Information of third parties may be subject to additional restrictions.
Resale of TI components or services with statements different from or beyond the parameters stated by TI for that component or service
voids all express and any implied warranties for the associated TI component or service and is an unfair and deceptive business practice.
TI is not responsible or liable for any such statements.
Buyer acknowledges and agrees that it is solely responsible for compliance with all legal, regulatory and safety-related requirements
concerning its products, and any use of TI components in its applications, notwithstanding any applications-related information or support
that may be provided by TI. Buyer represents and agrees that it has all the necessary expertise to create and implement safeguards which
anticipate dangerous consequences of failures, monitor failures and their consequences, lessen the likelihood of failures that might cause
harm and take appropriate remedial actions. Buyer will fully indemnify TI and its representatives against any damages arising out of the use
of any TI components in safety-critical applications.
In some cases, TI components may be promoted specifically to facilitate safety-related applications. With such components, TI’s goal is to
help enable customers to design and create their own end-product solutions that meet applicable functional safety standards and
requirements. Nonetheless, such components are subject to these terms.
No TI components are authorized for use in FDA Class III (or similar life-critical medical equipment) unless authorized officers of the parties
have executed a special agreement specifically governing such use.
Only those TI components which TI has specifically designated as military grade or “enhanced plastic” are designed and intended for use in
military/aerospace applications or environments. Buyer acknowledges and agrees that any military or aerospace use of TI components
which have not been so designated is solely at the Buyer's risk, and that Buyer is solely responsible for compliance with all legal and
regulatory requirements in connection with such use.
TI has specifically designated certain components as meeting ISO/TS16949 requirements, mainly for automotive use. In any case of use of
non-designated products, TI will not be responsible for any failure to meet ISO/TS16949.
Products
Applications
Audio
www.ti.com/audio
Automotive and Transportation
www.ti.com/automotive
Amplifiers
amplifier.ti.com
Communications and Telecom
www.ti.com/communications
Data Converters
dataconverter.ti.com
Computers and Peripherals
www.ti.com/computers
DLP® Products
www.dlp.com
Consumer Electronics
www.ti.com/consumer-apps
DSP
dsp.ti.com
Energy and Lighting
www.ti.com/energy
Clocks and Timers
www.ti.com/clocks
Industrial
www.ti.com/industrial
Interface
interface.ti.com
Medical
www.ti.com/medical
Logic
logic.ti.com
Security
www.ti.com/security
Power Mgmt
power.ti.com
Space, Avionics and Defense
www.ti.com/space-avionics-defense
Microcontrollers
microcontroller.ti.com
Video and Imaging
www.ti.com/video
RFID
www.ti-rfid.com
OMAP Applications Processors
www.ti.com/omap
TI E2E Community
e2e.ti.com
Wireless Connectivity
www.ti.com/wirelessconnectivity
Mailing Address: Texas Instruments, Post Office Box 655303, Dallas, Texas 75265
Copyright © 2014, Texas Instruments Incorporated
Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Related manuals

Download PDF

advertising