28BYJ Stepper motor only turns in one direction. Is it damaged?

Hi, I've got a cheap 28BYJ-48 5V stepper motor, I'm using a driving board with a ULN2003 IC to drive it. For whatever reason this thing only turns counter-clockwise. Here's my code:

#include <Stepper.h>

// These are probably wrong
// The motor spins slightly less than one full revolution
int steps = 64;
int gearReduction = 32;
int totalSteps = steps * gearReduction;

Stepper stepper1(totalSteps, 2, 3, 4, 5);

void setup() {
  stepper1.setSpeed(10);
  Serial.begin(9600);
}
void loop() {

  stepper1.step(totalSteps);
  delay(2500);
  stepper1.step(-totalSteps);
  delay(2500);
}

The pins on the driving board (IN1, IN2, IN3, IN4) are connected to pins 2, 3, 4, 5 on my Arduino Mega in that same order.

The most commonly recommended solution here in the forum is to swap the IN2 and IN3 pins to get it working, but this does not work for me. I also tried a bunch of different pin orders to no avail. Most different orders result in the motor not rotating at all or just stuttering in place.

I tested the resistance between each of the 5 motor wires (represented as ABCDE) these are the results:

A-E 23ohms
C-E 23ohms

A-C 46ohms

No connections on B and D

I don't know enough about stepper motors to draw any conclusions from this. I think that the E wire is the +V common, I don't know about the other ones, are the A and C wires the on the same phase? Shouldn't I see a connection between wires B& D? Or between those and the common?

Something interesting that I noticed is that if I hold the motor shaft just as it starts rotating the motor stops and changes direction.

I also tried slowing down the motor to the point that I can see the LEDs on the driving board blinking, the motor still only turns in one direction. The LEDs blink in the same order defined in the Stepper library:

 * The sequence of control signals for 4 control wires is as follows:
 *
 * Step C0 C1 C2 C3
 *    1  1  0  1  0
 *    2  0  1  1  0  
 *    3  0  1  0  1
 *    4  1  0  0  1

When the motor is supposed to be running in reverse the LEDs also blink in the reverse order.

The motor only moves on every other step. I don't now whether this is normal.

That's all. I hope you guys can help me.

Sorry for my awkward usage of the english language. Any feedback would be appreciated.

28BYJ-48 is a unipolar stepper motor.
It doesn't work with just a 4-wire connection.
Is the connection as shown below?

The motor has 5 wires, red must be connected to V+, 4 others must be connected to ULN2003 output pins, what does A-E-C mean? Post a wiring diagram.

chrisknightley:
28BYJ-48 is a unipolar stepper motor.
It doesn't work with just a 4-wire connection.
Is the connection as shown below?

Yes, that's how it's connected. I though that would be implied by the fact that I'm using a driving board.

JCA34F:
The motor has 5 wires, red must be connected to V+, 4 others must be connected to ULN2003 output pins, what does A-E-C mean? Post a wiring diagram.

The ABCDE thing are the 5 wires of the motor. I measured the resistance between each wire that comes out of the motor.

Shouldn't I see a connection between wires B & D? Or between those and the common?

Yes, if E is common (usually RED), you should see 23 Ohms between B and E, D and E, and 46 between B and D. Bad motor?
Where is the 5V motor power coming from? NOT from the Mega's 5V pin I hope.

JCA34F:
Yes, if E is common (usually RED), you should see 23 Ohms between B and E, D and E, and 46 between B and D. Bad motor?
Where is the 5V motor power coming from? NOT from the Mega's 5V pin I hope.

I just checked, the E wire is the red one. If what you say is correct than the motor is likely defective, there's no connection at all to the B and D wires.
The power is coming from a cheap 5v breadboard power supply.

I tried pressing down on the blue plastic cap, where the wire comes out from, while measuring the resistance and now I can get a connection on the B and D wires. I'll try to remove the cap and see if I can fix it. Its likely a bad solder connection in there.

Ok, so I just finished fixing it.

After lifting the plastic cap from the motor I found a little circuit board where the motor wires are connected to. The coil wires are connected to the other side of this board. There was just enough space between this board and the motor shell to reach the coil wires with a multimeter probe; I then did a continuity test between each of the pads and the coil wires and found out that there was no connection to 2 of the coil wires; So I busted out the old soldering iron with the intent to reflow the solder on the pads to fix the connection issues, but in the process I completely underestimated how much heat that little board could take and ended up lifting a pad... I managed to solder a jumper wire from another pad to the coil wire and after doing that the motor worked!!! I also had to swap the IN2 and IN3 pins to get the motor to spin, but now it goes BOTH ways, and is running a lot smoother.

So, lessons learned:

-There should be some resistance between all of the motor wires and the common wire(usually the red one) and double that resistance between each of the 4 wires.

-A 25w soldering iron has enough heat to lift a pad from the circuit board in less than a second.

-If the motor doesn't spin correctly just swap the IN2 and IN3 pins and it should start working.

2 Likes

Good work! + a Karma point :sunglasses:

The result may not be pretty, but, if your iron lifts a solder pad, it may be able to replace the solder pad. All is epoxy, even what is holding the copper to the epoxy circuit board.
Paul

raffnixss:
So, lessons learned:

-A 25w soldering iron has enough heat to lift a pad from the circuit board in less than a second.

I'd rephrase that as "a non temperature-controlled soldering iron is worse than useless for electronics".

@raffnixss You don't even need to modify the motor. Just connet the 4 wires to a bipolar motor controller and you are good to go.

Funny thing - this week I took a 12 24byj-48 and found exactly the same situation. Rotated in one direction but not the other. A little help by applying some torque and it might make about half a turn but then stalled again. I hope they are not all like that. I just need to find some time to look into it further.

So not a one off situation it seems.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.