Pololu Robotics & Electronics
Menu
My account Comments or questions? About Pololu Contact Ordering information Distributors

Stepper motor with DRV8825 problems


#1

Problem: when change the direction after stopping, the motor vibrates but doesn´t really move. When I help the motor with my finger in the right direction, the motor drives correct with the full torque. Sometimes the motor will catch the speed until the it has to stop an changes the direction.
SETUP: An Atmega2560 delivers a PWM (1kHz, 50%) all the time. The Direction pin is changed after about 1000 steps. The !Enable pin determines if the next step should be performed.
(I have to control 15 motors simultaneously with a direction- and enablepin for every motor an one step (PWM) line for all motors)
An Atmega328P delivers per SPI the values vor the next step. This happens while the PWM pin is High. While the PWM pin is low the values are handed over to the !Enable and Direction Pins.
Motor: Nema 17 - 17HS4401-S, 1.7A, 42Ncm Vmot = 24V, Driver: DRV8825
I set the VRef to 0.85V.
Code: I don´t use the arduino libraries, it´s plan C, C++;
The Code seems OK, as the image shows.


I even tried a simple ramp. (1 Step, 10 steps disabled, 1 Step 9 steps disabld …)
All settings are only changed when the PWM pin is low and the enable pin is high to not interfere with the
driver.

Change of Direction with PWM (Step) Low:
StepperDirToPWM

Change of Enable with PWM (step) Low:
StepperEnableToPWM

The PWM with 1kHz and the SPI communication while PWM is High.

Video of motor behavior:

I tried to change the PWM (Dutycycle, frequency), directionchange with ramps - without them, checked all the wiring many times, read manuals, forums, …
I am really stuck here since a view days.

gert


#2

Are you trying to ramp the speed by enabling and disabling the driver? Disabling the driver cuts the current to the coils (which removes torque) and it is also likely that when the driver is re-enabled, the indexer is returned to the home position, so if only a single step is taken between enabling and disabling, the driver will not be moving the motor.

Is this one of our DRV8825 boards? There are many clones that use this driver chip on the market. Can you post a picture that clearly shows the board?

-Nathan


#3

DriverBoard


I don´t want to remove the cooler, but I have another board without cooler at school, so I can send you a better photo on monday.

  1. I didn´t realise that the !enable Pin resets the index.
    I tried another approach: I set !enable to low and used an AND logic for the former enable logic an the continuous PWM, (Looks good on Oszi)

  2. I only use FULL STEP MODE: The Uref is therfore: 1,17V? (1,7A x 1,4 (from 70 to ~100%)) x 0.5 (because of the 0.1 Rsense). Am I right here?

  3. Everything sounds and looks good when the PWM Frequency is about 700Hz. At 1kHz the motor starts to get problems. at 1400Hz the motor reacts as the video from the first blog shows. Is there a calculation model for a good ramp for these drivers and steppers and why is the fmax so low?

gert


#4

Hello Gert,

Unfortunately, that is a knockoff of our board, not something we made. If you want to try with a genuine Pololu driver, you can find them on our web site or get them from our distributors. If you have the same issues with one of our boards, I would be happy to help you continue troubleshooting.

-Nathan