Stepper motor with driver board problem

Hello,

I’ m using a 28BYJ-48 5Volt steper motor together with a driver board.
It is working fine, but my question/problem is that my leds on the driver board are still on after the motor stops.

Is there a way to solve this? At startup the leds are off.

#include <Stepper.h>
#define STEPS  100   //Number of steps per revolution

Stepper small_stepper(STEPS, 8, 10, 9, 11);
int  Steps2Take;

void setup() 
{
  small_stepper.setSpeed(200);  
}

void loop() 
{
  small_stepper.setSpeed(1);   // Show the 4 step sequence 
  Steps2Take  =  4;  // Rotate CW
  small_stepper.step(Steps2Take);
  delay(2000);
}

Hi,

I think you have seen this: http://arduino-info.wikispaces.com/SmallSteppers

What you see is that the motor stops with certain bits ON, holding the motor in position. Normal.

Since you have a geared motor, it will probably hold position fine if the current is turned off. Try that.

You COULD add code for MotorOff and MotorOn where you PinMode the 4 outputs to Inputs to turn off the power. Try that, but the drive chip may not pull to "off".

Otherwise you need to save the output values for the 4 bits, turn them off (low) to power off, then restore that data to them to power on before the next steps you want to take..

Maybe someone has this coded already??? Anyone?