Using Servo Motors with Arduino

Тәжірибелік нұсқаулар және стиль

Learn to use Servo Motors with an Arduino. Directly, and with a PCA9685 I2C Servo Driver.
Accompanying article with code: dronebotworkshop.com/servo-mo...
More articles and tutorials: dronebotworkshop.com
Join the conversation on the forum: forum.dronebotworkshop.com
Subscribe to the newsletter and stay in touch: dronebotworkshop.com/subscribe/
Today we’ll be making things move with Servo Motors!
Analog servo motors are inexpensive little powerhouses that can be perfect when you're designing something that needs to move. They pack a lot of torque for their size and their shaft position can be pretty accurately controlled.
We will start out by taking a look at how analog servo motors work and what kind of signal we’ll need to control them. We will also learn how to read the specs so that we can choose the best servo motor for our application.
There are two types of servo motors we will look at - conventional servos that rotate 180 or 270 degrees and continuous rotation servo motors.
Then it's time for the experiments. We will use a couple of the example sketches written for the Arduino Servo library to show just how easy it is to control a servo motor with an Arduino.
We will also examine a method of controlling LOTS of servo motors, the PCA9685 16-channel PWM controller board. As its name would imply this board lets you control 16 devices like servo motors and it interfaces to your Arduino or Raspberry Pi using the versatile I2C bus.
And if 16 servos still isn’t enough you can cascade up to 62 of these boards to drive an unimaginable 992 servo motors with just one Arduino!
I’ll settle for a more reasonable 4 servo motors, the 4 servo motors in the MeArm that I built in an earlier video. I’ll show you how to build a controller for the MeArm using an Arduino Uno and a PCA9685 board.
Here is the Table of Contents for this video:
00:00 - Introduction
02:14 - Servo Motor Basics
07:26 - Understanding Servo Specifications
09:25 - Servo Tester Demo
14:09 - Arduino Sweep Sketch
18:56 - Arduino Knob Sketch
25:12 - The PCA9685
30:05 - MeArm Controller
As always you'll find a detailed article on the DroneBot Workshop Website at dbot.ws/servo. It includes the sketches we cover in the video in an easy to download ZIP file as well as detailed explanations and links to other useful resources.
And speaking of useful resources please sign up for the DroneBot Workshop newsletter..
I hope you enjoy the video, and if you haven’t already please subscribe to the KZread channel.

Пікірлер: 643

  • @normanhall5902
    @normanhall5902 Жыл бұрын

    I’am 74 & can listen & learn from you 24 hrs a day & learn & it sinks in i was a commercial mechanical engineer for year , never got involved with electronics which is my hobby know some people you listen to it goes right over your head. You are good thank you Norman.

  • @QuintBUILDs
    @QuintBUILDs3 жыл бұрын

    This was unlike anything I've seen on KZread. Came for a refresher on arduino servo control and got SO much more! Content like this has the potential to replace the university system. Will be watching more of your videos and encouraging others to watch. Well done sir.

  • @asdf0019

    @asdf0019

    3 жыл бұрын

    Very useful. Thank you!

  • @zackhenderson2392

    @zackhenderson2392

    2 жыл бұрын

    The majority of educational content is capable of replacing the universities. Hell some places flat out show you youtube videos as part of the class. Only difference is you're paying for it :)

  • @rotterdamtv6378

    @rotterdamtv6378

    2 жыл бұрын

    @@VioFax superior intellegence? Lol so funny

  • @myvideo7748
    @myvideo77486 жыл бұрын

    This guy makes the most comprehensive tutorial ever! He even explained each line of the code! I have learned a lot, thank you so much!

  • @The_Daddy_2012
    @The_Daddy_20126 жыл бұрын

    I don’t normally comment on videos but this time I’ll make an exception. Your presentation style is spot on. Clear and calm. You also don’t do what every other educational video does and expect the viewer to know everything. Usually watching an educational video just starts a long process of watching other videos to understand what is happening in the original. Thank you very much!

  • @roberthatfield8966
    @roberthatfield89666 жыл бұрын

    Another example of an absolutely brilliant and concise presentation of exactly the information people need to understand the topic. I appreciate not only the obvious work you put in to researching the broad variety of possible applications, but also the visual aid presentation and video editing necessary to bring it all together. Keep this up and your library of videos is destined to become the be-all and end-all of youtube workshop references.

  • @jobmos8251
    @jobmos82516 жыл бұрын

    I haven't seen the full video yet, but I really appreciate what you're doing. Your style of teaching is very clear, calm and easy to follow.

  • @AlvaroLuizTrentini

    @AlvaroLuizTrentini

    3 жыл бұрын

    I totally agree!

  • @landthos1

    @landthos1

    3 жыл бұрын

    I was literally just thinking, “this guy gets it, he’s not talking like i already know what he’s saying”. This is a huge problem when it comes to more advanced stuff. The youtubers always over-estimate how smart i am😂

  • @andreamitchell4758

    @andreamitchell4758

    11 ай бұрын

    @@AlvaroLuizTrentini his tutorials are horrible and leave ouit many critical steps, there is not even any servo category in y IDE under examples at all he also forgot to tell yout o set the board in board manager and the comport first

  • @paulgalvinauthor
    @paulgalvinauthor6 жыл бұрын

    This is really high quality stuff! I really enjoy watching these videos. I liked seeing how you used the oscilloscope to show PMW. I "got it" without that, but it really hammered home what is happening there.

  • @vangelis.gavalakis
    @vangelis.gavalakis5 жыл бұрын

    I honestly appreciate your work in these videos. This is the best channel in it's category I've ever come across!

  • @alreqeb_productions
    @alreqeb_productions6 жыл бұрын

    I have always believed that young people are the best to explain sth to me till I saw your channel & realized why experience really matters... You are the best ever...

  • @yarachenchad5682
    @yarachenchad56824 жыл бұрын

    I started watching this video at two times speed but then I needed to slow it down. But after listening at two times speed I can now only tolerate watching this video at 1.5 speed. Great video very informative and through!

  • @fxsrider
    @fxsrider2 жыл бұрын

    I am 90% into a DIY Eggbot. The servo that lifts the pen is kicking my butt. The video is comprehensive and I have to say the graphics are very polished. Thank you for sharing your knowledge. Thank the people that help you produce this content as well.

  • @Love2Destroy
    @Love2Destroy5 жыл бұрын

    Very thorough. I really appreciate you explaining everything in the code instead of breezing over it like most do.

  • @Scanito
    @Scanito4 жыл бұрын

    Thanks sir for another great, extremely clear and friendly lesson/demo on servo motors for Arduino. You are the best!

  • @Darphi01
    @Darphi015 жыл бұрын

    Thanks so much for this very very good tutorial. I knew nothing about how these servos worked and now I'm on my way to starting my first project with them. :-)

  • @dansquires2713
    @dansquires27136 жыл бұрын

    Another excellent video. Once again I know have an idea for servo's and the courage to have a go! I have no idea how you do it but I learn more in 45 mins watching your video than I do with hours of researching myself. Keep up the good work! Right, now to subscribe to the newsletter.

  • @roonywalsh8183
    @roonywalsh81833 жыл бұрын

    i was searching for a channel like this where arduino is taught comprehensively...found it 2 years late but glad i found it ......will surely learn a lot from you sir.

  • @philporter9957
    @philporter9957 Жыл бұрын

    By far one of the very best electronics teachers out there. Clear and concise without any ‘greater than though’ attitude. I beg anyone interested in electronics to subscribe and support this incredible resource.

  • @mukageegee
    @mukageegee4 жыл бұрын

    I love the calm approach too. Some people suffer from a slow curve. The speed of presentation is just right.

  • @jackkelly6251
    @jackkelly62513 жыл бұрын

    Using this video to help with a final year project in university. Thanks for taking the time to make this video very clear and concise, it has been a massive help! :)

  • @abdelaaliaitmbarek8680
    @abdelaaliaitmbarek86806 жыл бұрын

    I liked the video before watching it, I was waiting for your new videos, your channel is the best I ever seen, thank you so much :)

  • @richardhugendubel8426

    @richardhugendubel8426

    6 жыл бұрын

    i second that

  • @acehaag
    @acehaag2 жыл бұрын

    Great presentation! I'm a retired EE 10 years of Arduino experience. I've seen these RC type servos before but never used one. My experince have been with larger DC motors. I'm currently working on an Arduino based cuckoo clock, these will work great thanks.

  • @jerittwilliams
    @jerittwilliams5 жыл бұрын

    I've watched several of your videos. Very easy to follow and good information for students of all ages and levels! Thanks for sharing!

  • @luberies
    @luberies4 жыл бұрын

    Thank you for the positive message that you transmit with your videos along!

  • @TheMechatronicEngineer
    @TheMechatronicEngineer4 жыл бұрын

    I have recently discovered your channel. Absolutely brilliant! Very educational! You deserve a lot more subscribers. Cheers

  • @infinytower3317
    @infinytower33175 жыл бұрын

    Subscribed. One of the clearest and most thorough presentations!

  • @liolikbolek5780
    @liolikbolek57804 жыл бұрын

    I am very grateful to you for your lessons, especially for your excellent clear and distinct English

  • @franciscalderbank8623
    @franciscalderbank86233 жыл бұрын

    Another great tutorial Bill! You certainly have a great aptitude for teaching.

  • @nuclearlion
    @nuclearlion4 жыл бұрын

    This is excellent, jumping in for hobby and work and loving this already!

  • @harimury
    @harimury4 жыл бұрын

    One of the best video lectures I have seen. The explanation is very clear and structured. The graphics part is very well done. Both the hardware part and the code part are explained very clearly. Thank you very much Sir!

  • @missboof2469
    @missboof24695 жыл бұрын

    This was incredibly helpful. Thank you

  • @CrazyWorldSoccer
    @CrazyWorldSoccer4 жыл бұрын

    This tutorial about servomotor was the best that I've ever seen

  • @schnasndasn1504
    @schnasndasn15045 ай бұрын

    Thank you so much, not just for this but for all the videos you made. Every time I start working on a project I start with some crappy 3 minute video an get stuck at some point. Then I watch one of your videos and the problems go away because your videos include all the necessary informations. Happy new year! Keep up the excellent work! Greetings from Germany :)

  • @Dronebotworkshop

    @Dronebotworkshop

    5 ай бұрын

    So glad to hear that you find my videos useful, thank you so much!

  • @HritikJain
    @HritikJain Жыл бұрын

    As a beginner, I can say this is the best channel which offers such clearity for doing things

  • @WintonMc
    @WintonMc2 жыл бұрын

    Hi Bill, I've just got around to watching your Servo video - another educational great. Thank you so much for posting this. It will have saved me alone many days of frustrating research and messing about.

  • @dipalzambare9257
    @dipalzambare92574 жыл бұрын

    I was not ready to try servo with PCA9685 (since datasheet says it is for LEDs) till i saw this, great tutorial. I am going to watch all of your videos now :)

  • @rgarciap7
    @rgarciap74 жыл бұрын

    The best electronics tutorial video I have seen. Keep up the good work.

  • @mattbarrington
    @mattbarrington Жыл бұрын

    Great video! Answered every question I had and several I didn't know I needed. Appreciate it!

  • @nathancomtois6178
    @nathancomtois61783 жыл бұрын

    Thank you for posting these knowledge videos! Hobbying into electronics in my spare time outside of my busy work life.

  • @ieduardoms
    @ieduardoms3 жыл бұрын

    Great video, very clear. Thank you very much for speaking slowly and clearly, it is really appreciated for not native English speakers.

  • @larrybud
    @larrybud2 жыл бұрын

    Nice introduction. For others, in his initial code at 17:00, there's no need to "sweep" each degree. You could simply write 0 to the servo, wait a bit, then write 180, wait a bit, and loop back to 0. 3 or 4 lines of code.

  • @amolsakhalkar5766
    @amolsakhalkar57664 жыл бұрын

    Thanks very much for creating comprehensive high class tutorials.

  • @maheenc9006
    @maheenc90063 жыл бұрын

    brilliant video! thank you for the clear and calm workthrough of this

  • @shaunsomaru4524
    @shaunsomaru45245 жыл бұрын

    Have not watched the full video as yet but its great so far, you teach clearly. Thank you sir for making these videos.. You have a new sub

  • @parthasengupta3904
    @parthasengupta39043 жыл бұрын

    I have not seen such a comprehensive , data rich, lucid and informative video tutorial before. I would like to thank you very much for your effort from the bottom of my heart. At the end of the tutorial you feel amazed at what you have learnt from scratch. I would like to know the details about constructing the robotic arm that you used to demonstrate the working of PCA9685. I am an Electrical Engineer and have interest in Arduino Projects, which i keep doing for my kids school projects. Thank you once again.

  • @soccerfanaticvideography7274
    @soccerfanaticvideography72745 жыл бұрын

    Top notch instruction. Thank you for sharing.

  • @olavodias
    @olavodias2 жыл бұрын

    At 40:58 you say "I hope you learned something about server motors". You gotta be kidding, I've learned A LOT, I mean, really, A LOT. I'm very thankful for your video. You are the best.

  • @aminnima6145
    @aminnima61455 жыл бұрын

    greetings from morocco sir.....im not an engineering student and still can understund you well...thanks to your exeptional style of teaching

  • @vk4865
    @vk48656 жыл бұрын

    Hey.. I watched the full video and liked it very much, as I always. I always look forward to watch your new videos on such hard core technologies.

  • @matthewmeldrum2890
    @matthewmeldrum28902 жыл бұрын

    Thank you so much for making this, this is exactly what a rusty beginner like me needs. Seriously, thank you

  • @wernerw.1328
    @wernerw.13283 жыл бұрын

    I´m a beginner and I´ll create an "Useless Box". Your videos help me to do it - and I´m so thankful that I subscribed your channel.

  • @gracielazaffarana9777
    @gracielazaffarana97774 жыл бұрын

    Excellent - from start to end. Thank you!

  • @gabeweigelt6661
    @gabeweigelt66612 жыл бұрын

    Incredible how helpful this video is. Needed a refresher on servos, building a remake of the the classic board game “Dark Tower” which featured a tower with an electronic spinning window

  • @AlohaMilton
    @AlohaMilton5 жыл бұрын

    Thank you for sharing your knowledge. Very appreciated!

  • @Nobilangelo
    @Nobilangelo4 жыл бұрын

    Thank you very much for this video. You are a very good teacher. Your explanations are clear and concise, you take us step by step, explaining as you go both verbally and visually. I knew nothing about servos beforehand, except for the word. Now I have a head full of ideas. It is the same with your other videos. Thumbs up (using my native liveware servo) and subscribed. I enjoyed your dry joke at 27:44

  • @Real-Hoodie-Guy
    @Real-Hoodie-Guy2 жыл бұрын

    Omg thank you I could not get the servos to work till I found you video. 10/10 Will subscribe.

  • @benjamindunn7160
    @benjamindunn71605 жыл бұрын

    Awesome presentation and describes everything to the last detail in a very pleasant way to understand, GREAT JOB

  • @w000w00t
    @w000w00t2 жыл бұрын

    This is a masterpiece of education! Fantastic work demystifying servo motors!!!! Thank you so much!!!

  • @jackmartin9190
    @jackmartin91905 жыл бұрын

    Great job of explaining the subject.

  • @robertpendergast2620
    @robertpendergast26206 жыл бұрын

    Top quality presentation.

  • @bob14072
    @bob140724 жыл бұрын

    Your videos are very very well done. I learn so much every time.

  • @douglasosborn3378
    @douglasosborn33784 жыл бұрын

    Another great presentation... thank you for passing on your knowledge.

  • @bwilless1
    @bwilless13 жыл бұрын

    Nice video, thank you for taking the time to put together a complete informative video. I learned lots!

  • @ego73
    @ego735 жыл бұрын

    Very well presented! I'm only getting started learning the syntax of Arduino and your clear step by step explanation of the sketch really helps me wrap my noggin around coding. Please make more videos especially with the aforementioned step by step walk through of the code. By way of request, I'd love to see a video on coding for a 3 axis CNC platform. Thank you! Subscribed!

  • @wilford3242
    @wilford32426 жыл бұрын

    Your videos are awesome!

  • @MikeM-of2if
    @MikeM-of2if5 жыл бұрын

    I found you a few months ago and absolutely love your channel! Thank you for putting all the time and energy into your videos, I know it is time consuming. I am looking forward to putting all this knowledge into use sometime soon! Thanks again and please keep up the most excellent work! Are you an instructor by chance?

  • @COSMICAMISSION
    @COSMICAMISSION Жыл бұрын

    Incredible servo introduction video. Thankyou so much! Subscribed!

  • @raymarciano657
    @raymarciano6575 жыл бұрын

    Great video! Exactly the info that I needed. Thanks!

  • @tobiasworner5106
    @tobiasworner51064 жыл бұрын

    Saw 2 Videos from you... So far really intetesting!

  • @Frightline777
    @Frightline7773 жыл бұрын

    One of the best teachers on youtube!Hands down!

  • @suomynona7261
    @suomynona72612 ай бұрын

    Thank you for this video! Very great explanations, easy easy to watch and understand!

  • @75mechanic
    @75mechanic5 ай бұрын

    Very informative and easy follow video. I'm starting to learn Arduino and build a small robotic arm with 4 servos and was unable to find out how to control servos before I came across your video. Thanks for sharing your knowledge, its great for my learning.

  • @lorue
    @lorue4 жыл бұрын

    VEEEERYYYY! GOOOOOD! all your videos, thank very much. You are done a great job. congratulations. Saludos desde México

  • @Blender3DProjects
    @Blender3DProjects3 жыл бұрын

    First half was pretty basic and explained in depth, second half was a big step up, really liked it :)

  • @omkar187
    @omkar1874 жыл бұрын

    Excellent presentation...... So calmly provide the clarity, great.

  • @roycechua
    @roycechua5 жыл бұрын

    Awesome work and explanation. Definitely made it clear what a servo is and how to use multiple servos with the servo motor controller.

  • @TuanTran-xi4vs
    @TuanTran-xi4vs Жыл бұрын

    Thank you very much for your video. Your teaching style is very easy to understand.

  • @GaryParkin
    @GaryParkin5 жыл бұрын

    I was wondering how people controlled more then a few servos from and Arduino. Thank you as always for your classes. If I were still an instructor, your classes would be mandatory watching for my class. :)

  • @TheAwesonymous
    @TheAwesonymous5 жыл бұрын

    Subbed because of the super clean workshop setup you got there

  • @alexdiaz8431
    @alexdiaz84316 жыл бұрын

    Thanks you! Video was very educational. I like you style and your speed. Easy to follow.

  • @oscararmendariz4188
    @oscararmendariz41885 жыл бұрын

    Outstanding video! Thank you very much!

  • @robroymacgregor7279
    @robroymacgregor72792 жыл бұрын

    Just absolutely awesome,... I appreciate the simplicity and directness....so eell done

  • @jvpineda6860
    @jvpineda6860 Жыл бұрын

    Thank you very much. This really helps me fully understand servos

  • @Modelpilot
    @Modelpilot2 жыл бұрын

    Thank you so much for your clear and relaxed explanations, now i really start to understand how it all works,

  • @Rccrasher716
    @Rccrasher7163 жыл бұрын

    Just discovered your channel. Very helpful. Thanks!

  • @oOcitizenOo
    @oOcitizenOo6 жыл бұрын

    Thanks for this awesome explanations!

  • @georgec4414
    @georgec44143 жыл бұрын

    Great video, very professional and well explained. Thank you very much. Subscribed !!!!!!!!

  • @khalisi7798
    @khalisi77982 жыл бұрын

    Thank you , you provide great information clearly and simple to understand

  • @spocksvulcanbrain
    @spocksvulcanbrain4 жыл бұрын

    Cool video thank you. I would love a short video of your workbench/shop. It look so organized and neat. If you could tell us how you made it, what you've built into it (I see a really convenient power and connection panel) and the rest. Thanks.

  • @alanbrown4275
    @alanbrown42753 жыл бұрын

    Great Explanation of Servos, Thank You

  • @adultingishard
    @adultingishard4 жыл бұрын

    Do you have a background as a teacher? Your teaching style is absolutely fantastic.

  • @nicola3444
    @nicola34443 жыл бұрын

    The best I’ve seen on arduino and servos

  • @garypalmer7540
    @garypalmer75404 жыл бұрын

    What a wealth of information fantastic well done that man and love your workshop.

  • @klaushansen3389
    @klaushansen33895 жыл бұрын

    I like your clear explanations of the workings of the hobby servo. Very impressed by your workbench that is shown in the background. Would like a write up on it.

  • @net6147
    @net61474 жыл бұрын

    Great watched all the video very informative and easy to understand, Thanks

  • @stephenpalmer11
    @stephenpalmer112 жыл бұрын

    Always an incredible, enjoyable tutorial 👍

  • @meinbherpieg4723
    @meinbherpieg47233 жыл бұрын

    Thank you for this video. It's very informative and clear.

  • @mrelkoholics
    @mrelkoholics4 жыл бұрын

    Thanks great video ,very concise. Keep up the good work, cheers!

  • @arunkarkare
    @arunkarkare3 жыл бұрын

    ड्रोनेबोट workshop site videos are very nice, explains in a most systematic way..

  • @user-dn9ks2oy1f
    @user-dn9ks2oy1f9 ай бұрын

    thank you for explaining servo motor I learned many things after watched this video

  • @akshaybhawar842
    @akshaybhawar8422 жыл бұрын

    DUDE YOU SOLVED A LOT OF PROBLE I GET DRING SERVOPROJECTS THANKS SIR REALLY

Келесі