Computer Aided Design of a Low-Cost Painting Robot

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 highend 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.


INTRODUCTION
I ndustrial 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][3][4]. Automotive 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.

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.

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.

Quality
Spray painting has many issues related to their qualities.

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. 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-

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.

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.

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.

Motor Requirements
As discussed above in Introduction, Servo Motors were favored over other types of motors. To determine the 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.

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 lightweight and easy to machine.

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 eûcient 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-333and 64-4080µs and highest configurable pulse rte.

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-

Denavit-HartenbergMethod
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 coordinate 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 (α i-1 ): It is the angle deviation between z i-1 to z i measured about previous link length.
The Link (α 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.

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. 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.     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: S αβγ = Sin(α) * Sin(β) * Sin(γ) C αβγ = Cos(α) * Cos(β) * Cos(γ)

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: 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 θ i angles from Table   2. This results in Maximum coordinates as: X m = 510mm, Y m = 510mm and Z m = 580mm

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.

Maestro Servo Controller Interfacing
At this stage, the object has been recognized but to

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.

Electronic Circuitry
The operating voltage of all the motors used had a rating

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 lows through circuit.

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 take 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.

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 were smooth, but as paint diameter was less, the maximum at 150mm was chosen at optimal distance between the work surface and paint nozzle.

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 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.

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.

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, 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.

FIG. 9. CURRENT CONSUMPTION
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 nonavailability of higher torque servos within budget it was 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.

CONCLUSION
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.