# Educational lego nxt robot arm

Michael Thompson 1Victoria M. Willem Noriega 2Vanessa Martinez 3. Forest Ave, Tempe, Arizona mjthomp3 asu. Forest Ave, Tempe, Arizona, jewillem asu. Forest Ave, Tempe, Arizona, vimartin asu. Abstract - In this paper we present the use of a 3R Lego robotic arm for teaching basic robotic concepts. The Lego Mindstorms NXT kit is an affordable equipment that can be used to better visualize robotic concepts usually taught in classes. The 3R Lego Robot has 2 degrees of freedom and has been equiped with an accelerometer located at the end-effector to educational lego nxt robot arm acceleration data in the x, y and z axes.

Additionally, a gyroscope was placed at the joint for the up and down movement. This allowed for obtaining a plant educational lego nxt robot arm the 3R Lego Robot in order to understand the inverse and forward kinematics as well as the physical representation of Denavit-Hartenberg DH parameters, velocity manipulability ellipsoids and trajectory planning. This is essential and key in the study of plants that is relevant to everyday use in the industry and academia.

This will allow professors at the university to teach more easily with hands-on approach. Therefore, this can be extended to more complex analysis and feedback control. This will lead to better analysis of the system and provide educational lego nxt robot arm students with higher education of what they have learned in class.

Furthermore, students will be more competitive to obtain jobs in industry by combining theoretical with experimental approach. Traditionally, industry core concepts are not taught in the class and may be incorporated with the 3R Lego robot for resume building and skill set application.

Some papers indicate the use of different programming languages for the Lego Educational lego nxt robot arm however, none of them have the capabilities educational lego nxt robot arm potential of Matlab and Simulink. Additionally, some others have presented educational lego nxt robot arm work to teach robotic-related concepts, but they either lack the hands-on approach or the hardware utilized is expensive. The importance of this study lies on understanding and implementing basic robotic concepts in Matlab and Simulink together with a 3R Lego robot.

Therefore, a more complex Simulink model can be developed for controller design purposes. This paper describes a comparison of a simulation model versus a real life educational lego nxt robot arm for helping students to understand modeling system theories educational lego nxt robot arm real world applications. Unrestricted use, distribution, and reproduction in any medium are permitted, provided the original work is properly cited. As technology advances, engineers have always been interested in mimicking animal or human-like behaviors using robots.

A great motivation to study robotics is how often they are used in industrial applications. Someone would be hard-pressed to find any factory that does not heavily depend educational lego nxt robot arm robots to educational lego nxt robot arm. They are faster, more precise, and less expensive in the long run when compared to their human counterparts.

Robots are capable of performing a variety of different tasks. In addition, they do not need common safety and comfort requirements that humans need in order to continuously perform them.

Furthermore, as long as the robots are intuitively designed, they can be adapted and used in the future for different maneuvers as well. However, understanding how these apparatus work in real life constitute an important component in robotics-related classes.

Although robotics concepts are often taught in many books [1], [2], [3], they become hard to visualize in a three-dimensional space. To cope with this problem, some simulating programs have been proposed in the recent years.

In a later version, features such as transformations, import of a 3D CAD model and inverse kinematics were also included [6].

In the same matter, a Matlab GUI was developed to simulate and learn the basic concepts of robot dynamics [10]. They include the selection of well-known manipulators like Puma, Stanford and Scara by changing the link masses, inertias and the Denavit-Hartenberg DH parameters. The importance on the latter lies on the fact that they are typically used to represent the architecture of a robotic arm and are usually provided by its manufacturer [11].

The DH parameters were used to define different configurations of a FANUC LR Mate iB robot and compared to the results provided by an open software for the synthesis, analysis, simulation and control of the same robot [12]. Nonetheless, although they allow to have a better understanding of real physical systems, they become expensive for educational purposes. Recent studies demonstrate the extended use of Lego NXT kits for educational purposes [13], [14]. While most of them have been used for controller design [15], [16], [17] and signal processing manipulation [18], the number of articles found for teaching basic robotic concepts is lacking.

In this matter, a 3 degrees of freedom DOF drawing robot has been proposed [19] using Lego NXT and LejOS [20], a program that allowed to have a better resolution for the position of the motor axle compared to the NXT default operating system. Yet, none of them use Matlab and Simulink to study and control the robotic arm; therefore, they limit the research scope that educational lego nxt robot arm be developed with the use of Lego NXT kits.

Matlab and Simulink constitute a powerful environment that allows the use of toolboxes such as robotics [22], system identification [23], control system tuning [24] and optimization [25] that leads to a better understanding of control systems and robotics. Our goal is to build and program a robotic arm using critical robotic concepts. This includes forward and inverse kinematic equations, DH parameters, force and velocity manipulability ellipsoids with the use of Simulink and Matlab.

This will allow a future integration of more advanced control-related concepts through the use of existent Matlab toolboxes. In order to control the robot arm to accomplish the task, several analyses were needed including the forward and inverse kinematics, the workspace, trajectory planning and the force and velocity manipulability ellipsoids educational lego nxt robot arm the end-effector throughout all the configurations.

The manipulator constituted by 4 links including the base connected by 3 joints. The aim of forward kinematics is to determine the end-effector position and the orientation as a function of the joint angles. It was illustrated in class that the position and orientation of a body with respect to a reference frame are described by the position vector of the origin and the unit vectors of the frame attached to the body.

Hence, with respect to the base frame, the forward kinematics function can be expressed by the homogeneous transformation matrix. Since the manipulator structure is an open kinematic chain, each joint connects two and only two consecutive links. Therefore, it is reasonable to first describe the kinematic relationship between consecutive links and then to obtain the overall description of the manipulator kinematics in a recursive fashion [1].

To this purpose, the Denavit-Hartenberg DH convention was used to construct the direct kinematics function by composition of the individual coordinate transformations expressed by Eq. The frame for each link was defined as shown in Fig. Therefore, the coordinate transformation describing the educational lego nxt robot arm and orientation of the end-effector frame with respect to the base frame is given by Eq.

Therefore, the homogeneous transformation matrix for this manipulator is shown below. Consider the arm in Fig. The axes xi were chosen to minimize the calculation. The DH parameters are specified in the table 1.

It is worth pointing out that the frame 3 does not coincide with the end-effector frame and the end-effector frame can differ due to the different tasks.

If the task is to be specified for the end-effector, it is necessary to assign the end-effector position as a function of time. Accounting for the dependence of position from the joint variables, the forward kinematics equation can be written in the form of Eq. This expression shows three joint space variables that allow specifications of at most three independent operational space variables. On the other hand, the orientation is not a concern, thus all joint angles can be fully defined given a position of the end-effector.

The inverse kinematics problem consists of the determination of the joint variables corresponding to a given end-effector position. The solution to this problem is of fundamental importance in order to transform the motion specifications, assigned to the end-effector in the operational educational lego nxt robot arm, into the corresponding joint space motions that allow **educational lego nxt robot arm** of educational lego nxt robot arm desired motion.

As mentioned above, the manipulator is not a redundant structure, it is easy to compute the closed-form solution for the inverse kinematics based on Eq. Therefore, the solution for the inverse kinematics can be obtained as:.

The workspace is the region described by the origin of the end-effector frame when all the manipulator joints execute all possible motions [3]. Since the manipulator has less than 6 degrees of freedom DOFsit cannot take any arbitrary position and orientation in space. Therefore, it is necessary to compute its workspace to guarantee all the positions along the path are reachable for the manipulator.

In order to simplify the calculation, we chose the end-effector as the center of the third joint and the workspace is shown as Fig. Given a educational lego nxt robot arm of joint variables, the educational lego nxt robot arm of the operational space variables deviate from those computed via direct kinematics and the direct kinematics equation is dependent on the DH parameters by Eq.

After establishing the relationship between the joint variables and the end-effector position, we are able to compute the differential kinematics to map the joint angle velocities and the end-effector velocities. Therefore, if the end-effector location is expressed with the reference to a minimal representation in the operational space, the Jacobian matrix can be computed via differentiation of the forward kinematics function with respect to the joint variables [1]:.

Therefore, we are able to compute the general version of the Jacobian matrix for our Lego arm and the result shows as below:. The evaluation of the manipulator is very helpful for determining suitable manipulator postures to execute a given task in the current configuration.

Therefore, it is necessary to compute the velocity manipulability ellipsoids for all the configurations during the task. This allows us to make sure that there are no singular configurations, and more importantly, it can help us to obtain an idea of the capability at the end-effector for all configurations.

Consider the set of joint velocities of unit norm [3]:. Through the differential kinematics equation 4 solved for the joint velocities, we can obtain that:. For our Lego arm, since it is a nonredundant manipulator, the points on the surface of the sphere in the joint velocity space are mapped into the points on the surface of the ellipsoid in the end-effector velocity space as shown in Fig. The Simulink model encompasses three motors and six time signals. The motors are connected up and work together in a time sequence in order for the 3R Lego robot to work properly within the desired design specifications.

The entire robot ran for approximately 10 seconds allowing each motor to work independently of each other. The motors were actuated at specific time segments so that a smooth path trajectory was accomplished. Three simulated signals of each motor working independent of each other. Three blue signals works together in time to actuate the arm motor. One green signal is actuated to avoid an object during its path. Two red signals are actuated to allow the end-effector to grasp an object and set it back down.

The difficult part of programming the motors was to get the educational lego nxt robot arm to work in sequence. After one motor would start the other motor would stop and start. To correct this the global configuration of the motors had to be looked at so that the motors functioned in sequence yet independent of one another as shown in Fig 3a.

Given an initial configuration and a final assigned posture, we selected a path for the end-effector in the operating space based on workspace and manipulability ellipsoids analysis. We divided the motions into several parts, including 1 reach an object, 2 pick up the object, 3 lift the object, 4 avoid an obstacle, 5 place the object back down and for each part, it lasts approximately 2 seconds.

The cubic spline trajectory was chosen to plan the point to point motion for each part of the motion. Based on the inverse kinematics, each part of the motion only needs one joint to move which simplifies the calculation. The position curve shows that the initial joint angle is 90 degrees and the final joint angle is 0 degrees.