Tutorial: How to use a stepper motor (28BY-J48) with an Arduino and a ULN2003A board | UATS A&S #10

  Рет қаралды 67,612

Michael Schoeffler

Michael Schoeffler

Күн бұрын

Пікірлер: 55
@kevinjones2358
@kevinjones2358 2 жыл бұрын
Thanks for posting this. 5 years later your video got me started!
@clairemacare1921
@clairemacare1921 4 жыл бұрын
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.
@bablugaonkar666
@bablugaonkar666 10 ай бұрын
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
@MikeHammer1
@MikeHammer1 3 жыл бұрын
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
@torstonvodesil6709 Жыл бұрын
nice and simple, thanks
@juliuscaesar5001
@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
@bevita1322
@bevita1322 2 жыл бұрын
Hello, can I plug this to the wall? I made a circuit and blew the board when I plugged it in
@rossgeomans4374
@rossgeomans4374 2 жыл бұрын
Thank you, helped a bunch.
@zattiya
@zattiya 6 жыл бұрын
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.
@Ninjacat9000Ilovebigfloppa
@Ninjacat9000Ilovebigfloppa 4 жыл бұрын
The motor Is designed to be inputed in that way
@SummerFrost23
@SummerFrost23 2 жыл бұрын
The stepper.h library has different sequence. 8, 10, 9, 11 fix the sequence for ULN2003
@aerosoulzx
@aerosoulzx 6 жыл бұрын
Question; if I wanted to power the motor externally, how would I do this, and what parts would be required? Any help gratefully received! :)
@Ayce47
@Ayce47 4 жыл бұрын
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
@Ayce47
@Ayce47 3 жыл бұрын
@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.
@NaderTheExpert
@NaderTheExpert 2 жыл бұрын
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?
@roshnivaldar2746
@roshnivaldar2746 3 жыл бұрын
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?
@giovannicappello8852
@giovannicappello8852 2 жыл бұрын
hello, how much weight (kilos) can this motor lift? thanks
@manuelfreitas4526
@manuelfreitas4526 2 жыл бұрын
can you explay why the steper motor run only ccw?
@ValerianKapeller
@ValerianKapeller 2 жыл бұрын
Why always 8,9,10,11 pins on the arduino? Can i go for 2,3,4,5 as well? Thank you :)
@lucanfilm1948
@lucanfilm1948 6 жыл бұрын
Thank you for this great tutorial - it really helped me to get into that topic.
@ersatz7107
@ersatz7107 5 жыл бұрын
is there a code for controlling the motor with a potentiometer like how you would control a servo motor with a potentiometer?
@bdog4043
@bdog4043 6 жыл бұрын
What are pins 5,6,&7 used for on the driver?
@Rookysmasher
@Rookysmasher 4 жыл бұрын
thanks for explaining so well i understood everything!!
@pixelatedude
@pixelatedude 5 жыл бұрын
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
@catalinp9176
@catalinp9176 5 жыл бұрын
Switch pin2 with pin3 from the driver
@pixelatedude
@pixelatedude 5 жыл бұрын
Eeeh? Which pin? Sorry i'm forgot to say that, I am using Wemos D1 R2 for this
@brandolarios3616
@brandolarios3616 7 жыл бұрын
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
@mschoeffler
@mschoeffler 7 жыл бұрын
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.
@favesongslist
@favesongslist 4 жыл бұрын
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.
@nicolaslac1013
@nicolaslac1013 4 жыл бұрын
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)
@ukdashcamguy500
@ukdashcamguy500 4 жыл бұрын
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).
@nicolaslac1013
@nicolaslac1013 4 жыл бұрын
Yes, i got this, really great, thanks
@michaelsalais7393
@michaelsalais7393 3 жыл бұрын
So very informative. I thought pin 8 on an UnO was not PWM.
@frankymuller9923
@frankymuller9923 4 жыл бұрын
Thanks Nice tutorial
@glenlobo
@glenlobo 7 жыл бұрын
Single Axis Tb6600 and RC_52002513 Stepper Motor Driver Controller Speed Regulator Pulse Signal Generator CAN I MAKE A STEPPER MOTOR WORK??
@emadabuhagag222
@emadabuhagag222 4 жыл бұрын
very helpful thank you
@Hydra_Kumo
@Hydra_Kumo 2 жыл бұрын
Thanks
@johnberry5339
@johnberry5339 5 жыл бұрын
This is a Great tutorial thank you, I have just liked and subscribed :)
@moeshickenyay
@moeshickenyay 6 жыл бұрын
Great tutorial, thanks.
@rramirezx8738
@rramirezx8738 6 жыл бұрын
Why put the number 2038, where does that number come from?
@ClaudioFontachannel
@ClaudioFontachannel 6 жыл бұрын
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_warrior
@blue_name_warrior 5 жыл бұрын
​@@ClaudioFontachannel but why 2038? 64*64=? 4096 I think
@ClaudioFontachannel
@ClaudioFontachannel 5 жыл бұрын
@@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?
@mschoeffler
@mschoeffler 4 жыл бұрын
@@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/
@aspirine99999999
@aspirine99999999 6 жыл бұрын
thank you very very much.......
@anghelalexandru3366
@anghelalexandru3366 4 жыл бұрын
it has 2048 steps in full rotation, not 2038
@mschoeffler
@mschoeffler 4 жыл бұрын
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.
@anghelalexandru3366
@anghelalexandru3366 4 жыл бұрын
@@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...
@mschoeffler
@mschoeffler 3 жыл бұрын
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.
@anghelalexandru3366
@anghelalexandru3366 3 жыл бұрын
@@mschoeffler maybe mine is different
@SummerFrost23
@SummerFrost23 3 жыл бұрын
@@mschoeffler 2048 appears quite accurate to be complete revolution. 2038 or even 2044 tends to shift (incomplete revolution).
@historyunderbeneath
@historyunderbeneath 5 жыл бұрын
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); }
@CNCEVOLUTION
@CNCEVOLUTION 5 жыл бұрын
Like
@hanoknaik898
@hanoknaik898 5 жыл бұрын
chat
Modifying Cheap Stepper Motor To Be More Powerful (28BYJ-48)
6:22
JustAnotherMakerChannel
Рет қаралды 45 М.
Control Stepper motor 28BYJ-48 with ULN2003 for Arduino
10:27
To Brawl AND BEYOND!
00:51
Brawl Stars
Рет қаралды 17 МЛН
Гениальное изобретение из обычного стаканчика!
00:31
Лютая физика | Олимпиадная физика
Рет қаралды 4,8 МЛН
Cat mode and a glass of water #family #humor #fun
00:22
Kotiki_Z
Рет қаралды 42 МЛН
The evil clown plays a prank on the angel
00:39
超人夫妇
Рет қаралды 53 МЛН
Beginner's Guide to Controlling Stepper Motors with Arduino
9:59
Rachel De Barros
Рет қаралды 33 М.
148x210mm Arduino CNC plotter using 28BYJ-48 stepper motors
16:29
Chronic Mechatronic
Рет қаралды 77 М.
Chapter 10 - Exploring Stepper Motors (28-BYJ-48) with an Arduino
27:26
HOW TO: Arduino control of DC, Stepper, and servo motors
1:04:36
DonovanStudio
Рет қаралды 107 М.
28BYJ-48 STEPPER MOTOR WITH ULN2003 DRIVER - Arduino tutorial #14
10:57
To Brawl AND BEYOND!
00:51
Brawl Stars
Рет қаралды 17 МЛН