Physical Computing with Servos

Giving The Raspberry Pi a Body

In this post I go over how to set up your raspberry pi as a base for bionic projects using servos. When your done, you’ll have a solid, customizable platform To build any bot your crazy head comes up with as well as the know-how To use it.


First thing you’ll need is of course, is The Raspberry Pi 3B(+)- recommended but any model will do.

My very first one, runs noticeably smoother than it's predecessor and outclasses it  in every way so far. madeh PicsArt.

The perfect building block for any DIY technological device. This credit card sized computer has changed my life and made all things possible.

Next you’ll want an

Adafruit 16 channel Servo hat:

The stackable version of the Adafruit 16 channel servo hat used to add more hats of many kinds.

The Adafruit 16 Channel Servo Hat– is an easy to use expansions board for the pi and gives it the ability to efficiently control up to 16 servos, the muscles of your robot.

But it requires a bit of soldering to assemble. For that I recommend:

The ANBES Soldering Iron Kit is a good investment for any tinkerer that has everything you’ll need to start soldering except, maybe

Helping hands– which hold your board/ wires in place while you solder and has The added benefit of a magnifying glass to help you see better and protect your eyes.

A Hakko Solder tip cleaner– to make sure your tool is as clean and efficient as possible.

A Luditek Repair Mat– so you don’t make a mess and end up with hard solder all the place.

And last but certainly not least, you’ll need some

-Servos- servos are mini motors that add motion to your creations. Commonly used in hobby electronics such as rc cars and robots.

My favorite servos to work with would have to be:

J-Deal 9g servos: The mainstay of my experiments. The quality and price of this ten piece bundle makes the good ol’ J-Deals my go-to servos of choice. Though perfect for prototyping, when I begin finalizing a project, I go for metal geared servos. More expensive for only 4 but they tend to be more durable.


-The mg996r Standard sized digital servo: Bigger, badder, a little on the slower side but perfect for projects requiring some more kick or just bigger projects in general.

Optional Gear

Now if you want to make your creations portable, I suggest USB power. To do this I suggest an

Anker PowerCore + mini: (or any USB power supply that’s over 5v)

My favorite portable power source to use with my raspberry pi projects.

Its perfect for smaller more portable projects where I can just swap out power hassle free. not to mention the sleek look and many uses: mobile phones etc.

Then a CableDeconn USB to 5.5 mm/2.1 mm 5 Volt DC Barrel Jack Power Cable:

To connect my AdaFruit servo hats DC power plug to the Anker portable USB battery

to connect the battery to the Servo Board’s DC plug.

And lastly a love Rpi microUSB on/off switch:

To give my raspberry pi as well as other switchless boards an on/off button.

To have the option of an on/off switch for the pi (or the servo hat with the proper adapter)

Assembling the Servo Hat

Soldering 101

Now that we have all the gear, we can go ahead and get the hard part out of the way: soldering the actual Servo hat. Now Soldering can seem daunting at first, even a little dangerous. But Soldering comes in handy in the tech field and is worth learning about sooner or later.

So just relax and watch the video as many times as you need to get a handle On it and practice on something you don’t care about to get your hands comfortable enough to develop that finesse.

And remember, you only need to assemble this thing once. Believe it or not, Soldering gets fun after a while.

When that’s all set, we’re ready to configure and test.

Configuring and Testing

Making Sure it Works

Now that everything’s prepped and ready, it’s on to the suspenseful part, configuring and testing the Adafruit servohat with the raspberry pi.

Always update the pi Everytime you plan on doing something new:

$ sudo apt-get update
$ sudo apt-get -y upgrade
$ sudo apt-get -y dist-upgrade

Next we get the Servo Hat to accept and communicate with the raspberry pi and then test the set up by following along with the Official overview. Say a little prayer and you should Get results similar to this:

Eventually I got comfortable enough to create my own servo control script based on the official, to be seemlessly imported into any other python program.

I use this as a central control program to be easily plugged into any project I feel like adding Servos to. Makes life easier and modular.

From here on out, we got ourselves a nice plug n’ play servo Control system that can be used to design any kind of raspberry pi robot from scratch.

What’s Next?

I found Servos to be a gateway of sorts to projects of a much higher Calibur, encouraging me to go deeper and take a cracks at, say:

Building my very own homemade robot! An obvious choice for anyone looking to build a body for their pi.

..Or even my very own cybernetic prosthetic which relies on a gesture control system so cutting edge, it can even work on amputees etc.

And it all started with these basics.

Well That’s all for now. I hope you found this post to be informative. 🙂

Stay tuned for updates and as usual, please comment and share to show some love.


4 thoughts on “Physical Computing with Servos

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.