Introduction: Arduino Controlled Servo Robot (SERB)

Picture of Arduino Controlled Servo Robot (SERB)
What better way to start experimenting with open source micro-controllers ( Arduino ) then by building your very own open source robot ( CC (SA -BY) )?

What to do with your SERB?
  • (here) - How to connect your SERB to the internet and drive it over a Skype video call.
  • (here) - How to Control Your SERB Using a Wii nunchuck's accelerometers
  • (here) - How to Add Obstacle Detecting Whiskers to Your Robot
  • (here) - How to make 30 kits (Open Manufacturing)

  • Fully programmable using an Arduino Duemilanove micro-controller (or another micro-controller of your choosing).
  • No need to solder.
  • Choice of cutting options for acrylic pieces. (scroll saw, access to a laser cutter, purchasing pre-cut pieces)
  • Easily expandable and modifiable with extra bolt holes and included breadboard.
  • Dual ball bearing rear wheel.
  • Up and running in 1-2 hours. (from kit)
  • Open source design (build as many as you like)

(Shameless Plug)
In the UK and like Arduino stuff? check out our newly opened web store

A quick video of a completed Arduino controlled servo robot - (SERB) running the included test program (step 6)

Note: Source files are available on a parallel Instructable (Source Files For) - How to Make an Arduino Controlled Servo Robot - (SERB)

Step 1: Parts & Tools

Picture of Parts & Tools
All bolts can be found at your local Home Depot. The other parts can be found online (I have included a link to my favorite source for each).

Parts List:

A bundle containing all hardware items can be purchased at's store (here) ($120)

Nuts and Bolts:
  • 3mm x 15mm bolt (x20)
  • 3mm x 10mm bolt (x12)
  • 3mm nut (x34)
  • 3mm washer (x12)
  • 8mm x 25mm bolt (x2)
  • 8mm nut (x2)
  • Skate Bearings (x2) ( VXB ) (these are standard skate bearings so they can be salvaged from a pair of roller-blades or a skateboard)

  • Large O-ring (4.5" ID 3/16" Bead Dash #349) (x2) ( McMaster-Carr Product #9452K407 )
  • Small O-ring (3/4" ID 3/16" Bead Dash #314) (x1) ( McMaster-Carr Product #9452K387 )

  • AA Battery (x4) (not included in kit)
  • 9v Battery (x1) (not included in kit)

(all wire is 22 AWG solid I purchase mine through McMaster-Carr )
  • 15 cm Purple (x2)
  • 15 cm Black (x1)
  • 5 cm Black (x2)
  • 5 cm Red (x2)

  • Screwdriver (x1) (Philips)
  • Needle-nose Pliers (x1)

Step 2: Cutting Pieces

Picture of Cutting Pieces
Please chose which steps to follow based on the cutting option you have chosen.

Option 1 (Purchasing Pre-cut Parts)

  • Purchase a pre-cut chassis from's store ( here) ($60 including shipping to the USA and Canada)

Option 2 (Digital Manufacturing (ie. Ponoko ) / Access to a Laser Cutter)

  • Download the laser cutter layout ( "03 SERB Ponoko Cutting Layout P2.eps" or "03-(SERB)-Ponoko Cutting Layout (P2).cdr" )
  • Cut the files using Ponoko or on your own Laser Cutter (using 3mm, .118" acrylic (sometimes sold as .125")

Option 3 (Scroll saw and Drill)

  • Download and print the PDF pattern (please choose the file corresponding to your paper size) 03-(SERB)-ScrollSaw Pattern (letter).pdf03-(SERB)-ScrollSaw Pattern (A4).pdf(it is important to not scale the drawing while printing)
  • Measure the ruler on the printout against a ruler you trust, if they do not match the pattern has been scaled and you need to look at your printer settings before reprinting. If they do match up, onwards.
  • Glue the pattern to the acrylic sheet (3mm, .118" (sometimes sold as .125").
  • Drill holes.
  • Cutout pieces using a scroll saw

Step 3: Assembly

Picture of Assembly
Congrats on making it this far 90% of the process is complete just download the assembly instructions on this step (04-(SERB)-Assembly Guide.pdf) & after a little lego/mechano style assembly you'll be ready to wire.

To entertain you along the way here is a time-lapse of my assembly:

Step 4: Wiring

Picture of Wiring

With all the big pieces together its time to add the little electric veins which will allow our robot to be controlled. To do this download and print the wiring diagram (05-(SERB)-Wiring Diagram.pdf). A first glance at it can look quite daunting, however if you make each connection sequentially and take your time it comes together remarkably quickly.

The wiring is quite simple and no harm can come to your circuit until you add batteries. So wire everything up double check it, then add power.

Step 5: Testing & Troubleshooting

Picture of Testing & Troubleshooting

If you ordered a kit your Arduino has come preloaded with a test program. Just put in 4 AA batteries and plug the 9v battery into the Arduino. And if everything has been done correctly your robot will begin moving (it will turn in a random direction for a time between 0.1 and 1 second before going forward for a random time between 1 and 2 seconds then pause for 2 seconds before starting again).

If you have not purchased a kit an additional step is required. Download the attached zip file (07-(SERB)- SERB-Test Arduino Then unzip it in your Arduino sketch directory (default "my Documents\Arduino\") and download it to your arduino board. (if you are new to Arduino jump ahead one step where there are links to great getting started tutorials)

Common Problems:

My SERB moves slowly when it should be stopped.
This is a result of your servos not being calibrated quite right, to calibrate your servos wait until your program has the servos stopped then with a small screwdriver turn the potentiometer inside the servo (the little opening in the servo casing just above where the wires are). Rotate it either left or right until the servo is truly stopped.

Things aren't quite working properly.
Send us an e-mail with your symptoms and we'll try and help you out, while you're waiting for a reply double check all your wires with the wiring diagram from step 4.

If you encounter any problem please either add a comment to this Instructable or send an e-mail to and we'll try our very best to help you get your SERB working

Step 6: Programming

Picture of Programming
The physical robot is finished time to start giving it a brain.

Before we get into the details of programming an Arduino Controlled Servo Robot - (SERB) - a few links to some excellent Arduino programming resources on the internet.

Arduino Starter Guide - A guide to help you start with Arduinos, from downloading the programming environment to writing your first program.

Arduino Programming Reference - A complete easy to reference guide to the Arduino programming language.

How Servos Work - A quick primer to how servo motors work.

Arduino Servo Library - How the Arduino Servo library works (how we control our servos).

Alright with the learning out of the way lets get programming. There are three ways to get started programing your Arduino Controlled Servo Robot - (SERB).

Option 1: (Modifying SERB_Test.pde)
Sometimes when programming the easiest thing to do is take a working program and start adding your own code to it. To do this download the SERB_Test zipped program (07-(SERB)- SERB-Test Arduino Proceed to unzip this in your Arduino sketch folder (default "My Documents\Arduino\"). Finally open the Arduino programming environment and download it to your Arduino. The code is well commented.
(or copy and paste the code from the appendix on this step to a new Arduino Sketch)

Option 2: (Adding SERB Routines to your program)
Add some simple routines to your pre-existing program (like goForward(), setSpeed(int) etc.). To do this download the routines in the text file (07-(SERB)- Simple Routines Text.txt).
1. Copy and paste the preamble portion to the beginning of your program.
2. Copy and paste the routine portion to the body of your program.
3. Add a call to serbSetup(); to your setup() routine.

Option 3: (Creating your own program from scratch)
This is not too difficult. All that is required is to familiarize yourself with the Arduino Servo Library. Then the right servo is connected to pin 9, and the left servo to pin 10.

note: Additional programs will be added here as they are developed; or if you develop something and would like it featured send me a private message and it can be added.

Appendix: (SERB_Test.pde Code)

/* * Arduino Controlled Servo Robot (SERB) - Test Program * For more details visit:  *  * Behaviour: A simple test program which causes the SERB *            to turn randomly either left or right for a  *            random time period between 0.1 and 1 second. *            The SERB will then drive forward for a random  *            time period between 1 and 2 seconds. Finally *            pausing for 2 seconds before starting again. * * Wiring: Right Servo Signal - pin 9 *         Left Servo Signal - pin 10  * * License: This work is licenced under the Creative Commons  *          Attribution-Share Alike 3.0 Unported License. To  *          view a copy of this licence, visit  *  *          or send a letter to Creative Commons, 171 Second  *          Street, Suite 300, San Francisco, California 94105,  *          USA. *         */  //--------------------------------------------------------------------------// START OF ARDUINO CONTROLLED SERVO ROBOT (SERB) PREAMBLE#include <Servo.h>#define LEFTSERVOPIN  10  #define RIGHTSERVOPIN  9Servo leftServo; Servo rightServo; int speed = 100; //sets the speed of the robot (both servos)                  //a percentage between 0 and 100// END OF ARDUINO CONTROLLED SERVO ROBOT (SERB) PREAMBLE//--------------------------------------------------------------------------/* * sets pins to appropriate states and attaches servos. Then pauses * for 1 second before the program starts*/ void setup()                  {  serbSetup();                       //sets the state of all neccesary                                      //pins and adds servos to your sketch  randomSeed(analogRead(0));         //sets the random number seed with                                      //something mildly random  delay(1000);}/* * turns the robot either left or right (randomly) for a period between  * 0.1 and 1 second. Before going forward for a random time period  * between 1 and 4 seconds. Before pausing for two seconds then starting * again.*/void loop()                     {   turnRandom(100,1000);            //Turns randomly left or right for a                                     //randomtime period between .1 second                                     //and one second   goForwardRandom(1000,2000);      //Goes forward for a random time period                                     //between                                     //1 and 2 seconds   goStop();                        //Stops the robot   delay(2000);                     //pauses for 2 seconds (whilst stopped)}/* * turns the robot randomly left or right for a random time period between * minTime (milliseconds) and maxTime (milliseconds) */void turnRandom(int minTime, int maxTime){  int choice = random(2);                     //Random number to decide                                               //between left (1) and right (0)  int turnTime = random(minTime,maxTime);     //Random number for the pause                                               //time  if(choice == 1){ goLeft();}                 //If random number = 1 then turn                                               //left  else {goRight();}                           //If random number = 0 then turn                                               //right  delay(turnTime);                            //delay for random time                         }/* * goes forward for a random time period between minTime (milliseconds) * and maxTime (milliseconds) */void goForwardRandom(int minTime, int maxTime){  int forwardTime = random(minTime,maxTime);  //determine a random time to                                               //go forward  goForward();                                //sets the SERB forward  delay(forwardTime);                         //delays for random time period}//------------------------------------------------------------------------//START OF ARDUINO CONTROLLED SERVO ROBOT (SERB) ROUTINES/* * sets up your arduino to address your SERB using the included routines*/void serbSetup(){  setSpeed(speed);  pinMode(LEFTSERVOPIN, OUTPUT);     //sets the left servo signal pin                                      //to output  pinMode(RIGHTSERVOPIN, OUTPUT);    //sets the right servo signal pin                                      //to output  leftServo.attach(LEFTSERVOPIN);    //attaches left servo  rightServo.attach(RIGHTSERVOPIN);  //attaches right servo  goStop();}/* * sets the speed of the robot between 0-(stopped) and 100-(full speed) * NOTE: speed will not change the current speed you must change speed  * then call one of the go methods before changes occur.*/ void setSpeed(int newSpeed){  if(newSpeed >= 100) {newSpeed = 100;}     //if speed is greater than 100                                             //make it 100  if(newSpeed <= 0) {newSpeed = 0;}         //if speed is less than 0 make                                             //it 0   speed = newSpeed * 0.9;                   //scales the speed to be                                             //between 0 and 90}/* * sends the robot forwards */void goForward(){ leftServo.write(90 + speed); rightServo.write(90 - speed);}/* * sends the robot backwards */void goBackward(){ leftServo.write(90 - speed); rightServo.write(90 + speed);}  /* * sends the robot right */void goRight(){ leftServo.write(90 + speed); rightServo.write(90 + speed);}/* * sends the robot left */void goLeft(){ leftServo.write(90 - speed); rightServo.write(90 - speed);}/* * stops the robot */void goStop(){ leftServo.write(90); rightServo.write(90);} //END OF ARDUINO CONTROLLED SERVO ROBOT (SERB) ROUTINES//---------------------------------------------------------------------------

Step 7: Finished, Others Who Have Finished & the Future

Picture of Finished, Others Who Have Finished &amp; the Future

Congratulations on getting this far and I hope you're having fun with your Arduino Controlled Servo Robot - (SERB).

Michael Beck's SERB -Michael found the plans for the SERB over at and cut his out of yellow and red acrylic. I think it looks great.

Mike's SERB - Mike (of St. Louis Area robot club ROBOMO ) had a friend laser cut a SERB chassis, and used his own robotic know-how to get it up and running. I think it looks awesome done in blue. (check out his website for details on this as well as his other robots (here)

This section will have details on future developments and attachments (they will be featured here before they are properly documented). But i would also like to show off pictures of other peoples SERB's.

So if you've finished send me a private message with a photo and a few words (be it a description or a link to your website) and I'll add it here.

(Shameless Plug)
If you liked this instructable check out for other fun open source projects.


Sembot (author)2016-02-13


I made the Serb and have a pencil attached to, so I had a drawbot, with the 07-SERB-Test Arduino Program , this work excellent , with the random function you have a autonomous robot dat draw random

There is a problem, the robot drives much of the canvas off

Would it be possible to adapt the same program with a sensor (QRB1134) which ensures that when the robot touches the edge of the paper makes this reversible and further does with drawing

If I have the programming knowledge of Arduino I would do it, but my programming knowledge is very small, I'm more of a builder

Who can help please

Kind regards

ProlificSwan (author)2015-05-19

I followed your directions and unfortunately did not check the sizes of the servos before ordering them. The parallax servos you link to are bigger than the ones you actually use in your build, and so they do not fit in the laser cut designs you have. You might want to make some alternate designs for the larger servos or remove the parallax link since it is confusing. Awesome project otherwise!

What is the kerf on your laser? I noticed a size discrepancy here for the servo slot: ~22mx42mm (scroll saw pdf) vs. ~18mmx33.3mm (laser cutting CDR) that seems more significant than laser kerf. Found this servo on your website: . Compare it to the servo on the parallax site you linked to: . Notice the dimensions are at least a few mm different.

crogshockey (author)2015-03-26

hello am prince and want to build servo robot but want to buy the parts and electronics component from your end how do i it

crogshockey (author)2015-03-26

hello am prince and want to build servo robot but want to buy the parts and electronics component from your end how do i it

prb3333 (author)2014-11-15

Hi, I am interested in building a servo based robot and this project looks very good but the instructable is a little old. Has anyone put together an updated parts list of where bits can be bought now?

Kennethhackneyr97 (author)2014-06-12

Just to say, my project was based in yours. So, tanks!

jiffymanager (author)2014-04-25


calmlunch (author)2014-04-20


dadyprince84 (author)2014-03-31

hello am prince and want to build servo robot but want to buy the parts and electronics component from your end how do i it

clickyummy (author)2014-03-08


bearblue (author)2014-02-25


chimplost (author)2014-01-21

The cutting lines and/or vector engraving lines in your .eps file are thicker than we can handle.

regaltaxlaw (author)2013-12-18

Hi, i have a question do i need a current amplifier to connect the servos?

clickworried (author)2013-08-27

Hi, i have a question do i need a current amplifier to connect the servos?

My Diet Area (author)2013-08-03

The cutting lines and/or vector engraving lines in your .eps file are thicker than we can handle.

Rust93 (author)2013-03-19

Just to say, my project was based in yours. So, tanks!

aal krounz (author)2012-11-27

i need some help ,can i add Easy VR module to Arduino Controlled Servo Robot (SERB)

aal krounz (author)2012-11-12

i need some help ,can i add Easy VR module to Arduino Controlled Servo Robot (SERB)

turbosinaboy (author)2012-03-15

I can't get the Parallax servos right now. But I can get some Futaba S148 and modify them to continuous rotation. Do you know if the modification is only on the mechanical part?

SnyperBob (author)2012-01-18

I just tried uploading the EPS file to Ponoko and it doesn't work. Their website gives this error, for file : 03 SERB Ponoko Cutting Layout P2.eps

"You need to use a finer nib!
The cutting lines and/or vector engraving lines in your .eps file are thicker than we can handle. (We’ve highlighted the problem area(s) in your design here.) Please reduce all cutting and/or vector engraving lines to a thickness of 0.01mm then try again. "

Does anyone have the ability to fix this problem? Can you reupload the correct file to this Instructable please?

irgonh (author)2011-11-29

Hi, i have a question do i need a current amplifier to connect the servos?

robotkid249 (author)2008-11-24

I made sort of this kind of robot with arduino, only a little more complicated. I heard (through the arduino blog) that this design is going public, I would encourage you to use a larger battery because those servos need a lot of energy.

Gelfling6 (author)robotkid2492011-10-02

I made a suggestion of using a lower voltage, large-capacity 7.2V 3300-mAH RC car battery, just a matter of connecting the molex connector to the barrel connector for the Arduino, and to the 7805 regulator for the servos.

oomlout (author)robotkid2492008-11-24

Happy to here you made something similar it is a good form to experiment with. We have some more complex robotic projects in the works but thought we would start with the easiest. On the battery front, the servo's can suck through batteries pretty quickly (though not as quickly as a remote control car might). I was thinking of having a bigger battery pack but it would have meant switching battery sizes. I recommend some good re-chargeable AA batteries.

the gizmoman (author)2008-11-24

i wander if i can do that with my Lego mindstorm

Gelfling6 (author)the gizmoman2011-10-02

Pretty sure others already have...

Just a matter of knowing how to program it, what sensors it'll use, and how to control it. (remote, autonomous, etc.)

akatsuki666 (author)2009-02-12 how an you make a sevo only spin arout 90 degrees.pls respond ty

becauseican (author)akatsuki6662009-02-21

when you first buy a servo unmodded it can only spin 180.

Gelfling6 (author)becauseican2011-10-02

Next step, Hamed.Bamdad,

Or, do you need the servo to only rotate just 90-degrees? Simple enough, simply divide the values sent to the servo in 1/2. instead of 0-90-180, only go 45-90-135 (arduino style.)

znunez (author)2009-04-23

I need major help!!!!....I'm trying to add an additional servo with a ultrasonic range finder (SRF 05) to this robot but i need the program to control all servos combined together... i have a program to control just the servo and the sensor but i would love to combine it all together!! Thanks

robsummitt (author)znunez2009-05-21

Your probably going to need a servo controller shield or controller. I believe the Arduino servo library only supports 2 servos.

Gelfling6 (author)robsummitt2011-10-02

This reply is coming a bit latyer (2 years).. But, the most recent library (included with 0.22 ) is capable of up to 8, dependant on how you identify them. (It took me a few hours to figure how to address them as servo1 and servo2)

becauseican (author)2009-02-19

i want to build a ghetto version of this i just added up the cost and it is $33.50 not including a motor controller. Before I order anything i have to ask do i need a motor controller because i read that without one the arduino will get fried is this true please explain.

Gelfling6 (author)becauseican2011-10-02

Not 100% necessary.. Feed the +5V to the servos, from a 7805 regulator, and feed the +9V voltage through a separate wire to the regulator input, Not through the Vin pin of the arduino! (or.. if the servos draw too heavily, you could soon see a burned trace on the Arduino's board.) Do not draw the +5V from the Arduino's on-board regulator to drive the servos.

Chowmix12 (author)becauseican2011-01-27

A motor controller is absolutely necessary. I'm not sure if it is too late, but try this one for free from STmicroelectronics (L298HN.) These motor controllers allow you to isolate your motors power supply from your Arduino's power supply (great for reducing EMI feedback) and allow you two add speed control to your motors for just one pin for each motor.

Dexter G (author)Chowmix122011-03-23

Question: Is there any where else to buy the complete Arduino servo controlled robot kit (SERB) besdies Maker Shed? They are currently out of stock ot that kit and I would like to purchase of these robots. I don't know when Maker Shed will have any kits back in stock.

hintss (author)becauseican2010-12-02

check the arduino programming guides on they talk about servos

axeman911 (author)2011-08-25

hello, i bought two continuous rotation servos but i am having trouble getting them to spin individually they always spin together and always in the same direction?

Gelfling6 (author)axeman9112011-10-02

make sure they're connecting to different PWM outputs.. If they're plugged into the same, they're both reacting to the single signal. Also, make sure they're assigned different servo.write instructions, to the two different PWM outputs.

area36 (author)2011-09-20

I have an Arduino Uno. will that work all the same?

Gelfling6 (author)area362011-10-02

Can't see why not? the uno and duemilinova are essentially the same base device, just newer hardware on the uno.

Redneck2 (author)2009-01-15

I know this is kind of a stupid question but what do you use this robot for?

Chowmix12 (author)Redneck22010-12-09

Thats a common misconception. Not all robots are just for things like a butler. This is mainly just a robotics platform. you later add sensors and other stuff to make it into a robot.

hintss (author)Redneck22010-12-02

depends. what do YOU use the robot for?

get to da parakeet (author)2009-03-27

erm... how do you make the 9v battery thing??

they have a jig for soldering it. check out their manufacturing instructable

dunnos (author)2008-12-30

Hello mister mcfarlan sir, I am new to this whole robot stuff and all, i once built a robot called beetlebot following the BEAM principle ( that means no chip) is an ardiuno the same a pic? because that is the only controller i can get around here ( my parents don't like the idea of ordering from the internet) i know that the pic has some programming language... i really should investigate that... Anyway, my question: can i get a pic and do all the arduino projects? Thanks in advance, Dennis

oomlout (author)dunnos2008-12-30

Hey Dunnos.

BEAM robots are good fun to play with.

An arduino does the same kind of thing as a PIC but is a little different. Sorry for being so vague. I recommend checking out the Arduino web-site ( ), for all the details.

In terms of getting a PIC to do all the arduino projects the short answer is yes. However it is slightly more technical in you have all sorts of decisions to make (different boards, programming languages compilers etc etc.). (some people really enjoy this). Choosing an Arduino takes care of those details.

I hope you have fun in your electronics persual, and if you have any more questions (or would like me to answer your original ones better) feel free to send me a message.

Stuart McFarlan

Good luck in your

dunnos (author)oomlout2008-12-30

Hey stuart, i know, I love beam robots, currently making one that follows a black line. I dont find that at all vague, something like: it is the same but the pin layout is different code used is different and so on ... i love a challenge, if it wasn't for school i'd be doing that my whole day :) i only would like to know if i would have to learn how to program an arduino also. Also, what does an arduino starter kit cost?

About This Instructable




More by oomlout:How to Breadboard Arduino Compatible.RGB LED Tutorial (using an Arduino) (RGBL)Solderless Breadboard Layout Sheets (plug and play electronics)
Add instructable to: