Hi!
I am trying to drive a 5V 28BYJ-48 stepper with a a4988 stepper driver.
I would like to first mention that I am succesfully driving a 42BYGH34-0400A (nema 17 type) with the a4988 with no problems.
I saw an article of someone who explains how to drive a 12V 28BYJ-48 with an a4988, so I though well, then I can connect my 5V 28BYJ-48, change the power supply from 12 volts to 5 volts and that is pretty much it. The 5V 28BYJ-48 has 5 cables instead of 4, and in this article they connect the 4 cables for the 2 coils, leaving the ground disconnected.
As I got the 28BYJ-48 with some uln2003 stepper driver, for the cable order I simply followed the order in which they “should” be connected to the uln2003.
Well, it is not working. I can feel something going on inside of the stepper when I touch it, like a periodical step and the tipical chickimiki chickimiki sounds of the stepper, but it doesnt turn as it should. I am guessing, it is either the power supply, the cable order, or the fact that the ground is disconnected, but I am very new in steppers, so I really dont know. General wiring should be correct because, as I said, I run the nema 17 like motor flawless.
General wiring available at the driver´s website.
Code, follows:
const int M0 = 3;
const int M1 = 4;
const int M2 = 5;
const int stepPin = 6;
const int dirPin = 7;
unsigned long motorDelay = 10UL; // fiddle with this to control the speed
void setup() {
pinMode(stepPin,OUTPUT);
pinMode(dirPin,OUTPUT);
pinMode(M0,OUTPUT);
pinMode(M1,OUTPUT);
pinMode(M2,OUTPUT);
digitalWrite(M0,HIGH);
digitalWrite(M1,HIGH);
digitalWrite(M2,HIGH);
}
void loop() {
digitalWrite(dirPin,HIGH);
digitalWrite(stepPin,HIGH);
delay(motorDelay);
digitalWrite(stepPin,LOW);
delay(motorDelay);
}
looking forward for new insights!