Go Down

Topic: Controlling stepper motor with a DRV8825 driver (Read 521 times) previous topic - next topic

groundFungus

Try slowing down the steps to 1 per second to see what it does. 
You will save everyone's time if you read and follow the forum guidelines.https://forum.arduino.cc/index.php/topic,148850.0.html

ceduq

Last week, my motor worked well with a delay of 1s but now it doesnt react anymore ...I added in my loop a "print" to visualize each step until the 200th, I hear the sound of the motor but the rod doesnt turn at all.

Code: [Select]
#import Arduino Library
from bbio import *

#Define pins
stepPin = GPIO2_3
dirPin = GPIO2_4

#Set pins as output
def setup():
            pinMode(stepPin, OUTPUT)
            pinMode(dirPin, OUTPUT)

def loop():
            digitalWrite(dirPin, HIGH)
            for i in xrange(0,200,2):
                            digitalWrite(stepPin, HIGH)
                            delay(1000)
                            digitalWrite(stepPin, LOW)
                            delay(1000)
                            print("1")

            delay(1000)

run(setup, loop)

Railroader

Your stepper was running in the beginning You tell. Your setting for current, 0.9 Amps looks okey. Do You use heatsinks on the driver? 12 Volt pwr supply is okey. Could it be that the driver board gets hot and Cuts down current in order to save itself?
Did You check the heat discipation from the driver board in the beginning. Could it be possible that the driver board IC is toast some way?

Use Your knowledge. If that's not enough, look for education.
Having knowledge, think outside the box to gain more of it. Only trains run like the train, on the rails. The rest run between the rails.

ceduq

My battery was losing all its "juice" once connected, explaining that my stepper motor no longer responds to commands.
I could also test my project with an arduino. All problems seem solved using the Arduino.
The only difference I can see between the Arduino and the Beaglebone is the current delivered by the digital pins:
-> about 48 mA for the Arduino pin
-> about 6 mA (sometimes just 4mA) for the Beaglebone pin

If I rely on the driver datasheet, the current of 4mA is sufficient because it requires a high input current (Ihc) <100 uA (0.1 mA). In addition, the circuit has an internal resistance (pulldown) of about 100k ohm, which corresponds to a current of 33 uA (0.033 mA) to 3.3 V.

What do you think ?
I realized that the driver and the beaglebone were heating up quite quickly when powered on.

Railroader

Remember that a stepper consumes current all the time, even at stand still to keep. That makes the stepper maintainits position.
Arduino UNO outputs can deliver 20 mA, 40 mA shortly. Note that there is maximum for total current delivery so You can't put out 20 mA on all outputs at the same time.
Do You use heatsinks on the driver board? Even then it gets hot so I have installed a little 12 volt fan blowing air to the heatsinks in order to have power extended time.
Beaglebone was also heating up?

Attach a wiring diagram!
Use Your knowledge. If that's not enough, look for education.
Having knowledge, think outside the box to gain more of it. Only trains run like the train, on the rails. The rest run between the rails.

Go Up