DRV8834+nema 17 Strange sound

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.

Many thanks for any suggestion,

Edu

Hello, Edu.

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)?

-Derrill

Hello Derrill!
I attach a diagram of the connections (sorry for the quality). The motor is always stepping (micro stepping at mode 32).
Many thanks!

Can you try connecting VMOT directly to your power source, not the VIN pin on your Arduino and see if that helps?

-Derrill

Thanks Derril! I’ll try it during the weekend and I’ll tell you.

Edu

Hello Derrill,

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?

Thanks!

Edu

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.

You should not need to reset your current limit.

-Derrill

Hello Derrill!
many thanks. I’ll do it and I’ll tell you.

Thanks again.

Edu

Hello again Derrill,

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.

Many thanks for your help!

Edu