loading
This project answers to a need I had: a third hand that holds a camera while I perform a test and takes photos/videos (useful when you're stuck at the lab late at night, and suddenly need a photographer).
The downside to a robotic arm was obvious - It needs to be programmed, and it is the last thing you want to do when you need to make a video. So I made it motion capturing device as well...

Motion capturing and playing device - you "teach" the arm what it should do, and it repeats the movement! (no programming or computer needed).



For long time I wanted to transform standard IKEA Tertial lamp (here) into a functional robotic hand, I wanted to make it easy, without any manufactured parts, and to control as many degrees of freedom (DOF) as possible.
After modeling the lamp using my favorite CAD software, I realized the standard servos, placed in the right places can (to some extent) work.


Step 1: Stripping and Modeling IKEA Tertial Lamp

First step is, of course, to get a Tertial lamp, should be quite easy to get here, and remove the power cord (must be cut), dismantle the lampshade (But leave it's connector !) and remove the springs for future use.


3D Parasolid (.x_t): Download

Step 2: Hacking Servos for Analog Feedback

In purpose to get feedback from the servos, they should be capable to give feedback (analog), ready made analog servos can be found at Adafruit, or can be manually made as described here:
( I used cheap MG995 ), after some ruined servos I managed to figure the right steps:
  1. Pick the servo...
  2. USE TAPE (see image) to hold the top (the side near the power output) otherwise the transmission might fall apart
  3. Remove 4 cross bolts from the bottom.
  4. Take the PCB out gently, and position in your soldering stand
  5. Solder wire to the middle connection of the servo's potentiometer
  6. Assemble all back to have an "Analog feedback" servo.
repeat 3 times for all servos needed for the project.

Step 3: Camera Adapter

Connection of the camera to the arm should be easy release and enable full rotation,

Camera to servo steps:
  1. Pick one servo.
  2. Pick some nuts and arms (that come with the servo)
  3. Get a nut to mount the camera (any 3/8" nut will do).
  4. Build an arm that fit your camera,
  5. You're done !
Now, you need to connect the servo to the arm tip:
  1. Pick the arm tip part
  2. Bend the little metal plate to straight line.
  3. Take any small block/profile and mount to the metal plate.
  4. Mount the servo to the same block/profile
  5. You're done !

Step 4: Connecting Motors to the Arm

The arm should be actuated with two servos (the third is used for the camera - see previous step)

Servo 2 (arm end) mounting steps:
  1. Dismantle the triangular plate from the arm tip.
  2. Drill few holes to enable mounting of the servo arm to the plate.
  3. Mount the servo arm to the plate
  4. Assemble the plate back to the arm
  5. REPLACE THE UPPER BOLT, with a bolt the goes directly into the servo center of rotation. (see images)
  6. Tighten the servo body to the bar (I used spacers and zip ties - improvise!
Servo 3 (middle) mounting steps:
  1. Dismantle the trapeze plate from the arm.
  2. Drill few holes to enable mounting of the servo arm to the plate.
  3. Mount the servo arm to the plate
  4. Assemble the plate back to the arm
  5. REPLACE THE UPPER BOLT, with a bolt the goes directly into the servo center of rotation. (see images)
  6. Tighten the servo body to the bar (I used spacers and zip ties - improvise!

Step 5: Wiring and Power Sourcing

Wiring:

Note - since the servos require high current - I used a 7.4V power supply (batteries also will do), otherwise there will be all kind of faults.

SERVOS:
Each servo is connected with 4 wires -
  • Black - ground (Ensure to connect the Arduino ground to the power supply ground)
  • Red - POWER SUPPLY (I used a lab power supply 7.4V - to gain max torque form the motors)
  • Yellow - To the PWM output pin of the Arduino
  • White (my addition) -  to analog input pin of the Arduino
* The three servos are connected to PWM 9,10,11 and analog input A0,A1,A2

Buttons:
There are 2 buttons, connected to pins 7,12 (ground in)

Arduino:
I used Arduino Uno

Fritzing file: Download




Step 6: Software (Arduino Sketch)

The Arduino sketch

The Arduino code has two functions:
  1. Record the analog inputs from the servos potentiometers       (RECORD button)
  2. Operate the servos with the recorded values                               (PLAY         button)
Notes:
  • The recorded values are stored in the EEPROM memory of the Arduino - limits the recording (adding SD card will solve it).
  • The sketch prompts the recorded values and the played values, in real time, to the SERIAL MONITOR, but this is not needed to the working of the sketch.
  • Good tutorial for analog feedback servo can be found here
The Arduino sketch:
Download Arduino sketch

// (http://www.KeerBot.com)
// Example code for recording and playing back servo motion with an analog feedback servo
// 5 Dec2013, using manually hacked servos

#include <Servo.h>
#include <EEPROM.h>

#define CALIB_MAX 512
#define CALIB_MIN 100
#define SAMPLE_DELAY 25 // in ms, 50ms seems good

uint8_t recordButtonPin = 12;
uint8_t playButtonPin = 7;
uint8_t one = 9, two= 10, three=11;
uint8_t OneIn = A0, TwoIn=A1, ThreeIn=A2;
uint8_t ledPin = 13;

Servo myServo1,myServo2,myServo3;

void setup() {
  Serial.begin(9600);
  pinMode(recordButtonPin, INPUT);
  digitalWrite(recordButtonPin, HIGH);
  pinMode(playButtonPin, INPUT);
  digitalWrite(playButtonPin, HIGH);
  pinMode(ledPin, OUTPUT);
  uint16_t addr = 0;
  Serial.println("Servo RecordPlay, 3 Servos version");
  Serial.println("By http://www.KeerBot.com");
}

void loop() {
if (! digitalRead(recordButtonPin)) {
    delay(10);
   // wait for released
    while (! digitalRead(recordButtonPin));
    delay(20);
   // OK released!
    Serial.println("Recording");
    uint16_t addr = 0;
    digitalWrite(ledPin, HIGH);
    pinMode(OneIn, INPUT);
    pinMode(TwoIn, INPUT);
    pinMode(ThreeIn, INPUT);
    while (digitalRead(recordButtonPin)) {
       
        uint16_t a = analogRead(OneIn);
        uint16_t b = analogRead(TwoIn);
        uint16_t c = analogRead(ThreeIn);
       
        Serial.print("Read analog: "); Serial.print(a);Serial.print(" , ");Serial.print(b);Serial.print(" , ");Serial.print(c);Serial.print(" , ");
        // one
        if (a < CALIB_MIN) a = CALIB_MIN;
        if (a > CALIB_MAX) a = CALIB_MAX;
        a = map(a, CALIB_MIN, CALIB_MAX, 0, 255);
        // two
        if (b < CALIB_MIN) b = CALIB_MIN;
        if (b > CALIB_MAX) b = CALIB_MAX;
        b = map(b, CALIB_MIN, CALIB_MAX, 0, 255);
        //three
        if (c < CALIB_MIN) c = CALIB_MIN;
        if (c > CALIB_MAX) c = CALIB_MAX;
        c = map(c, CALIB_MIN, CALIB_MAX, 0, 255);
      
        Serial.print(" -> "); Serial.print(a);Serial.print(" , ");Serial.print(b);Serial.print(" , ");Serial.println(c);
        EEPROM.write(addr, a);
        addr++;
        EEPROM.write(addr, b);
        addr++;
        EEPROM.write(addr, c);
        addr++;
        if (addr == 512) break;
        delay(SAMPLE_DELAY);
    }
    if (addr != 512) EEPROM.write(addr, 255);
    digitalWrite(ledPin, LOW);
    Serial.println("Done");
    delay(250);
}

  if (! digitalRead(playButtonPin)) {
   delay(10);
   // wait for released
   while (! digitalRead(playButtonPin));
   delay(20);
   // OK released!
    Serial.println("Playing");
    uint16_t addr = 0;
    myServo1.attach(one);
    myServo2.attach(two);
    myServo3.attach(three);
   
    while (digitalRead(playButtonPin)) {
        // One
        uint8_t x = EEPROM.read(addr);
        Serial.print("Read EE: "); Serial.print(x);
        if (x == 255) break;
        x = map(x, 0, 254, 0, 180);
        Serial.print(", "); Serial.print(x);Serial.print(", ");
        myServo1.write(x);
        addr++;
        // Two
        x = EEPROM.read(addr);
        Serial.print(x);Serial.print(", ");
        if (x == 255) break;
        x = map(x, 0, 254, 0, 180);
        Serial.print(" -> "); Serial.print(x);Serial.print(", ");
        myServo2.write(x);
        addr++;
        //Three
        x = EEPROM.read(addr);
        Serial.print(x);
        if (x == 255) break;
        x = map(x, 0, 254, 0, 180);
        Serial.print(", "); Serial.print(x);Serial.println(", ");
        myServo3.write(x);
        delay(SAMPLE_DELAY);
        addr++;
           
        if (addr == 512) break;
        }
    Serial.println("-");
    Serial.println("Done reading EE");
    myServo1.detach();
    myServo2.detach();
    myServo3.detach();
    delay(250);
}
}






Step 7: Future Developments & Thanks.

Koby C. and HUJI- Power supply
www.Adafruit.com -For the Analog feedback servo Arduino sketch - here
Yaglush - for everything
<p>I really love it!!</p><p>It would be possible to include a new fuction to play and pause recorded movements?</p>
<p>hi..i follow your instruction..but i use mg996 servo ..recorder servo test sucsess,,but moto so slow,,and cannot move same recorded..just move little bit</p>
<p>I bet Ikea would love this one!</p>
<p>Dope IKEA hack! I would also totally buy this if there was a kit:)</p>
<p>Nice Job...Do you sell as a Kit ?</p>
<p>I've been looking at this design very carefully, I really like your idea of using a pre-made arm that is cheaply available and also fairly light while being structurally sound. Making the arm a learning machine using servos with a feedback mechanism is similarly well done. </p><p>I'm going to try and make a version that has the full 6 DOF and rotating claw, with a turn table so that the arm can swivel.</p><p>Two questions:</p><p>1. Why remove the springs? To my knowledge, they would help counterbalance the weight of the arm and make it easier for the servos to actuate and hold the arm in place. </p><p>2. Trying to move the entire arm will require a lot of torque. I was thinking about placing two servos facing in opposite directions at the base of the arm to double my torque, but I don't see this done very often. Do you have any reason why?</p>
You could also use something like this pretty easily I imagine? <br>http://www.amazon.com/Sharpics-SPMP16-Tabletop-Monopod/dp/B0013XVDXG/ref=sr_1_2?ie=UTF8&amp;qid=1386822800&amp;sr=8-2&amp;keywords=sharpics
Good idea, I actually hacked one analog joystick few months before, maybe next time... :)
this is the ugliest untidy fritzing schematic I ever saw.... anyways, beside that...good instructable!
I'll be glad if you want to volunteer and fix it, I&rsquo;ll send it right away to you (or D/L here: <br>https://drive.google.com/file/d/0B1rUcbjIOiwobk5zMEkweGxEbWs/edit?usp=sharing ) <br>
haha, sure! this night I will do my best, I really like like to help others, also I am very glad about the way to took my comment :), have fun!
mmmmmm <br>i would <br>instead of learning it <br> <br>use an old analog joystick to move it <br> <br>so you can move it with ease :P

About This Instructable

38,631views

361favorites

License:

More by wavegm:DIY Nail puller / remover DIY Car LCD sun shader  RC Submarine Hack - Android controller (Arduino, Android, Submarine, Bluetooth)  
Add instructable to: