Sie sind auf Seite 1von 57

Page i of 57

DESIGN AND FABRICATION OF


SMALL SCALE CNC TURNING
MACHINE
Senior Design Project Report

BY

Abubakar Rashid 2012021


Muhammad Hamza 2012216
Saad Bin Arshad 2012321
Zaryab Shahid 2012421

SUPERVISED BY
PROF. DR. WASIM AHMAD KHAN

SUBMITTED IN PARTIAL FULFILLMENT OF THE


REQUIREMENTS FOR THE DEGREE OF BACHELOR OF

SCIENCE

Faculty of Mechanical Engineering


GIK Institute of Engineering Sciences & Technology

May 2016
Page ii of 57

FACULTY OF MECHANICAL ENGINEERING


Ghulam Ishaq Khan Institute of Engineering Sciences and Technology

Senior Design Project Report

Approved as to style and content by:


Name and
signature of Advisor(s): Prof. Dr. Wasim Ahmad Khan

Date: _____________
Page iii of 57

ABSTRACT
Since the Industrial Revolution, the world has progressed in developing new innovative
technology at breakneck speeds. All of todays progress wouldnt have been possible without
the development of optimized processes and machines that produce products at a rate
sufficient to sustain the progress of civilization. Some such critical machines are Lathes,
Milling and the Shaper which have been a staple of every engineering workshop for decades
now. Of course they have drastically improved in functioning over time by becoming
numerically controlled, then subsequently becoming Computer Numerically Controlled
(CNC) after starting off as manually-operated machines.

Since Pakistan is a relatively young nation, it faces a dearth in such automation aids while
the rest of the world advances. Due to high capital costs and the need for sufficient expertise,
very few engineering setups in the country can afford to procure, operate and maintain such
hi-tech machines. Thus we took it upon ourselves to develop design principles and
methodologies that any workshop owner could use to retrofit existing manual machines and
turn them into fully functional CNC machines or could develop a fully functional CNC
turning machine from scratch.

We intend to design a small-scale Computer Numerically Controlled (CNC) Turning machine


to establish and validate our methodologies. In the development process, we will ensure that
we document every step of the process. Our main goals will be user-friendliness, low cost
and ease of use so that smaller engineering setups can save up significantly on capital costs
when retrofitting or building their own CNC machines using our methodologies.

The main advantages of such an indigenously produced machines are:


Sufficient level of precision and accuracy in machined work parts
Time saving
Reduced labor cost
Elimination of Human error
Portability
Significant capital, operating and maintenance cost savings
Page iv of 57

ACKNOWLEDGEMENTS

We wish to express our sincere gratitude to Prof. Dr. Wasim Ahmad Khan for his mentorship
and guidance throughout our project Design and Fabrication of CNC Turning Machine.

We acknowledge the support and encouragement by Engr. Masroor Khan in the electronics
part of the project work.

We also thank Engr. Jawad Mansoor for helping us in initial design and procurements stages
of this project.

We greatly appreciate the motivation and understanding extended for the project work, by
Lab Technicians Jamil-ur-Rehman, Khursheed, Waqas and Mujahid who especially helped
us in the execution part of our project.

Additionally we appreciate the assistance afforded to us by our fellow batchmate Absar


Ahmed with regard to our project.
Page v of 57

TABLE OF CONTENTS
Page
ABSTRACT..iii
ACKNOWLEDGEMENTS .iv
TABLE OF CONTENTS .v
LIST OF TABLESvii
LIST OF FIGURES..viii
NOMENCLATURE......x

CHAPTER 1 INTRODUCTION.11
1.1 Need Statement..11
1.2 Objectives and Outcomes..11

CHAPTER 2 MECHANICAL DESIGN.12


2.1 Free Body Diagram.......12
2.2 Workpart Material.....13
2.3 Box Volume..........13
2.4 Spindle Motor RPM..........13
2.5 Feed and Depth.........13
2.6 Cutting Force............14
2.7 Spindle Motor Power............15
2.8 Thrust Force..........16
2.9 Cutting Tool Attributes.............17
2.10 Tool Properties...............17
2.11 Lead Screw Calculations.........17
2.12 Torque Calculation..............19
2.13 Rotational Speed..............21
2.14 Stepper Motor Power Calculation........21
2.15 Machine Motor Parameter Calculator......23
2.16 CAD Model..25

CHAPTER 3 MECHANICAL FABRICATION27


3.1 Axis Tables....................27
3.2 Clamps.......27
3.3 Frame.....................28
3.4 Motor and Chuck Coupling.......29
3.5 Stepper Motor Coupling............29
3.6 Tool Post................29
3.7 Ball Screws................30
3.8 Photographs of Finished Machine 32

CHAPTER 4 ELECTRONIC AND COMPUTER SCIENCE ASPECTS..33


4.1 General Overview..........33
4.2 Work Flow Overview........33
4.3 Software Overview and Justification................34
4.4 Electronic Hardware Architecture Overview....40
4.5 Electronic Component Specifications...41
4.6 Electronic Component Selection Justification..........42
4.7 Motor Tuning................47
Page vi of 57

CHAPTER 5 PROJECT BUDGETING......48


5.1 Estimated Budget...........48
5.2 Actual Expenditure........49

CHAPTER 6 CONCLUSIONS........50
6.1 A Few Final Words............50
6.2 Future Work...........50

APPENDIX............51
Appendix A..........................................51
Appendix B..............56

REFERENCES.............57
Page vii of 57

LIST OF TABLES

Page

Table 2-1 Table showing lead screw parameters...18

Table 2-2 Table showing the friction co-efficients for a leadscrews of


various materials with various types of nuts.....20

Table 5-1 Detailed Estimated Budget48

Table 5-2 Actual Expenditure....49


Page viii of 57

LIST OF FIGURES
Page

Fig 2-1 Free Body Diagram...12

Fig 2-2 Correction factor for unit horsepower and specific energy when values
of chip thickness before the cut t0 are different from 0.25 mm (0.010 in)...14

Fig 2-3 Forces acting on a chip in the Orthogonal Cutting Model16

Fig 2-4 Top view of Lathe machine with axes relation to the chuck visible17

Fig 2-5 Lead Screw Parameters.19

Fig 2-6 Detailed Free Body Diagram of the Forces acting on a leadscrew...20

Fig 2-7 Detailed Schedule for the Mechanical Design portion of our project...22

Fig 2-8 Screenshot of motor parameter calculator applet..24

Fig 2-9 Dimetric View of our final CAD model with labels.....25

Fig 2-10 Front view of our machines CAD model.25

Fig 2-11 Side view of our machines CAD model...26

Fig 2-12 Top view of our machines CAD model...26

Fig 3-1 Isometric view of the CAD model of the Axis Table27

Fig 3-2 Isometric view of the CAD model of the clamps..28

Fig 3-3 Isometric view of the CAD model of the base plate.28

Fig 3-4 Picture showing final motor and chuck coupling..29

Fig 3-5 Picture showing the ball screws used in our machine...30

Fig 3-6 Detailed Schedule for the Mechanical Fabrication portion of our project31

Fig 3-7 Machine with mechanical parts fabricated and assembled32

Fig 3-8 Machine under fully functioning conditions with all electronics installed...32

Fig 4-1 Screenshot showing Mach 3s stock interface...34

Fig 4-2 Screenshot showing interpolations calculations simulations being run


on Microsoft Excel 2013...36

Fig 4-3 (Top) Graph showing the command visualized on the X-Z plane with
the idealized tool path shown. (Bottom) Graph showing the incremental
tool positions calculated along the tool path by our algorithms linear
interpolation...37
Page ix of 57

Fig 4-4 (Top) Graph showing the command visualized on the X-Z plane with
the idealized tool path shown. (Bottom) Graph showing the incremental
tool positions calculated along the tool path by our algorithms for
circular interpolation.38

Fig 4-5 Screenshot of the front-end HCI that we designed ourselves on


Microsoft Visual Basic .NET 2015.......39

Fig 4-6 Schematic showing the complete electronic architecture of our machine40

Fig 4-7 Pictures of the microcomputer, the I/O peripherals as well as the
trademark logo of the operating system43

Fig 4-8 Picture of the PCB that contains the embedded microcontroller and
the motor driver circuits44

Fig 4-9 Picture of the DC Power Supply...44

Fig 4-10 Picture of the DC Stepper Motor used for the Axis Tables...45

Fig 4-11 Picture of the AC Induction Motor used as our spindle motor..46

Fig 4-12 Picture of the VFD used to drive our spindle motor.46

Fig 4-13 A screenshot of the motor tuning feature within Mach 3..47
Page x of 57

NOMENCLATURE

A Symmetric positive definite matrix


DFP Davidon-Fletcher-Powell
f, F objective function
Ft: Thrust Force
Fc: Cutting Force
SFM : Surface feet per Minute
D: Diameter of workpart
P: Power (ft. - lb. /min)
Fc: Cutting Force (lb.)
HP: Horsepower (hp)
: Shear Stress of the Material
w: width of cutting operation
to: Chip Thickness prior to formation Where
T = Torque required
F = Net Force
dm = mean diameter of screw
l = lead of power screw
f = Frictional coefficient between threads and nut
fc = Collar friction
dc = Mean collar diameter
w: weight of assembly acting on the power screw.
Page 11 of 57

CHAPTER 1
INTRODUCTION

1.1 Need Statement


Since Pakistan is a relatively young nation, it faces a dearth in automated machining aids
while the rest of the world advances. There are major issues when it comes to procure and
use CNC machines in local engineering setups. Many engineering setups in Pakistan cannot
afford to procure, operate and maintain imported CNC Machines. Secondly, manual
machines are unable to machine precise and accurate parts that are the demand of the Industry
today. Moreover, manual machines require significant amount of time when it comes to mass
production in the industries.

1.2 Objectives and Outcomes


Our proposed solution consists of developing design principles and methodologies that any
local engineering setup could use to either fabricate their own or retrofit existing manual
machines to CNC ones. These were validated via fabrication of a small-scale CNC Turning
Machine demonstration prototype.
Mechanical Aspects
Fully developed design procedures for designing and selecting machine structures
including guideways, lead screws, shat coupling, motors, cutting tools, etc.
Electrical Aspects
Fully developed design procedures for designing and selecting electrical systems such
as motors, control and power circuitry, sensors, microcontrollers, etc.
Computer Sciences Aspects
Fully Developed design procedures for designing and selecting Human Computer
Interface (HCI), I/O devices, G&M code Interpreter programming, microcontroller
programming and interfacing, etc.
Page 12 of 57

CHAPTER 2
Mechanical Design

Mechanical Design was the most vital part of this project. There were a lot of contraints when
decisions were made regarding lead screws, cutting force calculations, box volume, etc.

2.1 Free Body Diagram


It is one of the necessary things to do before designing something. The free body diagram in
the figure below shows all the forces acting on the workpart. Orthogonal Cutting Model was
chosen because it is less complex than the Oblique Cutting Model. There were some
assumptions before choosing Orthogonal Cutting Model:
The tool is perfectly sharp
The shearing surface is a plane extending upward from the cutting edge.
The chip does not flow to either side
Continuous chip, no built-up-edge

In Orthognal Cutting Model, the radial component of force is ignored which is denoted as
Fr. Other two forces taken in consideration are:

The schematic for the workpart with forces acting on it are shown in Figure 2-1.

Fig 2-1: Free Body Diagram


Page 13 of 57

2.2 Workpart Material


Many material properties were reviewed from handbooks before opting for the final choice
of Aluminum and Wood. Aluminum was chosen as the worst case and wood was chosen as
the best material which can be machined by the turning machine. CNC turning Machine
which can machine aluminum and wood can be fabricated at a low cost. Secondly, jumping
over to more harder materials such as mild steel could be more intricate as harder tools should
be used and better damping techniques need to be impemented then.

2.3 Box Volume


Box volume was calculated by specifying the diameter (swing-over bed) and length of the
work part (center-to-center distance) being used in the machine.
Diameter Range (swing-over bed) = (1.5 - 4) in
Length Range (center-to-center distance) = (1.5 4) in
Box Volume = (2.65 - 50.27) in3

2.4 Spindle Motor RPM


Then, Equation 2.1 was used to calculate the RPM of the AC Motor


= (. ). 1
.

Where,
SFM for alluminum alloys = 1000 SFM

2.5 Feed and Depth


The operation of the CNC Turning Machine is only limited Finishing operations, so the
ranges for depth and feed are given below. These values have been extracted from ASM
Machining Handbook.
Depth: (0.025 - 0.01) in.2
Feed: (0.002 - 0.006) in.3

1
Mikell P. Groover, Fundamentals of Modern Manufacturing: Materials, Processes, and Systems, Wiley; 4
edition (January 5, 2010)
2
ASM Handbook Volume 16: Machining
3
ASM Handbook Volume 16: Machining
Page 14 of 57

2.6 Cutting Force


The concept of Specific Energy has been used to calculate the cutting forces acting on the
work part. As the tool will wear out with operation, Worn-Out Tool Factor was incorporated
in the calculations to get closer to the real conditions.
Specific Energy for Aluminum Alloys = 120000 (in-lb. /in^3).4
Worn- Out Tool Factor = 1.10.5
Modified Specific Energy for Aluminum Alloys = 132000 (in-lb. /in^3)

The formula used to calculate the cutting force Fc is:


= (. ). 6
Figure 2-2.7 was extracted from Groovers Textbook was used to get the value of correction
factor mentioned in Equation 2.2.

Fig 2-2: Correction factor for unit horsepower and specific energy when values of
chip thickness before the cut t0 are different from 0.25 mm (0.010 in).

4
Mikell P. Groover, Fundamentals of Modern Manufacturing: Materials, Processes, and Systems, Wiley; 4
edition (January 5, 2010)
5
Mikell P. Groover, Fundamentals of Modern Manufacturing: Materials, Processes, and Systems, Wiley; 4
edition (January 5, 2010)
6
Mikell P. Groover, Fundamentals of Modern Manufacturing: Materials, Processes, and Systems, Wiley; 4
edition (January 5, 2010)
7
Mikell P. Groover, Fundamentals of Modern Manufacturing: Materials, Processes, and Systems, Wiley; 4
edition (January 5, 2010)
Page 15 of 57

In the orthogonal cutting model, chip thickness before cut t0 is referred as feed of the turning
operation. The graph above shows the correction factor to be applied for various feed
operations.

A value of feed was fixed in the calculation, and changed the depth in the range specified
above to get different values of cutting forces. Then in the next iteration, the value of feed
was changed and repeated the same process for different depths. By changing values of feeds,
maximum and minimum cutting forces were determined.
Minimum Cutting Force (Fc): 4.75 lb.
Maximum Cutting Force (Fc): 25.34 lb.
For further calculations, refer to Appendix A at the end of the report.

2.7 Spindle Motor Power


To get the actual power of the spindle motor, efficiency of drive train was included in the
calculations.
Efficiency of Drive Train = 0.80
Equation 2.3 was used to calculate power:


= (. ). 8
.
Where,
SFM of Aluminum Alloys = 1000
As the dealers in local market demand Spindle Motor power in Horsepower so the power was
also calculated in other units.

To get the power in Horsepower, we used Equation 2.4.


= (. ). 9

After using Equation 2.4 over all the range, maximum and minimum power were calculated.
Max Power = 0.96 hp
Min Power = 0.18 hp

8
Mikell P. Groover, Fundamentals of Modern Manufacturing: Materials, Processes, and Systems, Wiley; 4
edition (January 5, 2010)
9
Mikell P. Groover, Fundamentals of Modern Manufacturing: Materials, Processes, and Systems, Wiley; 4
edition (January 5, 2010)
Page 16 of 57

2.8 Thrust Force


Merchant equation was used to calculate thrust force Ft.

To calculate the friction angle (), Equation 2.5 was used.


= (. ).10
Friction Coefficient () = 0.61 (for Aluminum and HSS Cutting tool)

The Equation 2.6.11 given below was used to calculate Shear plane angle ():

= + (. ). 12

Fig 2-3: Forces acting on a chip in the Orthogonal Cutting Model.

The Shear plane angle () is further used in the merchant equation to get the value of Ft.

There are some assumptions that need to be considered before using merchant equation:
Shear Strength of the work material is a constant
Shear Strength is unaffected by Strain Rate
Shear Strength is unaffected by temperature

Then, merchant equation was used to get calculate Ft:


= (. ).13

10
Mikell P. Groover, Fundamentals of Modern Manufacturing: Materials, Processes, and Systems, Wiley; 4
edition (January 5, 2010)
11
Mikell P. Groover, Fundamentals of Modern Manufacturing: Materials, Processes, and Systems, Wiley; 4
edition (January 5, 2010)
12
Mikell P. Groover, Fundamentals of Modern Manufacturing: Materials, Processes, and Systems, Wiley; 4
edition (January 5, 2010)
13
Mikell P. Groover, Fundamentals of Modern Manufacturing: Materials, Processes, and Systems, Wiley; 4
edition (January 5, 2010)
Page 17 of 57

Where,
Shear Stress for Al 2011 T4 = 221 MPa

2.9 Cutting tool attributes


Aluminum have many grades available in the world but the Aluminum Alloy chosen for
machining was:
2011 T3/T8.14
It was chosen because it has a Machinability rating: A. Secondly, it can be easily procured
from local markets in Pakistan.

2.10 Tool Properties


The tool properties mentioned below are extracted from ASM Machining Handbook. The
tool with these properties can perform the finishing operation efficiently on the Aluminum
Alloy mentioned above.
Back rake angle: 200 15

Side rake angle: 200 16

End relief angle: 100 17

Side relief angle: 100 18

End cutting edge angle: 50 19

Side cutting edge: 100 20

Nose radius: 5.1mm (0.20 in) 21

2.11 Lead Screw Calculations


After getting the maximum Cutting Force (Fc) and Thrust force (Ft), power calculations for
lead screws in x-axis and z-axis were done.

Fig 2-4: Top view of Lathe machine with axes relation to the chuck visible.
14
ASM Handbook Volume 16: Machining
15
ASM Handbook Volume 16: Machining
16
ASM Handbook Volume 16: Machining
17
ASM Handbook Volume 16: Machining
18
ASM Handbook Volume 16: Machining
19
ASM Handbook Volume 16: Machining
20
ASM Handbook Volume 16: Machining
21
ASM Handbook Volume 16: Machining
Page 18 of 57

The procedure to calculate lead screw forces is discussed below.

Firstly, market survey was performed and found out what kind of lead screws and in what
dimensions are available. The Table 2-1.22 shows the dimensions in which lead screws are
manufactured an available in market.

Table 2-1: Table showing lead screw parameters.

Ball screw were selected due to its various advantages over trapezoidal threaded or ACME
thread lead screws, some of which are:
1. High efficiency; ball screws have an efficiency around 90% as compared to 25-30%
of ACME thread lead screws.
2. Longer lifespan due to lack of sliding friction between threads and nut.
3. No need of regular lubrication

22
Richard Budynas, Keith Nisbett, Shigley's Mechanical Engineering Design, McGraw-Hill Education; 10
edition (January 27, 2014)
Page 19 of 57

Using the nominal major diameter (d) and pitch (p) of screw given in Table 2-1, following
calculations were made:
nominal minor diameter (dr)
= (. ). 23
mean diameter (dm)

= ( ) (. ). 24

Collar diameter (dc)
= . (. ). 25

Fig 2-5: Lead Screw Parameters

To calculate power required for the motor to move power screw, Torque and RPMs at which
power screw is to rotate are calculated. Therefore, Torque is calculated and then rotational
speed of power screw.

2.12 Torque Calculation


Equation 2-10 is obtained by resolving all the forces that act on the threads of power screw
which is shown in Figure 2-6.

23
Richard Budynas, Keith Nisbett, Shigley's Mechanical Engineering Design, McGraw-Hill Education; 10
edition (January 27, 2014)
24
Richard Budynas, Keith Nisbett, Shigley's Mechanical Engineering Design, McGraw-Hill Education; 10
edition (January 27, 2014)
25
Richard Budynas, Keith Nisbett, Shigley's Mechanical Engineering Design, McGraw-Hill Education; 10
edition (January 27, 2014)
Page 20 of 57

Fig 2-6: Detailed Free Body Diagram of the Forces acting on a leadscrew.

+
=

( ) (. ). 26

Table 2-2.27 gives the values the friction co-efficients for different cases.
Screw Material Nut Material

Steel Brass Bronze Cast Iron

Steel, dry 0.150.25 0.150.23 0.150.19 0.150.25

Steel, machine 0.110.17 0.100.16 0.100.15 0.110.17


oil

Bronze 0.080.12 0.040.06 0.06-0.09

Table 2-2: Table showing the friction co-efficients for a leadscrews of various materials
with various types of nuts.
Apart from the friction of the lead screws, the place where the lead screw itself takes support
from also has a friction as the lead screw will move and also have a high value of thrust (axial
load) on it. Due to this a thrust bearing or a collar is added between the lead screw and the
casing. This portion also exhibits friction and must be included to get an appropriate required
power. Torque required to overcome collar fiction is given by Equation 2.12.


= (. ). 28

26
Richard Budynas, Keith Nisbett, Shigley's Mechanical Engineering Design, McGraw-Hill Education; 10
edition (January 27, 2014)
27
Richard Budynas, Keith Nisbett, Shigley's Mechanical Engineering Design, McGraw-Hill Education; 10
edition (January 27, 2014)
28
Richard Budynas, Keith Nisbett, Shigley's Mechanical Engineering Design, McGraw-Hill Education; 10
edition (January 27, 2014)
Page 21 of 57

Mean Diameter of collar can be calculated by Equation 2.13.

+ .
= (. ). 29

Force (F) is composed of vector sum of all the forces acting in the direction of power screw.
For instance, in x-direction,

= + ( + ) (. ). 30

So, Total required torque will be

+
= ( )+ (. ). 31

This torque is calculated for both power screws in x and z direction.

2.13 Rotational Speed


The revolutions per second of the lead screw motor can be determined by dividing the
maximum feed over the distance travelled by the lead screw in one rotation. Distance
travelled by the lead screw in one rotation is equal to pitch of the lead screw, so


= (. ). 32

Where Lead = pitch * No. of starts

It has only one independent thread therefore screw has only one start

2.14 Stepper Motor Power Calculation


Power is a simple product of above calculated Torque and Rotational speed of power screw.

= (. ). 33
Please refer to Appendix A for the calculation tables.

29
Richard Budynas, Keith Nisbett, Shigley's Mechanical Engineering Design, McGraw-Hill Education; 10
edition (January 27, 2014)
30
Richard Budynas, Keith Nisbett, Shigley's Mechanical Engineering Design, McGraw-Hill Education; 10
edition (January 27, 2014)
31
Richard Budynas, Keith Nisbett, Shigley's Mechanical Engineering Design, McGraw-Hill Education; 10
edition (January 27, 2014)
32
Richard Budynas, Keith Nisbett, Shigley's Mechanical Engineering Design, McGraw-Hill Education; 10
edition (January 27, 2014)
33
Richard Budynas, Keith Nisbett, Shigley's Mechanical Engineering Design, McGraw-Hill Education; 10
edition (January 27, 2014)
Page 22 of 57

Fig 2-7: Detailed Schedule for the Mechanical Design portion of our project.
Page 23 of 57

2.15 Machine Motor Parameter Calculator


This software was developed on Microsoft Excel and can be used to verify that if the proposed
stepper motor can be suitable for our machine or not.

The group came across several problems when calculating the torque and power of the stepper
motors. There are a lot of factors which have to kept in consideration when doing torque and
power calculations. After reviewing various research papers and books, a method was
formulated to calculate the accurate torque and power needed to move the axis tables. After
completing the calculations, a software was developed which can be useful for students who
are continuing our project further. Secondly, this software can be useful for anyone who needs
to verify that whether his/her stepper motor has enough torque rating to move the
table/gantry.

This calculator simplifies all the torque and power calculations for the user. The user has to
put in the input parameters of his system which includes mass of the table, cutting forces,
leadscrew parameters, cutting speeds and the specifications of the proposed motor. The
calculator would calculate the critical speed, total torque to move the gantry/table, etc. It will
also tell the user whether the proposed motor would be suitable by keeping a factor of safety
of three approximately.

Figure 2-8 shows a screenshot of the calculator. It is evident in the figure below that the
estimated torque of the motor does not have a factor of safety of three so, the calculator is
giving an error message in red font at the bottom.
Page 24 of 57

Fig 2-8: Screenshot of motor parameter calculator applet.


Page 25 of 57

2.16 CAD Model


Using Solidworks 2014, we developed a detailed CAD model that we used for visualization
and simulation before we moved on to manufacturing.

Fig 2-9: Dimetric View of our final CAD model with labels.

Fig 2-10: Front view of our machines CAD model.


Page 26 of 57

Fig 2-11: Side view of our machines CAD model.

Fig 2-12: Top view of our machines CAD model.


Page 27 of 57

CHAPTER 3
Mechanical Fabrication

3.1 Axis Tables


Axis tables were incorporated in the design to move the tool post near the work part.
Aluminum was used to fabricate two axis tables:
X-Axis Table
Z-Axis Table
Each table consisted of:
Two faceplates
Two side plates
One Top plate
All of the above plates were machined out of 6mm aluminum sheet using Milling Machines.
Allen Taper head screws were used to fix these plates. The most challenging part of the
fabrication was to drill holes in the faceplates to fix bearings accurately. To get the greatest
possible accuracy, CNC lab was accessed to drill these holes. Figure 3-1 shows a
SOLIDWORKS model of our axis table attached to the stepper motor.

Fig 3-1: Isometric view of the CAD model of the Axis Table.

3.2 Clamps
Two types of clamps were used to hold the shafts for the X-Axis Table and Z-Axis Table.
Aluminum was used to fabricate these clamps. They had linear bearings fixed in them for the
linear movement of the Axis Tables. Vertical Milling Machine in the workshop was used to
machine these clamps. Then, holes were drilled in their bases to fix them on the frame of the
machine. Figure 3-2 shows a SOLIDWORKS models of the clamps we used in our machine.
Page 28 of 57

Fig 3-2: Isometric view of the CAD model of the clamps.

3.3 Frame
The frame consisted of Chuck Plate and Base Plate. Mild Steel was procured to fabricate
these two plates because it can damp the vibrations better than aluminum. After cutting these
two plates into required dimensions, the Chuck and the Base Plate were welded exactly
perpendicular to each other to get accurate reference when fixing other components of the
machine onto it. Holes were drilled into the chuck plate to pass the shaft connected to the
chuck and to pass the motor shaft. Holes were also drilled in the base to fix the clamps and
to mount the motor.

The frame was powder coated in black color to improve the aesthetics of the machine. Powder
coating has a greater resistance to harsh environmental conditions. Secondly, powder coating
is long lasting so it was preferred. Figure 3-3 shows a SOLIDWORKS model of our frame.

Fig 3-3: Isometric view of the CAD model of the base plate.
Page 29 of 57

3.4 Motor and Chuck Coupling


The coupling of motor and chuck was the most vital part of the fabrication phase. Our group
had a great focus on it because usually imperfect coupling leads to vibration and inaccurate
cutting of the work part. Belt and Pulleys were used to couple the chuck with the motor. Both
the pulleys have same diameter to keep the chuck and motor RPM same. The chuck is
securely fixed with a mild steel shaft which is enclosed in mild steel circular housing for
proper rotation of the shaft. Double row deep groove ball bearings were fixed in the housing
to support the shaft rotating at high RPM.

Figure 3-4 shows a pulley connected to the motor shaft on the left. On the right side, the black
housing contains a shaft connected to the chuck and double row deep groove ball bearings.

Fig 3-4: Picture showing final motor and chuck coupling.

3.5 Stepper Motor Coupling


The coupling was made from a solid rod of brass procured from material shop in Rawalpindi.
Two holes were drilled on each side of the brass rod to hold the shaft of the stepper motor
and the shaft of the ball screw. Allen bolts were screwed in the coupling to hold the both
shafts tightly.

3.6 Tool Post


Tool Post was made from a block of Aluminum with a groove machined on one side of the
block to hold the tool. Then, four holes were drilled and tapped in the aluminum block to pass
6mm screws which can hold the tool firmly.
Page 30 of 57

3.7 Ball Screws


Ball Screws were preferred over conventional lead screws to convert rotational motion of
stepper motors to linear motion to move the axis tables. They have efficiency of
approximately 80% as compared to conventional lead screws which have an efficiency of
30%. More efficiency equates to lighter servos or steppers, less energy wasted due to friction,
and in most cases, where adequate lubrication is available, exceptionally long service life.
The second reason ball screws are desirable in our machines is that ball screws lend
themselves well to the elimination of backlash in the system. Figure 3-5 shows a ball screw
that we used in our machine.

Fig 3-5: Picture showing the ball screws used in our machine.
Page 31 of 57

Fig 3-6: Detailed Schedule for the Mechanical Fabrication portion of our project.
Page 32 of 57

3.8 Photographs of Finished Machine


After fabrication was complete, we moved on to assembly and finishing and making the
machine presentable.

Fig 3-7: Machine with mechanical parts fabricated and assembled.

Fig 3-8: Machine under fully functioning conditions with all electronics installed.
Page 33 of 57

CHAPTER 4
Electronic and Computer Science Aspects

4.1 General Overview


We intend to design a small-scale Computer Numerically Controlled (CNC) Turning machine
to establish and validate our methodologies. In the development process, we will ensure that
we document every step of the process. Our main goals will be user-friendliness and ease of
use so that smaller setups and save up significantly on capital costs when retrofitting or
building their own CNC machines using our methodologies. The main advantages of such an
indigenously produced machines are:
Sufficient level of precision and accuracy in machined work parts
Time saving
Reduced labor cost
Elimination of Human error
Portability
Significant capital, operating and maintenance cost savings

4.2 Work Flow Overview


Our project Design and Fabrication of Computer Numerically Controlled (CNC) Turning
Machine involves mechanical, electrical and software aspects. In this section we will restrict
our discussion to the computer-science and electrical aspects of the project. Some major
deliverables have been listed below:
Develop a suitable microcontroller-based setup to control machine processes.
Assess use of sensors and their feedback for system regulation and control.
Select and procure suitable motors for each machine process.
Develop or procure a motor driver circuit.
Design and fabricate, or procure and integrate a voltage regulating power supply.
Develop suitable Human Computer Interface (HCI).
Design interpreter for converting G & M codes into machine language.

The fact that these deliverables were set on a broader scope without specifying restrictions is
due to the fact that we intended to leave room for adapting our electronic architecture design
to the availability of material and devices locally and keeping in mind the relative cost of
indigenous design and development and/or fabrication versus procurement and integration of
Page 34 of 57

materials, devices and code. It is worth re-stating that our most major guiding objective is to
produce an inexpensive and uncomplicated CNC Turning machine that is able to machine
softer metals while keeping in mind the scalability of the design. Also, the reader will note
that the design process we employed was iterative and thus we conformed to the Design for
Manufacturability (DFM) philosophy.

In our project, all the technical aspects; Mechanical, Electrical and Computer-Science, are
closely linked with each other, change in even one of the mechanical design parameters
directly influences the electrical calculations and computer programming and vice versa. In
this report, we start off by discussing the overall final electronic architecture setup for our
particular machine, then move on to discussing the specifications of each component as well
as a present a justification as to why and how each decision was made.

4.3 Software Overview and Justification


For keeping software development costs low, we decided on using an off-the-shelf software
for the more rigorous PC-to-microcontroller backend processing while developing a
customized and bespoke front-end Human-Computer Interface (HCI) ourselves. Since both
of these software packages would have to communicate with each other flawlessly, we have
to ensure compatibility.

The package chosen for the backend system was ArtSoft Mach 3.34 developed by Newfangled
Solutions Inc. Figure 4-1 shows the programs interface.

Fig 4-1: Screenshot showing Mach 3s stock interface.


34
http://www.machsupport.com/software/mach3/
Page 35 of 57

The main reason this was chose is because of its free-ware as well as open-source nature.
Being freeware meant that it quite literally didnt cost us at all to use this software. Due to
being open-source, we have access to its source code, which we interpreted and learned and
then streamlined to adapt to our machines functions and hardware. In its original form the
code was approximately 5200 lines of code written in the C++ programming language. After
streamlining and removing irrelevant functions pertaining to milling, EDM machines etc., we
brought the code down to only about 1800, lines of code which included only our desired
command set for turning machine operations. Mach 3 was also modified to work with our
own HCI.

Using Visual Basic .NET 2015, we developed a form-based Human-Computer Interface from
scratch. Not only was it and HCI, it was also a G&M code interpreter that we designed
specifically for our CNC Turning machine. It takes input in part program code from the user
in a rich textbox and then interprets it, reports errors if there are any and then feeds it to Mach
3. Mach 3 then takes care of the actual signals that need to be sent to the microcontrollers for
motor operations by itself. Since our machine is a first prototype, and low cost and ease of
manufacture and operation are key requirements for this project our Command Set is limited
to the following set of ISO 6983-1:2009 -compatible commands:
Selected G Codes
o G00 Rapid Movement
o G01 Linear Interpolation
o G02 Circular Interpolation (Clockwise)
o G03 Circular Interpolation (Counter-Clockwise)
o G70 Inch Units
o G71 Metric Units
o G90 Absolute Coordinates
o G91 Incremental Coordinates
Selected M Codes
o M04 Spindle On (Counter-Clockwise)
o M05 Spindle Stop

Most of the above mentioned codes were fairly easy to implement while the Linear and
Circular Interpolation codes required some work to be done. The algorithm was developed
by us and the general objective was to develop a code that generates incremental waypoints
for tool on intended interpolation path. The outcome of this activity was an Incremental
Page 36 of 57

Movement Table Displacement Array that once graphed on an appropriate set of axes, shows
the tool path in two dimensions. This array will be used to synchronize the table axes motors
to produce interpolated curves that are highly accurate. This code makes part of the HCI-
cum-G&M code interpreter that we developed. For pseudocode development &
experimentation we used Microsoft Excel 2013 since we had to play with mathematical
formulae repeatedly and visualize the results on graphs. Figure 4-2 shows the algorithm mid-
development.

Fig 4-2: Screenshot showing interpolations calculations simulations being run on


Microsoft Excel 2013.

The methods used for developing the algorithms for both types of interpolations has been
highlighted below.
1. Linear Interpolation
o Data Needed
Initial Position of tool tip in absolute X-Z plane of machine.
Retrieved from a numeric value stored in a variable.
Final Position of tool tip.
Extracted from a block of part program input by the user.
o Method
The two points stated above treated as a line in the X-Z plane.
Equation of line formed by calculating Gradient and Y-Intercept of the
line.
Page 37 of 57

Divides projected length on one axis into N number of increments.


Use line equation to find out corresponding coordinates on the other axis.
(in incremental coordinates relative to each interpolation point).
Generate an Nx2 Array and pass on to Mach 3.

Fig 4-3: (Top) Graph showing the command visualized on the X-Z plane with the
idealized tool path shown. (Bottom) Graph showing the incremental tool positions
calculated along the tool path by our algorithms linear interpolation.

2. Circular Interpolation
o Data Needed
Initial Position of tool tip in absolute X-Z plane of machine.
Retrieved from a numeric value stored in a variable.
Final Position of tool tip.
Extracted from a block of part program input by the user.
Center of Circle/Radius of Arc
Extracted from a block of part program input by the user.
o Method
Find absolute coordinates of Center of circle. (If not present)
Page 38 of 57

Calculate of Radius of circle. (If not present)


Generate Equation of circle.
Select one of four equation conjugates according to type of interpolation
path required. (I.e. CW or CCW, direction of cutting)
Divides projected length on one axis into N number of increments.
Use line equation to find out corresponding coordinates on the other axis.
(in incremental coordinates relative to each interpolation point)
Generate an Nx2 Array and transfer to Mach 3.

Fig 4-4: (Top) Graph showing the command visualized on the X-Z plane with the
idealized tool path shown. (Bottom) Graph showing the incremental tool positions
calculated along the tool path by our algorithms for circular interpolation.
Page 39 of 57

Moving on to why the particular programming language was chosen. The characteristics
that made us choose Visual Basic .NET 2015 are highlighted below:
Multi-paradigm:
o Structured
o Imperative/Declarative
o Object-oriented
o Generic
o Reflective
o Event-Driven
o Form-based
We chose Microsoft Visual Studio 2015 with Microsoft .Net Framework 4.6.1 as our
Integrated Development Environment (IDE) for developing our program. A screenshot of our
HCI with all the labels, rich textboxes and command buttons is shown in Figure 4-5.

Fig 4-5: Screenshot of the front-end HCI that we designed ourselves on Microsoft
Visual Basic .NET 2015.
Page 40 of 57

4.4 Electronic Hardware Architecture Overview


The schematic below highlights the layout of the electronic components used in our machine.
The arrows show the connections between devices.

Fig 4-6: Schematic showing the complete electronic architecture of our machine.

Starting off from the top-left, we have the microcomputer that has three basic but essential
I/O devices connected to it, namely the keyboard and mouse for data input to the system and
the LCD Monitor for displaying and interacting with the Human-Computer Interface (HCI).

The microcomputer is connected to a Printed Circuit Board (PCB) that contains the
microcontroller as well as the stepper motor driver circuits on it for each of the axis motors.
This connection is down via the 25-pin DB-25 Parallel Port.

A Power Supply takes mains power from the 220-volt AC (RMS) power source and converts
it into a 24-volt DC current for powering the PCB as well as the Axis Motors being controlled
through it.

The PCB receives one input from the microcomputer as mentioned above, a power input from
the DC power supply and controls the two axis stepper motors via 4 wires each in bipolar
mode. The PCB also contains a relay switch that controls the toggling of the spindle motor.

Another mains power source is used to power the Variable Frequency Drive (VFD) that
drives the high-powered Spindle Motor. The RPM of the spindle is varied independently
through a potentiometer knob on the VFD.
Page 41 of 57

4.5 Electronic Component Specifications


1. Microcomputer
o IBM Intel Pentium 4 (1.6 MHz)
o 512 MB of RAM
o 64 MB of NVIDIA VGA memory
o Microsoft Windows XP Professional

2. Keyboard
o Generic USB QWERTY Keyboard

3. Mouse
o Generic USB Optical 3-Button Laser Mouse

4. Monitor
o Sony 14-inch 4:3 LCD display

5. Microcontroller Board
o PCB with Integrated Toshiba TB6560AHQ microcontrollers for each stepper
motor.
o Integrated H-bridges and stepper motor driver circuitry.
o Relay for Spindle Motor
o DIP switches for motor current settings
o DIP switches for micro-stepping settings

6. DC Power Supply
o Mean Well Corporation
o AC Input 220 V (RMS)
o 24V-DC Output
o Auto-Switching with shunt and voltage fluctuation protection

7. Axis Motors
o DC Stepper Motors
o NEMA 23
o Rated at:
24 Volt
2.2 Ampere
o 1.4 N-m Torque
Page 42 of 57

o Bi-polar
o 1.8 degrees per step

8. Spindle Motor
o Siemens Corporation
o 2 Horsepower Power Output (1.5 kW)
o 3-Phase 440-volt AC (RMS) Input
o Up to 2850 RPM

9. Variable Frequency Drive


o General Electric Co.
o Single Phase 220-volt AC (RMS) Input
o 3-Phase 440-volt AC (RMS) Output
o Tachometer for RPM Output
o Frequency Range from 40 Hz to 80 Hz
o Variable Speeds from zero to 2850 RPM

4.6 Electronic Component Selection Justification


1. Microcomputer
2. Keyboard
3. Mouse
4. Monitor
We needed a computer that was just powerful enough to run both the frontend and the
backend software being used, i.e. Mach 3 as well as our own Visual Basic program.
It was also mandatory that the computer had a DB-25 Parallel Port. Since no modern
laptops come with such a port and since one cannot be integrated into them via any
sort of converters without compromising on quality of functionality, we had to look
towards desktop computers. The computer we selected has just the right specifications
to run both software as well as the 32-bit Microsoft Windows XP environment and
the right hardware ports needed. The I/O devices needed were quite obviously a
regular USB QWERTY keyboard, a USB laser optical mouse and an LCD monitor.
The particular types of mouse and keyboard were chosen due to their familiar nature
that any operator will be easily able to use. The LCD monitor was chosen instead of
Page 43 of 57

one with a CRT due to its smaller volume and weight as well as for the safety of the
operators eyes. Figure 4-7 shows the actual components used.

Fig 4-7: Pictures of the microcomputer, the I/O peripherals as well as the trademark logo
of the operating system.

5. PCB Microcontroller Board


During our design phase, we looked at several different microcontrollers such as the
AVR Atmega, Arduino, STM32F4, PIC-24 and even the BeagleBone Black. Using
any one these made the design too complex to be inexpensive or reliable. Thus we
turned to the Toshiba TB6560AHQ microcontrollers for controlling the stepper
motors. These were coupled to the motor driver circuits on the same PCB. Since the
whole PCB was sourced locally and at a very low cost, it was the ideal choice for our
machine. Furthermore, the PCB contains DIP switches for changing the motor current
settings as well as the micro-stepping modes for each individual stepper motor. It
could easily be adapted to CNC Turning machines of all sizes. Although the chipsets
had a current limit of 3.5 amperes, we developed a clever workaround that can allow
larger motors on larger machine to be run from this PCB board, this workaround will
be discussed later in this report. A photograph of the board in shown in Figure 4-8.
Page 44 of 57

Fig 4-8: Picture of the PCB that contains the embedded microcontroller and the motor
driver circuits.

6. DC Power Supply
The Mean Well Corporation manufactures versatile, inexpensive and highly reliably
AC-to-DC power converters and since we need a DC power source for our 24V
NEMA 23 stepper motors, we chose to go ahead one from their company. This power
supply takes regular mains power and supplies a constant maximum 23.95 volt DC
current at its output terminals regardless of input power fluctuations. It has surge
protection as well as a circuit breaker with built-in bullet fuses. The current output is
variable and can be brought down to 12V if necessary. Picture shown in Figure 4-9.

Fig 4-9: Picture of the DC Power Supply.


Page 45 of 57

7. Axis Motors
During the design process we considered several different types of motors for the
purpose of moving our machines axis tables. Among the considerations were DC
Brushless motors, DC Servo motors and DC stepper motors. The latter turned out to
be the best choice due the amount of control and precise movement they provide to
the user and the fact that they can infinitely turn in both directions puts them above
servo motors. Our two NEMA 23 axis motors were also sourced locally and since
they were bought used, they were extremely economical. They are capable of
producing a maximum of 1.4 N-m of torque and are rated at 2.2 amperes. They turn
1.8 degrees per step thus completing 200 steps in one revolution. And with our 5-mm
pitch ball screws attached to their shaft, these motors give the linear axis movement
an accuracy of 0.025 mm when run on single- stepping mode and with no-slip since
ours is an open-loop control system. Motor sample shown in Figure 4-10.

Fig 4-10: Picture of the DC Stepper Motor used for the Axis Tables.

8. Spindle Motor
We need a motor that could deliver smooth, high-speed and high-power operation.
This is why we went forward with a copper-wound, 2-horsepower (1.5kW), 3-phase
AC induction motor. The motor can spin up to 2850 RPM and has a 440-volt (RMS)
3-phase input. The noise and vibration levels were low due to the high quality brand-
name that the motor came with, i.e. Siemens. Since it was also sourced locally and
found in used form, it was relatively inexpensive. Figure 4-11 shows the spindle
motor used in our machine.
Page 46 of 57

Fig 4-11: Picture of the AC Induction Motor used as our spindle motor.

9. Variable Frequancy Drive (VFD)


Since we needed a way to control the angular speed of our spindle motor as well as
make it compatible with the widely available mains power sources in the country, we
procured a VFD that had a single-phase input of 220-volt AC (RMS) current. It has a
3-Phase 440-volt AC (RMS) output to run our spindle motor. The VFD allows the
speed of the motor to be varied between zero and 2850 RPM which easily contains
the range of speeds that we require for machining our selected materials. The VFD
unit also contains a tachometer that gives a digital output of the frequency as well as
the RPM. Figure 4-12 shows the VFD we used.

Fig 4-12: Picture of the VFD used to drive our spindle motor.
Page 47 of 57

4.7 Motor Tuning


To make our machine as energy efficient as possible, we tuned our motors to run at just a
quarter of their rated current. We tuned them in such a way that even at low current the motors
produce the same maximum amount of torque that they would produce at full current, but at
the cost of angular speed. The drop in angular speed is of no consequence due to the fact that
our required feed rates and depths of cut are easily attainable by our motors at low current. It
is to be noted that this tuning setup also includes tuning for zero slip below maximum torque.
Since our machines screws, guideways and machining processes do not provide a combined
calculated braking torque of more than 0.8 N-m, motor slip is not an issue, thus defeating the
need for costly shaft encoders for feedback and making the system closed-loop since accuracy
is not compromised. Slip comes in other micro-stepping settings than single stepping, the
latter is which is sufficient for our work. The image shows the window where the motors can
be tuned using Mach 3s built-in motor tuner. By setting the Steps per to 200, Velocity to
22.75 mms per minute and Acceleration at 47.4 mm/s2 we have achieved perfect
operation.

Fig 4-13: A screenshot of the motor tuning feature within Mach 3.


Page 48 of 57

CHAPTER 5
Project Budgeting
The detailed estimated budget for our project is shown in Table 5-1 and the actual
expenditure that occurred in Table 5-2.
Page 49 of 57
Page 50 of 57

CHAPTER 6
Conclusions

6.1 A Few Final Words


We were able to develop design principles and methodologies that any local engineering
setup could use to either fabricate their own or retrofit existing machines to CNC ones.
Mechanical, Electrical and Computer Science aspects were clearly focused when designing
principles and methodologies.

Secondly, our small scale model was successfully fabricated under 175000 Rs which is quite
economical as compared to machines imported from other countries. Moreover, the small
scale model was able to machine precise and accurate parts which is the foremost demand of
the industry these days. Since this was a first prototype, it cost more and thus we expect retail
versions to cost less than PKR 80,000.

This small scale model can be scaled up to industrial level machines easily using the design
principles mentioned in the report.

6.2 Future Work


There is still great room for improvement in the CNC machine. Some more functionality can
be added to the machine which includes adding facing operations and roughing operations to
the design. Moreover, tool post can be made more complicated by adding more than one tool
into it.

The machine can be made closed loop by incorporating optical shaft encoders for giving
position feedback as well as limit switches to physically limit the movement of the table
rather than just doing it on the logical level. There are some more programming
improvements such as a Larger Command set can be used.
Page 51 of 57

APPENDIX
Appendix A
Page 52 of 57
Page 53 of 57
Page 54 of 57
Page 55 of 57
Page 56 of 57

Appendix B
Page 57 of 57

REFERENCES
1. Mikell P. Groover, Fundamentals of Modern Manufacturing: Materials, Processes,
and Systems, Wiley; 4 edition (January 5, 2010)

2. ASM Handbook Volume 16: Machining

3. Richard Budynas, Keith Nisbett, Shigley's Mechanical Engineering Design,


McGraw-Hill Education; 10 edition (January 27, 2014)

4. http://www.machsupport.com/software/mach3/

Das könnte Ihnen auch gefallen