Design and Analysis of a Spraying Robot

An indoor spraying robot is built in this research to solve numerous challenges associated with manual spraying. The mechanical, hardware and essential technologies used are all detailed and designed. The proposed spraying robot's conceptual design is split into two parts: hardware and software. The mechanical design, manufacturing, electrical, and electronics systems are described in the hardware part, while the control of the robot is described in the software section. This robot's kinematic and dynamic models were developed using three links that move in the x, y, and z directions. The robot was then designed using SolidWorks software to compute each connection's deflection and maximum stresses. The characteristics of the stepper motors, power screw and belt drive, are calculated . Finally, an Arduino-Nano controller and stepper motor actuators were used to build and run the robot. As a result, the robot was able to move smoothly vertically and horizontally, according to the findings of the experiments as shown in figures 22, 23, 24, and 25. These figures showed the position and velocity curves of the links of the robot.


Introduction
During the development of science and technology, industrial robots appeared in industrial operations. Industrial robots are electromechanical devices that can perform industrial tasks accurately; besides that, they are used to reduce the risks of industrial processes for humans in continuous work and reduce the consumption of materials. Industrial robots can move in rotary motions such as articulated, SCARA, cylindrical, spherical or linear motion. The Cartesian robot is also called a rectilinear or gantry robot. It has three linear joints (or a combination of them) that use the Cartesian coordinate system (X, Y, and Z). This robot may also have an attached wrist to allow for rotational movement. The prismatic joints deliver linear motions along the respective axes. This robot is employed in material handling, computer numeric control machine load/unload, spraying materials, etc. The spraying operation is one of the essential processes in industrial robots, the most important of which is spraying for painting walls, cars, and devices and spraying insecticides on plants to get rid of agricultural pests and others. Also, they are used in purgation hospitals to prevent viruses. Therefore, the use of industrial robots to spray instead of humans is vital to caring for the health of the human body because it is affected by the paint and ventilation conditions of the spraying room. Furthermore, these robots also achieve a good quality of the spray-painting of the products. In (2013), [1] review the works related to 2 coating thickness problems and improving the multi-objective constraint. However, it did develop methods for modeling the deposition of materials such as Gaussian, Cauchy, Parabolic, and Beta models, but it did not come with satisfactory results. Fortunately, the min-max method has proven itself in formulating the paint film function for free-form surfaces. The appropriate tool path within an appropriate time and membrane quantity deviation was also inferred. From this data, the paint deposition rate model algorithm and the assumption of the gun shape of the paint like a cone were available. In 2015, [2] compare the cost and risks of hand painting over painting robots, a threeaxis (X, Y, and Z) with a two-part Cartesian robot controlled by a PLC and a computer was implemented. The first part is the unit of movement of the three axes x, y and z. Each axis contains a single-phase motor and transmission mechanisms and sensors to control motion. The second is the coating unit created by a pneumatic system. In 2015 [3], The robot chassis was developed to suit painting and interior wall decoration works, and it consists of 8dof, of which 6dof are robotic arms mounted on a 2dof movable base which are connected to it by four points of wheels. The differential system was driven, and a kinematic model of the robot joints was shown, and through the resulting matrix from the Jacobin matrix, the movement was planned and controlled. In 2017 [4] suggested a mathematical spray model of robot painting system based on Gaussian distribution intensity of spray painting operation, it also compared a characters of color-intensity when changing the distance between airbrush and painting surface within the spraying time. In 2017, a gantry robot derived a mathematical and dynamic model using a bond graph technique. Furthermore, the robot has simulated its motion on MATLAB within SolidWorks design and it was using a quadratic function with a velocity profile called a trajectory plan of the robot as in [5]. In 2019 [6], the dynamic model obtained the appropriate inertia parameters of the Kuka LWR robot and its final efficacy. The geometric parameters also distinguished as shown in the tables the fastest time by defining those parameters as the joint torque was estimated with the RMS difference. Based on the robot's self-sensing, the force sensor was replaced by an estimate of the external forces applied, and the torque was related to the Jacobin matrix. The kinetic accuracy clarified the accuracy of the external forces. In (2020) [7], a suitable material was proposed to design industrial robots, especially spray-painting robots. So, it had agreed to choose aluminum alloy to create the arm to reduce the weight of the portable arm and to choose steel alloy in the design of the base because it requires high rigidity and strength. In (2021) [8], a painting mobile robot was designed to avoid accidents of painting buildings on humans. The structure is designed from a moving part with a spray gun using two Arduino UNO boards connected wirelessly (to get rid of the burden of long electrical wires). First, the robot detects the area to be painted and completes it with high accuracy on its own. Next, the robot moves through the DC motor to move the four wheels, where the position of the wall to be painted is detected using the ultrasonic sensor. Then the spray gun paints the wall either horizontally or vertically. This paper presents the kinematic and dynamic model of the 3-DOF Cartesian robot (X, Y, and Z) for painting wall operation and analyzes robot fabrication for each link of it. In addition, the mechanical structure of this robot with its details is discussed. Section 2 presents the derivation of the kinematic and dynamic model of the 3-DOF Cartesian robot. Section 3 explains the mechanical structure and electronic circuit design. Finally, section 4 discusses the numerical and graphic results of the proposed models and the experimental results of the movement.

Mathematical Models 2.1 Kinematic Model
The robot manipulator is designed by a set of links that are connected within by joints which are revolute or prismatic, so n joints will haven + 1 links, because each joint connects two links. With the joint, there is a joint variable, denoted by qi. In the case of a revolute joint, qi is the angle of rotation, and in the case of a prismatic joint, qi is the joint displacement [9].
The kinematic model represents the motion of each link without respect to force; However, the forward kinematics model is an analysis that gives the relationship between the individual joints of the robot and the position and orientation of the endeffector. Denavit-Hartenberg's (DH) method finds a forward kinematic consisting of four variables for each link, such as a, d, Ɵ, and α [14] and [15]. a is the link length, d is the link offset, Ɵ is the joint angle, and α is the joint twist [10]. A manipulator whose first three joints are prismatic is a Cartesian manipulator. It has Cartesian coordinates representing the joint variables-the structure and workspace of the robot are shown in figures 1 and 2.  Where T is the transformation matrix for the axes of frame (last frame) with respect to the coordinate frame (previous frame). The transformation matrix of the end-effector to the reference frame is concluded by multiplying the previous matrices, so = × × …(1) are the joint space of each link. Joint velocity and acceleration of end-effector are determined with respect to the base frame, hence: Where g is the gravitational acceleration, is the joint velocity of links, and is the joint acceleration.

Dynamic model
From the dynamic model, the equation of motion is achieved. Besides that, the system's response can be obtained by using the state-space model found from the dynamic model [11] and [16]. There are several techniques to find dynamic equations in robot manipulators, such as the Newton-Euler equations.
= ˗ ! …(4) , ! , and are the mass, joint position, joint velocity, joint acceleration, damper coefficient, and force applied respectively, and # is the stiffness coefficient of second link that is caused by the belt. The subscript y1, x1, and z1 represent the first link, second link and the third link.
To derive the dynamic model of robot manipulator, the masses are weight using a suitable scale. This robot has three masses moving vertically and two masses moving horizontally, subsequently [9].

Design of The Cartesian Robot 3.1 The Structure of Cartesian Robot
The Cartesian robot is designed with three links in the X-direction, Y-direction, and Z-direction. This robot is designed for wall operations, as shown in fig.3; the structure of the Cartesian robot was designed with the help of SolidWorks software. The first link moves in the Y-direction, ranging from 0 to 90 cm. Two stepper motors create the motion; each one has a maximum power equal to 18 Watts and transforms rotational motion to linear motion by using two lead screws, as shown in fig.4. The link choice for the structure is made from an aluminum beam that is 2040 V-Slot type made from 6063-T5 Aluminum material, because it achieves a rigid and lightweight frame, as shown in Fig.5. The mechanical specifications are listed in Table 2.    The vertical beams may be exposed to buckling, so the critical load of each beam is calculated as equal to 8005.99N. Next, the maximum stress and deflection of each beam is calculated by using SolidWorks software, as shown in figs 6 and 7. The lead screw that transforms rotational motion to linear motion is made from stainless steel and connected with a brass copper nut. The capacity and basic life of lead screw are obtained by SolidWorks, as shown in figs 8 and 9. Also, the standard parameters of the chosen lead screw are indicated in Table 3.    Journal, Vol. 18, No. 3, P.P. 1-14 (2022) 6  The second link of the robot moves a 48cm range horizontally in the X-direction. This motion is created by on stepper motor with a maximum power of 20.4 watts. The link was made from the same aluminum beam as the first link, and the belt drive is transformed from rotational motion to linear motion, as shown in Fig.10. The horizontal beam that carries the X and Z link in this system bears the overall load, so, the maximum stress and deflection are 1.6876 mm, and 12.6013 MPa, as shown in figs 11 and 12. The belt used in the Xdirection to achieve the smoothest-movement is called 2GT timing belt (flat belt), as shown in Fig.13 and Table 4.    The final link of the robot moves in the Zdirection with a 30cm range. This link is manufactured the same as the first link, i.e. the same beam and screw, as shown in Fig.14. The assembly structure of the robot is shown in Fig.15.

Electrical and electronic design
The robot should move in a smooth and accurate movement. To achieve that, a particular motor like a stepper motor was used to indicate precise and calculated steps without building a complex control system. This motor has a highpower density and is capable of high micro-step resolution and quiet operation with minimal resonance. The Bipolar type of this motor is used to obtain direction and effort. To control a stepper 8 motor, an Arduino-Nano connects to the driver (DRV8825) for the stepper motor, as shown in Fig.16. The stepper motor specifications are shown in Table 5, and the block diagram of the electrical circuit of the robot is shown in Fig17.  16 Stepper motor nema17 and its driver.

Stepper motor results
The characteristics of the stepper motor are calculated and shown in table 6. It can be observed that the motor's powers are different depending on the position and the load that carries it out.

Lead screw and belt results
The terms of power screw and belt drive are determined by standard equations in [12] and these values are shown in tables 7 and 8.

Simulation results 4.3.1 Kinematic model response
When entering the DH parameters of the robot in MATLAB, we can conclude the plot directions of the robot's links and the robot's path, as shown in fig. 18 and fig.19. Figure 18 shows the robot's configuration in three dimensions and the endeffector's initial position, while Figure 19 shows the path of the robot motion for two cycles.

Dynamic model response
To simulate the behavior of each joint space of the robot, input the parameters from table 9 of the state-space were modelled (eq. 13) in MATLAB Simulink.  Figure20 represents the system's response; the blue line is the end-effector's position in the Ydirection, the red line is the end-effector's position in the X-direction, and the yellow line is the endeffector's position in the Z-direction. As shown, Xposition oscillates because of the spring effect (stiffness) created by the reaction of the belt. Figure21 represents the response of the system when value is neglected. Therefore, we notice the position in the Y-link increasing because the applied force is rising after the weight of the links is neglected.

Experimental result
When running the robot, position and velocity with time have been calculated for link X-direction (second link) with a belt transformation element and Z-direction (Last link) with a screw transformation element. The motion starts from the initial position, as shown in fig. 22; the second link moves gradually in the X-direction for 1.2 seconds for the transient time of the robot system to get a steady state. After that, this link moves at a constant velocity, as shown in Fig 23.   Fig. 22. X-position result for the second link. Fig. 23. Velocity for the second link.
While in the Z-direction, the motion starts from an initial position until 500 mm, as shown in fig.  24, the last link moves for 13.55 seconds. This time is low compared with the X-direction's motion because the previous link moves the screw slowly at 3.3 mm/sec. Fig. 25 shows that the velocity moves from zero until it reaches the maximum velocity, and it decreases to zero after getting to the final position. 12 Figure26 represents the difference between the response of a dynamic system model (measurement data) and the experimental results when running the robot; the blue line is the end-effector's position in the Z-direction when computing the system's parameters and the red line is the actual result of end-effector's position in the Z-direction. Figure 27 also shows the same difference but for the end-effector's position in the X-direction. As shown the blue line is linear, the robot actually moves smoothly in the X-direction as shown.

Conclusion
Compared to manual painting, the robotic spraying system has achieved optimal durability, safety, efficiency, and ease of use. All of the goals set for the proposed spraying robot have-been completed. The x-axis, y-axis, z-axis, and endeffector modules were all properly developed and built-in terms of mechanical design. All motors are mountings and couplings, and they are Position (mm) 13 correctly adjusted. All of the prismatic joints were successfully developed.
The structure is designed with sturdy and flexible arms to move smoothly, and the stress values for each link have been adjusted to ensure that the weights are handled to prevent bending and abrasion. The power systems module and the ARDUINO-NANO controller were successfully created in electrical and electronic systems. The software effectively controlled each joint of the spraying robot that completed the appropriate path for painting the wall. According to the experiment results, the proposed robot could move quickly in both vertical and horizontal motions.
In future work, a Raspberry pi controller could be used instead of an Arduino-Nano controller. Also, a machine vision and a camera are mounted on the robot to visualize and map for the path of the end-effector and to detect the windows and the door.