28BYJ-48 with ULN2003 only humming

I just started with a very basic stepper motor control using an arduino nano, uln2003 board and a 28BYJ-48 5v stepper motor. Because using the Stepper and AccelStepper libraries did not work for me a went back to the basics.

A schema of the wiring ;

2017-10-07_14-25-48.png

The code i used ;

#define IN1  8
#define IN2  9
#define IN3  10
#define IN4  11

void setup()
{
  pinMode(IN1, OUTPUT);
  pinMode(IN2, OUTPUT);
  pinMode(IN3, OUTPUT);
  pinMode(IN4, OUTPUT);
}

void loop()
{
  int ddelay = 1000 ;
  while (true) {
    for (int step = 0 ; step < 9 ; step++) {
      //Serial.println(step) ;
      switch (step) {
        case 0:
          digitalWrite(IN1, LOW);
          digitalWrite(IN2, LOW);
          digitalWrite(IN3, LOW);
          digitalWrite(IN4, HIGH);
          break;
        case 1:
          digitalWrite(IN1, LOW);
          digitalWrite(IN2, LOW);
          digitalWrite(IN3, HIGH);
          digitalWrite(IN4, HIGH);
          break;
        case 2:
          digitalWrite(IN1, LOW);
          digitalWrite(IN2, LOW);
          digitalWrite(IN3, HIGH);
          digitalWrite(IN4, LOW);
          break;
        case 3:
          digitalWrite(IN1, LOW);
          digitalWrite(IN2, HIGH);
          digitalWrite(IN3, HIGH);
          digitalWrite(IN4, LOW);
          break;
        case 4:
          digitalWrite(IN1, LOW);
          digitalWrite(IN2, HIGH);
          digitalWrite(IN3, LOW);
          digitalWrite(IN4, LOW);
          break;
        case 5:
          digitalWrite(IN1, HIGH);
          digitalWrite(IN2, HIGH);
          digitalWrite(IN3, LOW);
          digitalWrite(IN4, LOW);
          break;
        case 6:
          digitalWrite(IN1, HIGH);
          digitalWrite(IN2, LOW);
          digitalWrite(IN3, LOW);
          digitalWrite(IN4, LOW);
          break;
        case 7:
          digitalWrite(IN1, HIGH);
          digitalWrite(IN2, LOW);
          digitalWrite(IN3, LOW);
          digitalWrite(IN4, HIGH);
          break;
        default:
          digitalWrite(IN1, LOW);
          digitalWrite(IN2, LOW);
          digitalWrite(IN3, LOW);
          digitalWrite(IN4, LOW);
          break;
      }
      delay(ddelay) ;
      ddelay = ddelay - 10 ;

      if (ddelay < 10) {
        ddelay = 10 ;
      } ;
    }
  }
}

What i have checked or done.

  • Reversed the order of the wires to the ULN2003
  • Changed batteries Ikea LADDA 2450 wit Panasonic Aerocell. The latter pair has been tested in a small robot driving 2 steppers.
  • Increased voltage to 9 v
  • Swapped stepper motor
  • Swapped ULN2003

When i run the code all leds on the uln2003 are on, the leds which i would expect to be on are more bright than the others. If i disconnect the stepper motor only the leds which are HIGH are one.

Any suggestions?

The ULN2003 is the SMD version uln2003A_64 (ti 18ycwfm)

Hi,

'Motor only vibrates' almost always means the connections to the stepper are not in the right sequence.

See this page for examples and code: http://arduino-info.wikispaces.com/SmallSteppers

Hi,

Yes, but the ULN2003 board and the stepper are off the shelve i would expect that the order is ok. So took a multimeter and checked the pinout of the ULN chip package and the pins on the stepper motor connector.

My expectation was;

Blue IN 1 Pink IN 2 Yellow IN 3 Orange IN 4 Red +5V

When i measured, it as (on the connector side)

Blue +5V Pink IN 1 Yellow IN 2 Orange IN 3 Red IN 5

After rewiring the connector in the order (top to bottom) red,blue, pink, yellow, orange it rotates!

On the board the wiring is.

+------+ | +5v | | IN1 | IN2 | | IN3 | IN4 | +-----+

This are the boards i used

It Rotates!

Good!