LRA Wireling Power Issue

rodkaelyas

  • Newbie
  • *
    • Posts: 4
    • View Profile
Hello, I am running into an issue with the DRV2605 in audio to vibrate mode. When the microcontroller is hooked up to the USB connection and the rest of the circuit is hooked up to the battery, it works fine. However when everything is hooked up to the battery, the LRA motor just vibrates continuously.

Circled in the photo are the signal and ground wires for the audio signal that goes to the DRV2605 module. With the microcontroller hooked up to USB they read 0v normally, but with the battery connected to the microcontroller they are getting 3.3v continuously.

I tried this same circuit with the Seeed Xiao and the Adafruit haptic module and ran into the same problem.



Any help is appreciated!


lennevia

  • Administrator
  • Hero Member
  • *****
    • Posts: 437
    • View Profile
Hello,

There could be some serial communication or setup code that could be interfering. Can you share the code you are working with to rule that out?

Cheers,
RĂ©na


rodkaelyas

  • Newbie
  • *
    • Posts: 4
    • View Profile
#include <Wire.h>             // For using I2C communication
#include "Adafruit_DRV2605.h" // For interfacing with the DRV2605 chip
#include <Wireling.h>

Adafruit_DRV2605 drv;   // The variable used to interface with the DRV2605 chip

// Make Serial Monitor compatible for all TinyCircuits processors
#if defined(ARDUINO_ARCH_AVR)
  #define SerialMonitorInterface Serial
#elif defined(ARDUINO_ARCH_SAMD)
  #define SerialMonitorInterface SerialUSB
#endif


void setup() {


  // Initialize and power wireling
  Wireling.begin();

  //The port is the number on the Adapter board where the sensor is attached
  Wireling.selectPort(0);

  SerialMonitorInterface.begin(9600);
  SerialMonitorInterface.println("LRA Audio to Vibrate");
  drv.begin();


  drv.setMode(DRV2605_MODE_AUDIOVIBE);
 
  drv.useLRA();

  // ac coupled input, puts in 0.9V bias
  drv.writeRegister8(DRV2605_REG_CONTROL1, 0x20); 
 
  // analog input
  drv.writeRegister8(DRV2605_REG_CONTROL3, 0xA3);
 
  drv.writeRegister8(DRV2605_REG_AUDIOLVL, 0xA5);
  drv.writeRegister8(DRV2605_REG_AUDIOMAX, 0xC8);

  drv.writeRegister8(DRV2605_REG_AUDIOOUTMIN, 0xFF);
  drv.writeRegister8(DRV2605_REG_AUDIOOUTMAX, 0xFF);


 
}



void loop() {
}


lennevia

  • Administrator
  • Hero Member
  • *****
    • Posts: 437
    • View Profile
With nothing in your loop(), the hardware has nothing to repeat or continue doing after the setup() loop runs. I'm not particularly familiar with the audio to vibrate mode you are using, but I assume you need to read the audio data and process it with the library repeatedly like you might do with the loop() logic.

You can try calling your setup() loop in the loop() to see if re-writing to those registers does what you need, but you might need to add something else for what you are trying to accomplish:

loop() {
     setup();
}


 

SMF spam blocked by CleanTalk