Other Parts Discussed in Thread: DRV2605, DRV2624
Tool/software:
Hi, I'm driving 4 LRA motors using 4 DRV2605L continuously, with PWM input for about 2 hours. I've posted a snipped ot my code. It's configured so that 1 motor vibrates at 250 Hz once in a particular period, and the rests for 667ms.
However, after some time, these motors start to get burning hot. I've reduced to duty cycle from 180 to 140. However, I know according to the data sheet once this gets to 127, there's 0 volts delivered to the motors. How could I potentially solve this problem. It seems like too much current is going through the motors. I have used a voltage divider , and this has worked, but I would Ideally like to not do that for efficiency reasons. Could I reduce the duty cycle even further?
Please let me know any suggestions you have:
#include <Wire.h> #include "Adafruit_DRV2605.h" #include <esp_now.h> #include <WiFi.h> Adafruit_DRV2605 drv0; Adafruit_DRV2605 drv1; Adafruit_DRV2605 drv2; Adafruit_DRV2605 drv3; const int PWM_CHANNEL0 = 0; const int PWM_CHANNEL1 = 1; const int PWM_CHANNEL2 = 2; const int PWM_CHANNEL3 = 3; const int PWM_FREQ = 32000; const int PWM_RESOLUTION = 8; const int JITTER = 23.5; int dutyCycle = 140; const int DRV1 = 3; const int DRV2 = 4; const int DRV3 = 5; const int DRV4 = 10; int perms[24][4] = { {0, 1, 2, 3}, {1, 0, 2, 3}, {2, 0, 1, 3}, {0, 2, 1, 3}, {1, 2, 0, 3}, {2, 1, 0, 3}, {2, 1, 3, 0}, {1, 2, 3, 0}, {3, 2, 1, 0}, {2, 3, 1, 0}, {1, 3, 2, 0}, {3, 1, 2, 0}, {3, 0, 2, 1}, {0, 3, 2, 1}, {2, 3, 0, 1}, {3, 2, 0, 1}, {0, 2, 3, 1}, {2, 0, 3, 1}, {1, 0, 3, 2}, {0, 1, 3, 2}, {3, 1, 0, 2}, {1, 3, 0, 2}, {0, 3, 1, 2}, {3, 0, 1, 2} }; void TCA9548A(uint8_t bus){ Wire.beginTransmission(0x70); Wire.write(1 << bus); Wire.endTransmission(); } void setup() { Wire.begin(6,7); TCA9548A(0); delay(50); while (! drv0.begin()) { delay(5000); } drv0.useLRA(); drv0.setMode(3); drv0.writeRegister8(0x1D, 161); TCA9548A(1); while (! drv1.begin()) { delay(5000); } drv1.useLRA(); drv1.setMode(3); drv1.writeRegister8(0x1D, 161); TCA9548A(2); while (! drv2.begin()) { delay(5000); } drv2.useLRA(); drv2.setMode(3); drv2.writeRegister8(0x1D, 161); TCA9548A(3); while (! drv3.begin()) { delay(5000); } drv3.useLRA(); drv3.setMode(3); drv3.writeRegister8(0x1D, 161); ledcSetup(PWM_CHANNEL1, PWM_FREQ, PWM_RESOLUTION); ledcSetup(PWM_CHANNEL0, PWM_FREQ, PWM_RESOLUTION); ledcSetup(PWM_CHANNEL2, PWM_FREQ, PWM_RESOLUTION); ledcSetup(PWM_CHANNEL3, PWM_FREQ, PWM_RESOLUTION); ledcAttachPin(DRV1, PWM_CHANNEL0); ledcAttachPin(DRV2, PWM_CHANNEL1); ledcAttachPin(DRV3, PWM_CHANNEL2); ledcAttachPin(DRV4, PWM_CHANNEL3); } void loop() { for(int period = 1; period < 4; period++){ int pattern = random(25); for(int j = 0; j < 4; j++){ ledcWrite(perms[pattern][j], dutyCycle); delay(100); ledcWrite(perms[pattern][j], 0); delay(66); } } delay(666); }