Thanks for posting this. 5 years later your video got me started!
@clairemacare19214 жыл бұрын
Thank you, you're a star, you showed the basic code to control as stepper motor and didn't over complicate it so that I can go and do my own thing with confidence. Thank you.
@bablugaonkar66610 ай бұрын
Sir ur amazing I'm from India , clarity in explanations is amazing I have followed your vedio and done project too plz continue such vedio
@MikeHammer13 жыл бұрын
Here's a though: desolder the 4 driver input pins from the ULN2003 and reattach to the opposite side of the board. Then you can just plug the board directly into the Arduino. Makes for a smaller package and less chance of something disconnecting.
@torstonvodesil6709 Жыл бұрын
nice and simple, thanks
@juliuscaesar5001 Жыл бұрын
Hi thank you for the tutorial, I am using the 28ybj-48 stepper motor and controlling it with hc-05 Bluetooth model from my phone, I am sending a number 1 to make him move cw and number 2 to move ccw, but I don't know what to write in the code to make the motor stop by sending let's say number 3, I am totally new to arduinos, thanks in advance
@bevita13222 жыл бұрын
Hello, can I plug this to the wall? I made a circuit and blew the board when I plugged it in
@rossgeomans43742 жыл бұрын
Thank you, helped a bunch.
@zattiya6 жыл бұрын
In the Stepper function: why do I do Stepper stepper(STEPS, 8, 10, 9, 11); rather than 8,9,10,11. When I change the sequence it does not move as much.
@Ninjacat9000Ilovebigfloppa4 жыл бұрын
The motor Is designed to be inputed in that way
@SummerFrost232 жыл бұрын
The stepper.h library has different sequence. 8, 10, 9, 11 fix the sequence for ULN2003
@aerosoulzx6 жыл бұрын
Question; if I wanted to power the motor externally, how would I do this, and what parts would be required? Any help gratefully received! :)
@Ayce474 жыл бұрын
For anyone wondering about this, you just use an external power supply of 5-12 v(depending on driver) and just share ground with power supply and arduino
@Ayce473 жыл бұрын
@Vishnu Vardhan It depends on what driver you have. You first have to check what voltage and amps you need for your motor, then based on that you pick a driver. On the driver you first need your power supply(batteries, and old stripped wall charger, cables from an old destop power suplly etc) with an capacitor tied to both plus and minus. The capacitor has to be at minimum whatever is speciffied on the datasheet of the driver. then, you need to tie the ground of the power supply to the arduino. that's it.
@NaderTheExpert2 жыл бұрын
Can I connect 9v battery to +5v in of uln2003 or it must be 5 v regulated? The motor is 5 volt motor, does 9volt in damage the motor?
@roshnivaldar27463 жыл бұрын
Am I right in saying that it should turn clockwise for a minute but in your demo it's turning anti-clockwise and same when it should turn anticlock wise for ten secnds it turning clockwise? Am loosing it?
@giovannicappello88522 жыл бұрын
hello, how much weight (kilos) can this motor lift? thanks
@manuelfreitas45262 жыл бұрын
can you explay why the steper motor run only ccw?
@ValerianKapeller2 жыл бұрын
Why always 8,9,10,11 pins on the arduino? Can i go for 2,3,4,5 as well? Thank you :)
@lucanfilm19486 жыл бұрын
Thank you for this great tutorial - it really helped me to get into that topic.
@ersatz71075 жыл бұрын
is there a code for controlling the motor with a potentiometer like how you would control a servo motor with a potentiometer?
@bdog40436 жыл бұрын
What are pins 5,6,&7 used for on the driver?
@Rookysmasher4 жыл бұрын
thanks for explaining so well i understood everything!!
@pixelatedude5 жыл бұрын
I have same stepper motor, Then I write that code to my IDE, But my stepper motor didn't spin reverse after 1 minute spin. What's wrong? Please help
@catalinp91765 жыл бұрын
Switch pin2 with pin3 from the driver
@pixelatedude5 жыл бұрын
Eeeh? Which pin? Sorry i'm forgot to say that, I am using Wemos D1 R2 for this
@brandolarios36167 жыл бұрын
Hi could you tell me how to spin the engine at 30 or 60 rpm if this is posible? sorry english isn´t my first language
@mschoeffler7 жыл бұрын
To be honest, I can't remember whether I did test 30 or 60 rpm. But i guess this should be possible. For 30 rpm just write "stepper.setSpeed(30);" in the loop function and you are ready to go.
@favesongslist4 жыл бұрын
15rpm is 28BYJ-48 reliable designed speed, for faster speed it may not step accurately, if you raise the voltage for higher speeds there will be heating problems, so you may need to use a different stepper motor like www.adafruit.com/product/918 for 60rpm speed.
@nicolaslac10134 жыл бұрын
Hi, thanks for the tutorial. Do you think it's possible with this motor to make a full 360deg. not in 1 mn. but 180mn? (3hours)
@ukdashcamguy5004 жыл бұрын
yes you could easily do this, just have a for loop that goes up to the 2038 steps inside the loop step 1 step then have a delay (divide the 3 hours by rhe 2038 steps to find out how long a delay you need).
@nicolaslac10134 жыл бұрын
Yes, i got this, really great, thanks
@michaelsalais73933 жыл бұрын
So very informative. I thought pin 8 on an UnO was not PWM.
@frankymuller99234 жыл бұрын
Thanks Nice tutorial
@glenlobo7 жыл бұрын
Single Axis Tb6600 and RC_52002513 Stepper Motor Driver Controller Speed Regulator Pulse Signal Generator CAN I MAKE A STEPPER MOTOR WORK??
@emadabuhagag2224 жыл бұрын
very helpful thank you
@Hydra_Kumo2 жыл бұрын
Thanks
@johnberry53395 жыл бұрын
This is a Great tutorial thank you, I have just liked and subscribed :)
@moeshickenyay6 жыл бұрын
Great tutorial, thanks.
@rramirezx87386 жыл бұрын
Why put the number 2038, where does that number come from?
@ClaudioFontachannel6 жыл бұрын
depends from the type of stepper motor. 2038 is the exact number of steps that that the rotor of that motor must do for obtain complete 360 degrees of the external shaft. consider that it's a geared motor, so changing the number of the teeth of the gears will change the numer of steps to do for a complete revolution.
@blue_name_warrior5 жыл бұрын
@@ClaudioFontachannel but why 2038? 64*64=? 4096 I think
@ClaudioFontachannel5 жыл бұрын
@@blue_name_warrior no. you don't have to calculate that number. It's given in the datasheet of the motor. Every motor has a different number of steps for a revolution. Consider also that that kind of motor is geared, so more teeth on the gear, more steps for a revolution; less teeth, less steps. Clear?
@mschoeffler4 жыл бұрын
@@blue_name_warrior You find all the details in the written article: www.mschoeffler.de/2017/09/23/tutorial-how-to-drive-the-28byj-48-stepper-motor-with-a-uln2003a-driver-board-and-an-arduino-uno/
@aspirine999999996 жыл бұрын
thank you very very much.......
@anghelalexandru33664 жыл бұрын
it has 2048 steps in full rotation, not 2038
@mschoeffler4 жыл бұрын
Hi Alexandru, Thank you for the comment! I made this tutorial a very long time ago, so I can't remember all the details: I still think that 2038 is correct, even though the datasheet and other tutorials refer to 2048. When I started to work with the stepper, I recognized that it is not as accurate as I expected. So I had a deeper look into the problem. It turned out, many others had the same problem. Long story short: the actual gear ratio is approximately 63.68395:1 (instead of 64 --> 32 * 63.68395=2037.8864). You find more details in my written article: www.mschoeffler.de/2017/09/23/tutorial-how-to-drive-the-28byj-48-stepper-motor-with-a-uln2003a-driver-board-and-an-arduino-uno/ Here is an older discussion in the Arduino forum which comes to the same conclusion: forum.arduino.cc/index.php?topic=71964.0 There are also some reports that there are differences in-between individual 28BYJ-48 motors. Also the example video in the video does a full rotation with 2038.
@anghelalexandru33664 жыл бұрын
@@mschoeffler I don't want to argue with you, because I see your are well informed, but I let it run couple of minutes with 2038 steps set in the code and mine was not at the start position. PS: Sorry for my bad english...
@mschoeffler3 жыл бұрын
I did not intend to argue :) Just wanted to give a detailed answer since the "2048 steps info" comes up a lot. According to the datasheet, the information is also correct. However, many stepper motors of this type do a full rotation only with 2038 steps.
@anghelalexandru33663 жыл бұрын
@@mschoeffler maybe mine is different
@SummerFrost233 жыл бұрын
@@mschoeffler 2048 appears quite accurate to be complete revolution. 2038 or even 2044 tends to shift (incomplete revolution).
@historyunderbeneath5 жыл бұрын
Hi michael... i was wondering if you could kindly help me out with this Arduino servo, stepper motor setup that i am trying to use. i would so much appreciate it if you are able to work out what is going on wrong with the code or hardware......thanks in advance...... kzbin.info/www/bejne/nJrWXqSObtGXosk here is the code that i am trying to use with the servo and stepper motor. can you see anything wrong with the code? #include #define STEPS 32 Stepper stepper(STEPS, 9, 11, 10, 12); int randomRotationFrom = 5; int randomRotationTo; int randomNumber; int randomDelay; int eyes = 7; int angle = 10; int mouthclosed(-600); int mouthopen(600); int mouthspeed = 950; void setup() { servo_neck.attach(8); servo_neck.write(90); pinMode(eyes, OUTPUT); digitalWrite(eyes, LOW); randomSeed(analogRead(A0)); stepper.setSpeed(300); stepper.step(mouthclosed); delay(200); digitalWrite(eyes, HIGH); delay(50); digitalWrite(eyes, LOW); delay(50); digitalWrite(eyes, HIGH); delay(50); digitalWrite(eyes, LOW); delay(50); digitalWrite(eyes, HIGH); delay(5); digitalWrite(eyes, LOW); delay(100); digitalWrite(eyes, HIGH); delay(50); digitalWrite(eyes, LOW); delay(50); digitalWrite(eyes, HIGH); delay(500); digitalWrite(eyes, LOW); delay(50); digitalWrite(eyes, HIGH); } void loop() { randomDelay = random(10,3000); randomRotationTo = random(40,140); randomNumber = random(1,9); if (randomRotationTo > randomRotationFrom) { for(angle = randomRotationFrom; angle < randomRotationTo; angle += 1) { servo_neck.write(angle); delay(20); servo_neck.write(angle - 3); } if (randomNumber == 5) { stepper.setSpeed(mouthspeed); stepper.step(mouthopen); stepper.step(mouthclosed); } } if (randomRotationTo < randomRotationFrom) { for(angle = randomRotationFrom; angle > randomRotationTo; angle -= 1) { servo_neck.write(angle); delay(20); servo_neck.write(angle + 3); } if (randomNumber == 5) { stepper.setSpeed(mouthspeed); stepper.step(mouthopen); stepper.step(mouthclosed); } } randomRotationFrom = randomRotationTo; delay(randomDelay); }