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

Pololu Forum

Regarding stepper motor

#1

Hello guys,

I have made a button presser with bipolar stepper motor controlling with DRV8825 driver. The motor current is 1.5A . I have set the potentiometer of my driver to 0.509 so in the voltage supply its giving 0.19A to the motor. Thus, not providing enough power to press the button and skipping the steps as well. Any help would be appreciated

Motor: https://www.amazon.de/MVPOWER-Schrittmotor-Stepper-Phase-4-Stepping/dp/B07CZHLKTC/ref=pd_lpo_vtph_147_bs_img_1?_encoding=UTF8&psc=1&refRID=8KMSGNN6JM2R7YNCYRXF

#2

Hello,

The DRV8825 should be fine for those stepper motors. It looks like you do not have your current limit set appropriately. For the 1.5A per phase rating of those steppers, you can set your VREF voltage to 0.75V; you can see more about setting the VREF voltage and current limit in the “Current limiting” section of the DRV8825 product page. The video in that section is helpful if you have not set the current limit before.

-Derrill

#3

Hi Derrill,

I have set the current limit to maximum still its skipping the step or bouncing back while pressing the button and the motor got so heated up as well. Here’s my code:

from time import sleep
import RPi.GPIO as GPIO

DIR = 2   # Direction GPIO Pin
STEP = 3  # Step GPIO Pin
CW = 1     # Clockwise Rotation
CCW = 0    # Counterclockwise Rotation
SPR = 4   # Steps per Revolution (360 / 1.8)

GPIO.setwarnings(False)
GPIO.setmode(GPIO.BCM)
GPIO.setup(DIR, GPIO.OUT)
GPIO.setup(STEP, GPIO.OUT)
GPIO.output(DIR, CW)

MODE = (14, 15, 18)   # Microstep Resolution GPIO Pins
GPIO.setup(MODE, GPIO.OUT)
RESOLUTION = {'Full': (0, 0, 0),
              'Half': (1, 0, 0),
              '1/4': (0, 1, 0),
              '1/8': (1, 1, 0),
              '1/16': (0, 0, 1),
              '1/32': (1, 0, 1)}

GPIO.output(MODE, RESOLUTION['Full'])
step_count = SPR
delay = 0.05

for x in range(step_count):
    GPIO.output(DIR, CW)
    GPIO.output(STEP, GPIO.HIGH)
    sleep(delay)
    GPIO.output(STEP, GPIO.LOW)
    sleep(delay)
sleep(1)
GPIO.output(DIR, CCW)
for x in range(step_count):
    GPIO.output(STEP, GPIO.HIGH)
    sleep(delay)
    GPIO.output(STEP, GPIO.LOW)
    sleep(delay)
GPIO.cleanup()
#4

Setting the current limit to the maximum it can be set to is not an appropriate setting. Can you set the current limit as I suggested to see if that helps?

-Derrill