Introduction: UR12 Musician and Assistant Robotic Arm

About: Software Architect & Robotics Engineer

A Desktop-sized miniature robot arm that can perform accurate work by mouse operation, serve the tea and play music.

The project is an attempt to train to improve the automated capabilities to work accurately on behalf of humans using simple Possibilities.

A Background:

Robots can perform complex work accurately on behalf of humans, it is used not only in the manufacturing industry but also in outboard operation in space. I made a compact miniature to put such a robot arm on the desk.

The project is a desktop robotic assistant that can be utilized in many more applications than its predecessors. Built around an Arduino UNO R3, The main body is acrylic of thickness 3mm DIY easy to work with developed for makers and educational purposes.

Almost anyone can learn how to play with it in a few minutes. It supports visual programming as well as Arduino, Python, Processing 3 programming providing plenty of options for any range of user!

Step 1: Overview

Step 2: Design

As I mentioned before the shape is made from 3mm acrylic, made by a laser cutter accurately.

And the design is inspired by some open source designs available online.

Arm length: 60 cm

Width: 10 cm

Height: 45 cm

Wight: 900 gm

Step 3: Electronics Component

- Arduino board

- Arduino sensor shield

- Step down module (optional)

- X3 servo motors MG955

- X2 micro servos 9G

Step 4: Building the Shape

The Design has five degrees of freedom and it means we need 5 motors to achieve the target.

And degrees of freedom (DOF) means:

In statistics, the number of degrees of freedom is the number of values in the final calculation of a statistic that are free to vary. The number of independent ways by which a dynamic system can move, without violating any constraint imposed on it, is called a number of degrees of freedom.

The robot arm was assembled by using some screws and nuts

First, we need to fix the base as shown.

Second, we need to assemble the claw.

The claw is powered by metal gear servo motor rotate in 180 degrees connected with two arms operated through gear.

The rest of the arm doesn’t have motors because the shoulder and elbow motors are installed in the base itself as shown, both motors mechanisms work to handle the moves

Third, The Shoulder motor moves the arm up and down

The Elbow motor moves the arm forward and backward

Step 5: Power and Battery

The whole arm is working by a 5v battery, and here I’m using four 1.2 AA Lithium batteries to power up the motors and the Arduino board itself is powered by USB cable directly to the laptop.

In case you want to use a higher battery, you need to fix

Step down module to reduce the voltage using the screw

This is an LM2596 DC-DC buck converter step-down power module with a high-precision potentiometer, capable of driving a load up to 3A with high efficiency, which can work with Arduino UNO, other mainboards and basic modules.

In general, the performance of LM2596 Step-down Power Module is very good. You had better set the output voltage 5v lower than the input voltage, then the testing results will be more stable.

Step 6: Claw Modification

Recently I had to support the claw by fixing these circular handles to facilitate the capture process.

Step 7: Programming

The Idea is to record the coordinates of each motor then play back the moves in a sequence and here how to control any servo motors using a USB mouse:

the code is separated into two application, at first, you need to install processing 3 Application and write down this code:

//Processing code:

import processing.serial.*;      

int xpos=90; // set x servo's value to mid point (0-180);
int ypos=90; // and the same here
Serial port; // The serial port we will be using</p><p>void setup()
  size(360, 360);
  println(Serial.list()); // List COM-ports
  //select second com-port from the list (COM3 for my device)
  // You will want to change the [1] to select the correct device
  // Remember the list starts at [0] for the first option.
  port = new Serial(this, Serial.list()[0], 19200);

void draw()
  fill(255,0,0); //rgb value so RED
  rect(180, 175, mouseX-180, 10); //xpos, ypos, width, height
  fill(0,255,0); // and GREEN
  rect(175, 180, 10, mouseY-180);
  update(mouseX, mouseY);

void update(int x, int y)
  //Calculate servo postion from mouseX
  xpos= x/2;
  ypos = y/2;
  //Output the servo position ( from 0 to 180)

Secondly, open the Arduino IDE and copy this code :

#include Servo.h

Servo yservo;  Servo xservo; // servos for x and y</p><p>int ypos = 0;
int xpos= 0;

void setup(){
  xservo.attach(8); //(analog pin 0) for the x servo
  yservo.attach(9);  //(analog pin 1) for the y server
  Serial.begin(19200); // 19200 is the rate of communication

void loop() {
  static int v = 0; // value to be sent to the servo (0-180)
  if ( Serial.available()) {
    char ch =; // read in a character from the serial port and assign to ch
    switch(ch) { // switch based on the value of ch
      case '0'...'9': // if it's numeric
        v = v * 10 + ch - '0';
      case 'x': // if it's x
        v = 0;
      case 'y':
        v = 0;
Arduino Contest 2019

Participated in the
Arduino Contest 2019