Final Draft
Final Draft
A manipulator arm can perform arm like tasks. The manipulator arm that we constructed in robotics class
has 3 degrees of freedom, using the LEGO NXT system, including NXC code. See page 5 for a picture of
the completed robot.
1
sideways position, the manipulator arm has a firm grasp
on many items and does not have issues with rolling or The base of the robot is essentially an extended
easily moved objects such as balls. The claw, a simple version of the base in the web instruction. Since two NXT
structure on the robot, needs to be orientated and placed bricks were used, the second brick was attached directly
in the right position in order to maximize the functionality above the first, with enough room in between to access
of the manipulator arm (See Figure 2). the buttons and screen. We found this construction to be
the simplest and most stable method of holding the bricks,
Figure 2: The current claw on the robot. compared to placing them back to back or stacking them
on their sides.
2
Figure 5: The rubber bands on the first joint. was split into two programs, controlling two motors and
four sensors each.
Figure 7: the code to program the rotating base of the robot. While-
loops make up the core of the code so that the touch sensors can act as
remotes continuously. As long as one button is pressed, the motor will
rotate forward. When the other button is pressed, the motor will rotate
in reverse. A mutex is used so that the two commands will not conflict
with each other.
mutex rotate;
task rotate1()
{
SetSensorTouch(IN_2);
while(true)
{
Acquire(rotate);
while(SENSOR_2==1)
Figure 6: The rubber bands on the second joint. {
OnFwd(OUT_B,-50);
}
Off(OUT_B);
Release(rotate);
}
}
task rotate2()
{
SetSensorTouch(IN_1);
while(true)
{
Acquire(rotate);
While(SENSOR_1==1)
{
OnFwd(OUT_B,50);
}
VI. Programming and Controlling the Robot Off(OUT_B);
Release(rotate);
Relative to others, the programming of the }
manipulator arm is simple. Compared to pre-programmed }
actions, however, a “remote control” system is most
task main()
suitable for the arm. The function of the robot is to be {
able to perform in multiple situations, adjusting to any start rotate1;
angle or distance within its allowed range. Pre- start rotate2;
programmed actions, no matter how complex, would limit }
the arm to certain realistic, predictable scenarios. ii
To accomplish this flexibility, the program relies
on touch sensors to act as remote control buttons instead There were also custom adjustments made for
of making the robot do one specific task. For each of the each motor to compensate for the different functions.
four motors, two touch sensors are used (because of this Power in the rotation motor is set to the highest, since the
sensor port requirement, the bricks were connected to two weight of the whole arm is upon it; the other motors
motors each). Pushing down a sensor for one motor will generally run at a power of 10. Originally, all the motors
cause the motor to turn forward (causing the arm to rotate used had different power settings to account for the
or bend one way); pushing the other sensor cause the weight of the arm when outstretched or picking up objects.
motor to reverse (the arm will rotate or bend in the However, this was ineffective as the numbers would be
opposite direction). inaccurate once the weight or position of the arm changed.
The codes for the individual motors are the same, Additionally, the power required to lift the arm upright
with slight adjustments to account for other variables such when holding an object would cause the arm to slingshot
as weight. A general example for the control of one motor backwards if empty-handed.
is in figure 7. Since two NXT bricks were used, the code To fix this, the codes for all the motors except
for the rotation motor use the OnFwdReg(output, power,
OUT_REGMODE_SPEED) command instead of
3
OnFwd(output, power). Using the regulation command motor connections: we moved all three relevant motors to
eliminates the necessity to calculate how much power to an action onto the same robot to avoid the greater
apply in order to counter the weight of the arm when difficulty of using Bluetooth between robots.
stretched out. Since the motors automatically increase
power when rotation slows, the command is also more VII. Conclusion
flexible as it will adjust to situations such as picking up
heavier objects [cite]. It also allows the arm to move at a The finished robot is a balanced, remote
slower, more precise pace. The OnFwdReg() command is controlled robotic arm that user can manipulate to grab,
also used in place of the Off(output) commands on the lift, and move objects. With a rotating base and two
other motors, with power set to zero. This keeps the arm bending joints to increase its range of motion, a horizontal
in any outstretched position, preventing it from lowering claw to grab onto its target objects better and adjusted
due to gravity. programming to support heavier or larger objects, the arm
Though the remote program is the most is capable of a variety of tasks. It can be automated to
functional in using the robot for many purposes, we also perform tasks such throwing a ball. The remote system
compiled a few set actions for the robot to do in order to implemented allows for these freedoms and possibilities.
test the movement capabilities of the arm as well as our Though not as flexible, strong, or durable as its
programming skills as designers. As such, the robot also commercial, titanium-made counterparts, our manipulator
contains prototype programs for actions such as throwing arm defines some of the capabilities and uses these types
a ball. These programs required some alteration of the of robots have for simpler, everyday tasks.
4
Claw
Arm Section 2
Joint 2
Arm Section 1
NXT’s
Joint 1
Counter Weight
i
D. Parker, “Robot Arm,” NXT Programs, 2007. [online]. Available: http://www.nxtprograms.com/robot_arm/steps.html.
[Accessed: July 28, 2010].
ii
J. C. Hansen, Lego NXT Power Programming: robotics in C. Winnipeg, Manitoba, CAN: Variant, 2007.