Working on Robotics arm

I am working on a robotic arm that picks and places an object. Controlled by Arduino UNO with 6 servos. I am using MATLAB to operate it.
I have two main issues:

  1. I get an error of around 5 cm from desired and theoretical position. Is this common, or am I doing something wrong with the forward and inverse kinematics(which I believe I am not)?
    The robot and its dimensions can be seen here:here and here. Though it might appear a small error, it does matter as the dimensions of the links are small.

  2. When I run my servos to an angle close to range of servo(close to 0 or close to 180), the robot goes out of control. Well, this doesn't happen with all the servos, only for 3 of them and I have an opinion that it happens because as the links stretch out(like when all the links are horizontal) more torque is created at the center of robot.

I am looking for any constructive suggestions, opinions.

Not all servos can manage a range of zero to 180. I'd suggest that you do some experiments with the ones you have to find out what they are actually capable of.

Thanks for the reply, I completely forgot abt checking the range.

I don't think the range is a problem here. I can run the motors close to zero keeping all the other links vertical but I can't run the motor close to 20 degree if the links are nearly horizontal

Hrushi_Arduino:
but I can't run the motor close to 20 degree if the links are nearly horizontal

Maybe you are overloading the servo - which can damage the servo.

Post a diagram or photo showing your robot arm and the positions of the servos.

I get an error of around 5 cm from desired and theoretical position

What level of accuracy do you want?

...R