Multiple Servo Control with Arduino Uno R3

Поділитися
Вставка

КОМЕНТАРІ • 278

  • @3flyingkitty3
    @3flyingkitty3 5 років тому +8

    Thank you Mert, I was able to realize I had a few fried microservos in the bunch.

  • @cwrigh13
    @cwrigh13 7 років тому +4

    best Arduino servo video on UA-cam

  • @TehnoVito
    @TehnoVito 5 місяців тому +2

    This video helped my a lot in my robotic learninng proces. Good job!

  • @nihalkeetha
    @nihalkeetha 8 років тому +6

    I always wanted to know how do we control multiple servos with arduino now u did that

  • @recepselimagrman829
    @recepselimagrman829 2 роки тому +33

    I can't believe such important point is missed there, those servos (SG90s) are rated at 4.8V-6.0V absolute ratings. 9V is way pushing it. This might (probably will) fry the motors!

    • @akihasc7047
      @akihasc7047 2 роки тому

      no..at least 8.3 V needed to run this project..

    • @recepselimagrman829
      @recepselimagrman829 2 роки тому

      @@akihasc7047 Not really.

    • @isagumus1
      @isagumus1 2 роки тому +1

      Would be true if only a constant voltage DC power source was used but in this case, there’s only a simple 9V battery. Mind the voltage drops after running 4 of the servos. So it’s totally fine.

    • @atharvsalunke5390
      @atharvsalunke5390 Рік тому

      No brother

    • @galagatron5319
      @galagatron5319 Рік тому +1

      Im confused too because I read the same data on these servos. THinking these would be fried. Could I also have a theory that since there are 4 servos that sharing 9 volts would give each servo about 2 and 1/4 volts. Damn this connudrum.

  • @leandro3710
    @leandro3710 6 років тому +5

    thanks for the video, and thanks to the mute option too

  • @govorilegko
    @govorilegko 8 років тому +7

    I love your videos so much
    (those comments and descriptions to the code)
    thank you

  • @CobraEditx404
    @CobraEditx404 Рік тому +2

    as i can see all the motors are moving in a same direction but I want the each motor to rotate different directions is possible

  • @Racerr258
    @Racerr258 6 місяців тому +1

    Are you able to make each servo move independently of each other with this method? Or will they always be in sync

  • @Foxionos
    @Foxionos 7 років тому +20

    could you tell me how i could make these run on different speeds (delays)

    • @mohamedahmed534
      @mohamedahmed534 4 роки тому

      @Jörgen #2 where?

    • @aiversity5975
      @aiversity5975 4 роки тому

      Change the delay of the code in different servos

    • @flybobbie1449
      @flybobbie1449 4 роки тому +1

      delay(100) roughly delay(25000) is 20 seconds, just working on this now.
      I read wrong you want different speeds. Delay is before next step. Try;
      void loop() {
      myservo1.write(pos);
      delay(2500); // delay before activate servo 25000 is about 20 sec
      for (pos = 0; pos

    • @blevlabs
      @blevlabs 3 роки тому

      Program the Arduino using the servo library

    • @matharjun
      @matharjun 3 роки тому

      Using for loops

  • @cordellbrooks6365
    @cordellbrooks6365 7 років тому +9

    Can I use any signal inputs?????

  • @saadaljurais8083
    @saadaljurais8083 7 років тому +6

    Thank you so much. I have 3 important questions
    1) Is this connection series or parallel?
    2) If i have 5 servo motors (MG996R) and I want to use (Battery) what is the value of voltage and current that i need to apply so it works very well and there will be no damage ?
    3) Do i have to care more about the current or voltage, so they can run ?

    • @mohamedelbachirbelalmi3751
      @mohamedelbachirbelalmi3751 7 років тому +1

      from the video the connection are in parallel .....we have the same problem bro i hop he lestting to us

    • @larttv518
      @larttv518 7 років тому +1

      we have the same problem :(

    • @just2jimify
      @just2jimify 7 років тому +1

      If you put the motors in a parallel circuit then they will all recieve the same voltage which is a good thing! You want the voltage to be fixed at the voltage required by the servo (the allowable range will be quoted by the servo supplier. probably somewhere between 3.7 and 5v) You then want a battery that supplies enough mAH to keep your servos running for as long as you require.

    • @dragosbalmau
      @dragosbalmau 6 років тому +1

      Did you found a solution ?

  • @mariobaracus2619
    @mariobaracus2619 3 роки тому

    You helped me alot understanding how to do this without friying any servo, im using expensive ones so it would be bad to frie them

  • @sultansrv
    @sultansrv 8 років тому

    exactly what i was looking for !! im using 3 of the same servo motor and 1 a bit larger with metal casing. im gonna try this now. thanks.

  • @Cavi587
    @Cavi587 2 роки тому +2

    Isn't 9V a bit too much for these micro servos?

  • @unglaubichuberlieber8048
    @unglaubichuberlieber8048 5 років тому +3

    good tutorial, thanks !!! one question, if these servos were attached via a shield like l298n/vnh2sp30
    what needs to be changed ???
    thanks for you attention

  • @muhammadyezabaihaqi2215
    @muhammadyezabaihaqi2215 3 роки тому +2

    why do you use 9v? As I know mini servo maximum voltage is 5v

  • @fawzibryankairouani9539
    @fawzibryankairouani9539 7 років тому +15

    How can you make them run all at the same time, but each one at a different frequency and a different duty cycle?
    For example, the first one would do 0 to 45deg back and forth while the second one is doing 0 to 90deg and the third one 0 to 180deg back and forth.

    • @stephenkamin1345
      @stephenkamin1345 5 років тому

      I his is very difficult to do as the servos are noisy. I was only able to run two from one arduino... any more and the added one ran erratically.

    • @Robonza
      @Robonza 5 років тому +1

      I did a video on fully independent control.

    • @vishnupriyatummala801
      @vishnupriyatummala801 4 роки тому

      @@stephenkamin1345 yeah same problem I was able to run only 2 servos from one arduino...

  • @amiengineer
    @amiengineer 5 місяців тому +1

    Can we power 5 servo motor(MG995) using external power supply and control it with arduino

    • @gusthekidaz9808
      @gusthekidaz9808 5 місяців тому

      Yes just got to make sure all the voltages are correct

  • @boombastic1324
    @boombastic1324 3 роки тому +1

    If i use 5 tower Pro mg 996r servos is it going to work

  • @Kipyminyman
    @Kipyminyman 7 років тому +1

    Oh my goodness, you are a life saver, thank you!

  • @amritlalsingh7780
    @amritlalsingh7780 8 років тому +1

    if you keep uploading videos like this .one day you will be the greatest arduino channel

  • @AliRaza-ku9io
    @AliRaza-ku9io 7 років тому

    my first video to learn about arduino coding for servo motors :) great work man.. liked and subscribed.. ☺

    • @AliRaza-ku9io
      @AliRaza-ku9io 7 років тому

      +Mert Arduino and Tech always welcm :)

  • @fatmahanc2211
    @fatmahanc2211 5 років тому

    Very instructive and clean code.

  • @nanaagyarko6516
    @nanaagyarko6516 7 років тому +5

    How do we programme the servo to work one after the other but not at the same time

    • @spencerdebenedetti5204
      @spencerdebenedetti5204 5 років тому

      delay(100);

    • @sadhankumar7908
      @sadhankumar7908 5 років тому

      @@spencerdebenedetti5204 what to do with the delay(100)?

    • @spencerdebenedetti5204
      @spencerdebenedetti5204 5 років тому

      @@sadhankumar7908 if you write delay(300); or any other number after a line of code it will delay before the next line.... So for example with LEDs ( i dont know servo code by heart) it would be digitalWrite(LED1 HIGH); delay(300); digitalWrite(LED1 LOW); this puts a delay in between the commands. I hope this helps

  • @AmbieWolfie
    @AmbieWolfie 7 років тому +3

    Great video! Please excuse my ignorance of the subject, but how does the 1 signal wire enable the servo motor to travel in both a clockwise and anticlockwise direction? I always thought reversing the direction of the motor required switching the polarity of the positive and negative terminals -- though this is for general motors, rather than servos.... gaps in my knowledge, ah!
    Any advice is very much appreciated, thank you :)

    • @matthewwells1826
      @matthewwells1826 3 роки тому +1

      the servo is controlled by PWM ( DC current but in pulses, the width or "time on" of the pulse determines the servo position),

  • @Brianle180
    @Brianle180 7 років тому +3

    Great work. that is useful for my project.
    But as I know SG 9g servos just use 4.8v~5v for the power supply.
    In your video the servos use 9v power . Is that ok?
    Sorry for my english.

    • @Brianle180
      @Brianle180 7 років тому +2

      Thank you for answer me. a few day ago I tried to put 7.4v (2s lipos) for 8 servos. And my problem was gone. before that my spider robo when it use 5v DC port from arduino , it couldn't walk just like it was very easy to collapse, i think because the port of arduino doesn't give enough current for 8 servos. Am i right? Or there are something else?

    • @Brianle180
      @Brianle180 7 років тому +3

      Oh you just give something very value. Thank you a lot.
      But why we need to disconnect the servo motor when we connecting the arduino to computer.
      Can you tell me clear ?

    • @hasankeskin977
      @hasankeskin977 4 роки тому

      Hello can i work servo motors with 9 V battery?

  • @MakerDan55
    @MakerDan55 7 років тому +5

    You haven't shown how the Arduino gets power. Can you explain that?
    thanks,

    • @linuxphone9063
      @linuxphone9063 5 років тому

      exactly he shows how to power the servo but not the arduino

    • @minecraftvideos3435
      @minecraftvideos3435 5 років тому +1

      The 9volt battery has powered the servo and with the uno if u connect the cable with it to a computer it will just come on u do not need a battery source for the uno

    • @DIYTechGuyShow
      @DIYTechGuyShow 4 роки тому

      You need to run a wire from the Positive Rail to the VCC input on the Arduino. The Negative Rail should also be connected to the GND Pin of the Arduino.

  • @drcarrosdepapel
    @drcarrosdepapel 2 роки тому

    Nice video, u help me much... thx :)

  • @mkatdank5222
    @mkatdank5222 5 років тому +1

    Great video, thanks! How does the Arduino connect to power?

    • @Ferea
      @Ferea 5 років тому

      Through the cable connected to the computer. Or get a battery and connect it with the arduino vcc and ground

  • @XxGameBusterxX
    @XxGameBusterxX 5 років тому +2

    I really enjoyed this video alot it was simple and I'm super glad you commented oh what the program does I'm a novice when it comes to this so it was great and easy to follow thanks alot

  • @alvaro.sacris1930
    @alvaro.sacris1930 4 роки тому

    a 1.5V will do for this?

  • @josdodemont9570
    @josdodemont9570 7 років тому

    Thanks for your videos tutorials but is it possible to connect 5 or 6 servo,s ?
    Thanks !!!

  • @anilkanojia3361
    @anilkanojia3361 4 роки тому

    I am also trying something new..
    So please answer that how many servo motrs can be controlled using different digital io pins at a single arduino board...

  • @rendyyt2268
    @rendyyt2268 4 роки тому +1

    What the voltage of the extrenal battery?

    • @rendyyt2268
      @rendyyt2268 4 роки тому

      Did the servo is not broken? The datasheet of the servos are maximum voltage of SG90 is 5 volt right?

    • @jilljessurun2897
      @jilljessurun2897 4 роки тому

      @@rendyyt2268 ikr i dont understand that either

  • @HOBBY-MASTER
    @HOBBY-MASTER 3 роки тому +1

    Awesome video !
    Can you please tell how to control multiple servo motors with switch without using arduino

  • @Mintsel
    @Mintsel 7 років тому +1

    Can you do that in the same way with the arduino pro mini?

  • @dipentandel10
    @dipentandel10 6 років тому +2

    Please give me a answer....
    What a Arduino pin 1,2,4,7,8,12,13 connect with servo motor ?????

  • @minecraftvideos3435
    @minecraftvideos3435 5 років тому +1

    Thank u so much this video has helped me alot

  • @computertime4336
    @computertime4336 Рік тому

    This was a very good video i learned a lot 👍

  • @plavali_znaem
    @plavali_znaem Рік тому

    is it ok to use 9V battery? Won't I burn the servos?

  • @Marcus-pv9le
    @Marcus-pv9le 5 років тому

    I heard if you can hook up a mic panel connect to arduino and control panel you can operate multiple servos with voice command is that possible

  • @ethanc3552
    @ethanc3552 3 роки тому

    Is there anyway to control all of them with a single push button/ switch???

  • @BJamesThompson
    @BJamesThompson 4 роки тому

    THANK YOU!!! This is exactly what I was looking for :)

  • @monke1987
    @monke1987 6 років тому +1

    Do you need to have your uno plugged into the computer to control the servos or can it run just on the battery?

  • @jeremyrivera9085
    @jeremyrivera9085 3 роки тому

    How would you add a button to this set up and how would you write the code for it? Thanks!did this set up, my only problem I ran into was my power supply wasn’t strong enough, so I’ll get one or two servos working, just waiting on a new power supply thanks for any info!

  • @hasankeskin977
    @hasankeskin977 4 роки тому +1

    Hello i have a question.
    Is this servo motors doesn not work in 5-7V, i can use it with 9V batarry ?

    • @gerbendbr6437
      @gerbendbr6437 4 роки тому

      I was thinking the same, i think they'll start smoking after using it for a longer period

    • @DIYTechGuyShow
      @DIYTechGuyShow 4 роки тому

      No, you should not power this servo using 9 volts. You should reduce the power going to the servos to below 6V using a buck converter or some other type of power regulator.

  • @leibricke
    @leibricke 2 роки тому +1

    Running 6v servos on 9volt battery is pretty destructive

  • @rabinlamichhane2657
    @rabinlamichhane2657 8 років тому

    Can i use a 6 v battery instead ? Will it work fine or not ?

  • @schoolexamhelp1440
    @schoolexamhelp1440 4 роки тому

    Can we also connect 10 motor in this circuit

  • @ChadManCreations
    @ChadManCreations 8 років тому

    How long will the 9v battery last running 4 servos

  • @wojciechchojnacki7757
    @wojciechchojnacki7757 3 роки тому +1

    Good video, but what gets me is this: On your code delay of 100ms seems to be controlling servo's angular offset speed (time interval between each angular step?). So therefor 15ms between each angular offset step results with faster operation of the servo. When I'm using the same code, delay acts on a time interval between each full 180 degree sweep. So with a 100 ms my servos are shaking (as they cannot reach full 180 travel in that time) and I need something like 2000 for them to perform full sweep. I have used a breadboard first, than an expansion shield with Tower pro Sg90 servos, both operate more or less the same. Do you have any idea why is it acting different?

  • @nilimakulkarni4541
    @nilimakulkarni4541 Рік тому

    can i use uno or nano instead of R3 for the same?

  • @kartechindustries3069
    @kartechindustries3069 4 роки тому

    How u are using 5v servo with 9v supply

  • @jacopotech
    @jacopotech Рік тому

    hi, i'm new with arduino, i have a question: can i also attach the 9v battery directly to the arduino board and not to the breadboard or i need to attach one battery to the arduino board and one to the breadboard? and also, i can rotate it only at 180° or it can rotate at 360°?

  • @elijahbyrd3370
    @elijahbyrd3370 4 роки тому

    What could I do to control all 10 of my servos?? How many pins would I use?

  • @dkumarin
    @dkumarin 7 років тому +1

    Thank you for sharing the video. It is a good idea that you could avoid the motor shield. Please respond.

  • @Nai-cq5yq
    @Nai-cq5yq 2 роки тому

    Let say I want command 4 servo at the same time and same position like in the video, can't I connect it parallel in one pwm pin? Im looking for an answer for this.

  • @SABARIAHBINTIYAACOB-nu8xg
    @SABARIAHBINTIYAACOB-nu8xg Рік тому +1

    Kindly share the codes please.

  • @alejandrosiabato4229
    @alejandrosiabato4229 3 роки тому

    Bro, es posible dentro de un ciclo for, meter un(if) o sea un condicional para lograr mover dos servomotores al mismo tiempo, y que giren en el mismo sentido los dos?

  • @juanbriones1760
    @juanbriones1760 8 років тому +2

    Mert Thanks for your videos tutorials. .can you please do ir remote control car with old fashion motor shield no who you solder the pins up like the video number 2

  • @alainav1
    @alainav1 5 років тому

    the 4 motors can be cable on a single pin

  • @plavali_znaem
    @plavali_znaem Рік тому

    May I ask stupid question: so there’s a voltage supply both from computer and from the 9V battery ? Or is it so that he uploaded the code, and after that disconnected the arduino Uni from the computer, and only battery used as the source of energy?

  • @KyawZawHlyan
    @KyawZawHlyan 5 років тому

    nice and simple to understand

  • @jeremy11allen
    @jeremy11allen 5 років тому

    Would using an external power source like this work for powering a larger 20kg servo that has a 6v power requirement?

  • @MamunKarimtoyforusrc
    @MamunKarimtoyforusrc 7 років тому +1

    im facing problem with 2 pen tilt servo... using valu flysky th9x reciver with arduino ... 1 servo is working but when i use two serov ..thats the problem start...can u plz helm me

  • @sumitpanwar5408
    @sumitpanwar5408 7 років тому

    can i connect more servos to this please make a video adding more servos to this project

  • @tayyaraga3666
    @tayyaraga3666 5 років тому +1

    Birbirinden bağımsız (servo 1 60 derece, servo 2 90 derece, servo 3 180, servo 4 110 derece) döndürmek mümkün mü?

  • @opgamer-abhi9476
    @opgamer-abhi9476 6 років тому

    Which software u use to burn coding

  • @jogithajohn5689
    @jogithajohn5689 5 років тому

    how do you control one servo after another? what change should be made

  • @xxBSWgamesxx
    @xxBSWgamesxx 5 років тому +2

    If you wanted to start the servos off at different positions could you just do
    int servo1Pos= 0;
    int servo2Pos= 90;
    int servo3Pos = 120;
    or would you have to do something else? also is there a way to make it so it would stop once it gets to a certain degree then press a button to return to the starting position? what we would i need?

  • @bid0u12345
    @bid0u12345 9 місяців тому

    You're using two different power sources: One for the Arduino, one for the servos. How to power everything from the same source?

    • @gusthekidaz9808
      @gusthekidaz9808 5 місяців тому

      The servos and the Arduino board have different power requirements, different voltages. Your same singular power source would have to cater to each components required voltage

  • @frankschulz3849
    @frankschulz3849 2 роки тому

    Hello, yes, I was looking for that too. But I have a problem. Since 2 of my servos are mounted in a twisted position, servo 1 and servo 3 should always run backwards. That is, in the first pass of the movement. So servo 1 and servo 3 from 0 to 180 degrees and at the same time servo 2 and servo 4 from 180 to 0 degrees.Can this also be realised in the Sketch?

  • @Tea-Spin
    @Tea-Spin 7 років тому +1

    Isn't that 9V battery? Is that OK if the servos are powered by 9V Battery?

    • @MrBird94
      @MrBird94 6 років тому +1

      No it's not it will destroy them pretty quickly. These cheap 5gr servo's every seems to like can only handle 6.8Volts at the highest. I tested 8 of them running on 1 9v battery and 3 of them stopped working after 15 minutes of use (Not doing to stressfull jobs) I woul recommend not using any more then 5volts max as any higher will likely destroy them after a while.

    • @ehsiehs368
      @ehsiehs368 5 років тому

      @@MrBird94 which power supply can I use instead of the battery?

  • @kkcsynzx6250
    @kkcsynzx6250 2 роки тому

    How to move each one in different speeds

  • @mradulbhardwaj4134
    @mradulbhardwaj4134 3 роки тому +1

    Serpos

  • @shipcake12
    @shipcake12 7 років тому

    I love This Chanel

  • @ClashBishops
    @ClashBishops 7 років тому

    Great video I will be trying to make a project with arduino ..
    Will try using more then one servo... and diffrent angel!... Do you have some video about it!? I will use 2 servo trying to do some cool with it

  • @kurifukun7633
    @kurifukun7633 3 роки тому

    How come you don't use a capacitor and the servos are working fine??

  • @gijsdollenkamp8471
    @gijsdollenkamp8471 3 роки тому

    what if you want 2 servos to do 2 different things at the same time?

  • @PartyPilotier
    @PartyPilotier 8 років тому

    what is the title of the music in this video? its very relaxing.

  • @mattm9174
    @mattm9174 7 років тому +1

    Hi! Nice video :) I bought two Lipo to power 8 continous rotation servo 9G. Is it possible to power all the servo directly on the cells or do i need a power regulator? Thanks you in advance :)

    • @mattm9174
      @mattm9174 7 років тому

      Thank you for your answer. I didnt find any power regulator which can deliver enough power to power the 8 servo. Is It possible with the same battery to use several power regulator in derivation ?

  • @thenews25
    @thenews25 3 роки тому

    Best informative video...... Thanks

  • @petermaker76
    @petermaker76 8 років тому +2

    thank you for upload this

  • @NickB2513
    @NickB2513 2 роки тому

    Hello, I'd like to be able to make servo 1 move 180degrees then after 5 seconds make servo 1 move 180 degrees. And so on for all 4 servos. I've tried to do this using the delay but all the servos are moving at the same time. Can you help? Thank you

  • @lifewithgunner2666
    @lifewithgunner2666 4 роки тому +1

    wheres a code

  • @iflystuff8955
    @iflystuff8955 2 роки тому

    I typed out everything you did but for 2 and it’s not working. They only move like a mm? What am I doing wrong

  • @nihalkeetha
    @nihalkeetha 8 років тому +1

    I have a suggestion for another video for u where can I say that can u say me

  • @magical_spirit_wolf
    @magical_spirit_wolf 5 років тому

    How do you make the connections permanent and not use the bread board?

  • @ehsiehs368
    @ehsiehs368 5 років тому

    *which power supply can I use instead of the battery?*

    • @SanjayRamaswamyWolvie
      @SanjayRamaswamyWolvie 4 роки тому

      2 servos can run with arduino uno on Laptop Usb output voltage. Use 5v and Vcc and Gnd pins

  • @rendyyt2268
    @rendyyt2268 5 років тому

    Did the laptop source (5v) can control mutiple servos?

    • @SanjayRamaswamyWolvie
      @SanjayRamaswamyWolvie 4 роки тому

      I tried 2 servos with laptop output on Arduino Uno and they worked fine with the 5v pin and Gnd pin. I connected both the Servos to the breadboard and connected the 5v and gnd pins to the breadboard. But they didnt work with Arduino Pro Mini. Only One Worked. The other one is Struggling but couldn't even move a centimeter

  • @johncaballero4333
    @johncaballero4333 3 роки тому

    Hello sir, I my servo doesn't react to servo.write(angle). it only react to for loop code. Why is that? I'm using same sg90 servo motor.

  • @JonathanLov
    @JonathanLov 8 років тому +2

    I have no idea on how to run both a servo motor and a DC motor, can anyone tell me, or show a video on how?

  • @Iliuzija666
    @Iliuzija666 3 роки тому

    When I connect one servo, it works but when I connect more than one, every servo starts rotating without paying attention to the for loop. Looks like I checked everything. I even took another UNO, nothing has changed. Why is that?

  • @vishnupriyatummala801
    @vishnupriyatummala801 4 роки тому

    I am able to run only 2 servos... The signal is coming from only 2 pins,even though I write code for 4 pins... pls help me out

  • @CTMRetakes
    @CTMRetakes 2 роки тому

    How make multiple delay

  • @ultralegendgamer5956
    @ultralegendgamer5956 2 роки тому

    I am a 11 yo boy I was confused that how
    To control without int now I am clear . It goes serial y. If am wrong pls reply.

  • @felixavshalom2015
    @felixavshalom2015 8 місяців тому

    Can you provide a diagram without breadboard? direct connection

  • @a_a_al_s
    @a_a_al_s 7 років тому

    ممكن نتحكم بيهن بواسطه جايرو سكوب ....؟