# Computer Aided Design of a Low-Cost Painting Robot

Syeda Maria Khatoon Khatoon Zaidi, Faraz Junejo, Bill Mujtaba

► To cite this version:

Syeda Maria Khatoon Khatoon Zaidi, Faraz Junejo, Bill Mujtaba. Computer Aided Design of a Low-Cost Painting Robot. Mehran University Research Journal of Engineering and Technology, 2017, 36 (4), pp.841-856. hal-01700365

HAL Id: hal-01700365

https://hal.science/hal-01700365

Submitted on 4 Feb 2018

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
# Computer Aided Design of a Low-Cost Painting Robot

SYEDA MARIA KHATOON ZAIDI*, FARAZ JUNEJO*, AND SYED BILL MUJTABA*

RECEIVED ON 01.01.2016 ACCEPTED ON 22.11.2016

## ABSTRACT

The application of robots or robotic systems for painting parts is becoming increasingly conventional; to improve reliability, productivity, consistency and to decrease waste. However, in Pakistan only high-end Industries are able to afford the luxury of a robotic system for various purposes. In this study we propose an economical Painting Robot that a small-scale industry can install in their plant with ease.

The importance of this robot is that being cost effective, it can easily be replaced in small manufacturing industries and therefore, eliminate health problems occurring to the individual in charge of painting parts on an everyday basis. To achieve this aim, the robot is made with local parts with only few exceptions, to cut costs; and the programming language is kept at a mediocre level. Image processing is used to establish object recognition and it can be programmed to paint various simple geometries.

The robot is placed on a conveyer belt to maximize productivity. A four DoF (Degree of Freedom) arm increases the working envelope and accessibility of painting different shaped parts with ease. This robot is capable of painting up, front, back, left and right sides of the part with a single colour.

Initially CAD (Computer Aided Design) models of the robot were developed which were analyzed, modified and improved to withstand loading condition and perform its task efficiently. After design selection, appropriate motors and materials were selected and the robot was developed. Throughout the development phase, minor problems and errors were fixed accordingly as they arose. Lastly the robot was integrated with the computer and image processing for autonomous control. The final results demonstrated that the robot is economical and reduces paint wastage.

**Key Words:** Computer Aided Design, Robot, Automatic Paint, Servo Controller, Digital Image Processing.

## 1. INTRODUCTION

Industrial manufacturing, whether it's for a mass production or a batch production is fundamentally an art of repeatability. Multinational mass production businesses [1] adopted automation many decades ago to minimize production time and enhance their capacity while SMEs (Small and Medium

Enterprises) preferred cheap labor. Therefore, even in this age most of the SMEs are reluctant to adopt automation due to huge initial costs and inflexibilities of automatic systems, which cause them problems like limited production, poor quality and health concerns in some operations.
This paper aims to automate painting operation which is commonly required for almost all products and also because there are many problems associated to manual painting processes. Problems like material wastage, limited production, and poor quality are some common issues related to manual painting, but hazardous fumes in arising spray painting is a major health concern and therefore, automatic spray paint robots are used for spray painting in large manufacturing sector [2-4]. Automotive industries, furniture manufacturers and industries producing large quantities of small painted parts are the examples where robots are used for spray painting or spray coatings.

Robotic technologies with the passage of time have become so advanced that nowadays every industry rely on their accuracy and demands of robots are growing faster than ever predicted. Robotic giants like KUKA Inc. and ABB are producing robots for almost all type of industries from automotive to aerospace. All this, day by day advancement also increases the cost to avail this rapid, efficient and precise automation gradually, which in effect makes it impossible for SMEs to adopt these automatic manufacturing systems. Therefore, basic concept of this research derived from the problem facing SMEs in the field of spray painting.

The concept of affordable, flexible and efficient spray painting robot originates from the SMEs problems discussed earlier, which negatively impact on their business because of inconsistent product quality, low production rate, material wastage and other losses related to manual spray painting. An automation system or a robot that can overcome the discussed negative impacts on production and quality of SMEs, at the same time being affordable and cost effective, is the fundamental objective of this study.

## 1.1 Design Specification

Industrial robots can be of many forms and they are usually designed to serve specific purpose, such as a robot designed for welding purpose cannot be sent to the Mars because of its specific geometry and design specifications. Therefore, robots are designed after complete analysis of the operation that robot has to perform, such as robotic movements, type of joints, robotic geometries, drives and control system etc.

An automatic spray painting robot is self-explanatory in terms of its purpose and objectives, which answers the most fundamental parameter when designing a robot. Next step is determining how the robot will perform the intended purpose. Cartesian, cylindrical, spherical and revolute are major robotic geometries [5] used in robot designing. However, the most common industrial robots are designed with all revolute joints due to its increased flexibility, DoFs and working span with a compact size. A three revolute joint robot is more commonly known as an ‘Articulated Robot’ [6]

The design of a robot is influenced by the application of the robot [7]. Some applications of painting are predominately 2D (Two Dimensional), for example spraying large flat work piece. In these applications, a fixed or reciprocating nozzle is more likely to meet the job requirements and offer the lowest automation cost. Despite the low cost efficient process, this nozzle is not always appropriate. Irregular regions, enclosures, shadowed aspect and internal surfaces are all tasks that require flexible spray painting robot, examples of which are engine compartments and vehicle interiors. To be able to be autonomous, a robot has to be flexible, reprogrammable and diverse, hence these robot types are preferred. These requirements have led designers to the similar design conclusion. Thus, majority of spray painting robots are cloned after the first successful spray painting robot, Hetland et. al. [8].
Spray painting robots are usually articulated robots [9,10], having all revolute joints which allow them to go to angles which are harder to reach and looks like a human hand consisting 3-6 DoF. In articulated robots, every joint can be provided with an actuator which is always mounted outwards and feedback control by encoders can easily installed. Actuators and drives in a robot are always provided with some type of feedback so the control system can know the robot position all the time and guide robots it in a collision free trajectory.

According to the paper by Pierrot and Dumbre [11,12], stepper motors are safer, that is in the event of an electronic failure, stepper motors remain stationary as compared to conventional motors. Furthermore, stepper motors operate more closely to their maximum torque as compared to simplest motors which may have higher stall torque but low continuous operation torques. However, stepper motors are known to consume high current [13] and need dedicated stepper motor drivers for unidirectional rotation. As a result, Servo motors are more commonly used in industrial robots. Servo motors have an encoder based or potentiometer based feedback mechanism, which allows for precise angular control. This precise control of actuation used in servo motors allows more control which is required in painting robots.

## 1.2 Painting Mechanism

Painting mechanism [14] of a robot is the way in which it can paint the robot, which is in commonly known as an end effector. In order to deduce which end effector is appropriate for this robot, a review of various other methods is carried out. The methods reviewed from prior findings are physical tools, airbrush and spray tools.

A physical tool has aesthetical appearances depending on their application criteria. Generally, it is shaped as a cylindrical pen with a tip, like a pen or marker. In this mechanism, direct contact between the paper and end effector is necessary. The paint consistency is highly

dependent on work surface and most often its application is in making images rather than repetitive painting. Few modern day example of robots using physical tools as end effector includes Rita [15], Viktor [16] and Legonardo [17]. The purpose of this project is to be an industrial spray painting robot therefore physical tools are not compatible with this robot.

In an industrial robot, the type of end effectors used are spray guns, pneumatic nozzles and air brush etc. Industrial spray painting robots are equipped with nozzles which controls the flow rate by electronic actuating signals, while having pneumatic feeding mechanism. Air brush was invented by upgrading paint brush and atomizers [18] into which paint projection is controllable. In the past, airbrush was used to give concept of automatic spray painting when first automatic airbrush apparatus was designed and developed by Anderson et. al. [19]. It comprised of a robotic arm that used airbrush, sensors and controlled valve for painting.

Majority of industrial robots use automated spray tools as painting mechanisms. Typically the part is moving on a conveyor belt or stationary in one place, while the robot moves around painting or coating the part completely. An example Lehni and Franke [20], a robot using prismatic joints and a spray tools to paint images and patterns. Innovation in spray tools have led to Electrostatic Spray painting robot which help to minimize paint wastage.

Painting mechanisms are designed to handle specific type of paint due to different viscosities, forms and their solvents, because a change in viscosity or other parameters can change the overall painting quality and parameters like, film thickness. The appropriate end effector for this robot would be to use an Airbrush as they are most reliable, accurate and precise when compared to other tools. Furthermore, Airbrushes are designed to handle acrylic paints, water paints, oil paints, urethanes, inks and dyes.
## 1.3 Quality

Spray painting has many issues related to their qualities. State of the art robotic systems are provided with live condition monitoring systems which insures the painting quality while performing job. The most common quality issues in painting arise from dust particles, which effects surface finish, while too much paint causes issues like runs, drips and sags [21]. Incorrect spray pressures, unsuitable spray viscosities, paint impact speed and pattern non-uniformity are few flaws in painting operations which leads towards issues of mottling, stripping and color matching, usually encountered in metal painting.

Other common quality problem comes when painting bonded parts, which start micro cracks on the surface due different material shrinkage rates, called crazing [22]. Similarly, due to open void or dirt, blistering happens which can be avoided by proper cleaning and using fillers before painting, and last but not the least, paint peeling and orange peel are two type of quality issues in which paint layer rips off from the surface due to foreign material present in paint or surface which does not allow paint to stay on the surface, while orange peel occurs when paint droplets are sprayed on the surface due to improper gun setting and dry in uncontrolled temperature environment.

## 2. MATERIALS AND METHOD

To be able to define the robot's requirements, first its assumptions must be stated, which are summarized as follows:

(a) The Object must be a solid.

(b) The painting surface is flat, smooth and pre-cleaned, without any obstructions.

(c) The painting fluid is pre-filled in an overhead container.

(d) Maintenance and cleaning of Painting Mechanism is not autonomous

(e) If the Mechanism clogs the user has to unclog it manually

(f) The Painting cycle and motion are instructed by user through the interface

All the objectives of this project revolves around problems faced by SME's in Pakistan and on research detailed above.

The objective for the Robot are as follows:

* Prototype of an Industrial Spray Painting Robot

* Affordable

* Consistent in Paint flow and Quality

* Material wastage minimal compared to manual work

* Smooth working in Full Load Conditions

The objective is to design a prototype for a Robot manipulator, that is feasible to work in Industries, and has all the capabilities that can help achieve the task more productively and accurately.

Material wastage can be improved as robot is pre-programmed to perform a desired operation and parameters are fixed including (number of paint strokes, location of the spraying gun at particular height, flow rate of the paint coming out and speed of the paint on the part)

The task of painting manually can lack consistency in quality as labor experiences fatigue and tiredness after a particular time. The robot is capable of working continuously without any break for hours and with smooth precision and accuracy of film build. Therefore, the robot is capable of performing repetitive tasks with exact paint quality and coverage.
## 2.1 Structure Requirements

To design painting robot, existing robot designs were researched for their advantages and disadvantages to determine the likely structure that is able to fulfill all the objectives listed above. Designs were tested for failure and refined on Solidworks to determine an optimal design that is stable, robust and functions appropriately under full load.

### 2.1.1 Basic Design

A three-axis design of a robotic arm is shown in Fig. 1. It is the most basic structure of a robotic arm. The motors attachment and placement shown in black. The base of the robot (circle plate) is supported by two edge supports. The base motor will rotate the robot 360° to be extend the accessibility to the part.

The shoulder joint, that is where motor 2 is attached, will bear the weight of the end effector. This joint will be the weakest link of the robot, hence is analyzed for failure. Solidworks analysis tool is utilized to determine the stress and strain occurring on the particular part. Fig. 2 displays the stresses occurring on the joint. The figure shows a concentration of stress near the hole, where the motor is attached. Whereas, Fig. 3 displays the displacement caused by strain under load conditions. Figs. 2-3 exhibit failure occurring at and around the holes, therefore, the placement or design have to be altered, such that the weight is not on the holes completely.

### 2.1.2 Improved Design

The shoulder joint is altered, due to stress and strain concentrations, such that the motor is placed on the surface. This allows the load to be attached to the motor's shaft directly, and so structure does not come under stress. To increase the dexterity and to be able to reach areas

near to robot structure, the design is modified. This design allows the robot to be 4 DoF robot, allowing for complex painting capabilities. The arm link is divided into 2 smaller arms with an elbow joint in the middle. A rendered image of the altered design is shown in Fig. 4.

## 2.2 Motor Requirements

As discussed above in Introduction, Servo Motors were favored over other types of motors. To determine the

<figure><img src="image_2.png" /><figcaption>FIG. 1. SOLIDWORKS MODEL OF DESIGN ONE</figcaption></figure>

<figure><img src="image_3.png" /><figcaption>FIG. 2. STRESS CONCENTRATION ON SHOULDERS JOINT</figcaption></figure>

<figure><img src="image_4.png" /><figcaption>FIG. 3. STRAIN CONCENTRATION ON SHOULDERS JOINT</figcaption></figure>
Torques required for each motor, a torque calculator [23] was used. Taking **Fig. 5** as reference robotic arm, data for arm lengths and weights are filled to calculate the required torques for motor M0, M1, M2 and M3 specified in **Table 1** and finalized specification detailed in **Table 2**. If a field did not exist a zero was placed in its place.

<figure><img src="image_5.png" /><figcaption>FIG. 4. IMPROVED ROBOT DESIGN</figcaption></figure>

<figure><img src="image_6.png" /><figcaption>FIG. 5. ROBOTIC ARM</figcaption></figure>

<table><caption>TABLE 1. REQUIRED MOTOR TORQUE</caption><thead><tr><td>Motor</td><td>Torque (Nm)</td><td>Torque (Kg-cm)</td></tr></thead><tbody><tr><td>Base Motor M0</td><td>2.500</td><td>25.5</td></tr><tr><td>Shoulder Motor M1</td><td>2.170</td><td>22.2</td></tr><tr><td>Elbow Motor M2</td><td>0.905</td><td>9.33</td></tr><tr><td>Wrist Motor M3</td><td>0.114</td><td>1.16</td></tr></tbody></table>

## 2.3 Material Requirements

Different materials such as steel, aluminum, wood and acrylic are compared with each other. From comparison, Aluminum is the best choice material considering that it has high strength to weight ratio. Hence Aluminum was used mostly for robot structures, and to reduce weight Acrylic is used on some parts as it is extremely light-weight and easy to machine.

## 2.4 Controller Requirements

To control the movements of the robot, Maestro Servo Controller was used. Polulu servo controllers [24] were desired over other controllers because of availability, ease of use and cheap. Additionally it has many distinctive features; separate speed control for each servo, energy efficient and advanced mapping of low-resolution commands for optimal range and resolution.

Servo Controller requirements for this robots were at least 5 distinct motor control at high frequency. So 12 Channel Mini Maestro was selected for servo controller as it had ability to control up to 12 motors or inputs, pulse range of 1-333 and 64-4080µs and highest configurable pulse rte.

## 3. MATHEMATICAL MODELLING

In order to determine the workspace and to enhance controls of the robot; a kinematic model is needed. Kinematic Model is used to implement the simulation of the robot which is obtained by using the DH (Denavit-Hartenberg) Method.

<table><caption>TABLE 2. FINALIZED MOTOR SPECIFICATION</caption><thead><tr><td>Purpose</td><td>Quantity</td><td>Torque (Kg-cm)</td><td>Angle (°)</td></tr></thead><tbody><tr><td>Base and Shoulder</td><td>2</td><td>40.0</td><td>360</td></tr><tr><td>Elbow</td><td>1</td><td>9.8</td><td>180</td></tr><tr><td>Wrist</td><td>1</td><td>3.2</td><td>180</td></tr><tr><td>Trigger</td><td>1</td><td>Minimum</td><td>90</td></tr></tbody></table>
## 3.1 Kinematics Model

It is the study of robot's movement with regard to a reference position. It helps to analytically describe the movement of the end effector with respect to the base point. That is its position and orientation can be determined using direct kinematics. Kinematics is obtained by using HTM (Homogenous Transformation Matrix) by applying the DHMethod. However, if the configuration of each joint is needed to be found so that a certain goal position is reached; inverse kinematics is performed.

<figure><img src="image_7.png" /></figure>

## 3.2 Homogenous Transformation Matrix

To represent the position and relative orientation between two subsequent links, a reference system to each link must be associated. Therefore, it is possible to represent the relative translations and rotations between different links in a matrix known as homogenous transformation matrix, which is a 4x4 HTM made of a 3x3 Rotation Matrix and 3x1 Translation Matrix.

$$ ^{0}_{1}T $$

For example; $^{0}_{1}T$ represents the position and orientation of first frame with respect to base frame (0) and $^{0}_{2}T = ^{0}_{1}T * ^{1}_{2}T$ represent the position and orientation of second frame with respect to base frame So for this robot its final position P is represented as:

$$ P = ^{0}_{6}T = ^{0}_{1}T * ^{1}_{2}T * ^{2}_{3}T * ^{3}_{4}T * ^{4}_{5}T $$

To locate the coordinate system for each link a predefined method exists to obtain the robot's kinematics known as the DH Method.

## 3.3 Denavit-Hartenberg Method

Helps describe the robot's kinematics and represents its motion. To determine the mathematical model of the robot, its DH Parameterization (also known as DH Parameters) has to be done in order to standardize the coordinate frames for spatial linkages. It allows for frames to be allocated to different joints to determine the coordinate transformation from one frame to another.

The reference frames are laid out such that:

* The z-axis: Is in the direction of the joint axis, about which rotation/translation occurs.

* The x-axis: It is parallel to the common normal between the joint axis of successor and present joint.

* The y-axis: It is determined using right-hand co-ordinate system rule.

To determine Parameters of this robot the reference frames are made and the joint variable is determined as shown in Fig. 6. Fig. 6 shows two views, one front and the other side view.

The transformation is then described by the following four parameters known as DH parameters:

The Link Twist ($\alpha_{i-1}$): It is the angle deviation between $z_{i-1}$ to $z_i$ measured about previous link length.

The Link ($\alpha_{i-1}$): It is the distance between $z_{i-1}$ to $z_i$ measured along previous link length.

The Joint Offset ($d_i$): It is the distance between $x_{i-1}$ to $x_i$ measured along current joint axis.
The Joint Angle (θᵢ): It is the angle deviation between xᵢ-1 to xᵢ-1 measured about current joint axis.

Looking back to Fig. 6, a DH Table 3 can be computed for the each frame with respect to its previous frame using DH parameters as follows (where represents the link number):

To be able to compute the HTM between two successive links, the above parameters are substituted into the standard HTM shown in Matrix-1.

$$ i-1 \begin{bmatrix} \cos \theta_i & -\sin \theta_i & 0 & \alpha_{i-1} \\ \sin \theta_i \cos \alpha_{i-1} & \cos \theta_i \cos \alpha_{i-1} & -\sin \alpha_{i-1} & -\sin \alpha_{i-1} * d_i \\ \sin \theta_i \cos \alpha_{i-1} & \cos \theta_i \cos \alpha_{i-1} & \cos \alpha_{i-1} & \cos \alpha_{i-1} * d_i \\ 0 & 0 & 0 & 1 \end{bmatrix} $$

Matrix-1: Homogenous Transformation Matrix of Frame i with Respect to Frame i-1

Where θᵢ, αᵢ-1, dᵢ, and αᵢ-1 are DH parameters for the link

To be able to determine HTM for each respective frame, the data in Table 1 has to be substituted into Transformation Matrix shown in Matrix-1, to get; which are as follows:

$$ T_{i} = \begin{bmatrix} \cos(\theta_{i} + 0) & -\sin(\theta_{i} + 0) & 0 & 0 \\ \sin(\theta_{i} + 0) & \cos(\theta_{i} + 0) & 0 & 0 \\ 0 & 0 & 0 & 10 \\ 0 & 0 & 0 & 1 \end{bmatrix} = \begin{bmatrix} \cos(\alpha) & -\sin(\alpha) & 0 & 0 \\ \sin(\alpha) & \cos(\alpha) & 0 & 0 \\ 0 & 0 & 0 & 10 \\ 0 & 0 & 0 & 1 \end{bmatrix} $$

Matrix-2: Homogenous Transformation Matrix of Frame-1 with Respect to Frame-0

$$ T_{i} = \begin{bmatrix} \cos(\theta_{2} - 110) & -\sin(\theta_{2} - 110) & 0 & 0 \\ 0 & 0 & -1 & 0 \\ \sin(\theta_{2} - 110) & \cos(\theta_{2} - 110) & 0 & 0 \\ 0 & 0 & 0 & 1 \end{bmatrix} = \begin{bmatrix} \cos(\beta) & -\sin(\beta) & 0 & 0 \\ 0 & 0 & -1 & 0 \\ \sin(\beta) & \cos(\beta) & 0 & 0 \\ 0 & 0 & 0 & 1 \end{bmatrix} $$

<table><caption>TABLE 3. DDENAVIT-HARINBERG PARAMETER INPUT TABLE</caption><thead><tr><th>i</th><th>α<sub>i-1</sub></th><th>α<sub>i+1</sub></th><th>d<sub>i</sub></th><th>θ<sub>i</sub></th></tr></thead><tbody><tr><td>1</td><td>0°</td><td>0</td><td>70mm</td><td>α=θ<sub>1</sub> + 0°</td></tr><tr><td>2</td><td>90°</td><td>0</td><td>0</td><td>β=θ<sub>2</sub> + 110°</td></tr><tr><td>3</td><td>0</td><td>205mm</td><td>0</td><td>γ=θ<sub>3</sub> + 60°</td></tr><tr><td>4</td><td>0</td><td>215mm</td><td>0</td><td>δ=θ<sub>4</sub> + 80°</td></tr></tbody></table>

<figure><img src="image_8.png" /><figcaption>FIG. 6. DENAVIT-HARTENBERG FRAMES</figcaption></figure>
### Matrix-3: Homogenous Transformation Matrix of Frame-2 with Respect to Frame-1

$$ ^{2}_{3}T = \begin{bmatrix} \cos(\theta_3 + 60) & -\sin(\theta_3 + 60) & 0 & 205 \\ \sin(\theta_3 + 60) & \cos(\theta_3 + 60) & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \end{bmatrix} = \begin{bmatrix} \cos(\gamma) & -\sin(\gamma) & 0 & 205 \\ \sin(\gamma) & \cos(\gamma) & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \end{bmatrix} $$

### Matrix-4: Homogenous Transformation Matrix of Frame-3 with Respect to Frame-2

$$ ^{3}_{4}T = \begin{bmatrix} \cos(\theta_4 + 80) & -\sin(\theta_4 + 80) & 0 & 215 \\ \sin(\theta_4 + 80) & \cos(\theta_4 + 80) & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \end{bmatrix} = \begin{bmatrix} \cos(\delta) & -\sin(\delta) & 0 & 215 \\ \sin(\delta) & \cos(\delta) & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \end{bmatrix} $$

### Matrix-5: Homogenous Transformation Matrix of Frame-4 with Respect to Frame-3

$$ ^{4}_{5}T = \begin{bmatrix} 1 & 0 & 0 & 90 \\ 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \end{bmatrix} $$

### Matrix-6: Homogenous Transformation Matrix of Frame-5 with Respect to Frame-4

The HTM from end effector (link 5) to base frame (link 0) is the transformation from link-to-link; that is to getmultiply all HTM together, which is as follows:

$$ ^{0}_{5}T = ^{0}_{1}T * ^{1}_{2}T * ^{2}_{3}T * ^{3}_{4}T * ^{4}_{5}T = \begin{bmatrix} \alpha_{11} & \alpha_{12} & \alpha_{13} & X \\ \alpha_{21} & \alpha_{22} & \alpha_{23} & Y \\ \alpha_{31} & \alpha_{32} & 0 & Z \\ 0 & 0 & 0 & 1 \end{bmatrix} $$

### Matrix-7: Homogenous Transformation Matrix of Frame-5 with Respect to Frame-0

In Matrix-7; Where:

$$ S_{\alpha\beta\gamma} = \sin(\alpha) * \sin(\beta) * \sin(\gamma) $$

$$ C_{\alpha\beta\gamma} = \cos(\alpha) * \cos(\beta) * \cos(\gamma) $$

$$ \alpha_{11} = -C_{\alpha\delta}S_{\beta\gamma} + C_{\alpha\beta\gamma\delta} - C_{\alpha\beta}S_{\gamma\delta} - C_{\alpha\gamma}S_{\beta\delta} $$

$$ \alpha_{12} = C_{\alpha}S_{\beta\gamma\delta} - C_{\alpha\beta\gamma}S_{\delta} - C_{\alpha\beta\gamma\delta}S_{\gamma\delta} - C_{\alpha\gamma}S_{\beta} $$

$$ \alpha_{13} = S_{\alpha} $$

$$ \alpha_{21} = -S_{\alpha\beta\gamma}C_{\delta} + S_{\alpha}C_{\beta\gamma\delta} - S_{\alpha\gamma\delta}C_{\beta} - S_{\alpha\beta\delta}C_{\gamma} $$

$$ \alpha_{22} = S_{\alpha\beta\gamma\delta} - S_{\alpha\delta} - C_{\beta\gamma}C_{\beta\gamma} - S_{\alpha\gamma}C_{\beta\delta} - S_{\alpha\beta}C_{\beta\delta} $$

$$ \alpha_{23} = -C_{\alpha} $$

$$ \alpha_{31} = -C_{\beta\delta}S_{\gamma} + S_{\beta}C_{\gamma\delta} - C_{\beta\gamma}S_{\delta} - S_{\beta\gamma\delta} $$

$$ \alpha_{32} = C_{\beta\gamma\delta} - S_{\beta\gamma}C_{\delta} - C_{\beta}S_{\gamma\delta} + S_{\beta}C_{\gamma\delta} $$

$$ \alpha_{33} = -C_{\alpha} $$

$$ X = 205C_{\alpha\beta} - 90C_{\alpha\delta}S_{\beta\gamma} + 90C_{\alpha\beta\gamma\delta} - 90C_{\alpha\beta}S_{\gamma\delta} - 90C_{\alpha\gamma}S_{\beta\delta} - 215C_{\alpha}S_{\beta\gamma} + 215C_{\alpha\beta\gamma} $$

$$ Y = 205S_{\alpha}C_{\beta} - 90S_{\alpha\beta\gamma}C_{\delta} + 90S_{\alpha}C_{\beta\gamma\delta} - 90S_{\alpha\gamma\delta}C_{\beta} + 90S_{\alpha\beta\delta}C_{\gamma} - 215S_{\alpha\beta\gamma} + 215S_{\alpha}C_{\beta\gamma} $$

$$ X = 205S_{\beta} + 215C_{\beta}S_{\gamma} + 215S_{\beta}C_{\gamma} - 90C_{\beta\delta}S_{\gamma} + 90S_{\beta}C_{\gamma\delta} + 90C_{\beta\gamma}S_{\delta} - 90S_{\beta\gamma\delta} - 70 $$

## 3.4 Workspace Matrix

To make a workspace matrix, structural and geometrical limit must first be determined that limit the servo angles. All motors attached to the robot are restricted to move within a certain range of angles, that is the angle limit is dependent on the link length and the surrounding fixed parts. The surrounding fixed parts needs to be considered because the arm should not strike itself while in working state. These angular limits and respected link length are detailed in Table 4. Refer to reset point as 0°, assigning counter-clockwise direction as positive.

The working envelope is determined from Transformation Matrix, column 4 representing x, y and z coordinate equations in Matrix-7. Hence the workspace matrix becomes:

$$ \text{Workspace Matrix} = \begin{bmatrix} X \\ Y \\ Z \end{bmatrix} $$
Where X, Y and Z are expressed above.

Referring to workspace matrix, the maximum x,y and z coordinates can be computed using MATLAB by plugging in different combinations of θᵢ angles from Table 2. This results in Maximum coordinates as:

$$X_m = 510\text{mm}, Y_m = 510\text{mm} \text{ and } Z_m = 580\text{mm}$$

# 4. EXPERIMENTAL TRIAL

The Final Design, Fig. 4, modified by weight, stress/strain and torque requirements was made. Along the process the design is further refined for ease of manufacture. As an add-on, its components can be separated, for transportation purposes. For the robot to perform as it is detailed in objectives, certain experimental trials must be done, that is to ensure that it can perform under the load, smoothly without failing.

## 4.1 Maestro Servo Controller

Testing the robot alone with servo controller is done, to check for its capabilities. A simple basic program was made and tested. Polulu Maestro Servo Controller User Guide available on Polulu Website (Polulu Corporation) was used to help in programming the device. Once a pattern is programmed into the device, on pressing run script the pattern repeats itself continuously until stop script is pressed. The result to basic testing was that the movements were smooth and continuous with the robot

when it had 3DoF's. Unfortunately when the robot was upgraded to 4DoF's the movements became rickety and robot became precarious. The problem detected was that the servo motor was working on full load condition and hence required higher current and voltage. For general specification of the Maestro Device selected, as shown in Table 5.

## 4.2 Digital Image Processing

Image processing tool in MATLAB was used to identify the object that is to be painted on. Sample Object image is predefined into computer memory for verification. The purpose of Image Processing is to identify the object, compare to reference image. If the object matches sample

<table><caption>TABLE 5. GENERAL SPECIFICATION OF MAESTRO SERVO CONTROLLER (12 CHANNEL) [12]</caption><tr><td>Size</td><td>1.10x1.42"</td></tr><tr><td>Weight</td><td>7.3 g</td></tr><tr><td>Channels</td><td>12</td></tr><tr><td>Baud</td><td>300-200000 bps</td></tr><tr><td>Minimum operating voltage</td><td>5V</td></tr><tr><td>Maximum operating voltage</td><td>16V</td></tr><tr><td>Supply current</td><td>40mA</td></tr><tr><td>Configurable pulse rate</td><td>1-333 Hz</td></tr><tr><td>Pulse range</td><td>64-4080 µs</td></tr><tr><td>Script size</td><td>8 KB</td></tr></table>

<table><caption>TABLE 4. MAXIMUM AND MINIMUM ANGLES OF EACH LINK</caption><thead><tr><th rowspan="2">θᵢ</th><th colspan="2">Maximum Angle</th><th colspan="2">Minimum Angle</th><th rowspan="2">Total (°)</th></tr><tr><th>Degree (°)</th><th>Radiation</th><th>Degree (°)</th><th>Radiation</th></tr></thead><tbody><tr><td>θ₁</td><td>170</td><td>17/18</td><td>-170</td><td>-17π/18</td><td>340</td></tr><tr><td>θ₂</td><td>80</td><td>4/9</td><td>-80</td><td>-4π/9</td><td>160</td></tr><tr><td>θ₃</td><td>90</td><td>1/2</td><td>-90</td><td>-π/2</td><td>180</td></tr><tr><td>θ₄</td><td>90</td><td>1/2</td><td>-90</td><td>-π/2</td><td>180</td></tr></tbody></table>
object definition then a start signal is sent to robot for
operation. Results obtained from Image Processing tool
were that 85% or more similarity index between the sample
and reference images would start the operation signal. If
the images were identified as different, then the user was
notified through command window, 'Object Not
Recognized'.

4.3 Maestro Servo Controller Interfacing

At this stage, the object has been recognized but to
control the Servo Motors which are connected to the
Maestro Servo Controller, MATLAB and Maestro needs
to communicate. The solution implemented was virtual
communication using accessible COM ports. The Maestro
Servo Controller Software creates a Virtual Serial Port that
can be accessed by MATLAB. So, this Virtual port can be
used for communication between MATLAB and Maestro
Controller.

The Maestro Servo Controller, once connected to the
computer displays two virtual serial ports; COM and TTL
port (for more information, refer to the Polulu Maestro

Servo Controller User Guide available on Polulu Website
(Polulu Corporation)). Using Device Manager the COM
port number is found which is used for communication.
The communication code or referred to as interfacing code
wastested manually by sending various signals from
MATLAB to the Maestro device. However, the signal
sent from MATLAB restricted the motor movement within
90 degrees. Hence a solution that was implemented that
MATLAB was used to send start and or stop operation
to Maestro device, which caused maestro code (pre-
defined before initialization) to start operation.

4.4 Graphic User Interface

As the whole code was compiled; for operator ease, a
graphic user interface was made on MATLAB. Fig. 7
shows the start-up screen with details of what happens
on each button press.

4.5 Electronic Circuitry

The operating voltage of all the motors used had a rating
of 6-7V. Only the Shoulder and Base Servo Motor was

<figure><img src="image_9.png" /><figcaption>FIG. 7. GRAPHIC USER INTERFACE</figcaption></figure>
attached to 7V supply as they were operating at maximum load capabilities, while the rest of the motors were provided 6V Supply. Due to differences in current consumptions of the motors, a battery that was capable of supplying high current values was preferred. As excessive voltage could damage the computer and or circuitries, voltage regulator IC's were used. The maximum current output of a Voltage Regulator IC is 1.3A, and as around 2A current was consumed at heavy loading conditions, the IC's were connected in parallel.

During test trails of the electronic circuit systems and motors, it was observed that the Voltage Regulator IC's were heating up. It was essential to reduce the temperatures of the IC's, and fast, therefore, a small fan was used.

## 4.6 Motor Movement

Basic tests were carried out to monitor the behavior of motor at different loading angles. Firstly at no load, with controller powered via computer, all motors were tested. Once all motors have undergone this basic test, load was added and again tested with a 6V 4.5AH battery as supply.

The base motor once actuated after load application, started with a jerk and then smoothly moved to required position, without heating up. That meant that the motor was not operating at its maximum torque limit. An airbrush was mounted on motor to test at loading angles from 45-100 degrees.

Unfortunately, during our testing procedure, a short circuit caused damage to the motor circuit board. As the motor circuit board couldn't be replaced a new motor had to be bought. A valuable lesson was learned from this mistake, a short circuit caused excess current to flow to the motor causing motor failure. Hence there needs to be a fuse between the battery and motor, which could make sure no excess current flows through circuit.

## 4.7 Fluid Rate

The airbrush has a limited space to hold the painting fluid, therefore, the flow rate of spraying needs to be determined to understand how much paint needs to be available in an overhead tank without multiple refills. An experiment is conducted to determine the rate of flow; the cup is filled with 10cc of paint, and the time taken to empty the fluid is noted. This procedure is carried out three times to get and average value that is reliable.

It is established that it takes roughly 5 minutes. The average time calculated from the experiment was 327.4s to empty 10cc fluid, therefore, the rate is (10/327.4) cc/s, which is 0.0305cc/s.

## 4.8 Painting Distance

Once the rate is known, it is necessary to know the distance between the nozzle and work piece. That is, if the nozzle is too close, paint accumulates and starts to drip, if it is too far away, too much paint is wasted to surrounding areas. An optimal distance will ensure that the robot paints consistently and smooth paint surface. An experiment was carried out where the distance between nozzle and work piece was varied -50-300mm. At each distance the paint diameter and the surface finish was noted. It was perceived that as distance between the work piece and nozzle of airbrush increased, the time it took to make the same paint surface was longer. The results are detailed in Table 6.

After comparing the results, it was found that the optimal distance was at 150mm. At 200mm, the shape was deformed and lots of paint was accumulated at center which caused paint to drip down. Below 150mm distance the paint surface was smooth, but as paint diameter was less, the maximum at 150mm was chosen at optimal distance between the work surface and paint nozzle.
## 4.9 Spray Repetition

The next step in painting experimentation, is to determine the number of stroke required to completely cover the work surface. This will ensure that the robot will make consistent layer on each work pieces. The experiment was carried out on wood surface, at a distance of 150mm from the surface the airbrush was placed and after each paint stroke a picture was taken for comparison. The pictures are placed in observation table in Fig. 8 and the results are compared.

Looking at the pictures at certain spray repetition, it is observed that after eleven strokes, paint droplets are

<table><caption>TABLE 6. OPTIMUM DISTANCE TO WORKPIECE</caption><thead><tr><td>Distance (mm)</td><td>Diameter (mm)</td></tr></thead><tbody><tr><td>50</td><td>10</td></tr><tr><td>100</td><td>30</td></tr><tr><td>150</td><td>50</td></tr><tr><td>200</td><td>60</td></tr><tr><td>250</td><td>80</td></tr><tr><td>300</td><td>100</td></tr></tbody></table>

<figure><img src="image_10.png" /><figcaption>FIG. 8. SPRAY REPETITION RESULTS</figcaption></figure>

visible on surface and if the stokes are increased the paint eventually drips down the surface. Therefore between seven and nine is the optimal stroke repetition, so eight is preferred.

## 4.10 Current Consumption

Current consumption of each motor has been conducted, but as the whole robot is assembled and tested it is essential to know the power requirements of this robot. The completed robot has paint capacity of 100ml, arm length of 426mm, weight of 2.10kg and motor working on 6V, all powered by a 6V 4.5AH battery. To determine the current consumption of the robot, at different base shoulder motor angles, the current consumed is noted. A graph of the results is made to compare the current.

The graph in Fig. 9, shows the results of current consumption of robot against the shoulder motor angles at fixed load. The test is conducted twice, one where the angle was increased from 10-90 degrees (red), and the other decreased from 90-10 degrees (blue). All angles taken with respect to positive x-axis as 0 degrees.

From Fig. 9, it is visible that maximum current is consumed when robot moves against gravity, which is upwards. The maximum current it consumes is 2.5A, with 7V. Hence maximum power consumption is 18W.

## 5. RESULTS AND DISCUSSION

The prototype robot constructed in this study is shown in Fig. 10. The total cost of making this prototype robot is 26,000PKR without the compressor. Therefore, it can be said it is a cost effective CAD-based spray painting robot, modeled for small and medium industries. The most basic and simplified automation solution currently available in the market for the field of spray painting starts from thousands of dollar, whether it's a manipulator by KUKA Inc. or ABB. These expensive systems utilize state of the art technologies and complex computing to achieve the
performance required by multinationals to maintain their
standards. While looking from the perspective of SMEs
or business startups, these standardized expensive
systems are too costly to sustain within their business.
Also such systems require expert and trained operators
to run them and their reliance on expensive equipment to
function properly, which includes PLC systems, power
supplies, pneumatic and hydraulic systems etc. Systems
like these require a heavy assistance from the manufacturer
from the point of installation till the point of
commissioning, because only experts and fully trained
personal can understand them due to the nature of
complexity, and this complex structure and mechanism
helps manufacturer maintain a proper after sales business
to generate a profit and secure their technology being
copied or reverse engineered.

Development of an automation system which relies on
cheap, easily available equipment and designed for
achievable quality targets, heavily cuts down the cost of
such system. Using technologies that are not too complex
and easily understandable for a beginner such as
programming in Ardunio or using platforms like MATLAB,
makes it easy for a person to comprehend with little to no
technical experience. The prototype robot presented in
this study is developed considering these cost cut down
ideas explained above, which makes it highly cost effective
and yet possible to achieve desirable results.

The results for which this prototype was designed are
achieved with few exceptions. The robot has to recognize
the part present for painting using a camera (ordinary
webcam) and run the associated code build for that specific
part and also keep monitoring the whole process to act as
a sensor for safety, to stop the process if something goes
unexpected and also to monitor quality in live processes.
For the paint quality to be better than a conventional
manual spray painting and also to reduce the material
waste in painting an airbrush is utilized. Payload at the
end effector was decided to be at least 2kg but due non-
availability of higher torque servos within budget it was

<figure><img src="image_11.png" /><figcaption>FIG. 10. FABRICATED PROTOTYPE ROBOT</figcaption></figure>

<figure><img src="image_12.png" /><figcaption>FIG. 9. CURRENT CONSUMPTION</figcaption></figure>
later reduced to half a kg. The whole idea of this prototype
was inexpensive automation using technology that
doesn't require field experts to understand. Programming
is kept as simple as possible but effective. Simplicity
enables the non-programmer to grasp the language easily
with little prior training. GUI interface makes it easier to
control and operate the whole system.

Experimental results show that overall system results
conclude higher efficiency compared to manual spray
painting while maintaining even layer of paint. Power
Consumption is kept to minimum, as whole system can
operate on 6V (2Ah) rechargeable battery (excluding
compressor power). It has the ability to work continuously
on an assembly line in a loop without overheating. For
reproducibility and repairing, easily available electronics
and materials are used. The robot is a prototype model
and is ideal for relatively small part due to its limiting
working envelope. Further it can identify and paint variety
of parts as the image processing allows the robot to
distinguish objects. Live paint monitoring and data
acquisition objective were not achieved. The reason for
this is that, it is not possible with webcam; it requires
high performance industrial machine vision such as CCD
and CMOS cameras which are expensive and out of
budget.

The decreased payload proved to be a limiting factor as
the servo motors were required to run at their optimal
power all the time to reach max payload. Because of this
limitation it was not impossible to increase the paint
container capacity, mounted at the end effector without
increasing the torques of the servo motors and ultimately
increasing the payload. Hence, to be able to pick more
than 0.5kg load would have meant to use an industrial
grade servo motor; which is expensive, requires special
drive and power supply and is heavy due to its increased
torque capabilities. Hence this speciûcation was not
attained.

Experimental result also shows a flaw in part recognition
by DIP, that it's hard and sometimes very tricky to control
the part recognition because a slight change in placement
of the part or a slight change in the orientation, would be
picked up by the DIP and eventually system does not

recognize it. To overcome this flaw, DIP is programmed to
give the green signal if the presented part matches with
previously stored images on lower levels, i.e. 80~ 85%
similarity, because keeping it on higher side, let's say
90% or plus, would pick up any small change in part
orientation and would not recognize the part most of the
time. If DIP is improved it will be possible to paint any
part irrespective of its shape, as the camera will be
responsible for guiding the end effector appropriately.

6. CONCLUSIONS

The prototype robot constructed in the study managed
to achieve the fundamental objective set for the study; a
cost-effective industrial spray painting robot prototype.
It was under PKR. 30,000/- so is easily affordable by small
manufacturing industries, as their budget provided was
of PKR. 50,000/-

To cut down the costs of industrial grade servos, RC
servos were used, which restricted the robot capabilities,
but gave the robot smooth flow while in motion. The
design modifications and restrictions were chosen based
on a specific application criteria set by a manufacturing
industry, where safety of intrinsic mechanical compliance
is an important design consideration. The cost cut-down
methods and tradeoffs explained in this paper were made
as an effort towards designing an affordable painting
robot.

The robot constructed was a first generation, and so can
be improved. The study conducted in this paper allowed
us to find the weakness areas while designing a robot.
Therefore, the conclusion taken from this study, is to
look at torque increasing techniques such that high
torques can be achieved, for example using gear ratios. A
gearbox can be integrated into the design, to increase the
torque at the cost of speed. This modification will allow
for the robot to become more versatile and durable.

The second weak area of the constructed robot was lack
in part recognition in different environments. This image
processing, for part to be detected in various
environments needs to be researched and experimentally
trialed prior to installation into the robot. This will make
the robot autonomous.
ACKNOWLEDGEMENTS

Authors are grateful to the Almighty Allah for giving
strength and encouragement in completing this project.
Authors are really grateful to Shaheed Zulfikar Ali Bhutto
Institute of Science & Technology, Karachi, Pakistan, for
their technical support, logistics and guidance throughout
this project. The authors all thank their parents for their
continued motivation, encouragement and moral support
during the project.

REFERENCES

[1] Benhabib, B., "Manufacturing: Design, Production, Automation, and Integration", New York, USA, 2003

[2] Chen, H., Fuhlbrigge, T., and Li, X., "A Review of CAD Based Robot Path Planning for Spray Painting", Industrial Robot: An International Journal, Volume 36, No. 1, pp. 45-50, 2009.

[3] Chen, H., Thomas, F., and Xiongzi, X., "Automated Industrial Robot Path Planning for Spray Painting a Process: AReview", Proceedings of 4th IEEE Conference on Automation Science and Engineering, pp. 522-527, Washington, DC, USA, August, 2008.

[4] Haugan, K., "Spray Painting Robots: Advanced Paint Shop Automation", Industrial Robot: An International Journal, Volume 1, No. 6, pp. 270-272, 1974.

[5] Craig, J.J., "Introduction to Robotics: Mechanics and Control", 3rd Edition, Pearson/Prentice Hall, 2005.

[6] Saipollah, M.S.B., "Design and Simulation of Spray Painting Robot", Universiti Teknikal Malaysia Melaka (UTeM), May, 2008.

[7] Appleton, E., and Williams, D., "Industrial Robot Applications", Open University Press, 1987.

[8] Hetland, A., and Terje, O.H., "Remotely Operated Managed Maintenance Robotic System", Westinhouse Electric Corporation, March, 1996.

[9] MacDonald, B., and Pauli, D., "Adaptive Robot Training by Programming and Guiding", Journal of Intelligent Manufacturing, Volume 4, No. 6, pp. 385-404, 1993.

[10] Muzan, I., Faisal, T., Al-Assadi, H., and Iwan, M., "Implementation of Industrial Robot for Painting Applications", Procedia Engineering, Volume 41, No. 12, pp. 1329-1335, 2012.

[11] Pierrot, F., Dombre, E., D'egoulange, E., Urbain, L., Caron, P., Boudet, S., Gari'épy, J., and Megnien, J., "Hippocrate: ASafe Robot Arm for Medical Applications with Force Feedback", Medica Image Analysis, Volume 3, No. 3, pp. 285-300, 1999.

[12] Dombre, E., Duchemin, G., Poignet, P.,and Pierrot, F., "Dermarob: ASafe Robot for Reconstructive Surgery", IEEE Transactions on Robotics and Automation, Volume 19, No. 5, pp. 876-884, 2003.

[13] "Choosing a Motor: DC, Stepper, Or Servo - Free How-to Robot Construction Article", Robotoid.com, 2016. [Online]. Available: http://www.robotoid.com/howto/choosing-a-motor-type.html.

[14] Balkan, T., Ozgoren, M.K., Arikan, M.A.S., and Baykurt, H.M., "A Method of Inverse Kinematics Solution Including Singular and Multiple Configurations for a Class of Robotic Manipulators", Mechanism and Machine Theory, Volume 35, No. 9, pp. 1221-1237, 2000.

[15] Lehni, J., "Rita", Developed for Exhibition in Tensta Konsthall in Stockholm, 2005.

[16] Lehni, J., "Viktor", Produced in Collaboration with Defekt, Supported by the Swiss Federal Office of Culture and Migros Cultural Percentage, 2008.

[17] Benedettelli, D., "Legonardo – A Lego Portrayer Robot", 2008.

[18] Stanley, F.E., "Improvement in Atomizers", United States Patent US 182389 A, 19 September, 1876.

[19] Anderson, G.S., Galetta, J.D., MacGregor, D.T., and Prince, C.F., "Robotic Airbrush Apparatus", United States Patent US 4864966-A, September, 1989.

[20] Lehni, J., and Franke, U., "Hektor", Diploma Project at ECAL (Ecole Cantonale d'art de Lausanne), 2002.

[21] Conner, D.C., Greenfield, A.L., Atkar, P., Rizzi, A., and Choset, H., "Paint Deposition Modeling for Trajectory Planning on Automotive Surfaces", IEEE Transactions on Automation Science and Engineering, Volume 2, No. 4, pp. 381-392, 2005.

[21] Arikan, M.A.S., and Balkan, T., "Process Simulation and Paint Thickness Measurement for Robotic Spray Painting", CIRP Annals - Manufacturing Technology, Volume 50, No. 1, pp. 291-294, 2001.

[23] Society of Robots, "Robot Arm Calculator," [Online]. Available: http://www.societyofrobots.com

[24] Polulu, "Polulu Robotics and Electronics," [Online]. Available: https://www.polulu.com