Hello again!
I have a DRV8834 connected to a nema 17 motor (17HD40005-22B 2V/1.3A/1.6 Ohm per fase) and to an Arduino. The driver is fed by a separate power supply (9V/1A). Motor and driver work fine but when I connect the Arduino to my computer for communication (USB cable) the motor makes a high frequency sound.
If I unplug the 9V power supply this sound decreases. The sound disappears after removing the USB cable. Does anyone know why this sound appears?
By the way, Arduino output pins 0 and 1 (rx/tx) are not connected.
Can you post a diagram that shows how you have the arduino and driver connected? What is the motor doing while your Arduino is connected to the computer (e.g. stepping, holding, or disabled)?
Applying directly the 9V to Vmot the strange sound doesn’t appear, but the motor runs faster that it was suposed to. Should I have to set up the current limit again?
It sounds like your stepper motor is working properly now. The speed of the motor is controlled by the step signals you are sending the DRV8834, so I suspect you were missing steps before when your power supply was limited by your connections. I suggest adjusting the step rate in your program to get the speed you want.
Finally I got it. Really the motor didn’t work faster, it didn’t work indeed. Because changing only the power supply, the driver lost the reference level with the arduino. I had to connect the other GND pin to the Arduino’s GND. A terrible mistake on my part. Now it works without that terrible sound.