0% found this document useful (0 votes)
90 views7 pages

Design and Implementation of 3 Axis CNC Milling Machine

This document discusses the design and implementation of a 3-axis motion control system for a CNC milling machine using an Arduino controller. The goal is to reduce time and human involvement in the CNC machining process to increase accuracy and reduce errors. An Arduino and motor driver are used to control stepper motors that move the machine axes based on G-code received from open source software. The document outlines the methodology, which includes selecting appropriate motors and calculating cutting forces to design a precise, low-cost 3-axis CNC milling machine capable of machining materials like wood, aluminum and plastics.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
90 views7 pages

Design and Implementation of 3 Axis CNC Milling Machine

This document discusses the design and implementation of a 3-axis motion control system for a CNC milling machine using an Arduino controller. The goal is to reduce time and human involvement in the CNC machining process to increase accuracy and reduce errors. An Arduino and motor driver are used to control stepper motors that move the machine axes based on G-code received from open source software. The document outlines the methodology, which includes selecting appropriate motors and calculating cutting forces to design a precise, low-cost 3-axis CNC milling machine capable of machining materials like wood, aluminum and plastics.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 7

Design and Implementation of 3 Axis Motion Control System for CNC

Milling Machine
Aung Chit Thu#1, Aung Thu#2, Naung Linn Htike#3
Department of Electrical Power Engineering, Defence Services Technological Academy,
Pyin Oo Lwin, Myanmar
1
[email protected], [email protected]

Abstract - This paper discusses design and can design and construct CNC controlled machine.
implementation of 3- Axis Motion Control System for Advanced facility and precision of control of CNC tools, if
CNC Milling Machine using Arduino controller based it’s compare with usual machine, has had a significant
on computerized numerical controller (CNC) machine influence on the development of function components,
and open source software (G-code and GRBL) for frame body, stepper motors, and control circuits.
controlling whole operation. Computer numeric control Construction and evaluation of Low-cost table CNC
(CNC) machine plays an important role in the field of milling machine by using low-price milling cutter for the
automation. The main aim of this project is to reduce main spindle due to a low voltage supply of the main
time consumed and it reduces human involvement cutting forces it is possible to use the tools of smaller
which eventually reduces rate of error and also increase dimension to machine materials like wood, aluminum and
the accuracy of the production. The communication plastic materials.
between the open source software (G-code and GRBL)
and hardware (Arduino and Motor Driver) is to be
done with the help of USB.

Keywords – CNC Machine, Micro Milling, Multi-


axis Controller, PLC, Stepper Motor.

I. INTRODUCTION
CNC Machining is a process used in the manufacturing
sector that involves the use of computers to control
machine tools. Tools that can be controlled in this manner
include lathes, mills, routers and grinders. The CNC in (a) (b)
CNC Machining stands for Computer Numerical Control.
CNC – Computer Numerical Control – Taking digitized
data, a computer and CAM program is used to control,
automate, and monitor the movements of a machine. The
CNC controller works together with a series of motors and
drive components to move and control the machine axes,
executing the programmed motions. Arduino and motor
driver are used for the control of the motors, and open
source software (G-code sender) is used for executing the
G code for machining applications. Several authors have
studied the development of such machines on a smaller, (c) ( d)
Figure 1.Examples of Micro-components and Microstructures
low-cost scale. Manufactured by CNC Milling Machine (a) Micro Head (b) Micro Gear
Computer Numerical Control or CNC machine is a (c) Micro Turbine (d) Micro-propeller (see online version).
conventionally machine where an operator decides and Design and Implementation of Three-Dimensional CNC
adjusts various machines parameters like feed, depth of cut Machine where it discusses the design of low cost three
etc. depending on type of job, and controls the slide dimensional CNC. The main function is a microcontroller-
movements by hand. It also is a specialized and versatile based CNC machine and its communication between
form of a Soft Automation and its applications cover many personal computer (PC) and CNC machine by Software sub
kinds, although it was initially developed to control the system that gets a set of command and fetch to the
motion and operation of machine tools. A CNC machine mechanical sub system in order to be control the 3-axis.
takes codes from a computer and converts the code using Software sub system that is a PC that provides easy to use
software into electrical signals. The signals from the interface for user to program commands in such a language
computer are then used to control motors. Since the motors that microcontroller accepts. With the development of
can turn very small amounts the machine is able to move in technology, more miniature components are required for a
highly precise movements over and over again. wide range of applications. There is a tendency in these
The 3-axis CNC machine; these machines nowadays components to contain complex three dimensional features
have range size in the open market Over decades, industrial with high precision and are made from various materials.
technology has transformed many aspects of daily life.
Several studies have been carried out for the development II. AIM
of such a (CNC) machine on smaller thinner, lighter The aim of this paper is to design, calculate and
weighted and budget cost. From the related journal and implement three-axis motion control for CNC milling
research, the main idea in carrying out this work of CNC machine.
development. III. METHODOLOGY
As the technology of CNC machine characterized by To design a machine tool, the factor to be considered is
accessible price and technology so rip that even individuals the nature of work to be performed from the machine. Here

1
the current work is to design and optimize CNC milling Figure 2.A Flow Chart for Selection Processes for Machine
machine tool. Therefore, achieving precision is the most primary
requirement of the design. Precision of a machine depends
Study of all milling upon the tool path deviation from its original indented path.
Machine size &
processes, force More is the deviation less will be the precision. The main
parameter selection
generated & power cause of the tool path deviation is the deflection of the
for hardest workpiece
requirement for drive machine. The important parameters which will influence
for machining
motor selection the design are:
(1) Nature of work material to be machined
(2) Machining parameter such as depth of cut, width of
Calculate max tangential cut, feed rate etc.
Select parameter like (3) Selection of prober factor of safety
& plugging force for
feed rate, rpm and (4) Material selection for the machine tool components
different milling
cutter diameter to be (5) Availability of standard components against the
processes, select for
used for milling designed components and its effect on other
largest size for designing
parameters.
(6) Span of the machine tool in X, Y and Z direction
Analysis of the which depend upon the work material, this is
Selection of Z-axis drives selected assembly the most important parameter which causes
component (Ball screw, against the deflection, deflection in the machine tool.
drive motor, coupling, see the deflection is The empirical calculations are defined step by step
and guide way within the range starting from the force calculation. The flow chart
described in figure -2 shows the design step to be followed
to reach the structural design of the whole system.

A. Milling Operation for Material removal


Is Milling is the process of machining in which material is
No removed with the help of tool rotating about its axis, the
design
safe? processes is different from the drilling is apart from
traveling linearly along its axis the milling tool travels to
perpendicular to its axis also.
(1) End milling: In this process the cutter removes the
Yes
material from the ends or sides of the work
Analysis of the piece as shown in figure 3.
Selection of X-axis
selected assembly drives component (Ball
against the deflection, screw, drive motor,
see the deflection is coupling, and guide way
within the range

Is
No
design
safe?
Figure 3.End-milling (see online version)
(2) Face Milling: In face milling generally the top
surface of the work piece is being machined. It is
Yes
the most common type of milling operation for most
Analysis of the of the sculpturing operations.
Selection of Y-axis selected assembly
drives component (Ball against the deflection,
screw, drive motor, see the deflection is
coupling, and guide way within the range

Is
No design
safe?

Figure 4.Face-milling (see online version)


Selection processes complete Yes (3) Plunge Milling: Plunging was invented to be able to
remove large quantities of material and is especially

2
adapted for applications where long overhang is (3) Condition and Environment of operation.
needed.

Figure 7.Single-axis Driven System (see online version)


Figure 5.Plunge-milling (see online version)
Total mass of the table and work: m =40 kg
B. Selection of Ball screw Friction coefficient of sliding surface: µ =0.05
A ball screw is the machine tool member which Internal frictional coefficient of ball screw: µ0 =0.3
transmits rotary motion from the drive motor to the linear Ball screw efficiency: η =0.9
motion to the slide way. Ball screw diameter: DB = 15 mm =0.015m
(1) It is subjected to the thrust or axial force due to Total length of ball screw: LB = 200 mm =0.2m
the load of work piece, cutting force, friction of Material of ball screw: Steel [density, ρ = 7.85x103 kg/m3]
the slide way and inertia force. Pitch of ball screw: PB = 5 mm =0.005m
(2) Torsion force to overcome this force. Desired resolution: ∆l = 0.0125 mm/step
Feed: l = 50 mm
Positioning period: t0 = 0.8 sec
Safety factor, SF = 2

Required resolution, θs =

= =0.9◦

Operating pulse (A) =

= =8000 pulse
An acceleration (deceleration) period of 25% of the
positioning period is appropriate.
Acceleration (deceleration) period (t1) = 0.8 x 0.25= 0.2s

Operation pulse =
speed, f2
= = 13333.33 Hz
Figure 6.Linear Slide Guide and Ball Screw Actuator (see online version)
C. Selection of Slide Way
The round shaft slide way was selected earlier for Operating speed =
the purpose of wood carving CNC machine because of
its properties discussed. The selection of round shaft = 13333.33 x x 60 =2000 rpm
slide way depends upon the permissible value of
bending moment. The models for the round shaft slide
ways were taken from the round shaft guide way External force: FA = 0
technology. Load in shaft torque F = FA + (m sin α + µ cos α)
D. Selection of the Coupling = 0 + 40 (sin 0 + 0.05cos 0)
The coupling should require transmitting the torque =2N
from drive motor to the ball screw shaft. Therefore Pre load weight F0 = F/3 = 0.67 N
coupling should be designed to withstand the required
and fluctuating torque. Load torque TL =
E. Selection of Driven Motor and Calculation
For the selection of proper motor and its size the torque
required should be calculated, for which these point should =
be considered while calculating the required motor torque.
(1) Rate of acceleration, deceleration and required = 1.93x10-3 Nm
velocity for the desired motion. = 0.27 oz-in
(2) Inertia, frictional and other load torques to be Inertial of ball screw, JB = . ρ. LB. DB4
encountered.

3
These machines can automatically cut and shape the
= x 7.8x10-8 x 0.2 x (0.015)4
workpiece without a human operator. Each machine has its
=7.8x10-6 Kg-m2
own set of axes or parameters that must be controlled; as an
= 0.426 oz-in2
example, consider the milling machine shown in Figure 9.
Inertia of table and work, JT = m ( )2 = 40 x ( )2
The work-piece that is being formed is fastened to a
=2.533x10-5 Kg-m2 movable table. The table can be moved (with electric
= 1.385 oz-in2
Total inertia, JL = JB + JT motors) in three directions: X, Y, and Z.
= 0.426 + 1.385
= 1.811 oz-in2

Acceleration =

torque, Ta

= 0.54 J0 +0.983oz-in
Required torque, Tw = (TL + Ta) x SF
= (0.27 + 0.54 J0 +0.983) x 2
= 1.08 J0 + 2.51 oz-in Figure 9 Basic of Numerical Control of Milling Machine (see online
Table 1 Selected NEMA 17 Stepper Motor Specifications version).
Model no. 42BYGHM607 The cutting-tool speed is automatically controlled as
Speed High speed well. To make a part, the table moves the work-piece past
No of pole 4 the cutting tool at a specified velocity and cutting depth. In
Step angle 0.9◦ this example, four parameters (X, Y, Z, and rpm) are
Rated current 1.7 A continuously and independently controlled by the controller.
Rated voltage 2.5 V The controller takes as its input a series of numbers that
Phase resistance 1.5 completely describe how the part is to be made. These
Holding torque 0.32 oz-in numbers include the physical dimensions and such details as
Rotor Inertia 0.295 oz-in2 cutting speeds and feed rates.
Rotor inertia, J0 = 0.295 oz-in2
Required torque, Tw = 2.83oz-in = 0.02 Nm

Figure 8 Torque Speed Curve for NEMA 17 Stepper Motor


Select the motor for which the required torque falls within
the pull out torque of the torque speed characteristics.
IV. MOTION CONTROL
Motion control is a broad term used to describe an open-
loop or closed-loop electromechanical system wherein
things are moving. Such a system typically includes a
motor, mechanical parts that move, and (in many cases)
feedback sensor(s). Automation assembling machines,
industrial robots, and numerical control machines are
examples of motion control.
A. Numerical control
Numerical control (NC) is the type of digital control
used on machine tools such as lathes and milling machines.

4
satellites, robotic and control applications.
There are several features common to all stepper motors
that make them ideally suited for these types of applications.
They are as under:
(a) High Accuracy: Operate under open loop.
(b) Reliability: Stepper motors are brushless.
(c) Load Independent: Stepper motors rotate at a set
speed under different loads, provided the rated
torque is maintained.
(d) Holding Torque: For each and every step, the motor
holds its position without brakes.
Stepper motor requires sequencers and driver to operate.
Sequencer generates sequence for switching which
determines the direction of rotation and mode of operation.
Driver is required to change the flux direction in the phase
windings.
D. Stepper Motor Driver
The TP-6600 is a micro-stepping driver for controlling
bipolar stepper motors which has built-in translator for easy
operation. This is a professional two-phase stepper motor
driver. It supports speed and direction control. Its micro step
and output current with 6 DIP switch can be set. There are 7
kinds of micro steps (1, 2 / A, 2 / B, 4, 8, 16, 32) and 8
kinds of current control (0.5A, 1A, 1.5A, 2A, 2.5A, 2.8A,
3.0A, 3.5A) in all. And all signal terminals adopt high-speed
photo-coupler isolation, enhancing its anti-high-frequency
interference ability.

Figure 11 TB 6600 Micro-step Driver (see online version).

V. DRAWING LINE ALGORITHM


Figure 10.Block Diagram of 3 Axis Motion Control for CNC Machine
After knowing of how to extract drawings information and
B. G-code
how to move the CNC axis, algorithms of drawing the
G-code is the language used to describe how a machine important shapes such as lines, circles, arcs, ellipses and
will move to accomplish a given task, using numerical polylines are developed. To draw lines, the needed
control (NC) --- it is the most widely used NC programming information are the start point of the line and the end point
language. of the line and these information can be extracted from the
C. Arduino DXF file as follows: The X coordinate of the start point can
The Arduino Uno is a microcontroller board based on be found in the.
the ATmega328. The Atmega328 has 28 pins. It has 14
digital input/output pins of which 6 can be used as PWM DXF file after the group code 10. The Y coordinate of
outputs, 6 analog inputs, a 16 MHz ceramic resonator, a the start point can be found in the DXF file after the group
USB connection, a power jack, an ICSP header, and a reset code 20. After the X and Y coordinates of the start point
button. The Atmega328 has 32K of flash program memory are extracted, the program will call the moving algorithm
and 2K of Internal SRAM. It contains everything needed to so that the CNC will move until it reaches that point. The X
support the microcontroller; simply connect it to a computer coordinate of the end point can be found in the DXF file
with a USB cable or power it with an AC-to-DC adapter or after the group code 11. The Y coordinate of the end point
battery to get started. can be found in the DXF file after the group code 21. After
D. Stepper Motor the X and Y coordinates of the end point are extracted the
Stepper motor is a special type of electric motor that program will call the moving algorithm so that the CNC
moves in precisely defined increments of rotor position will move until it reaches that point. The above algorithm is
(Steps). The size of the increment is measured in degrees
and can vary depending on the application. Due to precise
control, stepper motors are commonly used in medical,

5
implemented in flowchart form as shown in Fig 5. If ( x1,y1) and (x2,y2) are (0,0) and (4,3) respectively,
∆x = x2 –x1 = 4 - 0 = +4
∆y = y2 – y1 = 3 - 0 = +4
+ and – signs represent the forward and reverse directions
of stepper motor.

X - no of steps = Xstep = = = 320 steps

Y - no of steps = Ystep = = = 240 steps

Angle θ = tan-1 = tan-1(3/4) = 36.87 deg

X- velocity = Fx = F cos(θ) =1 x cos (36.87) = 0.8 mm/sec


Y- velocity = Fy = F sin(θ) = 1 x sin (36.87) = 0.6 mm/sec

Time of x-motor drive = Tx = =

= 5 sec

Time of y-motor drive = Ty = =

= 5 sec

Tx and Ty must be the same.


For x-motor driver,

Fx = x = 64 step/sec

⸫ 64 step = 1 sec
1 step = 1/64 = 15.6 ms

T-off
Tonn
15.6ms

Let Toff be 1 ms,


Ton = 15.6 – 1 = 14.6 ms

1 ms

T-off
Figure 12 A Flow Chart of Drawing Line Algorithm
A. Linear Interpolation Calculation Tonn

1.46 ms
For Y-motor driver,

Fy = x = 48 step/sec

⸫ 48 step = 1 sec
1 step = 1/48 = 20.83 ms

T-off
Pitch = P = 5 mm/rev
Feed rate, F = 1 mm/sec Tonn
Nema17 stepper motor’s step per revolution = SPR = 400
20.83ms
step/rev
1 ms
Resolution of X,Y = = = = x = Let Toff = 1ms ,
Ton = 20.83 – 1 = 19.83 ms
0.0125 mm/steps T-off
Tonn
6
19.83 ms
[5] Rajendra rajput et al (2016), demonstrated the comparison of CNC
controller viz., Fanuc 21M 840D, Heidenhain TNC426. Kajal
Madekar et al (2016).
[6] Kumar, V Puttige, ―low cost automation for CNC machining
center‖, IJMET, Vol. 3.

VI. DRAWING CIRCLE ALGORITHM

The circle can be drawn using CNC by dividing the


circle circumference into small lines, the end point of one
line is the start point of the second line and the end point of
the last line is the start point of the first line. In this paper
the circle is divided into 360 lines, the start and end point
of each line are calculated using equations (1) and (2)
below and Fig. 10 shows these points on circle.

(1)
(2)

Figure 13 Circle Algorithm (see online version)

VIII. CONCLUSION

From this project, the principle of CNC machine was


learned. Better understanding was gained in the modes of
operation of CNC machine. There are various type of
modern CNC machines use in industry. Automatic
generation of different preparatory (G codes) and
miscellaneous function (M codes) is used in CNC part
programming for completing a successful CNC program.
Specifically, G-codes are commands for CNC machines to
follow so that they can operate on their own without human
control. Zero set up is very important step to obtain an
accurate geometry of the work piece. This project gives an
idea for the beginners to understand on how the CNC
machines work virtually.

ACKNOWLEDGEMENT

The author would like to express his gratitude to his


supervisor Major Naung Linn Htike, Research officer,
Department of Civil Development and Environmental
Conservation Research, Department of Research Centre
and Lt. Colonel Ohn Myat Win, Head of Electrical Power
Engineering Department.

REFERENCES
[1] Sundar pandain et al (2014), demonstrated an open source G-code
interpreter i.e. GRBL controller which acts as an inspiration to
work on the production system with low cost.
[2] Dr.J.B. Jayachandraiah et al (2014) provide the idea to develop the
low-cost Router system which is capable of 3 Axis simultaneous
interpolated.
[3] Torjus spilling (2014), presented his master’s thesis on self-
improving CNC machine.
[4] Alian Albert (2011) has studied history of CNC machines,
information regarding CAD/CAM software’s and suggested for
various components used in a router.

You might also like