# 28BYJ-48 stepper with ULN2003: shakes, wrong direction or too slow

> Fix a 28BYJ-48 stepper on a ULN2003 board that shakes instead of turning: coil order IN1 IN3 IN2 IN4, speed limits and 5 V supply.

Canonical: https://roboticsengineering.in/fix/28byj-48-stepper-uln2003-wrong-direction-or-jitter/ | Published: 2026-11-03 | Updated: 2026-11-04

**With the Arduino Stepper library the pin order for a 28BYJ-48 is usually IN1, IN3, IN2, IN4.** The wrong order makes the motor shake.

## What the message means

The motor has four coil connections that must be energised in a set order. Swapped pins give a shaking motor instead of rotation.

## Fix it in this order

1. Pass the pins in the order IN1, IN3, IN2, IN4 to the Stepper constructor, or use the AccelStepper half-step setup for this motor.
2. Set a low speed, for example a few revolutions per minute, because this motor is slow and geared.
3. Power the board with 5 V from a supply that can give the current, not from a weak pin.
4. Join the grounds with the controller.
5. Check the steps per revolution in the code against the datasheet of your version.
6. Reverse the direction by using negative steps.

## Why it happens

A 28BYJ-48 has four coils that must be energised in a set sequence to turn the rotor. The ULN2003 driver switches each coil on or off from a microcontroller pin. If the pins are connected in the wrong order, the coils are energised out of sequence, so the rotor pulls back and forth instead of turning. The motor then appears to shake in place.

The Arduino Stepper library expects its four pins in a specific order, which is not the same as the labels printed on the driver. Speed and stepping mode also matter. The geared motor has high torque but a low top speed, so high step rates cause missed steps. Check the steps-per-revolution figure against the datasheet for your gearing, because values differ between motors.

## If you see this, do this

| You see | Do this |
| --- | --- |
| Shakes in place | Coil order. |
| Skips at speed | Too fast for this motor. |

## Confirm the fix

1. Step the motor one step at a time with a one second delay. Each step should move the shaft smoothly, not shake in place.
2. Measure each coil lead’s continuity with a multimeter against the common wire. Mapping the coil pairs confirms which pins belong to each coil.
3. Run the stepper with a negative step count and confirm the shaft reverses. A positive count should turn it the opposite way.

**Common mistake:** Many readers assume that a motor that shakes is faulty or underpowered, when the usual cause is simply the pin order given to the stepper code.

## Related

[stepper vibrates](https://roboticsengineering.in/fix/stepper-motor-vibrates-but-does-not-turn/), [stepper calculator](https://roboticsengineering.in/stepper-motor-step-frequency-calculator/).

Last reviewed: November 2026. These are the usual causes and the order that finds them fastest. Test on your own board; clones and cables differ.
