Professional Documents
Culture Documents
CNC Machineproject
CNC Machineproject
net/publication/357509783
CNC-Machine project
CITATIONS READS
0 682
4 authors, including:
SEE PROFILE
Some of the authors of this publication are also working on these related projects:
All content following this page was uploaded by Marwah Ezzulddin Alabasy on 02 January 2022.
Project name:
Submitted by:
Supervised by:
Mrs.Marwa Ezzuldin Al-Abasy
Project overview
The term “CNC” refers to the process in which a computer follows a set
of instructions to send pulses to a stepper motor, power a spindle, heat an
extruder, or pulse a laser. Whatever type of CNC machine it may be, will have a
computer driving it. This project is 3-axis Router CNC machine the purpose of
this machine is to engrave on the wood. A simple 3-axis router CNC machine is
employed in a small work area and low cost. CNC means Computer Numerical
Control of machines. This is exactly the mission of mechatronics is to control the
machines using computer, this is the reason that makes us choosing this project.
The structure of the machine composed of acrylic plastic for the frame, MDF
(Medium-density fiberboard) wood is used for the base. The motion of the system
depends on four stepper motors, the screws and nuts will convert the rotational
motion to a linear motion and in addition to the use of stainless-steel shaft to
support the system. Arduino Uno is used to control the system instead of
specialized computers for each type of machine. Autodesk Inventor 2020 (which
encompasses the whole process of planning, testing and executing a 3D design)
have been used to make the design and convert it to G-code. Universal G-code
sender to send the G-code to the Arduino, and the Arduino used to control the
motion of CNC machine.
1
Figure 1: CNC-Machine Model
2
Table of content
3.2 Software______________________________________________________________ 22
3.2.1 Autodesk Invertor with Invertor CAM Integrated Software. _________________________ 22
3.2.2 GRBL ____________________________________________________________________ 23
3.2.3 Universal-G-Code-Sender____________________________________________________ 23
3
4.1.2 Electrical Connection _______________________________________________________ 36
References __________________________________________________________ 48
4
Table of Figure
Figure 1: CNC-Machine Model _______________________________________________________________ 2
Figure 2: CNC router _______________________________________________________________________ 9
Figure 3: CNC plasma ______________________________________________________________________ 9
Figure 4: CNC laser _______________________________________________________________________ 10
Figure 5: 3D printers ______________________________________________________________________ 10
Figure 6: Pick and Place CNC________________________________________________________________ 11
Figure 7:CNC-machine using steps ___________________________________________________________ 12
Figure 8: Computer Aided Design (CAD) step ___________________________________________________ 12
Figure 9: Computer Aided Manufacturing (CAM) step ____________________________________________ 13
Figure 10: G-code step ____________________________________________________________________ 14
Figure 11: Machining Stage ________________________________________________________________ 14
Figure 12: Arduino IDE ____________________________________________________________________ 15
Figure 13:Arduino UNO____________________________________________________________________ 15
Figure 15: CNC-shield-V3 __________________________________________________________________ 16
Figure 16: Stepper Motor Driver a4988 _______________________________________________________ 16
Figure 17: Stainless Steel Shaft ______________________________________________________________ 17
Figure 18: Lead Screw with trapezoidal nut ____________________________________________________ 18
Figure 19: Linear Bearing Block _____________________________________________________________ 18
Figure 20: Shaft Support ___________________________________________________________________ 18
Figure 21: Flexible Coupling ________________________________________________________________ 19
Figure 22: Spindle Holder __________________________________________________________________ 19
Figure 23: Acrylic Plate ____________________________________________________________________ 20
Figure 24: Stepper Motor NEMA 17 __________________________________________________________ 21
Figure 25: 400W Spindle ___________________________________________________________________ 21
Figure 26: Autodesk Invertor 2020 ___________________________________________________________ 22
Figure 27: Grbl __________________________________________________________________________ 23
Figure 28: Universal G-Code Sender __________________________________________________________ 23
Figure 29: X-axis motor side ________________________________________________________________ 25
Figure 30: X-axis ball bearing side ___________________________________________________________ 25
Figure 31: Y-axis ball bearing corner _________________________________________________________ 26
Figure 32: Y-axis motor corner ______________________________________________________________ 26
Figure 33: Z-axis carriage side ______________________________________________________________ 26
Figure 34: Z-axis motor side ________________________________________________________________ 27
Figure 35: Z-axis ball bearing side ___________________________________________________________ 27
Figure 36: Spindle carriage _________________________________________________________________ 28
Figure 37: CNC-machine design isometric view. _________________________________________________ 29
Figure 38: CNC-machine design side view. _____________________________________________________ 29
5
Figure 39: CNC-machine design top view. _____________________________________________________ 30
Figure 40: CNC-machine design front view. ____________________________________________________ 30
Figure 41: Displacement Analysis result of Y-axis ________________________________________________ 32
Figure 42: Displacement Analysis result of X-axis________________________________________________ 33
Figure 43: Von Mises Stress Analysis result of Y-axis _____________________________________________ 34
Figure 44: Von Mises Stress Analysis result of X-axis _____________________________________________ 35
Figure 45: circuit connection________________________________________________________________ 36
Figure 46: Vref terminals __________________________________________________________________ 37
Figure 47: CNC-machine isometric view _______________________________________________________ 39
Figure 48: CNC-machine front view __________________________________________________________ 40
Figure 49: CNC-machine side view ___________________________________________________________ 40
Figure 50: Firsts results of machining tests_____________________________________________________ 41
Figure 51: Finale accuracy level _____________________________________________________________ 41
Figure 52:engrave on MDF _________________________________________________________________ 42
Figure 53: wood milling ___________________________________________________________________ 42
Figure 54: to 4-axes CNC machine ___________________________________________________________ 44
Figure 55: design configuration to hidden Y-axis under the work table. ______________________________ 45
Figure 56: 3-D printed linear bearing block ____________________________________________________ 47
Figure 57: Connect the screw to structure using shaft support SK10 _________________________________ 47
6
Chapter one
Introduction
1.1 Preview: -
7
Chapter two
Introduction to CNC machine and Working Stages
2.1 Introduction
1. Router: - A CNC router can cut and engrave wood, metal, or plastic and is
a very common type of CNC machine. The user does not manipulate the
router, only enters information into the computer. Such as milling machines,
lathes machine and grinders.
8
Figure 2: CNC router
2. Plasma: - CNC plasma cutters are used to cut metal and wood (2
dimensional) and do not require as much power as a CNC router. These
machines use a plasma torch to penetrate wood or sheet metal.
3. Laser: - CNC laser cutters operate quite like CNC plasma cutters, but
instead, a laser is used to cut the wood or metal. Lasers can also be used to
cut plastic.
9
Figure 4: CNC laser
Figure 5: 3D printers
Pick and Place: - Pick and Place CNC Machines consist of several nozzles
that pick up electrical components for electronic equipment and place them in
the desired location. These are very commonly used in the construction of cell
phones, computers, tablets, etc.
10
Figure 6: Pick and Place CNC
11
4. Modern design software allows the designer to simulate the manufacture of
his/her idea. There is no need to make a prototype or a model. This saves
time and money.
5. One person can supervise many CNC machines as once they are
programmed, they can usually be left to work by themselves.
There are four steps to using the CNC machine for the machining process,
each step has several programs to do this. This section explains those steps and
the program that we used for each step in this project. Figure [7] show steps for
using a CNC-machine.
2. SolidWorks.
3. Fusion 360.
12
2.2.2 Computer Aided Manufacturing (CAM):
2.2.3 G-code:
13
Figure 10: G-code step
Orders are sent from the G-code to the machine, which responds to it by
performing machining process by stepping motor movement and spindle
movement. Figure [11] show Machining Stage.
We chose Universal G-Code Sender to send g-code to the Arduino and control
the CNC-machine
14
Chapter Three
Hardware and Software
3.1 Hardware
Features
• 4-Axis support (X, Y, Z, A-Can duplicate X,
Y, Z or do a full 4th axis)
• Uses GRBL as control software
Figure 14: CNC-shield-V3
• Power supply: DC 12-36V
Features
• 3.3 and 5 V compatible logic supply
• Output Current ±2 A
• Load Supply Voltage 35 V
16
3.1.2 Mechanical Parts
The material properties of stainless steel shaft are shown in the table[1].Also,
the dimensions and quantites shown in table [2].
In this project it used the trapezoidal nut of lead screw with acrylic frame.
18
3.1.2.5 Flexible Coupling Motor Shaft (5mm x 8mm) (× 4).
Flexible couplings are usually used to transmit torque from one shaft to
another when the two shafts are slightly misaligned. They can also be used for
vibration damping or noise reduction.
Spindle holder is used to carry and fix the spindle on the Z axis.
19
3.1.2.8 Acrylic Plates.
Is are made from acrylic, and they carry the motors, spindle and other parts.
Acrylic boards are drawn and designed in Autodesk Inverter 2020 and the boards
are cut with laser CNC-Machine. The material properties for acrylic are shown in
table [6].
3.1.2.9 Base.
20
3.1.4 Electromechanical Parts
Features
• Speed range 6000-32000 RPM with 6000 RPM step.
• Voltage 220V.
• The maximum diameter of the cartridge is 6 mm.
21
3.2 Software
Inventor CAM is software that use to create advanced tool paths to machine
models using 2.5D, 3D and 3+2 milling applications, as well as support for
Simultaneous 4- and 5-axis features for machining complex models including
multi-axis contouring [13].
22
3.2.2 GRBL
3.2.3 Universal-G-Code-Sender
23
Chapter 4
Calculations and Results
4.1 Calculations
We saw many CNC designs on the Internet to get ideas before we started
designing our model, and there were many options, but we faced a big problem,
which is the availability of materials locally in the Mosul city.
Initially, we considered using 3D printed parts. This was our first choice
because the 3-D printer prints parts with high accuracy and with desired design.
However, 3D printing is very expensive and the resulting parts do not have
enough strength. We searched a lot to find a material with high strength and can
be cut with CNC machine, so we can get the design that we desired.
We select acrylic as the material for the frame. We can get the desired shape
and size of acrylic with good price and very good precision by cutting it with laser
CNC-machine.
The machine structure consists of frame, base, supporting beam and motion
transition system.
• The frame is made from 10 plates 10mm thickness acrylic. The frame holds
the spindle and connects the machine parts together. We designed acrylic
plates in Autodesk 2020 inventor program. Figures [28] through [35] show
the designs and dimensions of the acrylic plates.
24
Figure 28: X-axis motor side
25
(× 2) (× 2)
Figure 30: Y-axis ball bearing corner Figure 31: Y-axis motor corner
27
Figure 35: Spindle carriage
• The base is made from MDF (medium density fiberboard) cut by CNC
machine, we made eight rectangular cross-sectional areas so that we could
fix the acrylic parts inside it to have more stability.
28
Figure 36: CNC-machine design isometric view.
29
Figure 38: CNC-machine design top view.
30
4.1.1.2 Stress Analysis
4.1.1.2.1 Preview
Stress analysis was done using the Auto Disk Inverter 2020 program and
obtaining the results for both the Deflection in the Beam and the Von Mises
Stress, and then the safety coefficient was calculated to ensure the safety of the
design.
We assumed that the center of gravity was located at the farthest point of the
spindle from the X-axis and this gives worse conditions on the beams, so the
supposed center of gravity is 12cm from the X-axis.
The spindle mass was measured with the Z axis components, which is the
mass loaded on the X-axis. And by measuring the mass of the components of the
X-axis and adding them to the mass of the components of Z-axis, we have the
mass loaded on the Y-axis.
31
4.1.1.2.2 Displacement Analysis
Check design For Bending Deflection: -
Deflection of a Beam Due to Bending in General machine part: 0.000 5 to 0.003 in/in of
beam length [16].
32
Displacement Analysis of X-axis
33
4.1.1.2.3 Von Mises Stress Analysis
Yield Strength of Stainless Steel = 250 MPa.
34
Von Mises Stress Analysis X-axis
35
4.1.2 Electrical Connection
Installing the CNC Shield on the Arduino and installing the stepper motor
drivers a4988 on the CNC-Shield. We enabled the microsteps by connecting their
own pins to 5V, as well as connecting the pins responsible for copying the Y axis
of CNC-shield to the A axis to get two stepper motor that have the same
movement on the Y axis. The stepper motors are connected to the CNC-Shield.
20V power source is connected to the CNC Shield. The circuit scheme is shown
in figure [44].
36
4.1.2.2 Current Limit for Stepper Motors
37
4.1.2.3 Moving Distance for Each Step (mm/step).
In this section will calculate how many distance the spindle will move when
stepper motor move one step.
We had set stepper motor driver a4988 one 1/16 step mode.
NEMA 17 stepper motor step angle is 1.8𝑜 and number of steps per revolution
is 200 steps.
Because we set a4988 on 1/16 step mode now the step angle will give by:
New step angle = 1.8/16 = 0.112𝟓°
So, the new number of steps per revolution will become = 3,200 steps
The lead screw we used contains 2mm pitch and the fourth thread. Therefore,
the distance for each revolution will be given by:
Distance per revolution = 2mm *4 = 8 mm / rev
Then:
𝑫𝒊𝒔𝒕𝒂𝒏𝒄𝒆 𝑷𝒆𝒓 𝑹𝒆𝒗𝒐𝒍𝒖𝒕𝒊𝒐𝒏
𝑫𝒊𝒔𝒕𝒂𝒏𝒄𝒆 𝒑𝒆𝒓 𝒔𝒕𝒆𝒑 =
𝑵𝒖𝒎𝒃𝒆𝒓 𝑶𝒇 𝑺𝒕𝒆𝒑𝒔 𝑷𝒆𝒓 𝑹𝒆𝒗𝒐𝒍𝒖𝒕𝒊𝒐𝒏
= 8 / 3200
= 0.0025 mm/step
= 2.5 μm/step
38
4.2 Results
The final result of this project is the completion of the manufacture of the
CNC machine with a medium workspace (40 cm in Y-axis, 24 cm in X-axis and
3 cm in Z-axis) as shown in the figures [46] through [48]. With a transmission
distance 2.5μm/step. The machine was successfully run and tested in several
operation tests.
39
Figure 47: CNC-machine front view
40
4.2.2 Results of CNC-Machine Operation Tests
The machine has been tested in several milling and engraving operations on
wood, and work has been done to improve accuracy until it reaches an excellent
level. The results of these tests appear in figures [49] and [51] and it shows
improvement in work.
41
Figure 51:engrave on MDF
42
Chapter 5
Conclusions, Future works and Problems
5.1 Conclusions
• We learned how to use CAD programs to make 2-D sketches and 3-D
models using Autodesk Inventor 2020.
• We learned how to use CAM programs to convert the 3-D models into G-
code and set the required setting of the machine.
• The machine was fabricated successfully and during testing it worked well.
• So that we could choose the appropriate parts for our machine. Our project
is to make a simple 3-axis router CNC machine of small work area and low
cost.
• The motion system depends on four stepper motors one for x-axis, one for
z-axis and we used two for Y-axis to get higher stability.
43
• We used screws-nuts system to convert the rotational motion from motors
into linear motion.
• Inventor CAM program to create 3D model and convert into G-code. The
motion of CNC will be controlled by GRBL program.
The goal of switching some parts is to use higher quality parts and better
capabilities, to increase accuracy and eliminate misalignment and vibration.
Noting that the required parts for the improvements are either not available in
Iraq or that are very expensive.
44
• Replacing the Liner bearing Block Guide to a linear Profile Rail Guide that
has a much higher accuracy.
• Replacing the hand screw with ball screw and use anti backlash trapezoidal
nut instead of normal trapezoidal nut.
• Replacing the stepper Motor Driver A4988 with the DRV8825, which
gives an additional step mode that is 1/32 step mode.
• Adding another ball bearing support for lead screw on the side of the
stepper motor, which will increase the stability of the lead screw
5.3 problems
During our work in the project we faced many problems, the reasons of these
problems are
• The cost of the components of the machine was a big problem for us. At
first, we made a complete design to make the structure of the machine by
using 3-D printed parts. But the 3-D costs a lot, so we made a new design
45
and we chose Acrylic plates to be our structure. The acrylic has high
strength and we can get the desired parts by cutting it with CNC machine
and it costs half of the 3-D printed parts.
• The drills that are used in CNC machines must be of light weight and small
size, and this type of drills have very high price (+70$), we could not buy it
because of its high price. We searched in the local markets for alternatives,
then we found one that suits our work with much lower price.
• The stepper motors that used in CNC are of bipolar type and they must have
high accuracy. This type of motors has high price (+20$). We passed this
problem by buying second hand motors which costs us much lower price.
These motors were of Unipolar type and we need bipolar type. Then we
could find a solution and passed this problem by using only four wires of
the unipolar motor so it becomes bipolar.
• Machine parts are not available in Mosul, we could find these components
and items only at one store in Baghdad, or we can buy them from internet
and this may take long time.
• The components that are available in the local markets were from the bad
quality which made a big problem for us. The linear bearings and the nuts
have a high clearance, and this make a big problem in term of stability and
deflection. But we passed this problem by design new linear bearing block
and print it by 3-D printer and added to the machine so we have double
46
bearing in the Y-axis as shown in the figure [55]. This step increased the
stability of the machine and eliminate the deflection.
• The motion system depends on lead screw with nut, we faced a problem of
how we can connect the screw to structure. We used shaft support SK10
which can be fixed in the axes and connected with the lead screw nut as
shown in the figure [56]
Figure 56: Connect the screw to structure using shaft support SK10
47
References:
[1] https://www.tramarindustries.com/2019/05/20/5-common-types-of-cnc-
machines/
[2] https://www.coadengineering.com/industrial-applications-of-cnc-
machines/#:~:text=Unquestionably%2C%20there%20are%20various%20ind
ustrial,CNC%20machines%20in%20many%20fields.&text=Plastic%2C%20
metal%2C%20computer%20parts%2C,machine%20users%2C%20among%
20other%20firms.
[3] http://www.technologystudent.com/cam/cncman4.htm
[4] https://en.wikipedia.org/wiki/Computer-aided_design
[5] https://www.autodesk.com/products/fusion-360/blog/computer-aided-
manufacturing-beginners/
[6] https://en.wikipedia.org/wiki/G-code
[7] https://en.wikipedia.org/wiki/Arduino_Uno
[8] http://makerhardware.net/wiki/doku.php?id=electronics:cnc_shield
[10] https://en.wikipedia.org/wiki/Linear-motion_bearing
[11] https://www.elprocus.com/stepper-motor-types-advantages-
applications/
[12] https://en.wikipedia.org/wiki/Autodesk_Inventor
[13] https://www.graitecusa.com/cad-software/manufacturing/inventor-hsm-
cam
[14] https://github.com/grbl/grbl
[15] https://github.com/winder/Universal-G-Code-Sender
48
[16] MACHINE ELEMENTS IN MECHANICAL DESIGN 4th Edition
Robert L. Mott, PE University of Dayton
[17] https://www.motioncontroltips.com/faq-set-stepper-motors-current-
limit-important/
[18] https://ardufocus.com/howto/a4988-motor-current-tuning/
49