How to control multiple Servo motors using one potentiometer with Arduino

แชร์
ฝัง
  • เผยแพร่เมื่อ 24 พ.ค. 2024
  • Learn how to control multiple servo motors using one potentiometer with Arduino. Wiring shown, code is explained and at the end demonstrated. Code link is below the timing of chapters of video.
    if you want to use multiple servo and each with separate potentiometer then see this video • Lesson 92: Controlling...
    **** Free Course ***
    Arduino Step by Step Course (over 100 lectures) Starts here • Lesson 00 What is Ardu...
    The best thank you for me is to not to skip ads and Subscribe 🔔 to my channel, like 👍 the video It is greatly appreciated. 🔔 😊.
    I will reply to all Subscriber's 🔔 questions. So make sure to Subscribe.😊 .
    ** Buy Servo Motor from **
    Amazon USA: amzn.to/3m6Cmkr
    Amazon Canada: amzn.to/2JdM5GK
    All Europe Amazon: amzn.to/36YDSzn
    AliExpress (single servo): s.click.aliexpress.com/e/_ApIWoQ
    AliExpress (4/5/20pcs metal gear): s.click.aliexpress.com/e/_AFMrG
    Jump to different section of video by clicking on the time:
    00:00 Start
    00:47 Introduction
    02:50 Wiring 2 or more servo
    06:13 Arduino code explained
    11:30 Demonstration of controlling multiple servo using one potentiometer
    Download Arduino code for this video: robojax.com/L/?id=279
    Related videos: th-cam.com/users/robojaxTVsea...
    Tutorial by Ahmad Shamshiri form Canada
    ****************************
    Arduino Step by Step Course (over 100 lectures) Starts here • Lesson 00 What is Ardu...
    ****************************
    If you found this tutorial helpful, please support me so I can continue creating contents like this. Here is PayPal link paypal.me/robojaxTV
    Follow me on Facebook robojaxTV
    Follow me on Twitter: / robojaxtv
    Follow me on Instagram: / robojax
    Tutorial by Robojax.com
    Get other projects code and learn Arduino
    robojax.com/learn/arduino
    #robojax #robojax_servo
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 71

  • @desisingh4600
    @desisingh4600 2 ปีที่แล้ว +1

    I enjoyed watching the video. I also love that Robojax responds to all the folks on here asking questions or making comments, unlike many youtubers. That's just classy my friend! Very classy! Much respect to you! TH-cam needs more content makers like you! I subscribed for that one reason! Two thumbs up & 5 5tars! :)

  • @RoMecha_lb
    @RoMecha_lb 3 ปีที่แล้ว +2

    Great work dear👏👏, keep up the good work👍

    • @robojax
      @robojax  3 ปีที่แล้ว

      Thank you! Cheers!

  • @HSRMF
    @HSRMF 3 ปีที่แล้ว +1

    so nice of you ..
    very useful informations , i love your videos

    • @robojax
      @robojax  3 ปีที่แล้ว +1

      Thank you very much 😀

  • @tiagodomas7055
    @tiagodomas7055 3 ปีที่แล้ว +1

    very nice video thanks i will use it

    • @robojax
      @robojax  3 ปีที่แล้ว +1

      Most welcome

  • @electronic7979
    @electronic7979 3 ปีที่แล้ว +1

    Excellent video

    • @robojax
      @robojax  3 ปีที่แล้ว +1

      Thank you very much!

  • @shuttyskenzin9237
    @shuttyskenzin9237 ปีที่แล้ว

    Hello Sir, can you please tell me which video you teach how to make the servos turn opposite direction?

    • @robojax
      @robojax  ปีที่แล้ว

      Hi, my videos are for learning. you gotta learn and make it work. Here th-cam.com/video/p6MI8bFsYOY/w-d-xo.html learn how to the servo changes the direction. I have explained it very well. so watch is 1, 2, 3 or even 10 times untill you know how it works and then come to the multiple serveo and change the code .

  • @stanojiarnolsp.z.2394
    @stanojiarnolsp.z.2394 3 ปีที่แล้ว

    Good video

    • @robojax
      @robojax  3 ปีที่แล้ว

      Glad you enjoyed

  • @technophile01
    @technophile01 3 ปีที่แล้ว

    hi.d first indiscreet question: are you Moroccan? even if it does not have to do with your present video I would like to know if we can program an esp32cam with an arduino uno because I have an esp32 camera but I have no ftdi module. I saw your video on the cam. thank you .

    • @robojax
      @robojax  3 ปีที่แล้ว

      Hi, No. I am from خراسان الکبیر.
      perhaps you've not watched the ESP32 camera and skipped. that is exactly what I've shown. P.S always post the question under the relevant video so other people learn from comments. I have a screen where all comments from all videos are shown in one page. so I never any comment. Thanks

  • @parindave1814
    @parindave1814 3 ปีที่แล้ว

    Really a nice video to control servos...
    I have tried the same things with my servo but vibrates a lot....
    Even if potentiometer is not moved, servo rotates by 10 to 15 degree....
    This issue can be fixed in program?

    • @robojax
      @robojax  3 ปีที่แล้ว +1

      you can't have potentiometer not connected. the noise at A0 pin will appear as a voltage and causes the servo to move. so you must have potentiometer connected at all times.

  • @JoseRamos-su3ep
    @JoseRamos-su3ep 3 ปีที่แล้ว

    Hello MR. Shamshiri, thank you for all of your Arduino Videos, there very helpful!!! I have a request for a video. Using a Remote Control radio, (with a two position switch, like a Gear & Down switch) control a continuous rotation servo. When the switch is activated in one direction,(High) the servo turns for 15 sec in CW direction then stops. Then when switch is activated low, the servo rotates CCW for 15 sec then stops.

    • @robojax
      @robojax  3 ปีที่แล้ว

      Hello Rose. you are welcome. I have tones of videos and codes for controlling servos with push buttons. see them all here th-cam.com/users/robojaxTVsearch?query=servo

  • @desisingh4600
    @desisingh4600 2 ปีที่แล้ว

    Hi Mr. Shamshiri,
    I hope all is well. I followed all your instructions to the letter, and I have 2 servos working with an Arduino Mega and Potentiometer, but I'm having the same problem as parin dave, who commented 10 months ago saying his servos were basically going crazy. My potentiometer has stayed connected, except when I switched it out trying to figure out what's wrong. My Arduino has the correct code as per your instructions. I have tried three different potentiometers, two 10 K ohms, and a 100 K ohms without success, thinking the problem may be there. I can't figure out what else could be causing this behavior? Do you have any idea as to what's causing this erratic servo behavior? My goal is to control 6 servos with one potentiometer, or toggle switch/rocker switch, or reversible polarity button.

    • @desisingh4600
      @desisingh4600 2 ปีที่แล้ว

      I forgot to mention that I'm using 120 degrees servos. I don't know if the math would be different, but I changed the 180 numbers to 120. I didn't know if the 1023 number should also be changed, and if it should, I wouldn't be able to figure it out, as I'm terrible with math.

    • @robojax
      @robojax  2 ปีที่แล้ว

      hello,
      for Arduino Mega you should know the resolution for analog is different see this page www.arduino.cc/en/Reference.AnalogRead

  • @grck4208
    @grck4208 3 ปีที่แล้ว

    Hi, your videos are awesome!!!! Would you please a tutorial video on to interface arduino with virtual reality (Unity, etc...) using sensors?

    • @RoMecha_lb
      @RoMecha_lb 3 ปีที่แล้ว +1

      Hello gracia , probably i have the answer about your question, yes you can interface between arduino and unity, but before that you need to learn first how to interface between arduino and your sensor for example, after you complete this steps, then you should go to the next step about how to interface your arduino data to your unity software or any software you want , you can do it yes .
      in my opinion ,this is a way to make your project idea, but we will wait our best Robojax to give us it's way.

    • @robojax
      @robojax  3 ปีที่แล้ว +1

      Hi, thank you. Never knew it that is even possible.

    • @grck4208
      @grck4208 3 ปีที่แล้ว

      @@robojax You should definitely look forward to it. You should do it.

    • @grck4208
      @grck4208 3 ปีที่แล้ว

      @@RoMecha_lb Thanks Mechatronics!!!!

  • @gopiveall4907
    @gopiveall4907 3 ปีที่แล้ว

    Good video, sir it is possible to rotate two servos .one servo in clockwise direction and another servo in anticlockwise direction by using one potentiometer?

    • @robojax
      @robojax  3 ปีที่แล้ว

      Check my other video , yes

  • @krisval7792
    @krisval7792 2 ปีที่แล้ว

    hi! i would like to ask if it is possible to control 2 servo motors using 1 infrared sensor at the same time? thank you!

    • @robojax
      @robojax  2 ปีที่แล้ว

      Hi, learn from this video how the command controls two servo. Then I have video on how to control servo motor. Using the same command control them.

  • @mhsohan2769
    @mhsohan2769 3 ปีที่แล้ว

    how can i monitor the angle in LCD ? will the circuit be changed for it and what is the code if i add LCD in here?

    • @robojax
      @robojax  3 ปีที่แล้ว

      here th-cam.com/video/xrIiKqvm8hQ/w-d-xo.html but I read your comment after 7 hour. You should have searched and not waited. Just search "robojax servo LCD"

  • @shuttyskenzin9237
    @shuttyskenzin9237 ปีที่แล้ว

    Hello Sir, I have a question, what if i want the servos to move in opposite direction instead of one direction for example, when i turn the potentiometer right, then one servo will turn right and the other will turn left and vice versa. Thank you for your time.

    • @robojax
      @robojax  ปีที่แล้ว

      Instead of increment ++ the value decrement - - he value. Watch basic servo yo learn that . I have the video

    • @shuttyskenzin9237
      @shuttyskenzin9237 ปีที่แล้ว

      @@robojax oh thank you

  • @buyme1cnc
    @buyme1cnc 3 ปีที่แล้ว

    How can we runs the 2 or more servos continuesly from 0 to 180° (for example) and we an changed the speed of servos with the potensio also ? can you made it for us ? thanks
    (for example : Car windshield, continuesly runs, and we can changed the speed by buttons etc, But in this case, the motor of windshield are the servos, and the buttons are the potentio)

    • @robojax
      @robojax  3 ปีที่แล้ว

      Interesting. you can add delay and make the delay function of potentiometer. I would have to make video on that

  • @dani777dani
    @dani777dani 3 ปีที่แล้ว

    super

    • @robojax
      @robojax  3 ปีที่แล้ว

      thanks

  • @CyberSyntek
    @CyberSyntek 3 ปีที่แล้ว

    Subscribed! Great info from a fellow Canadian.
    I just watched a few videos and still need my morning coffee so excuse me if I missed already made videos with the info.
    I'm trying to find info on how I could control a servo motor over wifi via a potentiometer.
    Example: multiple servo motor connected to a PCA9685 which connects to a ESP32 which receives a signal from another ESP32 with a potentiometer attached. Seems like a combo of some of your videos but still am unclear on how to go about this kind of thing.
    I'm not sure if ESP32 has enough analog pins for multiple potentiometers though. Kind of looking at ATmega2560+ESP8266 dev boards at the moment but still trying to work out what is the best way to do this. But first thing is first, control one servo via wifi and potentiometer. :)
    Again i've never done wifi or bluetooth so I might be misunderstanding and need to use something like a nRF24L01. Early into the research stage. XD
    If you have any advice or ideas on how to do that, maybe videos of yours to watch, I would be greatful! Thanks! :)

    • @robojax
      @robojax  3 ปีที่แล้ว

      Thank you. I am glad you liked it.
      I am not sure why you use WiFi and potentionmeter. you can control it over WiFi which perhaps you have seen my video. if not just search PCA9685. but combining two MCU like ESP32 and Arduino MEGA becomes tricky and need some work.
      Of course could do it over other wireless methods. But have to do it either over WiFi/Wireless or Potentiometer. if you want control it using both wifi and pot. as I said you need good place and lots of extra components to make it possible so they do not interfere with one another. Good luck.

    • @CyberSyntek
      @CyberSyntek 3 ปีที่แล้ว

      @@robojax thanx for the reply. More or less I looking into a method for making a wireless handheld controller. Initially I was planning to do the wired version as I am mostly experimenting at home and that is simple enough, but I figured it is a good time to learn how to do the wireless methods.

    • @robojax
      @robojax  3 ปีที่แล้ว

      good luck with your project. check my esp32 and esp8266 videos. I have spent a lot of time making consents for those MCUs.

  • @benben9944
    @benben9944 ปีที่แล้ว +1

    Sorry for my English language.
    How to make servo1 turn clockwise and servo2 turn anti-clockwise with 1 Potentiometer.

    • @robojax
      @robojax  ปีที่แล้ว

      Your English is excellent. you can learn how ONE servo is controlled. then make multiple servo each with different direction. So watch this video and learn th-cam.com/video/ntRW77mNFFk/w-d-xo.html do not skip. I have explained the code fully.

  • @liomars8087
    @liomars8087 3 ปีที่แล้ว

    Super, j ai une question ou je pourrais trouver des codes pour contrôler des moteurs pas a pas avec des potentiometres ?
    Merci 😁😁😁

    • @robojax
      @robojax  3 ปีที่แล้ว +1

      Here are all stepper motor videos th-cam.com/users/robojaxTVsearch?query=stepper

  • @ashkananali8571
    @ashkananali8571 3 ปีที่แล้ว

    استاذ احمد كيف اضيف بوش بوتن عدد ٢ مع مقاومة متغيرة للتحكم بزاوية السيرفو

    • @robojax
      @robojax  3 ปีที่แล้ว

      شاهد جميع مقاطع الفيديو ذات الصلة المؤازرة هنا. لدي الكثير من th-cam.com/users/robojaxTVsearch ؟query=28BYJ-48

    • @ashkananali8571
      @ashkananali8571 3 ปีที่แล้ว

      @@robojax كل الشكر والتقدير لك

  • @Albert-gl5tk
    @Albert-gl5tk ปีที่แล้ว

    Hi, im trying to make 2 servos go opposite directions but when I upload the code it just gives me an erra message even though I copied your text from the website.

    • @robojax
      @robojax  ปีที่แล้ว

      Please provide the error message here to help you

  • @jaydipsinh_gohil_0.1
    @jaydipsinh_gohil_0.1 2 ปีที่แล้ว +1

    Hello brother
    How to move
    2 potentiometer
    4 servo
    Ex :- Servo1,servo2 = pot 1
    Servo3,servo4 = pot 2
    Please help me quickly 🙏🏻🙏🏻🙏🏻🙇🏻🙏🏻🙏🏻🙏🏻

  • @youssefalenzy7048
    @youssefalenzy7048 3 ปีที่แล้ว

    السلام ورحمة الله ..
    كيف الحال مهندس أحمد ..
    عندي مشروع لكن فيه 5 Servo motor وقت تشغيلها بوقت واحد يحدث فيه مشكلة يلعب يمين ويسار الموتورز ماهو الحل ..
    وشكرا لك ..

    • @robojax
      @robojax  3 ปีที่แล้ว

      وعلیکم السلام و رحمة الله
      الحمد لله انا جيد. كيف حالك؟ تحقق أولاً من كل محرك واحدًا تلو الآخر th-cam.com/video/kZ9b31gVemc/w-d-xo.html ثم لدي العديد من مقاطع الفيديو على المؤازرة ، تعرف على أيهما مناسب لك. th-cam.com/users/robojaxTVsearch?query=servo

  • @alsaba2221
    @alsaba2221 2 ปีที่แล้ว

    السلام عليكم كيفك احمد
    محتاج طريقه تحكم بمتور ١٢v
    لو سمحت كيف اتواصل معك ممكن نتواصل على الوتساب ونا جاهز ادفعلك التعابك

  • @masterkit9517
    @masterkit9517 3 ปีที่แล้ว +1

    STM32 please example, arduino old technology

    • @robojax
      @robojax  3 ปีที่แล้ว +1

      I haven't used STM32 yet.

    • @masterkit9517
      @masterkit9517 3 ปีที่แล้ว +1

      @@robojax you need to learn quickly! otherwise you are completely behind technology

  • @DarElhijra-gm1oj
    @DarElhijra-gm1oj ปีที่แล้ว

    It's possible to make it at home.

    • @robojax
      @robojax  ปีที่แล้ว

      Sorry I didn’t understand. If you mean to to build this project at home? See the video, if you have all the components yes you can do it at home.

  • @mohammednabeelahmed7925
    @mohammednabeelahmed7925 3 ปีที่แล้ว

    Which audrino is this

    • @robojax
      @robojax  3 ปีที่แล้ว +1

      does not matter. just power servo with 5V. The rest works with 3.3V or 5V arduno. I am using UNO

    • @mohammednabeelahmed7925
      @mohammednabeelahmed7925 3 ปีที่แล้ว

      @@robojax ty

  • @gopiveall4907
    @gopiveall4907 3 ปีที่แล้ว

    Because in this video both servos are rotate in same direction.

    • @robojax
      @robojax  3 ปีที่แล้ว

      HERE th-cam.com/video/_uz7YcOzvjU/w-d-xo.html

  • @tvbox8478
    @tvbox8478 3 ปีที่แล้ว

    👍👌✌

    • @robojax
      @robojax  3 ปีที่แล้ว

      👍👍

  • @maskystudio9193
    @maskystudio9193 ปีที่แล้ว

    How to control 2potentiometer to single servo (mix)

    • @robojax
      @robojax  ปีที่แล้ว

      If you want to hire me this project costs $50. Else start with my course and learn it. Not hard.