How to use a servo motor with Raspberry Pi

Learn how to use a servo motor with Raspberry Pi in our latest How to use video on YouTube.

HOW TO USE a servo motor with Raspberry Pi

Subscribe to our YouTube channel: http://rpf.io/ytsub Help us reach a wider audience by translating our video content: http://rpf.io/yttranslate Buy a Raspberry Pi from one of our Approved Resellers: http://rpf.io/ytproducts Find out more about the #RaspberryPi Foundation: Raspberry Pi http://rpf.io/ytrpi Code Club UK http://rpf.io/ytccuk Code Club International http://rpf.io/ytcci CoderDojo http://rpf.io/ytcd Check out our free online training courses: http://rpf.io/ytfl Find your local Raspberry Jam event: http://rpf.io/ytjam Work through our free online projects: http://rpf.io/ytprojects Do you have a question about your Raspberry Pi?

Over the next few months, we’ll be releasing more videos in our How to use series, including guides on the use of LEDs, buzzers, and sensors with your Raspberry Pi.

What other components do you think we should cover? While we can’t make videos for every available component on the market, we’d love to hear what you, our community, believe to be integral to the maker toolkit.

You can find the How to use YouTube playlist here, and you can subscribe to our channel and never miss a video!

And, while you’re in a subscribe-y mood, also subscribe to the Raspberry Pi Press YouTube channel, the home of all content from The MagPi, HackSpace magazine, WireFrame, Custom PC, and more.

8 comments

Avatar

You have attached the +v wire to pin 2, not pin 1 as you say.

Avatar

Thanks for this. For hobby motors the usual recommendation is to use an external power supply. For a servo motor it is ok to prower it from the Pi directly? What is the difference?

Avatar

For really low power servos and with no load applied you can normally get away with directly powering them from the 5v/gnd on the Pi. As soon as you apply any load, or if you use a bigger servo, even when just testing, then my advice is Don’t Do It.
You can join the gnd of the Pi and the servo but give the servo a separate 5v supply. Some of my larger servos(for big, fast, model planes with multi-metre wingspans at over 100mph, for example) can pull 5amps.
If you’re running a bunch of servos, consider a driver board like the ones AdaFruit & SparkFun sell and control that from pigpio or even my pca9865 daemon.

Avatar

Hi, I would like a video how to use 3 or 4 pHATs with one raspi. Because no pHAT I know of is able to control more than 4 motors and some servos, too. Thanks!

Avatar

Unless it has already been done, the sensors included on the astro pi would be quite interesting, and adaptable to similar sensors in other configurations.

Avatar

Simple but very useful video for beginners like me to start with Raspberry Pi.

Leave a Comment

Comments are closed