Control Stepper motor 28BYJ-48 with ULN2003 for Arduino

  Рет қаралды 205,755

Robojax

Robojax

Күн бұрын

Пікірлер
@robojax
@robojax 3 жыл бұрын
Please subscribe here bit.ly/rj-subscribe and thumb up 👍. Thanks. I appreciate it.
@johnmellor6065
@johnmellor6065 6 жыл бұрын
just followed your video and wired it up as you described it worked first time, which is unusual for me thanks
@robojax
@robojax 6 жыл бұрын
I am glad you were able to do it.
@skrmnghrd4520
@skrmnghrd4520 5 жыл бұрын
Woah that is really unusual
@humbertosandoval
@humbertosandoval 4 жыл бұрын
@@robojax how can i set the RPM for the motor....?
@planker
@planker 2 жыл бұрын
Excellent presentaion. This has cleared up some stuff. I have a PTZ-E27 that I don't trust on my WiFi, It uses the 5 wire steppers as servos, Now they are Arduino servos Thanks. Now I have some cool stuff to go do.
@robojax
@robojax 2 жыл бұрын
Here is the full video with 8 projects kzbin.info/www/bejne/ioKag2WYjpKAjbc
@2xx_eli364
@2xx_eli364 4 жыл бұрын
Thanks allot friend for your video and code on stepper motors and how to use them for our own use. Got of to a rocky start at first due to no delay(1) code seen...
@robojax
@robojax 4 жыл бұрын
you are very welcome. I am glad your project worked.
@johnbowie3566
@johnbowie3566 4 жыл бұрын
Thank you for your instruction! Greetings from germany and stay well in corona-time!
@robojax
@robojax 4 жыл бұрын
You are welcome. Thank you from Canada. You take care as well. I am home and hopefully we all pass this hard time God willing.
@veronicaortiz2058
@veronicaortiz2058 3 жыл бұрын
Thank YOU! finally someone who knows what they are doing
@robojax
@robojax 3 жыл бұрын
You are welcome. Here is $200 Arduino course for free Arduino Step by Step Course (over 100 lectures) Starts here robojax.com/L/?id=338
@neeljagtap0702
@neeljagtap0702 4 жыл бұрын
Thanks alot i followed this and it worked it was my first arduino project
@robojax
@robojax 4 жыл бұрын
Glad it helped. Welcome to Arduino. Learn Arduino in 30 Minutes robojax.com/L/?id=135
@chadconway335
@chadconway335 6 жыл бұрын
Thanks man, I've had these stepper motors sitting here for months. Your video made it a breeze, threw you a few bucks on paypal. Happy Holidays RoboJax
@robojax
@robojax 6 жыл бұрын
You are welcome. Thank you for your support. Happy Holidays to you too.
@planker
@planker 2 жыл бұрын
Thanks!
@robojax
@robojax 2 жыл бұрын
Thank you for your kind support.
@Andyruuuu
@Andyruuuu 4 жыл бұрын
This worked perfectly for me thank you.
@robojax
@robojax 4 жыл бұрын
Glad it helped
@the_haunted_outhouse
@the_haunted_outhouse 6 жыл бұрын
Thank you for the informative video and the associated code. It worked very well for me. I refactored the code and built a small library to include with my projects to keep the main code for my projects cleaner. I was able to boil the drive code down to an array and about 8 lines across two small functions.
@robojax
@robojax 6 жыл бұрын
You are welcome. That is the best way but many viewer will struggle to understand it. I preferred to put it the most plain way so people can see how it works. Once they learned, then they can write simpler code.
@yashaswikulshreshtha1588
@yashaswikulshreshtha1588 2 жыл бұрын
@@robojax I couldn't find you code on website so I copied from video after doing exactly the same I wasn't able to get the motor running idk why! And can you please explain how the stepper motor actually works? thankyou
@kunalsharma6703
@kunalsharma6703 3 жыл бұрын
thanks for the detailed video......great help for beginners
@etstudio1790
@etstudio1790 2 жыл бұрын
greeting. thanks for the video. I have a question: my project is almost finished, I connected 3 servo 5v, one stepper 5v engine, one lcd display. all on the arduino board. How much voltage should I use? is 5v enough? ... or should I use more? I use it through the ULN2003 drive! like in this video.
@robojax
@robojax 2 жыл бұрын
voltage is the operating voltage and it does not change. so when you supply power of 5V, measure the current (ampere) for one servo motor multiply it by 3 and then measure the current for stepper. then add them together and you should get something like 1.2A (for example). then you find a power adapter or batter that can supply 5V 1.3A or 1.5A just higher than 1.2A.
@robojax
@robojax 2 жыл бұрын
have you see this latest video of this stepper kzbin.info/www/bejne/ioKag2WYjpKAjbc
@etstudio1790
@etstudio1790 2 жыл бұрын
@@robojax you make great torturials. Thank you. I've reviewed almost everything about stepper engines but now I'm confused by these amps. I hope I take the right amperage without measure it because I can't measure it. I'll use 1.5 A :) thank you, you're a nice person
@theflyingdutchman
@theflyingdutchman 3 жыл бұрын
hi, thx for the great tutorial. i have 1 isssue still. i want to combine a 4th button to control a servo, i keep getting a error with the "void drivestepper" part. for some reason i can't get in in the correct place. can /will you please help me out or give some hint how to combine this sketch with a 4th button for a servo. thanks in advance
@robojax
@robojax 3 жыл бұрын
This video has not push buttons. search my channel for video to control speed, angle, stop, start, potentiometer etc. Here if you don't know how to search kzbin.infosearch?query=28byj-48 all videos
@shamailhasanain8517
@shamailhasanain8517 3 жыл бұрын
Thanks alot. Usefull..you can also show how to use stepper library and its functions.
@robojax
@robojax 3 жыл бұрын
the code in this video does not have any library. I have explained it fully. I never skip the details.
@lacenaepronta
@lacenaepronta 4 жыл бұрын
Thank. Nice explanation. Do you also use the accelstepper library in some other video?
@robojax
@robojax 4 жыл бұрын
you are welcome. I've make tones of videos for different applications which was not possible otherwise if I used any library. here my other related videos kzbin.infosearch?query=28BYJ-48
@andreaperi8520
@andreaperi8520 3 жыл бұрын
ho eseguito il tuo progetto, tutto ok ora, è possibile far funzionare il motore per un tempo X e riavviarlo invertendo la direzione di rotazione? Grazie per l'aiuto
@robojax
@robojax 3 жыл бұрын
ovviamente possibile. Ma chi scriverà il codice. Ho modalità più di 10 o 15 video per questo motore che sono molto utili per molte applicazioni. per favore cerca nel mio canale 28BYJ-48 e sono sicuro che puoi trovare qualcosa. Inoltre ho spiegato completamente tutti i video. la maggior parte ha sottotitoli in italiano. quindi guardali, impara e scrivi il tuo codice. buona fortuna e stai al sicuro.
@progeinsrl6897
@progeinsrl6897 6 жыл бұрын
Great! It works better than including default stepper.h library.
@robojax
@robojax 6 жыл бұрын
Thank you. Glad to hear that.
@guyguy6420
@guyguy6420 5 жыл бұрын
Ciao. Premesso che volevo farti i complimenti per il video nonché la spiegazione del progetto. Volevo chiederti un info. E' possibile fare in modo di farlo girare anche in senso orario e antiorario in modo alternato ? grazie
@robojax
@robojax 5 жыл бұрын
Grazie mille. sì, è possibile. Avere più video su questo motore. Ecco il link: kzbin.infosearch?query=28BYJ-48 Ahmad dal Canada
@travisrenaut684
@travisrenaut684 3 жыл бұрын
Hi, top video my friend, i have succeeded in getting my stepper to work. my question is can i use the same code to control a Nema 17 1.8° 42mm 0.44N.M 1.7A Stepper Motor 4-Lead with a A4988 . thank you
@robojax
@robojax 3 жыл бұрын
Hi Please see this video kzbin.info/www/bejne/mYq3enagaamKj8U
@travisrenaut684
@travisrenaut684 3 жыл бұрын
@@robojax thank you, problem solved.:-)
@dingojack7023
@dingojack7023 5 жыл бұрын
what is the int count=0; for in your source page? I'm guessing it was left over from a part of code checking ratio or switch the direction. I just modified it to count++ for each loop and switch direction, value of 4321 does 360 degrees.
@robojax
@robojax 5 жыл бұрын
Yes I was doing something to count and forgot to delete.
@NaderTheExpert
@NaderTheExpert 2 жыл бұрын
Can I connect 9v battery to +5v in of uln2003 driver and drive 5v stepper motor with 9volt battery?
@robojax
@robojax 2 жыл бұрын
no you can't use it. the board will burn. please watch this updated better video with so many examples kzbin.info/www/bejne/o6SlZK2mrd5qi80
@marciofsrm7366
@marciofsrm7366 4 жыл бұрын
Olá professor, me tira uma duvida, se consigo controlar 4 ou 5 motores de passo utilizando uma esp32? se sim, quais pinout utilizar, a minha esp32 tem30pin... valeu obrigado
@robojax
@robojax 4 жыл бұрын
Isso é um problema. você pode usar o expansor de portas I2C.
@andreaperi8520
@andreaperi8520 3 жыл бұрын
ora, è possibile far funzionare il motore per un tempo X e riavviarlo invertendo la direzione di rotazione? Grazie per l'aiuto
@robojax
@robojax 3 жыл бұрын
si, tante possibilità. Avresti dovuto cercare nel mio canale per quello. sarai sorpreso di quanti altri codici ho. Ecco tutti i video relativi a questo motore kzbin.infosearch?query=28BYJ-48
@felixdsouza385
@felixdsouza385 4 жыл бұрын
Hello nice video can I use Arduino mini pro instead of UNO as I plan to a make turntable that moves at 10 degree angles for taking pictures for photogrammetry
@robojax
@robojax 4 жыл бұрын
Any Arduino will work. that is the beauty of Arduino. Here are my videos on this with tones of different features kzbin.infosearch?query=28BYJ-48
@jamesumipig3697
@jamesumipig3697 5 жыл бұрын
is there any way to use the battety connector?
@robojax
@robojax 5 жыл бұрын
I have sown it. I said your power supply. Your power supply is your battery. If your motor is 5V, connect 5 to 6V battery and if your motor is 12V connect 12V battery.
@HimAnhTu
@HimAnhTu 3 жыл бұрын
How can I use an external source to keep my unl2003 from getting hot?
@robojax
@robojax 3 жыл бұрын
just respect the operating voltage. make sure it is 5V. Simple as that.
@vincentstanleyso4577
@vincentstanleyso4577 3 жыл бұрын
Hi. I have problems with making the Arduino work without a power source connected to the USB hub of the Arduino. It works just fine when the Arduino is connected to my computer and at the same time is being powered by an external power source. Thank you!
@robojax
@robojax 3 жыл бұрын
Hi, you should not have problem. just supply 5V from USB or 6 to 12V from VIIN pin. it should work.
@RazZyvannilla7
@RazZyvannilla7 3 жыл бұрын
Hey, so the LEDs on my board are flashing when I upload the code. They flash in order ABCD over and over, do you know what this error is?
@robojax
@robojax 3 жыл бұрын
what error? flashing? they have to flash. but if they flash so slow that you can see, it means you've set the speed such that I it will complete one rotation in 1 hour. See my other video. I've got over 10 videos on this motor.
@atulkhatavkar6986
@atulkhatavkar6986 5 жыл бұрын
Hello Sir my motor is just vibrate and not moving. My connections are correct similar to you also connected external power with common ground still not working please help.
@robojax
@robojax 5 жыл бұрын
I will reply to all Subscriber's 🔔 questions. So make sure to Subscribe.😊
@JohnDoe-oh7gf
@JohnDoe-oh7gf 4 жыл бұрын
Hello I've followed your tutorial in the past and made a functioning turntable using this stepper motor. Recently trying to improve on my design I noticed it no longer works. The motor is just buzzing. I'm powering the motor using the 5V pin from the arduino board and the board. I'm at a loss on how to troubleshoot this. My primitive mind only speculates that maybe the motor is in some kind of wrong position because there is no on/off switch the board resumes executing the program as soon as the power is supplied. I did try to add delays before the motor started to work but currently I have no progress. Can you give me a clue why is this not working? I'm currently using your code as is. Cheers.
@robojax
@robojax 4 жыл бұрын
Hello, when motor buzzes it means wiring is incorrect. check it again. Or the PCB controller is dead if wiring is correct.
@JohnDoe-oh7gf
@JohnDoe-oh7gf 4 жыл бұрын
@@robojax Thank you for the reply. The wiring seem to be ok. I've ordered a new stepper motor and stepper motor controller. I will try to redo everything. EDIT: it seems now its working. In the end I've switched out the motor and driver unit so it could be the fault of both also I did find a design flaw in the way that I connected the rotating bit to my turntable that made too much friction that stopped the motor working. Thanks for the help.
@KJW648
@KJW648 7 жыл бұрын
Nice video :) I slow down your script(increased the delay) to see the LED sequence, for some reason the third LED is not coming on, can't figure why ??? Have made my own "Full wave" script and it work great.
@robojax
@robojax 7 жыл бұрын
Thank you. yes you can play with it but ca't know why one LED doesn't turn on.
@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?
@robojax
@robojax 5 жыл бұрын
Just updated the description where I added the link to my video on how to control it using potentiometer, how to control it using 3 push buttons and how to control is using hand gesture. good luck.
@freemanfreed1581
@freemanfreed1581 5 жыл бұрын
Can you make a stepper motor rotate 52.24 degrees only? how? what about a DC motor?
@1027sterling
@1027sterling 5 жыл бұрын
The best way is to just google some example code and play with the values to get the specific angle when you actuate the circuit. Say, press a button, and it moves to position, press the button again and it returns. Actually very useful. learn.adafruit.com/adafruit-arduino-lesson-16-stepper-motors/arduino-code www.amazon.com/LAFVIN-28BYJ-48-ULN2003-Stepper-Arduino/dp/B076KDFSGT/ref=sr_1_3?keywords=stepper+motor+kit+uln2003&qid=1566870972&s=gateway&sr=8-3
@robojax
@robojax 5 жыл бұрын
I have it in my "to do" list. I would have to use LCD screen so you know the angle.
@jojotoomojo8016
@jojotoomojo8016 5 жыл бұрын
Do you need those clamps to make it work
@robojax
@robojax 5 жыл бұрын
which clamps? Please tell me the time like 4:30 so I check it.
@jojotoomojo8016
@jojotoomojo8016 5 жыл бұрын
Never mind I figured it out
@MohamadSaleem-w7z
@MohamadSaleem-w7z 4 жыл бұрын
Hello sir, I need to know how I can get the MOTOR to do 10 turns to the right and 10 turns to the left and keep doing that. THANKS.
@robojax
@robojax 4 жыл бұрын
Assalamu alaikum, wow. interesting project. I will put it on my list and if time permit, I will make video.
@muhtadi313
@muhtadi313 5 жыл бұрын
thanks for learning ,but how we can stop the stepper in a specific posstion please help me.
@robojax
@robojax 5 жыл бұрын
you are welcome. I have course on Udemy with 2 push buttons to stop it any point www.udemy.com/robojax-arduino/
@bertjanboss6973
@bertjanboss6973 5 жыл бұрын
Robojax Thank you for te good video, is there an option in the code to let te motor turn faster?
@robojax
@robojax 5 жыл бұрын
you are welcome. This is the fastest speed. You can slow it down by adding delay in side the loop like delay(50); or 100 which is 50 millisecond and 100 is 100 milliseconds.
@amitdebnath9356
@amitdebnath9356 5 жыл бұрын
If I use arduino due which is operated on 3.5v.so which type driver I have to use?
@robojax
@robojax 5 жыл бұрын
You can use this module. As I have explained , you can connect external 5V for the motor. Watch the video.
@metallicaandchimaira
@metallicaandchimaira 2 жыл бұрын
Is there a way to power the motor without an arduino? I got a speed control circuit and it does not work when I connect everything
@robojax
@robojax 2 жыл бұрын
for stepper motor you need a microcontroller to send those signal I've shown. Arduino is a microcontroller.
@metallicaandchimaira
@metallicaandchimaira 2 жыл бұрын
@@robojax you cant just connect it to a potentiometer and increase the speeds with a knob rather than controlling it with an arduino?
@hsnrsd3468
@hsnrsd3468 6 жыл бұрын
Please help to create source code for 2 x stepper motor 28byj-48 with mpu6050. I have no idea the algoritm between the degree mpu and degree motor sync.
@robojax
@robojax 6 жыл бұрын
watch the video again. 1- Define 4 more pins for your 2nd motor. 2- inside setup define 4 pin more as output 3-change the vairable _setp to _step1 and make another one _step2, and do the same for "dir" varible and change it to "dir1" create another variable "dir2" and inside the loop duplicate the code replacing all pins with the one you defined in setp (1) and replace all "_step" to "_step1" and "_setp2" and then dir1 and dir2. If you can't understand this code, then watch mother videos on relays. You will learn how to define and change stuff. Can't help further.
@hsnrsd3468
@hsnrsd3468 6 жыл бұрын
@@robojax Thanks for the reply. yes, I can connect and define 2 motors. in this case, when the MPU6050 in 30 degrees, the motor goes to -30 degree to stabilize the object. it sounds like balancing motor. there are so many samples for DC motor and Stepper NEMA17, but I didn't find the sample for 28byj-48 motor.
@Dsilvainvesting
@Dsilvainvesting 6 жыл бұрын
Very well Sr.! I subscribe to your channel with pleasure. Your explaining technical knowledge is very good!. Keep going!
@robojax
@robojax 6 жыл бұрын
Thank you very much. I am pleased to know I can be helpful.
@kevindrakol
@kevindrakol 7 жыл бұрын
Hello with that motor and controller I want to do with an application to the button a button on the cell turn to the right when you press another turn to the left and you stop everything you could help me could not do anything
@robojax
@robojax 7 жыл бұрын
The direction of motor is determined by the variable "dir". Use this button project to read button www.arduino.cc/en/Tutorial/Button and inside the loop just before switch(_step) put this code. if (buttonState == HIGH) { dir = true; } else { dir = fales; }
@jacobforeman5421
@jacobforeman5421 5 жыл бұрын
Very helpful, it works! Can you say how to make it start and stop on timed intervals?
@robojax
@robojax 5 жыл бұрын
just add delay like delay(2000) will make it delay 2 seconds at any stage you add. Here is my other video on this kzbin.info/www/bejne/oqOoiGuuobihq7s and to start and stop with push button kzbin.info/www/bejne/p16raHqYrr1ontE
@LuisDanilo95
@LuisDanilo95 4 жыл бұрын
Moving a stepper is not simply sending high and low signals just because, you must keep in mind the other aspects such as the frequency the motor handles, in other words, it's not about to send ones and zeros awkwardly, at least you had to put a delay . .. otherwise you energize the coils, as I said, awkwardly.
@robojax
@robojax 4 жыл бұрын
yes. you are right.
@nektarioskoumantakis4987
@nektarioskoumantakis4987 4 жыл бұрын
How can I use a button that if I press it once the motor will rotate a full circle?
@robojax
@robojax 4 жыл бұрын
Here are my videos on that and I have included links in the description of the video as well kzbin.info/door/kcBSig_Iu4ZnAIeCeG1TVgsearch?query=28BYJ-48
@isabelleetsylvain8109
@isabelleetsylvain8109 7 жыл бұрын
Hello, you have a variant on you site to stop the motor after 3 sec. You need to remove the 'else' (located almost at the end of the script) because it always reset the counter to zero and the motor never stop.
@robojax
@robojax 7 жыл бұрын
You are right. I will test the code and update it. Thanks.
@xuanhoadao1992nd
@xuanhoadao1992nd 6 жыл бұрын
I am finding the answer for that question, motor can not stop, thank the both
@JohnDoe-oe8gm
@JohnDoe-oe8gm 4 жыл бұрын
So if I don't have an external voltage source it will not work?
@robojax
@robojax 4 жыл бұрын
it will work if you connect it to 5V of Arduino. But if you overload the Arduino board, it might get damaged. Depends on the motor what you do with it.
@JohnDoe-oe8gm
@JohnDoe-oe8gm 4 жыл бұрын
@@robojax I tried to power it using the arduino but the motor only vibrate and not rotate and I think I should get an external power source.
@piyavaca3163
@piyavaca3163 4 жыл бұрын
im newbie with arduino and i follow your instruction and it's work great ,thank you so much ))) the stepper temperature even very stabil. if you don't mind to explain i just wondering how to run 2 stepper motor with your code .Thank you
@robojax
@robojax 4 жыл бұрын
You are welcome. if it gets hot, 1-Input Voltage is higher than motor voltage. Make sure to connect 5V if motor is 5V 2- Incorrect wiring. for two motor, I would have to make another video.
@james6609
@james6609 7 жыл бұрын
hello can a sensors be addet to the arduino to make the motor recerse the same distance as i want to work a barrier on a model railway in other words when the first sensor is hit by the train it will close the barrier and when the second sensor is hit it will reverse the motor to open the barrier and would the code be difficult to write as i am new to electronis your help would be greatly received regards james
@robojax
@robojax 7 жыл бұрын
Watch this video and see how the direction of motor is reversed with hand gesture. you can use your sensor instead of the gesture sensor and change the direction of the motor. kzbin.info/www/bejne/gZekn4idlrh3o6s
@james6609
@james6609 7 жыл бұрын
hello thank you very much for your help
@robojax
@robojax 7 жыл бұрын
you are welcome.
@KJW648
@KJW648 7 жыл бұрын
Very easy, just add a couple of pins for the 2 sensors, when then sensor go hi/low on the pin, do a counted loop to open the gates and stop. Then when the other switch is activated do a reverse count to close. What sensor you use and how you open/close the gates, is down to you.
@alessandromanzocco3746
@alessandromanzocco3746 6 жыл бұрын
hello, my friend made for me an arduino IR controller to move a step motor by the tv remote controller. everything works fine, but he doesn't know how to make the motor move constantly while keeping pressed the remote button. Actually everytime i push the button, the motor turn just for the steps that he set. So to set the right position i must press many times the button. do you have any council? thanks
@robojax
@robojax 6 жыл бұрын
it could be done many ways but in your case you just need to find out how long (time) you want the motor to run every time you press the button. Then you can set a delay to stop it after that amount of time.
@alessandromanzocco3746
@alessandromanzocco3746 6 жыл бұрын
Robojax thanks for your quickly reply I will pass these informations to my friend. Have a nice day
@alessandromanzocco3746
@alessandromanzocco3746 6 жыл бұрын
arduino is not my daily bread LOL this is what i have now: #include #include #include // Create the motor shield object with the default I2C address Adafruit_MotorShield AFMS = Adafruit_MotorShield(); // Connect stepper motor with 32 steps per revolution // to motor port #1 (M1 and M2) Adafruit_StepperMotor *myMotor = AFMS.getStepper(32, 2); /*----- Variables, Pins -----*/ int receiver = 2; // Signal Pin of IR receiver to Arduino Digital Pin 2 /*-----( Declare objects )-----*/ // Setup of proper sequencing for Motor Driver Pins // In1, In2, In3, In4 in the sequence 1-3-2-4 IRrecv irrecv(receiver); // create instance of 'irrecv' decode_results results; // create instance of 'decode_results' void setup() { irrecv.enableIRIn(); // Start the receiver Serial.begin(9600); // set up Serial library at 9600 bps AFMS.begin(); // create with the default frequency 1.6KHz myMotor->setSpeed(200); // 200 rpm } //main loop to listen for remote IR signal and move motor void loop() { if (irrecv.decode(&results)) // have we received an IR signal? { switch (results.value) { case 0x20DFC03F: // UP button pressed myMotor->step(17, BACKWARD, SINGLE); //I need backward motion to turn my volume knob up //delay(200); this was in the original code but I decided no delay was better myMotor->release(); //saves stepper from using voltage and getting hot at rest break; case 0x20DF40BF: // DOWN button pressed myMotor->step(17, FORWARD, SINGLE); //delay(200); myMotor->release(); break; } irrecv.resume(); // receive the next value } }/* --end main loop -- */
@Unscientifically
@Unscientifically 4 жыл бұрын
I love your videos and already subbed. How would you change the speed with the code you provided.
@robojax
@robojax 4 жыл бұрын
thank you very much. here is my video showing you how to control the speed kzbin.info/www/bejne/oqOoiGuuobihq7s I used potentiometer or You can use push button kzbin.info/www/bejne/p16raHqYrr1ontE but you can learn from the video to control is with other means like hand gesture kzbin.info/www/bejne/gZekn4idlrh3o6s
@mr.b7403
@mr.b7403 6 жыл бұрын
hi robojax, when I am putting in your runtime version, the motor doesn't stop. basically I need the motor to turn 90 degrees and then return back. do you have any suggestions please, kind regards, dave
@marygellatly8012
@marygellatly8012 4 жыл бұрын
Is there a link were you can download the code
@robojax
@robojax 4 жыл бұрын
Wow. I recently updated the link and forgot to update the video link . Thank you for letting me know. The link in the description of the video is updated and working. here for you robojax.com/L/?id=262
@DilipKumar-uw3ly
@DilipKumar-uw3ly 2 жыл бұрын
@@robojax The link redirects to the video and datasheet only. Can you please point me towards the code screen. Thanks in advance.
@kentjohn6325
@kentjohn6325 2 жыл бұрын
Doesnt work, probably something wrong with my code. I wanna use Yours instead and i couldn't find the code you did. can i get the code? The website you posted on other comments cant find it either
@robojax
@robojax 2 жыл бұрын
Hello, ever video have a description below it and there is a link to get the code. I have mentioned this in the video.
@DanialADHOfficial
@DanialADHOfficial 3 жыл бұрын
i just boght adruino advance kit... i have zero knowlage in coding.. but know i dont understand why i cant make 2 void.. i mean how to make servo and led works at the same time.. because i cant make 2 void loop in coding
@robojax
@robojax 3 жыл бұрын
Hi, welcome to arduino. See this 30 minutes course then kzbin.info/www/bejne/g5PFY6uXZryWiK8
@franzotto448
@franzotto448 4 жыл бұрын
Danke für das Video. Thanks for the video.
@robojax
@robojax 4 жыл бұрын
you are welcome.
@gregepkt
@gregepkt 7 жыл бұрын
Sir, its possible to control speed in this project with potentiometer? ( in camera slider)
@robojax
@robojax 7 жыл бұрын
yes it is possible. The code robojax.com/learn/arduino/?vid=robojax-0293 shows that the motor rotation is controller by the value of _setp. so you can make _step depends on the value of potentiometer (code is here robojax.com/learn/arduino/?vid=robojax-ard-poten). so you have to convert the value of "voltage" which is float to integer make us between zero to 8. // Convert the analog reading (which goes from 0 - 1023) to a voltage (0 - 5V): float voltage = sensorValue * (5.0 / 1023.0); int stepNew = (int) voltage % 8;// Now you can use stepNew to control motor. I have not tested it but this is the idea.
@gregepkt
@gregepkt 7 жыл бұрын
RoboJax Videos . Thank You
@ricardofunk5848
@ricardofunk5848 6 жыл бұрын
@@robojax I can change the value of _step but the speed still the same.
@黃靖婷-y8k
@黃靖婷-y8k 7 жыл бұрын
Thanks for your great video, sir. I had my circuit arranged just like yours, but it turns out that only one LED on the ULN2003 is on, and the motor didn't move at all. My code is more simple than yours, though. Could you tell me where may I possibly made mistakes?
@黃靖婷-y8k
@黃靖婷-y8k 7 жыл бұрын
And here is my code: int dpin=2; int cpin=3; int bpin=4; int apin=8; void setup() { pinMode(dpin,OUTPUT); pinMode(cpin,OUTPUT); pinMode(bpin,OUTPUT); pinMode(apin,OUTPUT); } void loop() { digitalWrite(apin,LOW); digitalWrite(cpin,LOW); digitalWrite(bpin,LOW); digitalWrite(dpin,HIGH); delay(1000); digitalWrite(dpin,LOW); digitalWrite(bpin,LOW); digitalWrite(apin,LOW); digitalWrite(cpin,HIGH); delay(1000); digitalWrite(cpin,LOW); digitalWrite(dpin,LOW); digitalWrite(apin,LOW); digitalWrite(bpin,HIGH); delay(1000); digitalWrite(bpin,LOW); digitalWrite(cpin,LOW); digitalWrite(dpin,LOW); digitalWrite(apin,HIGH); delay(1000); }
@robojax
@robojax 7 жыл бұрын
Why do you have delay(1000)? Use the code I provided and try it. goo.gl/e8HbaH
@happycoloring8505
@happycoloring8505 3 жыл бұрын
Im always watch robojax video. Can u help me, i want to make controll stepper motor with keypad 4x4, with 50 combinantion of rotation. Keypad press 3 digit, correct sample: "A11"= motor rotation go to 1000, "A12"= motor rotation go to 2000, until "A61". Can you help me to make demo n code? Thanks before
@robojax
@robojax 3 жыл бұрын
Search for #robojax28BYJ_48 or click on it under the video. I have so many videos. and I am sure you can find something or get the idea how to use it for your purpose.
@happycoloring8505
@happycoloring8505 3 жыл бұрын
@@robojax thanks for ur respon, im just confused code how to function keypad with 3 digit, correct sample, press keypad "A11" the motor rotate 1000, and press "A12" motor rotate to 2000
@robojax
@robojax 3 жыл бұрын
Your confusion will be resolved if you learn how to control is with push button. Once you learned that then push button can send this value for you
@aimannazreen434
@aimannazreen434 7 жыл бұрын
How to make the stepper motor stop working after the rotation? For example after 2 cycle rotation the stepper motor stop working.
@robojax
@robojax 7 жыл бұрын
I just wrote a code for you so the motor stops after certain time. robojax.com/learn/arduino/?vid=robojax-0293 You can change it do other things. I have not tested the code but it should work. Good luck. Make sure you get the second code on this page. Let me know if it worked.
@aimannazreen434
@aimannazreen434 7 жыл бұрын
RoboJax Videos I have another question which part should I change to make the different rotation?
@robojax
@robojax 7 жыл бұрын
I have posted complete new code. so copy and past all. If you want the old code with continues rotation just get the top portion. You will compare both codes and find the difference.
@aimannazreen434
@aimannazreen434 7 жыл бұрын
RoboJax Videos thank you very much.
@baba_babaa2
@baba_babaa2 7 жыл бұрын
Hey RoboJax, thank you first of all. When using the second code on the page to run for a certain amount of time, it doesn't work. It runs forever. I notice "else count=0" so this a flag to restart everything because if your runtime is 3000, and once the check "count
@HowToTech12
@HowToTech12 3 жыл бұрын
how much power do i give?
@robojax
@robojax 3 жыл бұрын
Wow, you skipped the video big time
@HowToTech12
@HowToTech12 3 жыл бұрын
@@robojax yes i did plz tell me
@robojax
@robojax 3 жыл бұрын
Please watch to get answer. I spent 5 to 8 hours to make the video and you can’t even wait to watch it for free? Amazing
@HowToTech12
@HowToTech12 3 жыл бұрын
@@robojax wow u are being mad i only asked you a question
@vinhtranphuc715
@vinhtranphuc715 6 жыл бұрын
thanks a lot, bro, you save my day.... love you
@robojax
@robojax 6 жыл бұрын
You are welcome. ❤
@DiySpeaker-Vn
@DiySpeaker-Vn 6 жыл бұрын
Các bạn có thể tham khảo sản phẩm tại: www.sendo.vn/dong-co-buoc-giam-toc-28byj48-5v-9375261.html
@DorisVisits
@DorisVisits 6 жыл бұрын
I have a step motor board using the UN20(03) which has burned out the IC. Can you recognise the components so I can replace them? dorisvisits.com/uln2003-fault/
@robojax
@robojax 6 жыл бұрын
The two pieces of red item are 1N4148 diode (SMD type). www.ebay.ca/itm/391780046356 the chip is also Surface mount device (SMD)
@UzunKamis
@UzunKamis 4 жыл бұрын
It seems that you are microstepping the stepper?
@robojax
@robojax 4 жыл бұрын
stepper.
@ilhamrahmatmuharam8501
@ilhamrahmatmuharam8501 4 жыл бұрын
thanks, its great,,,,how to control the speed without potensiometer ? only use code
@robojax
@robojax 4 жыл бұрын
see if you can find something here kzbin.infosearch?query=28BYJ-48
@Bahanov
@Bahanov 5 жыл бұрын
Good Video. You have error in setup function. You define Pin1 two times and definition of Pin4 is Missing. Obviously it works this way but maybe not with the best performance.
@robojax
@robojax 5 жыл бұрын
Thank you. I just checked the code and in setup() all pins are correct, see it here snag.gy/nphEgF.jpg please let me if I am missing something to correct it.
@ger_not_found
@ger_not_found 5 жыл бұрын
do you know a better code?
@onthepalehorse
@onthepalehorse 7 жыл бұрын
what is your voltage source
@robojax
@robojax 7 жыл бұрын
the board needs 5v. The motor voltage depends on the motor. In this video it is 5 V. Watch the video fully, I have explained it.
@onthepalehorse
@onthepalehorse 7 жыл бұрын
I know about the 5v, what I don't know is how much amps I need... I tried connecting the motor with a 9v battery but it just vibrated. Then I connected it with 7.5 vdc 500mA power source but same thing happened. Can u pls tell me your power source
@onthepalehorse
@onthepalehorse 7 жыл бұрын
I know about the 5v, what I don't know is how much amps I need... I tried connecting the motor with a 9v battery but it just vibrated. Then I connected it with 7.5 vdc 500mA power source but same thing happened. Can u pls tell me your power source
@icangmfy6205
@icangmfy6205 7 жыл бұрын
Hello,It's a good tutorial, I'm interested in your idea, I want to know how if from analog to motor, for example using LDR sensor (A0), the motor will go right if sensor ldr to light, if dark motor will reverse direction, how is the arduino code? thank you
@robojax
@robojax 7 жыл бұрын
You can do it by watching two video and should combine them. 1- how to read potentiometer with arduino kzbin.info/www/bejne/ipOvlXSHpapnoKc 2- How to control motor with your hand gesturekzbin.info/www/bejne/gZekn4idlrh3o6s So first you have to understand how motor is controlled then implement it.
@icangmfy6205
@icangmfy6205 7 жыл бұрын
Okay thanks, how to code if stepper motor will stop when press micro switch?
@amanshrichandani7365
@amanshrichandani7365 5 жыл бұрын
Thanks for uploading this video
@robojax
@robojax 5 жыл бұрын
You are welcome. سلام
@robojax
@robojax Жыл бұрын
سلام علیکم. مجرا (کانال) فارسی علم و فن را راه اندازی کردم: لطفا به دوستان تان خبردهید و حمایتم کنید. www.youtube.com/@ilmofan
@runningwithscissors7715
@runningwithscissors7715 5 жыл бұрын
great example...mine didnt work (bad controller board,only 3 lights worked)then with new board it only worked if the delay was set to 2! at least it worked!!...thankyou
@robojax
@robojax 5 жыл бұрын
You are welcome.
@enyzvers69
@enyzvers69 7 жыл бұрын
I have this one... do not know what arduino is, can I run it without "arduino"?
@robojax
@robojax 7 жыл бұрын
Arduino is a microcontroller (micro-controlelr) that can be programmed to do things. this motor needs different signal at different angle or time to rotate. Arduino makes the right signal so the motor rotates. If you can do the same type of signal using other means or controllers, it will work.
@clarkso65
@clarkso65 6 жыл бұрын
Thank you so much for the good video!!
@robojax
@robojax 6 жыл бұрын
You are very welcome.
@drewlawrence8488
@drewlawrence8488 6 жыл бұрын
How can you automatically reverse the motor when it stalls.? I want to reverse the motor for 3 seconds when the motor stalls. I love your videos because you answer most questions during the video.
@robojax
@robojax 6 жыл бұрын
You are welcome. I am glad you found them useful. To change the direction of stepper motor this code you can use dir = true; or use dir = false; so use it after the Case X; where x is 1, 2 , 3 o4. but I have write separate code to accommodate this specific feature.
@drewlawrence8488
@drewlawrence8488 6 жыл бұрын
I need a way to get the motor to reverse only when the motor binds up. If some causes the motor to stop because it locks up I want it to reverse the direction for 3 seconds to release the bind then continue. Can we read the difference in load or voltage sensing an increased load
@robojax
@robojax 6 жыл бұрын
It needs a little work but doable. If I want to do it, I have to create the whole project. I am very busy with creating contents. I would suggest posting your question at Arduino official forum: forum.arduino.cc/You can read the voltage difference but it wont' be reliable as there would be unknown factors that changes the values.
@bellandma007
@bellandma007 6 жыл бұрын
#include const int trigPin = 12; const int echoPin = 13; long duration; int distance; int i; int c; const int stepsPerRevolution = 200 ; Stepper myStepper(stepsPerRevolution, 8, 9, 10, 11); void setup() { pinMode(trigPin, OUTPUT); pinMode(echoPin, INPUT); const int stepsPerRevolution = 200; myStepper.setSpeed(60); Serial.begin(9600); } void loop() { int sensorValue = analogRead(A0); float voltage = sensorValue*(5.0/1023.0); Serial.print(voltage); Serial.print(" Volt :"); Ultrasonic(); c=0; if(voltage>=3 && voltage
@rasikaalwis7345
@rasikaalwis7345 5 жыл бұрын
Brilliant.Thank you so much.
@robojax
@robojax 5 жыл бұрын
You are welcome. Here is my video explaining how to control the speed of this motor : kzbin.info/www/bejne/oqOoiGuuobihq7s or to control like start, stop or change the direction with push buttons: kzbin.info/www/bejne/p16raHqYrr1ontE
@deepakkumarpainkra6071
@deepakkumarpainkra6071 7 жыл бұрын
Why don't you gave 5V (power) from auduino board?
@robojax
@robojax 7 жыл бұрын
Because arduino can't have enough power (Current) to run the motor. You have supply 5V from external source.
@deepakkumarpainkra6071
@deepakkumarpainkra6071 7 жыл бұрын
Thanks for replying, The doubt came because there are many tutorials that have used 5V from arduino board and are working. I am tryring to work with 28bYJ-48 12V motor, i checked the wiring they are correct . But i don't know motor is only vibrating, i don't have 12V adapter or battery, how i can solve this problem any suggestion, will it work from 9V battery?
@craigallen1418
@craigallen1418 5 жыл бұрын
@@deepakkumarpainkra6071 Try and change the speed of the rotation. If a stepper motor is made to spin too quickly it will vibrate instead of moving as you have experienced.
@TheTvRadioDude
@TheTvRadioDude 7 жыл бұрын
very helpful :) Thanks a lot!
@robojax
@robojax 7 жыл бұрын
You are welcome. 👍
@bullygram
@bullygram 6 жыл бұрын
very well done! thank you
@robojax
@robojax 6 жыл бұрын
you are welcome.
@CRAZYMr12
@CRAZYMr12 7 жыл бұрын
i follow this tutorial but my motor only vibrates and doenst move is axis. Is it broken?? Can anybody help?
@robojax
@robojax 7 жыл бұрын
1- you haven't connected external power sources. So you have week power 2- The order of wires are not right. check the connections.
@kirknelson156
@kirknelson156 7 жыл бұрын
if the states are switching too fast it won't do more than vibrate, need some delay.
@erjonamiftari616
@erjonamiftari616 7 жыл бұрын
There is an error in declaring the outputs in the code, fix it and it works. I had the same problem.
@CGGizmo
@CGGizmo 6 жыл бұрын
Thank you for your great effort Can you please explain to me the code for the same Stepper motor for 26 equal steps around 360 degrees and return to the same starting point? best regard Ali
@robojax
@robojax 6 жыл бұрын
did you watch the video? that is what I did. Explained the code and provided the code so you can use it. here is the code robojax.com/learn/arduino/?vid=robojax-0293
@yashgupta8633
@yashgupta8633 3 жыл бұрын
You said one goes to 10 and then 2, 3, 4 goes to 10, 11, 12. So are 1 and 2 both going to 10?
@robojax
@robojax 3 жыл бұрын
I can't explained it better than video. So watch it multiple times 3, 4, 5 or even 10 time. this what I would do to learn if I don't get it.
@KashifJavedForex
@KashifJavedForex 7 жыл бұрын
Why this motor vibrate when working?
@robojax
@robojax 7 жыл бұрын
The vibration is due to unstable mount of motor. if you try to rotate something with the motor, the motor should be mounted tightly. Or the motor is defective.
@KashifJavedForex
@KashifJavedForex 7 жыл бұрын
I am just trying to run this stepper motor without mounting anywhere but its keep vibrating and does not move.
@robojax
@robojax 7 жыл бұрын
Oh, the vibration is due to incorrect wiring or sequence that makes the motor rotate. Please check the wires to be connected to the wrong pins either on arduino or the motor driver board.
@KashifJavedForex
@KashifJavedForex 7 жыл бұрын
Yes the connections from motor into driver are not correct so I connect arduino according to that wrong sequence and now working fine.
@grandmetallic556
@grandmetallic556 4 жыл бұрын
why my motor is vibrating but not moving
@robojax
@robojax 4 жыл бұрын
either code is changed or wiring is incorrect.
@grandmetallic556
@grandmetallic556 4 жыл бұрын
@@robojax i follow every steps but its just vibrating
@manojghosh1615
@manojghosh1615 7 жыл бұрын
sir i want to make robotic hand ....control by flex sensor and stepper motor please me the arduino code...my stepper motor 1.8 degree ,bipolar
@robojax
@robojax 7 жыл бұрын
I don't have the hand to practice and see it. I have in mind to have project, but until then you gotta find a way to finish your project. Subscribe and watch my videos.
@MC-rj7mo
@MC-rj7mo 6 жыл бұрын
You shouldn't use a stepper motor for a robotic hand. Servo motors work better.
@stevenhill1878
@stevenhill1878 6 жыл бұрын
u never explained the wires from the drive to the UNO board.
@robojax
@robojax 6 жыл бұрын
I have explained them at 4:17 (click on 4:17)
@anusuyaakuttykrishnan1199
@anusuyaakuttykrishnan1199 6 жыл бұрын
HI sir....how to add water sensor???send me the coding and way to fix sirrrrrr.....pplllllsssss sir
@robojax
@robojax 6 жыл бұрын
Hi, I will try to make a video for water sensor in the coming weeks.
@anusuyaakuttykrishnan1199
@anusuyaakuttykrishnan1199 6 жыл бұрын
Robojax sir.......I want it before Wednesday sir......thats my project's last day.....pls help me sirrrrr......when water sensor detect the clothes must move inside....after the water sensor dry the clothes must come ou again....plsss sir........reply me as fast as possible
@sharatraj9663
@sharatraj9663 7 жыл бұрын
pls help my motor is vibrating but not moving
@robojax
@robojax 7 жыл бұрын
you have connected either the wires incorrectly to the motor or to the wrong port on Arduino. If the order of wires are not correct, it will not move or simply make noise.
@saleemnaseer1279
@saleemnaseer1279 6 жыл бұрын
Sir where code is available of that vedio...?
@robojax
@robojax 6 жыл бұрын
You can get the code from bit.ly/28byj48 and it is available under the video in the description section.
@tonyperry6702
@tonyperry6702 4 жыл бұрын
good job
@robojax
@robojax 4 жыл бұрын
Thank you for not skipping the ads and keep watching them. This will help me a lot.
@vjaceslavsverdins5174
@vjaceslavsverdins5174 7 жыл бұрын
Thanks for this video. Is it possible to make this stepper to work faster?
@robojax
@robojax 7 жыл бұрын
I have not tested it but it should work. Current code is dalay(1) for 1ms ( milisecond). So change it to delayMicroseconds(100); this is now μS or microsecond which is 1000 times smaller than ms. So 100μs is 10 times faster than ms. So divide 1000/xμs and you will get the speed factor. for example if the 1000/200=5, so it will be 5 times faster. You should not that dalayMicroseconds(x) will accept only integer like 10, 200, 1 but not 150.56. test it and let me know by replying to this comment.
@vjaceslavsverdins5174
@vjaceslavsverdins5174 7 жыл бұрын
Maximum for this type is 750, will do a "gearbox" to speed it up.
@lostrocket9126
@lostrocket9126 5 жыл бұрын
thank you robojax!!!!!!
@robojax
@robojax 5 жыл бұрын
you are welcome.
@wilinton0
@wilinton0 7 жыл бұрын
que buen tutorial gracias
@robojax
@robojax 7 жыл бұрын
de nada. Me alegro de que lo haya encontrado útil.👍
@amitbu
@amitbu 6 жыл бұрын
If anyone is interested, I've written a library that controls this motor elegantly: github.com/AmitBu/stepper-motor-control
@brayanlopez8131
@brayanlopez8131 7 жыл бұрын
why you set up have 2 times the sentences whit pin1? pinMode(pin1,OUTPUT); pinMode(pin1,OUTPUT); pinMode(pin2,OUTPUT); pinMode(pin3,OUTPUT);
@robojax
@robojax 7 жыл бұрын
it should be. Thanks for tell me. but I have to check, how come the program was working with those wrong values. pinMode(Pin1, OUTPUT); pinMode(Pin2, OUTPUT); pinMode(Pin3, OUTPUT); pinMode(Pin4, OUTPUT);
@wdujsub7902
@wdujsub7902 6 жыл бұрын
it is working just fine, because these pins are set as outputs by default
@jacobabraham9944
@jacobabraham9944 6 жыл бұрын
​@@wdujsub7902 were is pin4
@alaafantazia7718
@alaafantazia7718 5 жыл бұрын
thank you very much
@robojax
@robojax 5 жыл бұрын
You are welcome.
@xuanhoadao1992nd
@xuanhoadao1992nd 6 жыл бұрын
Very good, thank sir
@robojax
@robojax 6 жыл бұрын
Thank you.
@halamkajohn
@halamkajohn 3 жыл бұрын
forward lllh llhh llhl lhhl reverse lhll hhll hlll hllh : inverter chip with diode protection. bill rockstroh (ww2) at radiac abrasives i think would just put this at logic chips. i did a few boards with logic chips. first guess- selector chip with 0v 5v. 4 bit . now if the stepper motor starts to skip. a spring may havesettled that question somewhere.
@arduinohobby
@arduinohobby 5 жыл бұрын
Подключение шагового двигателя 28BYJ-48 с драйвером на микросхеме ULN2003 к Arduino Uno kzbin.info/www/bejne/bpOQapeooqeDirs
@robojax
@robojax 5 жыл бұрын
Я не уверен, знаете ли вы или нет, но когда вы публикуете ссылку, она чаще всего рассматривается KZbin как спам и оставляет ее для просмотра и одобрения. Ахмад из Канады
@sultan7679
@sultan7679 5 жыл бұрын
Thanks
@robojax
@robojax 5 жыл бұрын
You are welcome.
Big Stepper Motors with Arduino
29:43
DroneBot Workshop
Рет қаралды 1,2 МЛН
Enceinte et en Bazard: Les Chroniques du Nettoyage ! 🚽✨
00:21
Two More French
Рет қаралды 42 МЛН
Control Stepper Motor Speed & Direction with Arduino and a Potentiometer
13:18
Basic Setup of GRBL CNC Shield + 28BYJ-48 Stepper motor + A4988
8:19
Mr Innovative
Рет қаралды 418 М.
Water your yard FOR FREE !!!
17:01
SuburbanBiology
Рет қаралды 728 М.
Turn your Pico into a 400MHz 24 Channel Logic Analyser
25:26
Happy Little Diodes
Рет қаралды 55 М.
Arduino Basics   Intro to Stepper Motors
9:00
learnelectronics
Рет қаралды 110 М.
Enceinte et en Bazard: Les Chroniques du Nettoyage ! 🚽✨
00:21
Two More French
Рет қаралды 42 МЛН