Syncing Robotic Arm Tutorial




Introduction: Syncing Robotic Arm Tutorial

Robotic arm technology is one of the most wildly used technology in robotic automation industry. Its accuracy, efficiency and stability makes it an outstanding tool for fine, repetitive and heavy-duty operations. Remote controlled robotic arms can also be operating under high-risk or extreme conditions. Nevertheless, most of the robotic arms are heavily based on preset control program, which makes its functionality and adaptability largely restricted. Also, its signaling mechanism may be trivial and unintuitive for light users. In order to find an easy solution for nonprofessional users to manipulate robotic arms, the concept of using a syncing system to control robotic arms has been put forward in recent decades. However, due to the complexity of its algorithm, most of these arms can only be seen in fiction movies or TV shows.

In this tutorial, we will show you how to
install potentiometers on a suspension arm, capture the data and map them to a servo controlled robotic arm through an Arduino chip.

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: Method

Syncing robotic Arm is consist of 2 parts, a 4DOF servo controlled robotic arm and a controlling arm for position capturing. The motion of the controlling arm is sensed in real-time by 4 potentiometers installed at each of its joints. By mapping the position of each joint to the robotic arm through a micro-processor, we can then set it to sync the motion of the controlling arm. In order to have a better controlling experience, we also added few ergonomic components.

Step 2: Material & Tools


3D printed components (grabber (4 parts), coupling horn (2 parts), coupling rod*2)

Figure 2-1 Base plane of the grabber

Figure2-2 Grabber horn connector

Figure2-3 Grabber horn

Figure2-4 Grabber sliding block

Figure 2-5 Base axle horn

Figure 2-6 Base potentiometer horn

Figure 2-7 coupling rod

Figure 2-8 4DOF servo controlled robotic arm

Figure 2-9 suspension arm

Figure 2-10 0-50Kohm potentiometer*4

Figure 2-11 10K resistors

Figure 2-12 220V-5V 2A Power adapter


Hot glue gun; hot air gun; screw driver; multi-meter; soldering iron;

Step 3: Installation of Coupling Rods and Potentiometers at Each Joint.

Install potentiometer at these 4 joints: Base joint (rotates horizontally,controls left-right spin); Bottom joint (rotates vertically,controls forward-backward swing); Upper joint (rotates vertically; controls up-down swing); Grabber (rotates horizontally, senses the pinch movement through a transmission system).

For the bottom and upper joint, the installation is relatively simple.

Take the upper joint as an example, Due to the hot plasticity of the 3D printed component (PLA in our case), we can heat up a 1cm long, 1mm wide flat metal stick and slowly push it into the material. Note that it should be pushed into the protruding side by 2-3 mm in depth.

Step 4:

Then use the hot glue to fix the potentiometer right next to the joint.

Step 5:

Put the coupling rod onto the fixed axle, make sure the rod can slide freely.

Step 6:

Install 3D printed coupling rod along the arm with one of its end
fixed on the shaft of the potentiometer. Press the sleeve all the way down and make sure the metal stick is firmly stuck inside the slut.

Step 7:

Repeat this procedure for the bottom joint.

Step 8:

For the grabber, fix the potentiometer in the slot (may use hot air gun in case being too tight). Use the same method to fix a flat metal stick into the material and put the horn onto it, with the stick stuck inside the slot.

Step 9:

Follow the picture to install the sliding block. Insert blocks alone the track from each side of the base of the grabber and connect it to the horn using a pair of 3D printed connecting sticks.

Step 10:

After it’s done, insert a stick (we use a ball pen cartridge here) loaded with spring in between these two sliding blocks to make them bounce back after pushing.

Step 11:

For the base joint, due to the limitation in size, we have to use a coupled long horn set to sense its position.

Same as above, fix the potentiometer next to the base joint.

Step 12:

Then install 2 long horns both on the shaft of the potentiometer and on the base shaft of the arm. Need to notice that in order to make the horn stay firmly on the base axle, the 3D printed component is designed to be slightly smaller. You may use hot air gun to heat it up and stick it onto the axle. To couple their motion, connect two horns with wires (we used jumping wire in our case), so they will always be rotating in parallel.

Step 13:

After the installation of all four potentiometers are done, connect 2 signal wires to each of these potentiometers to measure the voltage across. For each potentiometer, one of the wire goes to the pin in the middle, the other goes to the pin on either side. For convenience, you may use wires with different colors for different potentiometers. In the end, use hot glue to seal the soldering spots so they won’t be shorten during use.

Step 14:

At last, fix the signal wire along the arm so it won’t be twisted.

To get this done, you may either use hot glue gun or Velcro tape or both. Need to notice that wires should not be installed in the positions which affect the motion of the arm. Bundle all 8 wires on the base with thermoplastic pipe.

Step 15:

Till now, the controlling arm is all set.

For the servo controlled arm, we may refer to the instruction of the 6 DOF Robotic Arm.

As we will only use 4 of its DOF, we can take off the third and the fifth (counted from bottom) servo with connection and reassemble it.

Notice that for the purpose of further calibration, don't yet put the screw to fix the horn onto the shaft of the servo during installation.

Step 16: Wiring

We applied a voltage divider circuit and measure the voltage across the resistor. As the potentiometer and the resistor are connected in series, we sense the voltage across the potentiometer by measuring the voltage across the resistor.

The operating range of each potentiometer is less than 180 degree,
we can set its operating resistance to be ranging from 10000-40000ohm by adjusting its initial orientation. To further enhance the accuracy and make the voltage-resistance relationship close to linear, we may use the following method to find the ideal resistance of the resistor.

R: resistance of the resistor

r: resistance of the potentiometer

V: input voltage

V: Voltage across the resistor

According to the voltage divider circuit, v=V*(r/(r+R))

Use the Curvature k of the v-r plot is to find the best value of R (Picture 2)

Here, x is r, Y is V*(r/(r+R)).

As the lowest value of k corresponds to the point with the best linear property, we can take the derivative of k with respect to R and find the value of R which leads k equal to 0.

Note that because of the limited accuracy of other components, the resistor that we use doesn’t need to have the exact resistance as what we calculated from above. In our case, to get a fair result, we can simply chose 15000ohm resistors for all these joints.

Step 17:



Servo Base;

Servo Joint1;

Servo Joint2;

Servo Grabber;

const int analogInPin1 = A1; // Analog input pin that the potentiometer is attached to

const int analogInPin2 = A2; // Analog input pin that the potentiometer is attached to

const int analogInPin3 = A3; // Analog input pin that the potentiometer is attached to

const int analogInPin4 = A4; // Analog input pin that the potentiometer is attached to

int sensorValue1 = 0; // value read from the pot

int sensorValue2 = 0; // value read from the pot

int sensorValue3 = 0; // value read from the pot

int sensorValue4 = 0; // value read from the pot

void setup() {

// initialize serial communications at 9600 bps:







void loop() {

// read the analog in value:

sensorValue1 = analogRead(analogInPin1);

sensorValue2 = analogRead(analogInPin2);

sensorValue3 = analogRead(analogInPin3);

sensorValue4 = analogRead(analogInPin4);

// print the results to the serial monitor:

Serial.print("\nBase Joint:" );


Serial.print(" Bottom Joint =" );


Serial.print(" Upper Joint =" );


Serial.print(" Grabber =" );


// map the results to servo control parameter

Base.write(map(sensorValue1, 200, 500, 45, 150));

Joint1.write(map(sensorValue2, 680, 300, 130, 50));

Joint2.write(map(sensorValue3, 800, 400, 30, 140));

Grabber.write(map(sensorValue4, 250, 320, 180, 80));


The servo control library Servo.h is included in our code. As our code only involves simple functions, we won’t go too deep into the basic of the language.

Motion mapping mechanism

Its motion mapping mechanism involves 3 steps:

1. Read the voltage across the resistor from the analog input pin. The reading ranges from 0-1023, which indicates 0-5v voltage proportionally.


sensorValue1 = analogRead(analogInPin1);

sensorValue2 = analogRead(analogInPin2);

sensorValue3 = analogRead(analogInPin3);

sensorValue4 = analogRead(analogInPin4);

2. Based on the initial orientation of the servo, map the input value to match the wanted position of servo correspondingly.

3. Send the position parameter to the digital output pin to control the motion of the servo.


Base.write(map(sensorValue1, 200, 500, 45, 150));

Joint1.write(map(sensorValue2, 680, 300, 130, 50));

Joint2.write(map(sensorValue3, 800, 400, 30, 140));

Grabber.write(map(sensorValue4, 250, 320, 180, 80));

The map() function in the code above is used to map the read to the angle parameter of the servo. XXX.write() function is used to send those mapped values to the servo.


As the position-voltage relation is can be roughly considered to be linear, an easy way to set the mapping parameter is to take down the analog input readings at 2 different positions (here we recommend mid-point or end points) and map them to the servo position parameter.

Accordingly, our first step is to hook up the controlling arm to the microcontroller through a USB cable, open the Arduino IDE program, copy the code above into the window and upload it to the chip. Make sure the right chip type and COM port is selected.

If everything goes well, the voltage of each resistor can be read from the serial monitor. Make sure the serial monitor is set to be at the right band rate (9600 in our case).

Then, move each of the joint to some certain positions and read
the analog input values from the serial monitor and white them down. Then adjust the servo arm to these positions and take down position parameters. Lastly, map the input values to the servo positions and send these values via digital output pins.

Playing around the mapping parameters will give you a better result of syncing motion.

To further enhance its accuracy, we can even add more positions as reference and map them piecewise.

Be the First to Share


    • Backyard Contest

      Backyard Contest
    • Silly Hats Speed Challenge

      Silly Hats Speed Challenge
    • Finish It Already Speed Challenge

      Finish It Already Speed Challenge

    4 Discussions

    Kris S
    Kris S

    4 years ago

    Video please!


    4 years ago

    Thanks! It starts the thinking process.

    To use usual produkts as base its important!


    4 years ago

    Nice instructible!

    Instead of using multiple MAP statements to improve accuracy, you might want to implement a curve-fitting function that returns the synchro value for each measured joint position. To do this you'd need to use a protractor to measure the resistance values returned from each joint at, say, every 10 degrees. Plug these values into excel and spit out a function which produces the least error across the measured values. Implement the function in the arduino subroutine.

    Would temperature affect the readings much? If so then you might have to measure temp and adjust or use position encoders instead.

    Best Wishes!