Stepper Motor + DRV8825 Driver Not Working

Hi all,

I have these steppers from Amazon:

Rated voltage 4.1 v rated current 1A/phase

I'm using a DRV8825 mounted on an expansion board, wired as this example:

I'm using the same code as the above example.
Please note that the driver is missing in the foto, but I've mounted it and checked for correct orientation. I've set the Vref = 0.5v
(Max Curr/2) as specified for this stepper and driver.

I get no stepper movement ! Why ?
Appreciate your help.

The link to the stepper brings up the sales page, not a real datasheet.
My idea was to see which cable colours belong to which coil. I suspect the cables to the coils are connected wrongly to the driver.
Do like this:
1). Disconnect all 4 stepper wires from the driver. The motor can be turned easily by hand.
2). Connect 2 wires to each other. Turn the motor by hand. If it's heavy, Youhave found matching cables. If the motor turns easily, change one of the cables to one of the free cables. Turn the motor.

What is the voltage and current capability of the stepper power supply? For a DRV8825 the stepper motor power supply must be more than 8.2V, minimum.

The test code in the linked page may be pulsing too fast. Steppers can't go from zero to high speed all at once without acceleration. Try the following code and see if the stepper moves.

int Index;

void setup()
{
   pinMode(6, OUTPUT); //Enable
   pinMode(5, OUTPUT); //Step
   pinMode(4, OUTPUT); //Direction
   digitalWrite(6, LOW);
}

void loop()
{
   digitalWrite(4, HIGH);

   for (Index = 0; Index < 2000; Index++)
   {
      digitalWrite(5, HIGH);
      delay(50);
      digitalWrite(5, LOW);
      delay(50);
   }
   delay(1000);
   
   digitalWrite(4, LOW);
   
   for (Index = 0; Index < 2000; Index++)
   {
      digitalWrite(5, HIGH);
      delay(50);
      digitalWrite(5, LOW);
      delay(50);
   }

   delay(1000);
}

Post clear photos of your setup and wiring.

Thanks for the reply.

@Railroader Pls scroll down the Amazon page and you'll see the motor's specs. Yes you are right the cables were wrong ! The expander has a male attachments, so I took it for granted that they should match the stepper ones.

@groundFungus I power the DRV8825 with a bench top power supply but I had it set to 4.2v -wrong- I switched motor cables, increased the power to 9v and used your code, now the stepper moves. But only in one direction and not smooth. I guess I must use 1/2 or 1/4 stepping to get a smoother run.

Stepper motors don't ever run really smoothly like a DC motor. They step, always. Microstepping will make it smoother, of course. Microstepping will also mitigate the effects of resonance. I would recommend at least x4 microstepping.

The original code sets the steps to 10 per second so it will take 200 seconds (over 3 minutes) to go 2000 steps. Change both of the the

for (Index = 0; Index < 2000; Index++)

to

for (Index = 0; Index < 20; Index++)

and try it again. To go 20 steps takes only 2 seconds.

Please copy the part telling about the colours of the cables so we can know which cables belongs to which coil.

Hi,
Stepper Specs;
NEMA17 Stepper Motor for 3D Printer J-Head Titan Extruder 17HS4023

Phase: 2 phases
Voltage : 12 V
Current: 0.7 A / phase
Resistance : 4.0 ± 10%? / Phase
Inductance: 3.2 ± 20% mH / Phase
Retention torque: 14 N. cm
Insulation class: B
Angle: 1.8 ± 5% / Step
Dimensions: 42 x 42 x 23mm
Weight: 126g

Where have you connected the stepper.

Can you please post a copy of YOUR circuit, in CAD or a picture of a hand drawn circuit in jpg, png?
Hand drawn and photographed is perfectly acceptable.
Please include ALL hardware, component names and pin labels.

What are you using as a power supply?

Do you have a DMM?

Thanks.. Tom... :smiley: :coffee: :australia: :+1:

Stepper specs:
OUYANG 17HS4023Rated voltage DC 4.1V
Rated current DC 1 A /phase
Holding torque ≥130 mN.m
Step angle 1.8°±0.09°
Moment of inertia 30.8 g.cm²
Phase (1KHz) 4.1x (1±20%) mH/phase
Maximum no-load operating frequency ≥2500PPS
Steering(shaft extended looking) A-AB-B-Clockwise

Wire colours on the Dupont connector of stepper are Red-Blue-Green-Black.
I have found that Red-Blue = coil1, Green-Black = coil2.
However this stepper can NOT be plugged into the expansion board because the male white plug on the expansion board is marked 2B-2A-1A-1B. I used jumper wires to connect the correct sequence.
The rest of the wiring is as the photo posted by TomGeorge.
As I mentioned before, the DRV8825 is missing in the photo but I have it plugged in with the correct orientation and have adjusted the current limit pot to =0.47v.
I'm using a 30v/10A bench top power supply set at 9v.

The stepper turns but it's not smooth. It's the first time I'm using this setup. In the past I used the cheap 28BYJ steppers with old ULN2003 drivers and had no smoothness issue.
I'll post a hand drawn set up as soon as I can.

How much coil current does that equate to?

Set it to at least 15V, 18 ~ 24 would probably be better.

The 28BYJ steppers are on the order of 2048 steps per revolution full step. The 17HS4023 motors are 200 steps per revolution full step (1.8 degree per step) so will seem a lot more "notchy". That is normal.

Yes, my dumb question.

I had a TB6600 driver laying around, hooked that up and set to 1/2 stepping, the stepper(s) run smoothly.

For my project I need 2 steppers to turn together so I tried connecting 2 of these steppers to the same pin on the TB6600 driver and they work fine.