I recently got into arduinos + circuitry and intend to use an Arduino UNO + DRV8825 to drive a NEMA17 step motor (very simple constant speed application for a peristaltic pump). I wired up everywhere and while it works fine, whenever the motor idles (eg during the delay timing between microsteps), the motor will let off a high pitched noise.
The motor I’m using is from Adafruit and rated for 350mA current, so I set my VREF to ~155 mV (~90% of limit). Even if I drop the VREF lower, the sound persists so I’m not sure what the source of the issue is. My basic wiring is basically the same as the diagram in this link, with the primary differences being which digital pins I connected to STP and DIR (12 and 13) and I have the M2 pin also connected to 5V for 1/16 microstepping.
Here’s an image of the setup when I was playing around with 1/32 stepping, otherwise it’s the same wiring. The motor power supply is 12V 6A and has a 47uF 50V capacitor in line with it.
The basic code in my loop function is below, taken from a tutorial.
for(int x = 0; x < stepsPerRevolution; x++)
Is this high pitched noise indicative of a problem, or expected? And in either case is there some way I can mitigate or stop the noise? I’m happy to upload a video if needed to help diagnose the issue.
The high pitched noise is most likely the current limiting in action. The noise may be due to motions in slightly loose windings, so a different motor will probably behave differently.
Breadboards are not suitable for motor currents, and the tracks may burn, leading to intermitten connections that could destroy the motor driver. Either solder motor connections to the driver, use high current connectors or screw terminals if supplied.
Thanks for the quick response! I will try with a different NEMA17 and see if it behaves differently.
Could you elaborate on the high current connectors and screw terminals? Would 4-pin terminals like these be suitable to just plug into the breadboard itself (motor wires --> terminal --> breadboard --> driver), or do I need to entirely bypass the breadboard, and if so would that mean soldering the drive and terminal to a pcb like a protoshield? I could definitely solder the motor wires to the driver itself, but just wanted a little bit more flexibility while I’m still prototyping everything.
You should bypass the breadboard completely. Dupont pin connectors such as sold by Pololu and others can easily handle 350 mA and can be slipped directly on to the header pins on your driver. https://www.scondar.com/wire-to-wire/dupont-2-54mm-pitch-connectors/
Don’t change any wiring with the power on, that can lead to instantaneous destruction of the motor driver.
And should the power supply + capacitor be moved off the breadboard as well? My header pins are pointed down into the board so my thought was to just resolder the 4 motor pins to point up (away from the breadboard) and connect them via dupont wires. All other connections could then stay on the breadboard. Would that suffice?
Breadboards cannot handle high currents. They are intended for logic circuitry.