Hi,
Im following Paul McWhorter tutorials on Arduino and im doing a project with stepper motor (elegoo starter kit).
I followed all his steps but it turns out the motor wont rotate.
I tried all the 24 possible sequences but it wont work.
Im not sure what is the problem.
I tried measuring the voltage at the 5v of the power supply module (i connected its GND to the GND of arduino) using analog read and it gives me 360 and not 1023 (for 5v).
Any suggestions?
Thanks very much
Please post the information that we need, to help you:
Schematics, code and datasheets for motors, drivers, power supply, please, or a well polished crystall ball
I just watched his video, and he might be a little confusing as he fiddled with the wires, if you are new to connecting projects on a breadboard and writing the sketch for the project. Have a look at my favorite Arduino guy, Dronebot Workshop, where he has well written web site posts as well as a verbatim videos that follow the web posts on YouTube.
@anon57585045 @Railroader
Hello,
Here below additional info:
MEGA 2560 Controller Board
Stepper motor: ROHS 28BYJ-48 5V DC
ULN2003 Stepper Motor Driver Module
Power Supply Module (ELEGOO Power MB V2)
Battery: 6F22 9V
i'm sorry i don't know how to write schematics using the online tools so i included a picture
IN1 - 11~
IN2 - 10~
IN3 - 9~
IN4 - 8
here below the code:
i expect it to make the stepper motor rotate with one of the 24 sequences of pins but it doesn't rotate
#include <Stepper.h>
int stepsPerRevolution = 2048;
int motSpeed = 10;
int dt = 500;
int value;
//trying to find the right sequence for my stepper motor - 24 tries
Stepper myStepper = Stepper(stepsPerRevolution, 8, 9, 10, 11); //no
//Stepper myStepper = Stepper(stepsPerRevolution, 8, 9, 11, 10); //no
//Stepper myStepper = Stepper(stepsPerRevolution, 8, 10, 9, 11); //no
//Stepper myStepper = Stepper(stepsPerRevolution, 8, 10, 11, 9); //no
//Stepper myStepper = Stepper(stepsPerRevolution, 8, 11, 9, 10); //no
//Stepper myStepper = Stepper(stepsPerRevolution, 8, 11, 10, 9); //no
//Stepper myStepper = Stepper(stepsPerRevolution, 9, 10, 11, 8); //no
//Stepper myStepper = Stepper(stepsPerRevolution, 9, 10, 8, 11); //no
//Stepper myStepper = Stepper(stepsPerRevolution, 9, 11, 8, 10); //no
//Stepper myStepper = Stepper(stepsPerRevolution, 9, 11, 10, 8); //no
//Stepper myStepper = Stepper(stepsPerRevolution, 9, 8, 10, 11); //no
//Stepper myStepper = Stepper(stepsPerRevolution, 9, 8, 11, 10); //no
//Stepper myStepper = Stepper(stepsPerRevolution, 10, 8, 9, 11); //no
//Stepper myStepper = Stepper(stepsPerRevolution, 10, 8, 11, 9); //no
//Stepper myStepper = Stepper(stepsPerRevolution, 10, 9, 8, 11); //no
//Stepper myStepper = Stepper(stepsPerRevolution, 10, 9, 11, 8); //no
//Stepper myStepper = Stepper(stepsPerRevolution, 10, 11, 8, 9); //no
//Stepper myStepper = Stepper(stepsPerRevolution, 10, 11, 9, 8); //no
//Stepper myStepper = Stepper(stepsPerRevolution, 11, 8, 9, 10); //no
//Stepper myStepper = Stepper(stepsPerRevolution, 11, 8, 10, 9); //no
//Stepper myStepper = Stepper(stepsPerRevolution, 11, 9, 10, 8); //no
//Stepper myStepper = Stepper(stepsPerRevolution, 11, 9, 8, 10); //no
//Stepper myStepper = Stepper(stepsPerRevolution, 11, 10, 8, 9); //no
//Stepper myStepper = Stepper(stepsPerRevolution, 11, 10, 9, 8); //no
void setup() {
myStepper.setSpeed(motSpeed);
Serial.begin(9600);
}
void loop() {
myStepper.step(stepsPerRevolution);
delay(dt);
myStepper.step(-stepsPerRevolution);
delay(dt);
}
thanks v much
Using pen and paper mostly works well enough for schematics.
Use a real power source and bring that 6F22 back to the fire alarm, or a remote. It will not work for long if it even works at all. There's not enough currenr delivered by that battery.
Ok thanks! @Railroader
I will buy a DC jack to connect to a socket. I will come back to you once I’m able to test this.
Regards
Hi, @sarahsh
Welcome to the forum.
Do you have a DMM? ( Digital Multimeter )
I think your problem is the 9V smoke detector battery, it does not have the capacity to drive your circuit as well as a stepper motor.
Thanks.. Tom..
![]()
No I don’t. As mentioned above, i will buy a dc jack for power supply. Hope it will work like this
It's generally not recommended to power motors through/from the Arduino, but in this case it should be ok. Those 28BYJ-48 motors with ULN board only draw about 200mA. Just power the motor driver from the 5volt pin of the Mega, assuming you power the Mega from USB.
Leo..
2 posts were split to a new topic: Pin connections for stepper driver Proteus project
you were right, it works with a dc jack connected to a socket, thank you !
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
