Connecting multiple servo's to Arduino

Imagine the task when you need to make a manipulator arm or spider robot. In this case, we will need to control several servo motors.

You will need:

  • Arduino board (Uno, Mega, Nano, ...)
  • 3x Servo
  • Breadboard 
  • Wires

Servos are connected to individual PWM pins.

I added an electrolytic capacitor parallel to the power line to my assembly.

The whole point of controlling several servo machines is that we create one object for each servo motor. The servo class contains all the necessary methods to operate the servo.

//connecting servo library

#include <Servo.h>

//create servos

Servo servo1;

Servo servo2;

Servo servo3;

void setup() {

 //attach servo pins





void loop() {

 //turn all left






 //turn all right








As you can see, managing individual servos is quite a simple task. You can try to connect them, and you get a “caterpillar”, which is much more difficult to control.

In the next lesson, we will look at the assembly of a two-link manipulator and learn how to control it.

Leave a comment

Name .
Message .

Please note, comments must be approved before they are published