Arduino Tutorial: Servo Potentiometer Control - Beginner Project

แชร์
ฝัง
  • เผยแพร่เมื่อ 8 เม.ย. 2016
  • Arduino Tutorial: Servo Potentiometer Control - Beginner Project
    Arduino Starter Kit with Potentiometer: amzn.to/22kKvjw
    Code for Servo Potentiometer Control: www.dropbox.com/s/6zeu6nfbtxt...
    Hitec HS311 Servo: amzn.to/1S9zXnZ

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

  • @xyz.5512
    @xyz.5512 6 ชั่วโมงที่ผ่านมา

    this is very well explained. i needed breakdown for my project of "robotic arm using servo and POT" and this provided me everything i needed to know. thanks!

  • @threeelancer
    @threeelancer 4 ปีที่แล้ว +10

    I love how I am learning about the components but also how to be clever with a breadboard. Great vid. Please keep making more.

  • @wwabete2009
    @wwabete2009 3 ปีที่แล้ว +5

    I have just started Arduino and your tutorial was just exceptional!! Thank you and keep on doing the good job.

  • @MadGod-ju5gr
    @MadGod-ju5gr 6 ปีที่แล้ว +1

    The best totural i have ever seen this helped in my science project with an A+

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

    thank you for this tutorial. You do a great job and are easy to follow along with. hope to see more on the arduino.

  • @cheskaabarro4658
    @cheskaabarro4658 4 ปีที่แล้ว +2

    More tutorials please. I'm new to arduino and your video is really helping me. You are great in teaching! More tutorial pleaseeeee

  • @marcusfunchar7060
    @marcusfunchar7060 6 ปีที่แล้ว

    Please do more arduino videos they are so clear to understand even the code is easy to get. I just got my arduino starter kit today and I know nothings about arduinos but your videos helped me start playing with it. Thanks so much

  • @mirzahamidshahbaig
    @mirzahamidshahbaig 7 ปีที่แล้ว +3

    Nice explanation for an Arduino beginner like me. Thanks.

  • @corbintriano6148
    @corbintriano6148 8 ปีที่แล้ว +7

    Excellent video. I found it holding my interest while being able to easily follow along=)

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

      +Corbin Triano Thanks for the comment. Glad it was helpful. Please subscribe for more how-to videos.

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

    This was very clear. Thank you!

  • @henkdev1476
    @henkdev1476 5 ปีที่แล้ว

    This tutorial was amazing i subbed

  • @bridgetteh8372
    @bridgetteh8372 7 ปีที่แล้ว +2

    Thank you! I really hope you do more arduino tutorials! Yours are the easiest to follow!

    • @DroneHow
      @DroneHow  7 ปีที่แล้ว

      +Bridgette H Thank you very much.

  • @des2610
    @des2610 หลายเดือนก่อน

    Nice presentation! Exactly what I need to know. thanks.

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

    Thank you for this well explained tutorial!!!

  • @brutalblends928
    @brutalblends928 4 ปีที่แล้ว +2

    dude thanks, your a blessing ..

  • @MrYeshwanthln
    @MrYeshwanthln 7 ปีที่แล้ว +4

    Presentation is perfect ! very clear and to the point (Y)

    • @DroneHow
      @DroneHow  7 ปีที่แล้ว

      Thank you!

  • @rajoak3097
    @rajoak3097 7 ปีที่แล้ว +4

    Hey really nice video, initially it was not working so I changed the theta to zero and now it's working well!

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

      It's not working for me rn, can you explain?

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

    Excellent tutorial, thank you for taking the time to share with us, very much appreciated.

  • @ahmedhassan-vg6re
    @ahmedhassan-vg6re 7 ปีที่แล้ว

    Thank you for this beautiful explanation

  • @TrungTran-hw7ws
    @TrungTran-hw7ws 6 ปีที่แล้ว

    your sound feel so good to me

  • @TimRoot-dotcom
    @TimRoot-dotcom 7 ปีที่แล้ว +40

    excellent. you have a great teaching style. im hoping you make more arduino tutorials!

    • @DroneHow
      @DroneHow  7 ปีที่แล้ว +3

      +Tim Root Thanks, Tim. Stayed tuned for more such tutorials

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

      I should accept in that

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

      Drone How I don't know why my servo keeps shaking and acting weird. Can you please help me out

    • @oscarking454
      @oscarking454 7 ปีที่แล้ว

      EONGTX GAMER what is your delay set at ?

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

      Servo_Pot_Control:8: error: redefinition of 'void setup()'
      void setup()
      ^
      Blink:18: error: 'void setup()' previously defined here
      void setup() {
      ^
      C:\Users\Kevin\Desktop\arduino-nightly\examples\01.Basics\Blink\Servo_Pot_Control.ino: In function 'void loop()':
      Servo_Pot_Control:13: error: redefinition of 'void loop()'
      void loop()
      ^
      Blink:24: error: 'void loop()' previously defined here
      void loop() {
      ^
      exit status 1
      redefinition of 'void setup()'
      This report would have more information with
      "Show verbose output during compilation"
      option enabled in File -> Preferences.

  • @sarahal-shehri6494
    @sarahal-shehri6494 2 ปีที่แล้ว

    Such amazing tutorial !!! THANK YOU SO MUCH

  • @antobs3680
    @antobs3680 5 ปีที่แล้ว

    Great explanation. Thank you for making awesome videos

  • @FluorescentApe
    @FluorescentApe 7 ปีที่แล้ว +2

    Professional video! Thanks alot. Sadly i've broken my old servo, but it's nice to watch some tutorials for the future!

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

    Great tutorial.🔥🔥🔥

  • @diamony123
    @diamony123 4 ปีที่แล้ว

    great tutorial, any idea how you would use a pot to display 10 images on a tft display as you turn the pot to select back and forth the images.

  • @mohdfaridrozali3319
    @mohdfaridrozali3319 8 หลายเดือนก่อน

    Thanks for your guide😊

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

    You should make more arduino tutorials. They are very helpful.

  • @wouterscott8016
    @wouterscott8016 6 ปีที่แล้ว

    Thank you very much for the video. I would love to see some more. Are you going to continue making these tutorials?

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

    Awesome, it works. Please make more Arduino tutorials

    • @DroneHow
      @DroneHow  7 ปีที่แล้ว

      Will do!

  • @manolotrlolo
    @manolotrlolo 7 ปีที่แล้ว +3

    Is there a way to directly input data from a PC to an arduino? As an example, if I'd want to turn the servo by 45 degrees, could I simply type it in my PC and send it directly to the Arduino a.k.a the servo?

  • @AO-lq9dq
    @AO-lq9dq 3 ปีที่แล้ว +1

    great content thank you so much

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

    Really helpful

  • @vedansh29
    @vedansh29 5 ปีที่แล้ว

    Very well explained

  • @paulocastro9277
    @paulocastro9277 5 ปีที่แล้ว

    Hi!!!
    Please, can I include a position readout on a OLED display returning the information of the servo in degrees???
    Thanks so much and at last, thanks too for the great tutorial!!!
    Regards!!!

  • @pusska0
    @pusska0 4 หลายเดือนก่อน

    Hi, Awsome video. How would I Add another potentiometer to this circut? So I can control one servo from two potentiometers. I have managed to get one servo opperating with one pot but not two. thanks for any feedback provided.

  • @johnvincentarabejo1294
    @johnvincentarabejo1294 5 ปีที่แล้ว

    Thank you for the "any potentiometer you want" ^__^ other vid uses only 10k ohms

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

    what progrmaming changes are required to power two servos, with identical motion?

  • @ethanschwall6853
    @ethanschwall6853 7 ปีที่แล้ว

    I have a smaller breadboard with only 30 rows, could I put the potentiometer between row 25 and 30?

  • @who-is8cu
    @who-is8cu 3 ปีที่แล้ว +1

    Can I do this twice on the same board, but on different sides

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

    I just tried running this code with an external power supply made from AA batteries so that I could run more than one servo, but the servo keeps shaking back and forth randomly when I do so. Is there a different way you need to write the code to use 5V external rather than the 5V on the arduino?

  • @dipeshbhushan3929
    @dipeshbhushan3929 7 ปีที่แล้ว +4

    sir in my case my servo keeps on rotating
    please help me sir

  • @abuhanifazulkafli1683
    @abuhanifazulkafli1683 5 ปีที่แล้ว

    thanks. this help me alot.. but.. can this potentiometer control the motor from 0 to 360 degrees??

  • @elbertmoria9299
    @elbertmoria9299 5 ปีที่แล้ว

    Can I use a 360 continuos servo and continuos potentiometer?

  • @toxicbourtzis9091
    @toxicbourtzis9091 7 ปีที่แล้ว +5

    Can you please make a same tutorial but with a push button!!!

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

    Nice video.

  • @k4rz107
    @k4rz107 4 ปีที่แล้ว

    i wanna ask can i make the servo rotate more than 180 i mean like full rotation 360 degrees or no??

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

    All awesome

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

    It's great Drone How

  • @visionaryrobotics4065
    @visionaryrobotics4065 5 ปีที่แล้ว

    how many servos can i connect to my arduino until i need a different power supply?

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

    i have this problem where as soon as my servo reaches 180 it keeps going around in circles I need a fix..

  • @amishashethia4902
    @amishashethia4902 5 ปีที่แล้ว

    Please , please upload some more arduino uno tutorials and you are the best

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

    Can I use any potentiometer or are there certain ones that are compatible with an Arduino?

  • @tanveersohail1089
    @tanveersohail1089 4 ปีที่แล้ว

    I am searching for this table cover.... Can anyone help to by saying the name of the cover of table

  • @minhtructran6321
    @minhtructran6321 6 ปีที่แล้ว

    A weird ques is that =]]]
    The flat belwlow those stuffs, how can i get one the same.

  • @5xgreentv33
    @5xgreentv33 5 ปีที่แล้ว +4

    My servo has a mine of its own I can’t control it by the potentiometer it goes back and forward really fast plz help

  • @Rocky-cj2gz
    @Rocky-cj2gz ปีที่แล้ว

    can we do this with mirco servo?

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

    help i put in the same exact codes but it says redefinition of void setup

  • @krisvalencio
    @krisvalencio 6 ปีที่แล้ว

    How about controling 2 servo with 1 potentiometer?

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

    thanks

  • @newtonsingh2188
    @newtonsingh2188 7 ปีที่แล้ว

    can you please explain how to make this simple circuit wireless

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

    what about external power source?

  • @x-6790
    @x-6790 4 ปีที่แล้ว

    From where you purchased all components.?

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

    my servo just goes nuts

  • @jacktan9336
    @jacktan9336 4 ปีที่แล้ว

    can i ask are there any application of this in any real world scenario?

  • @dhruvmistry6623
    @dhruvmistry6623 4 ปีที่แล้ว

    what to do if i had 2 servo. can you show me circuit diagram ?

  • @user-xf3fx2wg3c
    @user-xf3fx2wg3c 5 ปีที่แล้ว

    big thumbs up 👍👍👍👍

  • @tahooraahmadi1417
    @tahooraahmadi1417 5 หลายเดือนก่อน

    can you write the code for this project and not using the servo library but instead use micros and millis

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

    I don't understand the link between your 180 value and the servo.
    The servo does not care about the angle, it is just looking for the pulse width from 1 to 2 mS. Right?

  • @syuesalim6933
    @syuesalim6933 4 ปีที่แล้ว

    wow it does work! BUT why when i use batery it work like SLOW

  • @leoniegadner9499
    @leoniegadner9499 4 ปีที่แล้ว

    What do i do if my servo has an analog signal?

  • @bendemanish1446
    @bendemanish1446 6 ปีที่แล้ว

    Please make video on or command I mean this think or that think by servo and potentio meter

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

    Theoretically could you have connected for instance 4 servos and 4 potentiometers?

    • @DroneHow
      @DroneHow  6 ปีที่แล้ว

      Yes, I don't see why not.

  • @nickdesert7304
    @nickdesert7304 5 ปีที่แล้ว

    Thanks

  • @rafaesteves9
    @rafaesteves9 4 ปีที่แล้ว

    My servo rotating to the left and dont move more...
    Please help me

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

    Please make a 2020 video this will be amazing

  • @RalphV
    @RalphV 7 ปีที่แล้ว

    My potentiometer is weird, I cant find it online. It came with the elegoo beginner kit, it has 3 pins but two in front one in back middle. Theres no serial number for me to look up, only "10k".

    • @DroneHow
      @DroneHow  7 ปีที่แล้ว

      +Ralphie Vigg It can be replaced with any 10k potentiometer

  • @joakimjocka8022
    @joakimjocka8022 5 ปีที่แล้ว

    it works

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

    I have seen all video

  • @gopigupta6648
    @gopigupta6648 5 ปีที่แล้ว

    Hello I tried with 10k potentiometer and it’s not working

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

    i have the SG90 servo and it works but not fully. it feels like it's spazzing out

    • @foxxy2583
      @foxxy2583 6 ปีที่แล้ว

      Brandon Holtz same

  • @yudiramos2805
    @yudiramos2805 4 ปีที่แล้ว

    hello, i have a question. If i wanted to add more servos to my code how could it be done? thanks

    • @vojtechslavik8262
      @vojtechslavik8262 9 หลายเดือนก่อน

      I did it, exactly u just have to define more servos and add another integers for potentiometr(if u want to use more of them)

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

    Thanks Senpai

  • @parasyadav7742
    @parasyadav7742 4 ปีที่แล้ว

    Bro plzz tell how to make connections for 4 servo

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

    Cool

  • @bessalf
    @bessalf 8 ปีที่แล้ว

    Hi, great tutorial.. thank you!! I wanted to do an electronic airplane trim for my simulator. I have purchased a trim wheel on ebay and I will connect it to the simulator/computer. My idea is that when I use the trim on the yoke, the servo control turns the trim wheels. Having that I have a few questions:
    1) Is it okay to turn the servo manually?
    2) Do you think this servo is strong enough to turn a airplane trim wheel?
    3) Using your program.. can it read the input from the pc rather than the potentiometer with an small adjustment?
    Thanks,

    • @DroneHow
      @DroneHow  8 ปีที่แล้ว

      +Filipe Bessa Now when you say simulator, what kind of simulator are you specifically referring to and what size aircraft are you looking into?

    • @bessalf
      @bessalf 8 ปีที่แล้ว

      +Drone How I'm bulding a simulator for a Piper Seneca V! I've bought two trim wheels on ebay! My idea is to control these two wheels electronically using the servos when I activate it through the yoke, but in some ocasions I would turn these wheels manually!
      The mechanic turn will be translated, visa reduction gears, to a rotary potentiometer, which I can then read on the simulator software!

    • @DroneHow
      @DroneHow  8 ปีที่แล้ว

      +Filipe Bessa I would first recommend doing a torque reading when manually turning the wheels. Once you have the torque reading, I would find a servo that can handle at least twice the torque required. Nothing in the code or arduino would change. If the servo has a higher current rating, you'll need to power the servo directly, so as to prevent overloading the arduino.

    • @DroneHow
      @DroneHow  8 ปีที่แล้ว

      +Filipe Bessa You can certainly turn the servos manually, provided there is no power to the servo when turning it. Are you looking to drive the servo through more than 180 degrees of rotation?

    • @bessalf
      @bessalf 8 ปีที่แล้ว

      +Drone How thanks for replying! I think the wheels are not that heavy to turn, so probably the servo you used should be able to turn it, but I can go stronger if needed! The rotation will depend on the reduction gears! The servo should turn at least the same as the rotary potentiometer in your video! I've seen a couple of videos on how to hack a servo for continuous rotation if I need a greater turn!

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

    when i used the code the servor started to go back and fouth

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

    Esp32 board how to control 2 servo and 2 potanmeter please code send me

  • @11.manish8
    @11.manish8 3 ปีที่แล้ว +1

    Nice so much

  • @andrew.k3002
    @andrew.k3002 9 หลายเดือนก่อน

    why does my servo motor just go crazy when i turn the potentiometer to the right?

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

    my servo is vibrating how can i fix it

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

    nice video.......

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

      +tayyab mahboob Thank you! Please subscribe

  • @madhukeshnp
    @madhukeshnp 6 ปีที่แล้ว

    Please add a push button to rest the position of the servo to Home position. That is the pos= 0;

  • @Ez-jw8xv
    @Ez-jw8xv 6 ปีที่แล้ว

    does anyone know how to do this on circuitpython

  • @_.ah7
    @_.ah7 3 ปีที่แล้ว

    im using a 9g servo and 10kohm potentiometer but doesn't work at all
    all the wiring is done just like u told

  • @nikhilbalthi9133
    @nikhilbalthi9133 7 ปีที่แล้ว

    val=map(val,0,1023,0,180) what is the relation between them please explain?

    • @DroneHow
      @DroneHow  7 ปีที่แล้ว

      This is a map function. So you're mapping analog inputs from the Potentiometer (0-1023) to output values that the servo can understand (0-180 degrees)

  • @the_clockwork_jackass6897
    @the_clockwork_jackass6897 6 ปีที่แล้ว

    The 5v connection in 1:34 is tomato colored
    And there's a glimpse into what my head is like

  • @bubbachubs8224
    @bubbachubs8224 5 ปีที่แล้ว

    Can I unplug the arduino from my computer after the code is done uploading

    • @robertrodgers6251
      @robertrodgers6251 4 ปีที่แล้ว

      Yes, but you'll still have power the arduino.

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

    code
    #include //accesses the Arduino Servo Library
    Servo myservo; // creates servo object to control a servo
    int val; // variable to read the value from the analog pin
    void setup()
    {
    myservo.attach(9); // ensures output to servo on pin 9
    }
    void loop()
    {
    val = analogRead(1); // reads the value of the potentiometer from A1 (value between 0 and 1023)
    val = map(val, 0, 1023, 0, 180); // converts reading from potentiometer to an output value in degrees of rotation that the servo can understand
    myservo.write(val); // sets the servo position according to the input from the potentiometer
    delay(15); // waits 15ms for the servo to get to set position
    }

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

      What if i have to use 4 servos at once

  • @sergecampeau2844
    @sergecampeau2844 7 ปีที่แล้ว

    What is this programming language? Is it complicated to learn?
    Would it be possible to set a more complex rule with look-up table?

    • @Charlie-wu6bm
      @Charlie-wu6bm 7 ปีที่แล้ว

      Serge Campeau the programming language is based off java so is pretty easy to learn. it has been simplified with modules which does most of the work for you.