Design and Implementation of 3 Axis CNC Router for Computer Aided Manufacturing Courses

In this paper, it is intended to make the mechanical design of 3 axis Computer Numerical Control (CNC) router with linear joints, production of electronic control interface cards and drivers and manufacturing of CNC router system which is a combination of mechanics and electronics. At the same time, interface program has been prepared to control router via USB. The router was developed for educational purpose. In some vocational schools and universities, Computer Aided Manufacturing (CAM) courses are though rather theoretical. This situation cause ineffective and temporary learning. Moreover, students at schools which have the opportunity to apply for these systems can face with various dangerous accidents. Because of this situation, these students start to get knowledge about this system for the first t ime. For the first steps of CNC education, using smaller and less dan gerous systems will be easier. A new concept CNC machine and its user interface suitable and profitable for education have been completely designed and realized during this study. To test the validity of the hypothesis which the benefits that may exist on the educational life, enhanced traditional education method with the contribution of the designed machine has been practiced on CAM course students for a semester. At the end of the semester, th e new method applied students were more successful in the rate of 27.36 percent both in terms of verbal comprehension and exam grades.


Introduction
In some vocational schools and universities, Co mputer Aided Manufacturing (CAM) courses are though rather theoretical.Therefore, students face with ineffective and temporary learn ing.Besides, students at schools that have the opportunity to applying real Co mputer Nu merical Control (CNC) machines, can face with various accidents.To eliminate these problems , various simu lation systems are used.Before being applied to actual CNC machine, the corresponding meaning of the code written in simu lation environment can be first observed on the virtual CNC machine.As a result, without being confronted with adverse accident which they may face while try ing their o wn codes, students can make the necessary arrangements in a virtual environ ment.Thus, by applying a sort of debugging process to written code instead of making direct ly real-life testing of applications that actually confronted and observed, training more efficient and effective results with CNC machines are becoming possible.Start ing fro m this situation, to accustom students to workbench in the first step of CNC training, creating a co mpact and relat ively less dangerous system will have great help in education.There are several studies on this subject.Aktan, in his thesis, designed and manufactured low cost, three axis, mult ipurpose cartesian robot system for education [1]. Lee and Chang, in their study, have developed CAD/CA E/ CAM system.They also stated that this system could be used as supplementary training tool in courses [2].Köbeloğlu, in his thesis, designed and manufactured low cost, two axis, CNC lathe for training in vocational and technical schools [3].Tseng and Kolluri, in their study, are designed microcontroller controlled 3 axis CNC router [4].Their aim is was try out new technologies and use them in educational applications, especially.In this study, a co mpact, USB controlled 3 axes CNC router is designed and manufactured.An interface program is prepared with Microsoft Visual C#.Un like other studies, the produced system has been tested on students .Mechanical design of the system is described in Sect ion 2. In Section 3, electron ics design is explained.User interface and control method are shown within the Section 4. Methodology and testing procedure are also described in Section 5.The results and conclusions are shown and discussed in Section 6 and 7, respectively.

Mechanical Design
The system has 3 linear axes.In these axes, transmission of motion is provided with the help o f linear bearings.Necessary amount of motor power is calculated by regarding the general structure of the system and axes weight [5].

P = (2π N m T t ) / 60
(1) Where; P = Motor power while cutting (W) T t = Total moment while cutting (Nm) N m = Motor speed (rpm) P a = Motor power while acceleration (W) As a result of calculations, findings about motor power requirements are pointed in Table 2.

Electronics Design
The router has 3 stepper motors and for each stepper motor, drivers shown in Figure 2

Power Supply
Full wave rectifier circuit is prepared as power source of motors.300W 24 Volt transformer is used at circuit input.
Rectificat ion is managed with 1000V 50 ampere bridge diode at circuit output.100V 1000uf parallel capacitor is connected to output.Whole power supply circuit and its schematic drawing shown in Figure 3 and 4, respectively.The control bo x (Fig. 5), which is consisting of electronic parts of the system, g ives opportunity for user to make control and adjustment of processes.There are power source, driver and other electronic equipment inside the box.The front panel includes on-off switch, power indicator, axes movement indicators, X-Y-Z manual movement buttons, spindle switch and emergency stop button.The back panel has motor and limit switch connections.4 Interfaces and Control The router system's control type is open loop.By making essential calculat ions with microcontroller, nu mber of steps are calculated and sent to L297 stepper motor driver.
According to incoming signals, pulses are produced and sent to L6203 M OSFET d river.Necessary movements are carried out through driving motor with the help of driver.The block d iagram of the system is shown in Figure 6.

L297 Stepper Motor Driver
Step Direction Enable

L6203 Full Bridge Driver
Stepper Motor

Figure 6. Block diagram
So far mechanic, electronic and program interface parts of system were ment ioned.Now, it will be explained how the system works.Data trans mission is carried out via USB.So, the developed system is available to work on every co mputer that has USB port.The first step is the data analysis of G and M codes which are entered by user.
Our sample code is: "G01X97Y85" In this code, G letter indicates working mode.What is to be done is determined according to the ensuring value.In our examp le, the value is 01.Th is value signifies that router will start cutting process.Velocities of router at the time of cutting and going idle must be different.Because, while going id le, there is no force against and machine must be send to the place of cutting rapid ly fo r t ime saving.Here, because of 01 value, axes should move slowly.Ensuring letter and the following number demonstrate which axes should move and the amount of movement in millimeters.According to the examp le, if the line had finished here, it would have been understood that we should go 97 mm in X axes at slow velocity.But it is seen that Y value is present next to X.It is the sign of linear interpolation to be done.After the line extract ion in this process, velocity, axis and distance data are appointed to variables and send via USB channel to the microcontroller.Fro m these incoming data, according to distance value which motor needs to take how many steps is calculated and pulses are sent to the driver.Through these pulses, motor rotates as required and a linear movement is performed via ball bearings.After end of the movement, microcontroller sends a signal to computer that the process is finished.Then, the co mputer sends values of next line to microcontroller.In this way, process finishes after all lines were processed.The user interface which is written with Microsoft Visual C# is shown in Figure 7. Here, G and M codes are 05002-p.3

MATEC Web of Conferences
entered fro m Code Entry section.The user writes the code and presses enter.The code passes the lower bo x.After all lines are written, the codes send to router by pressing "Send to Machine" button.By "Load from File" option, the code can also be downloaded from any text file.With indicators on the right side of the interface, can be seen the axis positions and by pressing "Zero" button, they can send to home positions.With the "Spindle Velocity" button, speed of the spindle can be ad justed.Required spindle speed can be calculated by pressing the "Calcu lation of rev/ min" button on the left side of the interface.The calculator showed in Figure 8. Fro m the ramping section, acceleration and deceleration ramp ing rate of the stepper motors can be set.In Figure 9, it is tried to visualize the entire mechanical design of the system for using CAM courses.

Methodology of Testing
After co mplet ing design and imp lementation of desired system, testing process the last step of the study has been started.During this step, the designed system has been integrated to CAM course taken by 96 undergraduate students and the aimed students are randomly div ided into two groups.Addition to this, one of the groups was selected randomly and classic education methods applied during semester.The other group also had been educated via new, system integrated training scheme.In order to eliminate the effects of lecturer mentioned in the paper of Kane and et al [6], the in fluences of lecturing class size explained in Angrist and et al [7] study and also the possible impacts of lecturing at different t imes of a day, for both of the groups have been educated by the same lecturer at the same class and the same hours of the day.For co mparing education methodologies during the semester two written and one oral examination including same kind of questions were applied to both groups.By averaging exam g rades of the students, their semester-end scores were acquired.
The average semester -end grades of the students taken given CAM course can be seen as a bar graph in Figure 10.When the distribution of the grades between 0 and 100 investigated statistically, normal (Gaussian) distribution approximately has been achieved.The graph of average grades is clearly shaped like a Gaussian distribution.Due to the fact that any Gaussian distribution is a symmetrical d istribution [8], skewness in other words coefficient of asymmetry should be equal to zero [9,10].Kurtosis which means convexity is one of the characteristics for comparing any random distribution with normally d istributed ones [9,10].Ku rtosis coefficient is equal to 3 for Gaussian distributions [9,10].As can be seen from Tab le 3, the parameters were calculated for obtained grades distribution as 3.1301 and 0.0648 respectively.Consequently, the distribution was roughly accepted in the form of Gaussian distribution.
On the other hand, so as to make the Gaussian distribution more meaningfu l and eliminate individual success or failure of the students, 95 percent was selected as confidence interval [11].If the given Table 3 is examined, it has been also presented the whole class, end-average grade and standard deviation of the grades.By putting the average and standard deviation informat ion to the given Equation 3 [11], the upper and lower boundaries of the confidence interval were derived as shown on Table 3.The boundaries of confidence interval and the eliminated students, emphasized by red color, with respect to them are demonstrated on Figure 10.The number of students eliminated due by confidence interval lo wer boundary and upper boundary, is 3 and 4 respectively.At this point, the students within the confidence interval were determined and listed in their groups.With final selection, average score calculat ion process for selected students was applied again in terms of their groups.Additionally, at the end of the semester a question concerning whether novel educational model are more efficient was directed by conducting a survey on related students.Targets were performed in educational 3 axis CNC router system and it was observed that system worked properly.Students trained by new method of learn ing had the opportunity of testing their experiences on real system during semester.Thanks to the recently designed CNC mach ine, without any accidents or injury the students reached to the end of the semester.Working with smaller and less detrimental system has encouraged the students to be self-confident and all students trained by new methodology has had the experience of conduct an experiment on real system at least once.
It is obvious that statistically obtained results are master indicat ions of the study success.The evaluations at the end of the semester in terms of both exam grades and verbal do minance clearly show that the students trained by new method are 27.36% more accomp lished than other students.Moreover the questionnaire made on modified learning process applied students results support the previous statistical outputs.As can be seen in Figure 11, 64.44 percent of the participants declared that new methods for learn ing are mo re efficient.The 24.4 and 11.12 percent of the participants also claimed respectively that no difference between new or classical methods, and backing up classical methods of education.When the obtained statements evaluated, it is deduced the new designed system used CAM courses will be more efficient and successful.

Conclusions
The students have difficulty to design or use real systems caused by the theoretical experiences in CAM courses.In order to overco me th is prob lem, a novel methodology including simp le and less dangerous CNC machine which is designed through this study was prepared and applied to CAM courses.A student group taken CAM course has been rando mly d iv ided into t wo g rou ps.One o f the groups was educated by traditional theoretical methods and the other one by recently designed method.The effects of the education methods have been tested by one verbal and two written examinations.The results show that new proposed and applied method to CAM courses is more efficient and successful in the rate of 27.36 percent.Also, the conducted survey outputs emphasize that new education methodology is widely acclaimed.
In order to improve proposed methodology and get suitable for any CAM course without any hesitation, several adding and regulations will be performed in further studies.Axis dimensions can be enlarged.Instead of step motors, more precision and powerful servo motors can be used.With the addition of divisor like structures, axis nu mber can be increased and more varied geometrical shaped products can be processed.Open loop control can be converted to close loop control with the usage of encoders.

Figure 1 .
Figure1.M echanical structure of the router[1] were designed and produced.These drivers are co mbination of L297 and L6203.L297 is integrated circuit of stepper motor control.Fro m step, direction and enable signals , wh ich are g iven to input, it produces step motor phase signals at output.It can work at full step and half step modes.It is necessary to use adjunct integrated circuits like L298 and L6203 to drive motor with L297.L6203 is integrated circuit o f Hbridge driver.There is one bridge inside.For this reason, to drive one stepper motor, it is necessary to use two L6203.It heats less and has ability to give current more in co mparison to L298.It can p rovide appro ximately up to 5 A output current.

(Figure 10 .
Figure 10.Semester -end grade averages of all students

Figure 11 .
Figure 11.Questionnaire results on students

Table 1 .
Radial movement which is produced by stepper motors, is transformed to linear movement by linear bearings.Stepper motors are lin ked to linear bearings via couplings.Axes are able to work independent from each other, at the Technical properties of the router.

Table 2 .
Motor power requirements.

Table 3 .
Main specifications of semester -end grades distribution.