Setting DRV8825 output current

Hi all,

I've a problem to correctly setup DRV8825.

I'm using this stepper motor:
Two phase 4 lead wires bipolar stepper
Rated Current 1.5A
Rated Voltage: 4V
Resistance per phase: 2.7Ohm +-10%
Inductance per phase: 6.5mH +-20%

Power supply for motor on VMOT and GND is 36v.

Power supply for board is 5v.

Board I'm using is Arduino Mega 2560.

I dind't understand well how to measure VREF on DRV8825. Board is chinase. I've initially tried with via on bottom and gnd on arduino, but I'm measuring 36V. So I've tried to measure from pot pin on DRV8825 and GND on arduino and, probably becouse I've shorted something with multimeter probe, DRV8825 fried.

Can someone explain me better were I need to place multimeter probes to measure VREF on DRV8825?

Also, I need to have motor attached or not to set correct VREF?

Thank you!

I've solved and set about 0.6V VREF. But now I've a problem with motor, it doesn't move, just emitting a continuos peep. Motor shaft isn't connect and have no load.

This is my code:

#define DIR 2
#define STEP 3

#define SLP 4
#define RST 5
 
#define M0 8
#define M1 7
#define M2 6
 
 
int dirLevel  = HIGH;
  
void setup() {
  pinMode(DIR, OUTPUT);
  pinMode(STEP, OUTPUT);
  pinMode(SLP, OUTPUT);
  pinMode(RST, OUTPUT);
  pinMode(M0, OUTPUT);
  pinMode(M1, OUTPUT);
  pinMode(M2, OUTPUT);

  digitalWrite(M0, LOW  );
  digitalWrite(M1, LOW );
  digitalWrite(M2, LOW  );
  
  digitalWrite(SLP, HIGH  );
  digitalWrite(RST, HIGH );
  
  digitalWrite(DIR, LOW );

}
 
 
void loop()
{

  int dPause = 100;
  digitalWrite(STEP, HIGH);
  delayMicroseconds(dPause);
  digitalWrite(STEP, LOW);
  delayMicroseconds(dPause);

}

With higher delay, like 200 ms, it emitting vibrations, but shaft don't move.

I've tested also inverting wires and another motor to be sure. But same result.

The Pololu web page has good instructions for wiring and adjusting their DRV 8825.

If it is wired according to their instructions it should work with this Simple Stepper Code - which is fairly similar to your own.

I would start with much slower speeds until you get it working - perhap 5 millisecs per step.

...R
Stepper Motor Basics

Yes, 5kHz step rate from stationary is an impossible ask. Use the AccelStepper library to
ramp the step rate.