Reconfigurable Articulated Robot Using Android Mobile Device

This paper focuses on the design and development of a reconﬁgurable three-degree-of-freedom articulated robot for conducting pick-and-place tasks. To implement the system, an Android platform for the manual control of an articulated robot using wireless Bluetooth technology was developed. This application allows the user to manually reconﬁgure the robot following the re-quirements of the integrated system via a user-friendly display. The articulated robot comprises four motors, three of which are used for positioning and orientation and ﬁnally used to carry out the pick-and-place task. An Arduino Un R3 board is used to control the movement of the links via a pulse width modulation method. We introduce a set of conveniently composed kinematic and dynamic mathematical models for positioning the robot’s arms and, in our results and discussion section, calculate and report the torque required to move each joint.


Introduction
e exponential growth in mobile technology and the development of remote-control device applications in recent years has motivated researchers to go beyond closedloop fixed industrial robotic applications to explore the tremendous potential for using open-architecture Android-based user-friendly displays to reconfigure robots to carry out designated tasks. Robots are multifunctional devices that are primarily designed to work in a manner that emulates human activities such as picking and placing, loading and unloading, and carrying out several surveillance, healthcare, industrial, and aerospace tasks. In the robotic field, the primary focus has been on reprogrammable robots, which require the application of a high level of programming skill. In this paper, we focus on a manually adjusted reconfigurable robot that can be controlled via a user-friendly interface in which slider movement is used to adjust each joint individually.
Android operating systems can be used to carry out manual robot control using wireless Bluetooth technology to monitor the current distance between the robot and obstacles via an ultrasonic sensor. Increases in the computational power and sensing abilities of smartphones and the recent availability of interface boards have made smartphone-controlled robots popular among a wide range of enthusiasts [1,2]. Reasonably priced and effective surveillance robots, which are controllable using an Android smartphone through an Ardunio microcontroller and can assume varied obstacle avoidance positions over a communication range of 50 m, have been shown to perform reasonably well. A smart trolley based on Android smartphone sensors that can move and demonstrate location to users has also been developed [3,4], and a robot arm dedicated to specific tasks based on different control approaches has been designed and developed [5].
In the field of defense, an Android-controlled prototype tank-based military robot with HC-05 Bluetooth module-enabled object detection and tracking capability has been developed and tested in simulated enemy target engagements [6].
A number of mobile-controllable robotic arm systems have also been developed. e LabVIEW controlled robotic arm is a robotic gripper that has the form of a human hand and can be ordered to adjust its pose to a set of desired coordinates. If coupled with a wrist and arm [5], it can be used to achieve inverse kinematics sufficient for calculating the rotational level of dexterity required for grasping and manipulation [7]. Mobile device-controlled robotic vehicles with additional four-degree-of-freedom (DOF) robotic arms have been used as assistive robots in search and rescue missions. ese automatic systems employ a graphical user interface (GUI) to ease utilization [8]. A number of robotic arm structures with synthesized 3-DOF capability based on the application of accurate algorithms and equations have been compared with respect to a variety of criteria [9].
With the growing popularity of Wi-Fi networks, network-based teleoperated mobile robots have become an active focus of research. To overcome the general shortcomings of robots in terms of high cost and power consumption, lack of portability, and difficulty in obtaining an outdoor power supply, remotely controlled teleoperated mobile robots based on Wi-Fi networks have been designed [10]. Of the two basic types of networks-dedicated and nondedicated-used for communication in networked control systems, nondedicated networks are preferable for robotic control applications owing to their low costs and ready availabilities [11,12].

Materials and Methods
A 3-DOF articulated robot for object manipulation tasks was developed in the Mechanical Engineering Department Laboratory at the College of Engineering of Jouf University, Saudi Arabia. e developed system comprises the following subsystems.
2.1. Manufacture. As the base of the robot, a cast-iron 1.2 ft 2 -area platform with four legs was developed. Robot Structural Analysis Products software was used in the design process to obtain suitable robot element designs in terms of cross-sectional position (sway or nonsway), length, thickness and radius, expected loads/weights, moments, and bendings. Using the program, biaxial bending calculations were carried out to obtain the column capacity. Design tests were performed to ensure that the joints and links were all in good absolute and relative positions. To ensure safety during use, some modifications were made based on design tests. To enable environment interaction, suitable robot arms and grippers were designed. In consideration of mechanical properties, environmental conditions, and health, safety, noise, and cost factors, Teflon materials were used to fabricate the robot arm and disc mechanism. Teflon, or polytetrafluorethylene (PTFE), is a plastic synthetic fluoropolymer of tetrafluoroethylene that can be used in various applications. PTFE has important properties that include a low friction coefficient and material inertness that keep it from reacting with different substances and provide a high resistance to liquids and a high melting point. PTFE has a strong carbon-fluoride bond, giving it Young's modulus of approximately 500 MPa and a tensile strength of 20 MPa. In terms of robotic arm applications, it has desirable toughness, density, and durability [13,14].
Electromechanical system characterized by intermediate modeled dynamics and uncertain parameters make the actuators unable to overcome the initial electromechanical inertia [15,16]. A proposed dynamic system supports sufficient power supply, standardized actuators are self-sustained startup, and control signal makes it possible to bring all actuators in home position before start of a new task. Further design parameters of the robot are listed in Table 1.

Android-Based Communication System.
e computational power and efficiency of handheld devices such as mobile phones and tablets are increasing exponentially. ese devices are currently equipped with dual-core technology processors with high video graphic signal transfer rates and support multiple connectivity options such as USB, Bluetooth, and Wi-Fi with 4 and 5G network support. In designing an Android-controlled robot, the most challenging task is to ensure that the Android device can interoperate with individual parts of the robot such as the actuators, specialized sensors, and security systems. In previous studies, this issue has been addressed using a layered approach [17,18].
In this project, a Bluetooth module was used to enable communication between the controller and Android. e telecommunication system components are shown in Figure 1.
In the proposed system, an ATMEGA328P-PU microcontroller is interfaced with a Bluetooth module through the UART protocol using code written in an embedded C language. Bluetooth is a wireless communications protocol running at 2.4 GHz that is suitable for forming personal area networks; Bluetooth HC-05-integrated communication system architecture is an extremely integral feature of low-power devices that is available in all smartphones. As a microcontroller board, we selected the Arduino Uno, which is based on the ATmega328P. It has 14 digital input/ output pins (of which six can be used as pulse width modulation outputs), six analog inputs, a 16-MHz quartz crystal, a USB connection, a power jack, and a reset button.
e Arduino Uno contains all of the functionalities needed to support a microcontroller and can be simply connected to a computer through a USB cable and powered by an ACto-DC adapter or battery. Arduino can interact with a variety of outputs, including LEDs, motors, and displays. Owing to its flexibility and low cost, Arduino is a very popular option for creating interactive hardware projects. e proposed robot employs servo motors, a type of DC motor with a closed feedback system in which the position of the motor can be communicated back to its control circuit. Unlike a stepper motor, a servo motor operates in a closed loop in which the motor shaft is connected to a series of controls that continue to move the shaft until it arrives at the desired position.
As noted above, Arduino can be powered in several ways. In the proposed system, it is connected directly to the board through a USB port using a USB cable. To directly power the motors, a 9 V battery pack is used. As another very important requirement in working with the Arduino, a seamless breadboard is used. Using this device, it is possible to create a prototype of an Arduino project without having to permanently solder circuits. e breadboard allowed us to create temporary prototypes and carry out experiments with different circuit designs. e holes (nodes) of the plastic housing of the control system are metal clips interconnected by strips of conductive material.

Robot Structure.
is proposed robot is an articulated RRR-type robot, a configuration used in 25% of all industrial robot arms (e.g., the ASEA IRb6 and SCEMI 6P01 [19]) because it is well adapted to anthropomorphic coordinates compatible with the human arm. A number of design standards were followed in the construction of various mechanical components. e arm design comprises two links and four rotating elements, with rotation carried out using a stepper motor gear directly connected to a rotating disc.
To select an appropriate motor, force calculations were carried out. In the process, the weights of the end-effector and object to be carried were taken into account. As a first step, a free body diagram with the robot arm stretched out to its maximum length was produced, as shown in Figure 2. e design process involved only two DOFs, corresponding to lift and rotation, respectively, and the center of mass of each linkage was assumed to be at the midpoint of the linkage length (L/2) [20].

Modeling of the Articulated
Robot. An articulated robot manipulator with two bars can be described as a robot with three joints-two rotational and one torsional joint-with the latter located at the manipulator base (joint 1). is configuration of joints and bars gives the manipulator a three-dimensional workspace. e set of positions and orientations of the end-effector of the robot manipulator for a given set of joint angles is called the forward kinematics [21,22]. e control design of an articulated robot arm can be categorized into two mathematical models, namely, a kinematic and a dynamic model. e robot arm kinematics indicate the coordinate transformations to be applied in the operation and joint spaces. ese transformations can occur in both directions, that is, in a direct (θ⟶y) and a reverse direction (y⟶θ). e coordinates θ and y are computed using the following equations: 2.4.1. Direct Kinematics. e proposed system has a 3-DOF robot arm, as shown in Figure 2.
e direct kinematic transformation for this 3-DOF space is given by where F is the coordinate force vector of the 3-DOF robot arm and H n n−1 is the transformation at an individual DOF, which is given by the following matrix: e solution for a given position is computed using matrices or a set of algebraic equations. An appropriate derivative of equation (2) gives the solution for the velocity and acceleration of the robot arm. e Denavit-Hartenberg parameters for each DOF are listed in Table 2.

Inverse Kinematics.
Inverse kinematics transformations are the opposite of forward kinematics transformations and are used to find the joint coordinates corresponding to a given set of operation coordinates.
is inverse transformation can be carried out using the transformation matrix in equation (3) or, more simply, by applying a geometric approach. In the proposed system, Joints 1 and 3 are the base and end-effector joints, respectively. For both joints, the rotation angle is limited to ± 90°. e shoulder joint angle (θ 2 ) can then be calculated using the coordinate scheme shown in Figure 3. A schematic of the inverse kinematics is shown in Figure 4.
After determining the method for computing the rotational angle, it is a simple task to compute the shoulder joint angle (θ 2 ): where L 1 and L 2 are the lengths of links 1 and 2, respectively. e wrist angle (θ 3 ) is used to position the end-effector.
To derive the kinematic relations of the robot, the Lagrange approach can be applied as follows: from which the equation of motion can be obtained as e above equations are obtained from the matrix transformation used in deriving the direct kinematic and dynamic quantities, which include the moments of inertia and weights. ese dynamic parameters are related to the DH coordinate frames defined in Figure 3. Equation (6) can be rearranged to obtain the second derivative of the joint angle as in which the effects of inertia are represented by the matrices M � M(θ, _ θ) and N � N(θ, _ θ), the effects of gravity are given by the vector g � g(θ), and the torque around the joint is represented by the vector τ. Equation (7) can then be used to obtain the control design as the following state-space linear model:     Journal of Robotics e linear state-space model in equation (10) is obtained by applying the control action vector u in a modified form of the model in equation (8). e variable matrix A(x) of the state-space model depends on the state vector x � [θ, _ θ] T . e torque around a particular joint can be calculated from the basic algebraic relation in equation (11), which is produced by the control action represented as an auxiliary vector u.
e state vector x has three joint angles (Figure 3) with the following 3-DOF derivatives: A custom mechanical gripper composed of stamped aluminum with a weight of approximately 0.17 kg and a servo of recommended size was selected for the project [23,24]. is configuration reduces the chance of damage to the servo but limits the gripping power. Depending on the servo motor used, the claw can open to approximately two inches and can pick up relatively heavy objects. A new spring-loaded clutch helps protect the servo gears from damage and increases the gearing ratio to 2 : 1, allowing the servo to act over its entire range while providing additional gripping power. e gripper also has a mounting plate on its bottom side that accepts standard spacings for servo mounting, as shown in Figure 5. e complete integrated 3-DOF robot platform is shown in Figure 6. As an initial experiment, the arm successfully performed a pick-and-place task using a 100 g weight (Figure 7).

Communication between the Robot and Mobile Device.
Communication between the robot and mobile device is established through a Bluetooth device, which in asynchronous mode can handle up to 720 kbps. e Massachusetts Institute of Technology (MIT) App Inventor app was used to build the GUI for the Android platform. App Inventor for Android is an open-source web application provided by Google that is currently maintained by the MIT. It enables the computer-based creation of software applications for the Android operating system. MIT App Inventor provides an innovative introduction to programming and app creation based on the transformation of text-based language coding into the visual dragging and dropping of building blocks. e simple graphical interface allows inexperienced users to create basic, fully functional apps within an hour. App Inventor has three main modules: (i) the App Inventor designer, (ii) the App Inventor Blocks editor, and (iii) an emulator or Android phone. e App Inventor designer is accessible through a web page on which all editable tab icons for integration development are available on the left-hand side of the window (Figure 8). e right-hand side of the designer window allows users to view a screen and all components added to the screen. Using the App Inventor Blocks Editor, it is possible to select subblocks to create the first full-code block. e left-hand side of the Design Screen contains a block for connecting the smartphone to the Bluetooth module. e next block allows Base Breadboard + controller + bluetooth Shoulder joint Wrist joint Base joint Gripper

Journal of Robotics
ListPicker1 to select and connect to the desired Bluetooth device and to set the "hidden" label, Label1, to read "CONNECTED." If the default Text of Label1 is set to "NOT CONNECTED," it changes its color to red. e screen also contains slider blocks for controlling the servo position and buttons for specified tasks. e position of a slider can be changed by sending the Bluetooth "Send Text" command prefixed with a specified slider or button to the Arduino controller.
e final module of the MIT App Inventor is the Blocks Editor emulator, with which the user can interface via the connect option to test how the application would function in the real world.
e Blocks Editor is accessed through a mobile GUI, which is shown in Figure 9.
Our android robotic platform is characterized by its low cost, robustness, flexibility, modularity, and ease of use. To establish a useful connection between the Android and the device, it is necessary to ensure that all integrated circuits are active and that the power supply is maintained throughout the system. After launching the application, the status of the Bluetooth adapter is first checked. If it is turned off, the application asks the user for permission to turn it on. If "Start" is selected, the Bluetooth will turn on together with the application's user interface. If this switching is not permitted but the Bluetooth is already turned on, the application is terminated and the user is informed that the device is not connected. e slider and check position are used to set the positions of the various joints shown on the screen.
e "Continue" button on the screen is used to maintain the work cycle while all necessary locations and orientations are being adjusted. Under this architecture, flexible programming structures that maintain records of the updated current position of all motors and initiate cyclic operation are used. A deployment diagram for the application is shown in Figure 10.

Experiment.
To assess the system's capabilities, a pick-and-place exercise was carried out. After checking all hardware settings and initializing the software programming, the positions of all of the joints were adjusted manually by visually inspecting and then moving them, and then the "Continue" button on the mobile screen was pressed. e robot successfully performed the given task, which involved the picking and placement of a circular hollow box. e positions of each joint over the course of the exercise are shown in Figure 11.

Design Parameter.
As a result of time and cost constraints, we were only able to develop a prototype articulated  robot and limited our study to a laboratory experiment carried out in the Mechanical Engineering Department at Jouf University in Sakakah, Saudi Arabia. In developing the prototype robot, several design standards were considered. e design parameters used to develop the DH robot arm are listed in Table 1.
Static torque calculations for both the base and shoulder joints are very important in developing this type of robot. e static torques calculated at these joints are listed in Table 3.
e developed articulated robot is cost-effective because of its simple mechanism and minimal use of actuators to perform the required tasks. e costs of elements of the robot arm are listed in Table 4.

Conclusion
In this study, we developed a robot arm control method. e articulated robot arm we developed uses four motors and represents the most commonly used industrial model (25% of all industrial robots use pitch, yaw, and roll-type robot arms).
To develop our control system, we carried out a complete mathematical formulation of the forward and inverse kinematics needed to dynamically model a two-link 3-DOF robot manipulator. In the forward kinematics modeling of the system, the equations for the position of the end-effector with respect to the base frame were derived by applying the DH conventions and using homogeneous transformation matrices. e kinematic and dynamic models helped us to fully automate the motion of the robot's joints for use in an unknown environment. Interaction with the robot is facilitated through the use of a mobile device hosting an app constructed using the MIT App Inventor online application, which is inexpensive and readily available. System configurability was innovatively implemented by enabling the adjustment of joint positions through a graphic user interface applying slider movement. e positions set in this process with respect to the physical environment are stored in a cyclic operation within the robot's workspace.  Figure 11: Position of robot joints during pick-and-place task.  Although we attempted to develop an arm that could hold up to 800 g, motor torque constraints limited us to 200 g. e robotic arm employs a simple structure in which a rotating disk directly translates the motor moment into link rotation, thereby minimizing the frictional loss between contact surfaces. e simple mechanism and minimum use of actuators make the model quite cost-effective.

Data Availability
No data were used to support this study.

Conflicts of Interest
e authors declare that they have no conflicts of interest.