With the recent surge in Omicron cases, shipping may be slower than stated times. We are working to build, ship and respond to everything as quickly as possible. Please see all COVID-19 updates here. Thank you for your continued support.

Intro to Servo Motors with Jeff

Check out another video from our education team!

Favorited Favorite 0

A couple weeks ago, we posted two new videos from Jeff Branson - SparkFun's Educational Outreach Coordinator. Those videos were all about robotic motors.

Today we have another video from Jeff, this time specifically about servo motors. Check it out:

Check out the Vimeo version here

If you have any questions, please leave them in the comments below. We are also still interested in hearing your ideas for videos of this kind in the future – what would you like to learn more about? Thanks for watching!

Comments 17 comments

  • Awesome. I've been dying to get into servos, but had no idea where to start or if a servo was even what I needed for a project I've been thinking about. This is great.

  • Few cautionary notes for people just starting out. Servo's have DC motors inside that consume more power than arduino can typically provide, so ensure you have common ground and a separate power line just for the motor (6V will do fine). I typically use a 4xAA pack with a quick shutoff switch in case I go out of bounds. Keep in mind that Arduino will send out any pulse width you order it, unlike a pre-calibrated radio toy remote. Some values will land the gears out of bounds and will force the servo to lock up, making a buzzing noise. It may either strip servo gears, or cause batteries to drain prematurely. That's were the separate power shutoff switch comes in handy. You'll often be calibrating the range response of each servo experimentally. Futaba servo demonstrated in this tutorial is of a cheap and inconsistent variety. No 2 Futabas are alike.

    In terms of accuracy, as far as I'm aware, most standard servos have 1024 steps of response. At roughly 180 degress max rotation that makes 0.176 deg step increments. Mechanical quality and gaps between the gears will reduce that. Futaba gears may wobble 0.2 deg right out of the box.

    Servos are sensitive, so don't subject them to much mechanical stress. Don't press onto the gear shaft as that may damage the potentiometer, making the servo twitchy and less accurate.

    Start with cheap parts initially and then progress onto more expensive metal gear and ball bearing ones.

  • Great video, thanks! Is there any chance a continuation of this actuators series will lead to brushless DC motors? I find myself trying to do position control just like the servos in this video (which most off-the-shelf ESC's are bad for) and am wondering if somehow I am just failing to find an obvious existing solution that doesn't involve writing the commutation code.

  • I had my technology classes who are using the SIK as part of my curriculum view the video, I went over a few things, I then released them to play with servos for the class period. They were engaged and excited to be doing something they had just seen from the video and were asking how they could use them in projects. Awesome Job!

    I think this would be an awesome video series segeway on how to start and get into working on an AVC vehicle!

  • I really liked the video. However, going over some code during the video would be awesome. I saw that there seemed to be a technical challenge to that. May I suggest some screen recording software, and inserting that into the video?


    • Screen captures are no problem at all. In the future I will be sure to include more coding. Thanks!

      • That would be awesome. The Arduino example sketches are easily obtained, but the custom code used, or at least an in depth explanation of the timing and how it was achieved would be amazing. (IE did you just write digital high/ micro(40)/digital low etc.

  • It is just Youtube not letting us click on the max screen size or is it something else?

    • I'm not having any issues going full screen. Is there no icon there or does nothing happen when you click on it?

  • I think the middle positions should be close to 1.5ms not 1.0ms

    I always understood that servos varied there pulse between 1.0ms and 2.0ms with 1.5ms being half way. I do understand that the edge timings are not exact. It is only the center that I question.

    Otherwise the servo would sweep really fast over the first "half" (.4ms) and then slower over the last half (1.2ms).

    Unless I am missing something...?

    • Ben, The mid point does shift, it depends on the servo. I have settled on the old standard and assume 1.0 ms is the center. As pointed out below, the center is (I,m assuming)1.5ms. I pinged the far end on the oscilloscope and it was hitting around 2.4ms, I didn't shift my numbers on the board, hence the discrepancy. If the servo shudders or acts strangely, shifting position erratically,the pulse width is the most likely culprit. This is the time to question the center point. Jeff

    • I'm pretty sure you're right on this Ben. The "middle" position should be around 1.5 ms, but this varies depending on the make of the servo. From my understanding, depending on the make of the servo, you can actually burn up servos if it is given pulse widths outside the typical range. In other words, if 2.0 ms translates to its maximum position and it is given a 2.4 ms pulse, it will try and go beyond that maximum position to no avail. Digital servos, on the other hand, if you give them a pulse outside the typical range, will not even respond, like these fancy ones http://www.teamassociated.com/parts/details/29167/

      • Thanks BD, you are right, the board numbers were based on an assumption of .6-1.5, but they scoped out differently and i didn't shift my center point when I did the board correction. Good catch, Thanks!

    • Ben is correct the middle position of a servo is approximately 1.5ms. The exact position depends on the make.

  • Excellent video Jeff. Cleared up a few questions I had of my own. As for what I'd like to see a video on in the future - how about XBee communication / WiFi? I'm sure it's pretty straightforward, but I'm sure a video from you guys would make it that much easier to learn. Thanks for doing these!

Related Posts

Recent Posts


All Tags