1

I'm using the Stepper library to control a single stepper motor. When the Arduino is not running the motor it is holding the motor shaft in place. For my application, this is very wasteful and puts unnecessary strain on the motor.

Is the Stepper library supposed to do this or is something else up with my circuit? Can this behavior be overridden?

4 Answers 4

4

use disable output class in accelstepper library. http://www.airspayce.com/mikem/arduino/AccelStepper/

0

Stepper library has nothing to do with this. What holds your motor are those GNDs or 0 Volts applied to control pins of your Stepper motor.

What you are looking for is UL2003A. The way ULN2003A works is solution to your problem.

Assuming your stepper is unipolar, Here is a complete tutorial on how to use Stepper motor with UNL2003A.

0

The ability to release all the stepping motor coils depend on the hardware and software used. For example, the Adafruit.com hardware and software has this function to release all the stepping motor coils. Investigate their approach and determine if you can contribute to the library you are using by porting this feature. Also investigate if this feature is not (serendipitously) already part of the library you are using. For instance, it is not unreasonable to expect the library you are using to return Atmel pins to a passive input state (which, depending on the hardware, may release the stepper) when you destroy the instance of the stepper library class.

0
//for all pins used for controlling stepper motor assign all of them LOW


#include<Stepper.h>
const int stepsPerRevolution = 200; 
Stepper myStepper(stepsPerRevolution, 10, 11,12,13);

void setup() {
  myStepper.setSpeed(30);

Serial.begin(9600);
}

void loop(){

 Serial.println("clockwise");
  myStepper.step(stepsPerRevolution*5);
  delay(300);
digitalWrite(10,LOW);
  digitalWrite(11,LOW);
digitalWrite(12,LOW);
digitalWrite(13,LOW);


}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.