Manufacturing a Plotter Printer with Computer Numerical Control Based Pen Ink Using CoreXY Mechanisms

−In the process of printing images, a high-quality plotter printer is required to obtain better printed images. This causes the costs incurred to purchase a plotter printer become even higher along with the quality of the printout. In addition, the use of original plotter printer ink is significantly more expensive than that of the non-original ink. Therefore, this paper proposes a pen based computer plotter printer design using the CoreXY framework. This framework is based on a 2D in-axis motion control technique using a single continuous belt for both axes. To evaluate the performance of the proposed design, the level precision for vector and raster modes are measured using the Mean Absolute Percentage (MAPE). Based on the results of precision measurements, it was found that the MAPE percentage value for measuring line length precision in vector mode is 58.38% and in raster mode is 56.32%. The MAPE percentage value for measuring circle radius in raster mode is greater than in vector mode. The percentage value of MAPE obtained for raster mode is 59.43% and for vector mode is 58.76%. In angular precision measurement, the MAPE percentage value from both modes produces the same value. The value obtained is 0%. It was found that the printer prototype designed to produce high-precision images with affordable pen ink costs and can process digital instructions from a computer using Computer Numerical Control (CNC).


INTRODUCTION
A printer plotter is a tool for presenting data from a computer to its users. The data source usually comes from an image or text documents. However, a high precision plotter printer is required to achieve a better printing quality. High precision printers require high quality components that cause the costs incurred to purchase a printer become even higher along with the quality of the printout. In addition, the use of original plotter printer ink is significantly more expensive than non-original ink.
Black printer ink falls into the category ten most expensive liquids in the world at number eight for $2,700 per gallon. This printer ink is more expensive than human blood which is in the top ten for $1,500 per gallon [1]. This is the major factor of the widespread use of non-original inks. Despite the print-out quality is obviously not as good as the original ink, consumers prefer affordable ink regardless of the quality. As many as 57 percent of printer owners in Indonesia are known to use non-original ink, either refilled or pirated cartridges [2]. Consumers are also not aware of the negative impacts due to the continuous use of non-original inks, like clogged printers and other more serious damage.
Mean absolute percentage error (MAPE) has been employed in many machine learning and regression precision analysis [3]. One of the earliest discussions on plotter printing can be found in [4]. The CoreXY mechanism is used to achieve high-precision displacement control where the torque is more stable. Also, the PLCcontrolled CoreXY mechanism is realized to perform an imitated-handwriting functionality. Zhu et.al [5] developed a plotter printer that can print human portrait images into sketch form using Matlab for image processing interface and path calculation. The position values of the binary image pixel coordinates are converted into angles by utilizing reverse kinematics where the servo motor is controlled with the Arduino Mega. The Sobel and Canny methods are also applied for edge detection. The Canny algorithm is widely used as the basis for detecting traffic lanes where the traffic line is the detection reference [6]. Munna et.al [7] showed that plotter printers are able print text files and geometric shapes from a computer onto paper. Hasan et.al [8] presented the development of a printer plotter with the Computer Numerical Control (CNC) method where the Arduino Nano is used as the microcontroller. Zamani et.al [9] built a 3D plotter printer capable of processing logical instructions provided in the form of code or text or images which are further converted into machine language. In addition, the proposed machine can also work as a laser cutter and produce 2D images for particular objects. Shahid et.al [10] concerned with controlling the motor driver protection for pen movement in the X and Y axes of the stepper motor rotation.
The aforementioned works showed that it is highly possible to build a plotter printer using other objects as its ink cartridge. And based on the problems before, therefore this paper presents a pen-based digital plotter printer using the CoreXY mechanism. This paper presents the development of a plotter printer using CoreXY framework where the control of the driver motor also maintains the pen movement in the X and Y axes by utilizing stepper motor rotation. This printer is expected to be able to produce good image quality at an affordable cost and be able to process logical instructions from a computer.

CoreXY
CoreXY is a 2D in-axis motion control technique using a single continuous belt for both axes as shown in Figure  1. CoreXY has three advantages, namely fast, simple, and flexible implementations. CoreXY parallel-kinematics means that the motor becomes the main source of inertia. The motor on the X-axis is stationary while the Y-axis is governed by the X-axis [11]. When the X and Y axes of the motor are in the same motion, the slider can move to the desired coordinates within the range of the frame structure. The movement of the CoreXY structure is modeled by the following equation: which and 0 denote the desired and initial axis positions. Slider displacement ( ) is determined by the motor speed ( ) and time ( ).

Flowchart System Diagram
The flowchart of the system is shown in Figure 2. If vector mode is selected, the system prints the only area of the image that has lines. Since the plotter printer only scans the areas of the image with lines, the process of printing the image takes less time. On the other hand, if the raster mode is selected, the plotter printer prints the entire image area from the origin [0, 0] to the other edges. Obviously, the image printing process takes longer using this mode than that of the vector one.

Required Parts
The following are the various parts used to build the plotter printer: Table 1. List of the required parts All parts are assembled to obtain the final design of the device. Several parts are shown in Figure 3 in accordance with the numbered list above.

Mechanical System Design
The final system design is shown in Figure 4. This plotter printer is designed using the CoreXY framework where the pen moves in two axis directions, namely X and Y. At both ends of the X-axis, a stepper motor is installed which moves the pen of the plotter printer. At the end of the Y-axis, a pen holder is attached. Inside the pen holder, a servo motor is placed to move the pen position up and down.

Software
The software used to print the image is LaserGRBL as shown in Figure 5. This software is able to load and stream G-Code path to the microcontroller.

Precision Testing
Mean Absolute Percentage Error (MAPE) is an error measurement that calculates the percentage of deviation between actual data and forecast data [13]. This calculation is used to see the difference percentage between the actual size image and the size of the printout. To evaluate the performance of the proposed design, the level precision for vector and raster modes are measured using the MAPE [14] which is calculated through the following equation: where x denotes the actual size, x̂ is the size produced by the plotter printer and N is the number of measurement samples.

RESULT AND DISCUSSION
Tests were carried out in two modes [15], namely vector and raster modes. The following are the results of precision measurements that have been obtained from several experiments. Interested readers can visit [16] for the prototype demonstrations.

Vector
Precision measurements on vector images are carried out in several categories, namely line lengths, circle radius, and angle degree.  Table 2, it is found that the length of the printout with the actual length is different. Among all the experiments, the result of the 5th experiment achieves the biggest difference in length. All trials had an average printing time under 10 seconds. The MAPE value obtained from the measurement of vector precision for the line length is 58.38%. From the measurement results in Table 3, it is found that the radius of the printed circle with the radius of the original circle is different. Similar to the previous experiments, among all the experiments performed, the results of the 5th experiment have the biggest difference in radius length. All trials had an average image printing time under 5 seconds. The MAPE value obtained from the measurement of vector precision for the circle is 58.76%.

Table 4. Vector precision measurement results for angles
From the measurement results in Table 4, it is found that the angle of the printout with the original angle is the same. All trials had an average printing time under 35 seconds. The MAPE value obtained from the measurement of vector precision for angles is 0% indicating precise angle printing.

Raster
Similar to the vector mode, precision measurements on raster images are carried out in several categories, namely line length, circle radius length, and angle degree.  Table 5, it can be noticed that the length of the printout with the original length is different. Among all the experiments, the result of the 5th experiment achieves the biggest difference in length. All trials had an average printing time under 3 minutes. The MAPE value obtained from the measurement of raster precision for line length is 56.32%. Table 6. Raster precision measurement results for circle radius From the measurement results in Table 6, it can be seen that the radius of the printed circle with the radius of the original circle is different. Similar to the previous experiments, among all the experiments performed, the results of the 5th experiment have the biggest difference in radius length. All trials had an average printing time of under 5 minutes. The MAPE value obtained from raster precision measurements for circles is 59.43%. From the measurement results in Table 7, one can see that the angle of the printout with the original angle is the same. All trials had an average printing time under 3 minutes. The MAPE value obtained from the measurement of raster precision for angles is 0%.

Comparison
This section reports the measurement comparisons of experiments that have been carried out using vector and raster modes.  Table 8, it is found that the difference in the percentage of MAPE for measuring lines in vector mode has a higher value than in raster mode. And the percentage of MAPE for measuring the radius of the circle in raster mode has a higher value than in vector mode. However, in the measurement of angle, the percentage value of MAPE in both modes is the same. Table 9. Result of comparison of average printing time From the measurement results in Table 9, it found that the average processing time for vector mode is smaller than for raster mode. In raster mode, the plotter printer will print the entire image area from [0, 0] to the finish line. Therefore, the image printing process will take longer using this mode.

Printout Image Samples
This section presents some image samples from experiments carried out using vector and raster modes. Figure 6 uses vector mode to print three circles with different diameters. Based on the results from Table 3, the radius of the printed image is different from the actual image.   The printouts in Figure 8 and Figure 9 using vector and raster modes produce different image models. In raster mode, the plotter printer plots the entire image area from [0, 0] to the edges so that the resulting image models are shaded in accordance with the actual image. Whereas for vector mode, the plotter printer only plots the image area with outline. In addition to printing images, this plotter printer plotter can also print written images as shown in Figure 10. The figure below is a printout of the signature image using vector mode.

CONCLUSION
Based on the results of precision testing carried out in vector and raster modes, it was found that the MAPE percentage value for measuring line length precision in vector mode is 58.38% and in raster mode is 56.32%. This shows that the MAPE value in vector mode is greater than in raster mode. But the MAPE percentage value for measuring circle radius in raster mode is greater than in vector mode. The percentage value of MAPE obtained for raster mode is 59.43% and for vector mode is 58.76%. In angular precision measurement, the MAPE percentage value from both modes produces the same value. The value obtained is 0%. The average time to print an image in vector mode is smaller than in raster mode. In vector mode, the average printing time is under 30 seconds. Meanwhile, in raster mode, the average time to print images is 2 minutes. Based on this, it is found that the duration time of printing images in vector mode is faster than in raster mode. Based on the results of precision measurements, it was found that the printer prototype designed to produce high-precision images with affordable pen ink costs and can process digital instructions from a computer using Computer Numerical Control (CNC). As suggestions for further research, adding more variations to the testing image for printing is highly advised to measure its performance. The use of different types of stationary for printing is recommended, especially by using stationary with ink thickness such as markers or highlighter.