Download as pdf or txt
Download as pdf or txt
You are on page 1of 51

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/357509783

CNC-Machine project

Technical Report · January 2022

CITATIONS READS

0 682

4 authors, including:

Marwah Ezzulddin Alabasy


University of Mosul
4 PUBLICATIONS   0 CITATIONS   

SEE PROFILE

Some of the authors of this publication are also working on these related projects:

Researcher Academy View project

Conveyor Belt for Barcode Reader Based on Arduino View project

All content following this page was uploaded by Marwah Ezzulddin Alabasy on 02 January 2022.

The user has requested enhancement of the downloaded file.


Republic of Iraq
Ministry of Higher Education and Scientific Research
University of Mosul

Project name:

CNC plotter machine using Microcontroller

As part of the requirements for a Bachelor of Science degree in


Mechatronics Engineering

Submitted by:

Ahmed Mahmood Hameed


Harith Yasser Ibrahem
Murtadha Shukr Mahmood

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

Project overview ________________________________________________________ 1

Table of content ________________________________________________________ 3

Table of Figure __________________________________________________________ 5

Chapter one Introduction _________________________________________________ 7

1.1 Preview: - ______________________________________________________________ 7

1.2 project Idea: -___________________________________________________________ 7

Chapter two Introduction to CNC machine and Working Stages __________________ 8

2.1 Introduction ____________________________________________________________ 8


2.1.1 Type of CNC machines: ______________________________________________________ 8
2.1.2 Applications of CNC machine: ________________________________________________ 11
2.1.3 Advantages of CNC: ________________________________________________________ 11

2.2 How is the CNC Machine Used for Machining? _______________________________ 12


2.2.1 Computer Aided Design (CAD): _______________________________________________ 12
2.2.2 Computer Aided Manufacturing (CAM): ________________________________________ 13
2.2.3 G-code:__________________________________________________________________ 13
2.2.4 Machining Stage: __________________________________________________________ 14

Chapter Three Hardware and Software _____________________________________ 15

3.1 Hardware _____________________________________________________________ 15


3.1.1 Electronics Parts___________________________________________________________ 15
3.1.2 Mechanical Parts __________________________________________________________ 17
3.1.3 Electromechanical Parts_____________________________________________________ 21

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

Chapter 4 Calculations and Results ________________________________________ 24

4.1 Calculations ___________________________________________________________ 24


4.1.1 Mechanical Design and Stress Analysis _________________________________________ 24

3
4.1.2 Electrical Connection _______________________________________________________ 36

4.2 Results _______________________________________________________________ 39


4.2.1 The Final CNC-Machine _____________________________________________________ 39
4.2.2 Results of CNC-Machine Operation Tests _______________________________________ 41

Chapter 5 Conclusions, Future works and Problems ___________________________ 43

5.1 Conclusions ___________________________________________________________ 43

5.2 Future works __________________________________________________________ 44


5.2.1 Adding features ___________________________________________________________ 44
5.2.2 Parts replacement _________________________________________________________ 44
5.2.3 Design adjustment _________________________________________________________ 45

5.3 problems _____________________________________________________________ 45


5.3.1 The cost of the components: - ________________________________________________ 45
5.3.2 Availability of the components _______________________________________________ 46

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: -

An introduction and the aim of the project will be introduced in chapter 1. In


chapter 2, general information About CNC machine will be seen. Chapter 3 will
refer to the hardware and software, chapter four will refer to calculations and
results. And finally, the conclusions, problems and future works will appear in
chapter 4.

1.2 project Idea: -

CNC-machine is used in various machining operations such as drilling,


milling, engraving, drawing and cutting. In this project, the 3-axis CNC-machine
will be used for drilling, engraving, cutting wood. This means it can be used to
make some of the pieces used to build other projects or machines, as well as the
manufacture of medals and small decorative pieces, can be made.

7
Chapter two
Introduction to CNC machine and Working Stages
2.1 Introduction

Requirements of today’s industry are to produce large quantity and quality


products with low production and installation cost. These tasks can be easily
completed by the machines which are controlled by computers to make work
easier with ultra-precision and less human caused errors. These are commonly
known as
CNC (Computer Numerical Control) Machines. In Industry it is not efficient
or profitable to make everyday products by hand. On a CNC machine it is possible
to make hundreds or even thousands of the same items in a day. The Computer
Numerical Control (CNC) machining is a process used in the manufacturing
sector that involves the use of computers to control machine tools. Under CNC
machining, machine tools function through numerical control. A computer
program is customized for an object and the machines are programmed with
language called G-code that essentially controls all features like feed rate,
coordination, axis motions, location and speed.

2.1.1 Type of CNC machines:

Different kinds of CNC machines cover an extremely large variety. Their


numbers are rapidly increasing, as the technology development advances, some
of CNC types will be listed below [1]: -

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.

Figure 3: CNC plasma

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

4. 3D Printer: - 3D printers use CNC technology and operate using similar


technology as CNC lasers, but utilize an extruder to slowly deposit plastic in
a consistent motion until the desired product is complete.

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

2.1.2 Applications of CNC machine:

There are various industrial applications of CNC machines in many fields.


The machine being computer-controlled makes more effective accuracy, thus
being able to work on a specific space without destroying the other parts. As a
result of that feature, the machine in question becomes essential in various firms.
Plastic, metal, computer parts, and Wood manufacturers, electrical, and metal
fabrication industries are some of the crucial CNC machine users, among other
firms [2].

2.1.3 Advantages of CNC [3]:

1. CNC machines are programmed with a design which can then be


manufactured hundreds or even thousands of times. Each manufactured
product will be exactly the same.
2. Less skilled/trained people can operate CNCs unlike manual lathes milling
machines which need skilled engineers.
3. CNC machines can be updated by improving the software used to drive the
machines.

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.

2.2 How is the CNC Machine Used for Machining?

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.

Figure 7:CNC-machine using steps

2.2.1 Computer Aided Design (CAD):

A Software used to prepare 2-D drawings or 3D models used to design


products. Figure [8] show CAD step. Software used for CAD [4]:

1. Autodesk Inventor 2020, this is what we chose to create CAD designs.

2. SolidWorks.

3. Fusion 360.

Figure 8: Computer Aided Design (CAD) step

12
2.2.2 Computer Aided Manufacturing (CAM):

CAM software prepares a model for machining by working through several


actions, including [5]:
• Checking if the model has any geometry errors that will impact the
manufacturing process.
• Creating a toolpath for the model, which is a set of coordinates the
machine will follow during the machining process.
• Setting any required machine parameters including cutting speed,
voltage, feed rate, etc.
We chose Autodesk Inventor 2020 With CAM integrated plug in. Figure [9]
show CAM step

Figure 9: Computer Aided Manufacturing (CAM) step

2.2.3 G-code:

G-Code or Geometric Code is the generic name for a control


language for CNC machines. It is a way to tell the machine to move to
various points at a desired speed, control the spindle speed, turn on and
off various coolants, and all sorts of other things. It is fairly standard,
and is a useful tool. The standard version of G-code is known as RS-
274D. Since G-codes are preparatory codes, in a CNC program they
begin with the letter G and direct the machine. Figure [10] show G-code
step. [6]

13
Figure 10: G-code step

2.2.4 Machining Stage:

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

Figure 11: Machining Stage

14
Chapter Three
Hardware and Software
3.1 Hardware

3.1.1 Electronics Parts

3.1.1.1 Microcontroller (Arduino Uno) (× 1).

The Arduino UNO shown in figure [12], is an open-source microcontroller board


based on the Microchip ATmega328P microcontroller and developed by
Arduino.cc. The board is equipped with sets of digital and analog input/output
(I/O) pins that may be interfaced to various expansion boards (shields) and other
circuits. The board has 14 Digital pins, 6 Analog pins, and programmable with
the Arduino IDE (Integrated Development Environment) via a type B USB cable
[7].

Figure 12: Arduino IDE


Figure 13:Arduino UNO

3.1.1.2 CNC-Shield-V3 (× 1).

The CNC Shield was designed by Protoneer.co.nz to take advantage of the


demand for a low-cost controller solution for DIY CNC machines. It was
designed to be 100% compatible with Grbl, the Opensource G-Code interpreter,
and fit onto the popular Arduino Uno. The CNC Shield can be used to control
a number of different types of CNC machines, including CNC milling machines,
15
laser engraving/cutting machines, drawing machines, 3D printers or any project
that needs precision control of stepper motors. It uses compatible stepper drivers,
either the A4988 or the higher current
DRV8825 [8].

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

3.1.1.3 Stepper Motor Driver a4988 (× 4).

The A4988 is a complete microstepping motor driver with built-in translator


for easy operation. It is designed to operate bipolar stepper motors in full-, half-,
quarter-, eighth-, and sixteenth-step modes, with an output drive capacity of up
to 35 V and ±2 A. The A4988 includes a fixed off-time current regulator which
has the ability to operate in Slow or Mixed decay modes [9].

Features
• 3.3 and 5 V compatible logic supply
• Output Current ±2 A
• Load Supply Voltage 35 V

Figure 15: Stepper Motor


Driver a4988

16
3.1.2 Mechanical Parts

3.1.2.1 Stainless Steel Shaft (8mm Dia.).

Figure 16: Stainless Steel Shaft

The material properties of stainless steel shaft are shown in the table[1].Also,
the dimensions and quantites shown in table [2].

Table 2: Material Properties of Table 1: dimensions and quantities


Stainless Steel. of stainless-steel shafts

3.1.2.2 Lead Screw with Trapezoidal Nut


(8mm Dia.).
Table 3: Material Properties of
Stainless Steel.
This part will convert the rotational motion
into linear motion and transmit it to next axis.
The dimensions and quantites shown in
table [3].
Table 4: dimensions and
quantities of Lead Screws

Table 5: dimensions and


quantities of Lead Screws 17
Figure 17: Lead Screw with trapezoidal nut

3.1.2.3 Linear Bearing Block SCS8UU (Closed – 8mm Dia.) (× 10).

A linear-motion bearing or linear slide is a bearing designed to provide free


motion in both directions [10].

Figure 18: Linear Bearing Block

3.1.2.4 Shaft Support SK10 (× 4).

In this project it used the trapezoidal nut of lead screw with acrylic frame.

Figure 19: Shaft Support

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.

Figure 20: Flexible Coupling

3.1.2.6 Aluminum Spindle Holder 52mm (× 1).

Spindle holder is used to carry and fix the spindle on the Z axis.

Figure 21: Spindle Holder

3.1.2.7 Ball Bearing 608ZZ (8mm inner Dia.) (× 4).

The purpose of a ball bearing is to reduce


rotational friction and support radial and axial loads on
the shafts.

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].

Table 6: material properties for acrylic

Figure 22: Acrylic Plate

3.1.2.9 Base.

Is made from MDF (medium density fireboard).

3.1.3 Electrical Parts

3.1.3.1 20 Volt DC Power Supply

20
3.1.4 Electromechanical Parts

3.1.4.1 Stepper Motor NEMA 17 (× 4).

A stepper motor is an electromechanical device it converts electrical power


into mechanical power. Also, it is a brushless, synchronous electric motor that
can divide a full rotation into an expansive number of steps. The motor’s position
can be controlled accurately without any feedback mechanism, as long as the
motor is carefully sized to the application [11].
Features
• Rated current 1.2 Amp.
• Step angle1.8 ° or 200 steps-per-revolution.
• four-phase.
• permanent-magnet.
• holding torque of 3.2 kg-cm
Figure 23: Stepper
3.1.4.2 400W variable speed spindle. Motor NEMA 17

Features
• Speed range 6000-32000 RPM with 6000 RPM step.
• Voltage 220V.
• The maximum diameter of the cartridge is 6 mm.

Figure 24: 400W Spindle

21
3.2 Software

3.2.1 Autodesk Invertor with Invertor CAM Integrated Software.

Autodesk Inventor is a computer-aided design application for 3D mechanical


design, simulation, visualization, and documentation developed by Autodesk.
Inventor allows 2D and 3D data integration in a single environment, creating
a virtual representation of the final product. Autodesk Inventor includes
parametric, direct edit and freeform modeling tools as well as multi-CAD
translation capabilities and in their standard DWG drawings [12].

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].

Figure 25: Autodesk Invertor 2020

22
3.2.2 GRBL

Grbl is a no-compromise, high performance, low cost alternative to parallel-


port-based motion control for CNC milling. It will run on a vanilla Arduino
(Duemillanove / Uno) as long as it sports an Atmega 328.
The controller is written in highly optimized C utilizing every clever feature
of the AVR-chips to achieve precise timing and asynchronous operation. It is able
to maintain up to 30kHz of stable, jitter free control pulses.
It accepts standards-compliant g-code and has been tested with the output of
several CAM tools with no problems.
Grbl includes full acceleration
management with look ahead. That means the
controller will look up to 18 motions into the
future and plan its velocities ahead to deliver
smooth acceleration and jerk-free cornering
Figure 26: Grbl
[14].

3.2.3 Universal-G-Code-Sender

Universal G-Code Sender is a


Java based, cross platform G-Code
sender, compatible with GRBL and
TinyG/g2core. Use this program to
run a GRBL or TinyG/g2core
controlled CNC machine [15]. Figure 27: Universal G-Code Sender

23
Chapter 4
Calculations and Results
4.1 Calculations

4.1.1 Mechanical Design and Stress Analysis

4.1.1.1 Mechanical Design

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

Figure 29: X-axis ball bearing side

25
(× 2) (× 2)
Figure 30: Y-axis ball bearing corner Figure 31: Y-axis motor corner

Figure 32: Z-axis carriage side


26
Figure 33: Z-axis motor side

Figure 34: Z-axis ball bearing side

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.

• The rotational motion of the stepper motor must be converted to linear


motion and this can be done using several methods, including: Either using
belts, this is used for the CNC laser machine because it does not require a
lot of high torque to move the axes, or we can use a lead screw with
trapezoidal nut. We choice to use an 8mm lead screw with a trapezoidal
nut. We used 8mm Stainless steel beams, two in the z-axis, two in the x-
axis and one in the Y-axis. They are used to connect the parts of the
machine together, support and to guide the linear bearing. We used 8
bearings to ensure stability and smooth motion, 4 in Y-axis, 2 in X-axis
and 2 in Z-axis. Figures [36] through [39] show our 3-axes CNC-machine.

28
Figure 36: CNC-machine design isometric view.

Figure 37: CNC-machine design side view.

29
Figure 38: CNC-machine design top view.

Figure 39: CNC-machine design front 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.

The mass loaded on the X-axis = 2.45 kg


The mass loaded on the Y-axis = 3.14 kg

By multiplying the masses by gravity accelerating, we get the forces loaded


on the axes.
Stress analysis was performed on the case when the Z-axis is in the middle of
the X-axis, as well as the X-axis in the middle of the Y-axis. This gives the highest
stress and deflection in the 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].

Displacement Analysis of Y-axis

Figure 40: Displacement Analysis result of Y-axis

Y-axis (length 500 mm) :


Min. limit = 0.0005 * 500 = 0.25 mm
Max. limit = 0.003 * 500 = 1.5 mm
Deflection in Y-axis = 0.5625 mm
0.25 < 0.5625 < 1 is safe.

32
Displacement Analysis of X-axis

Figure 41: Displacement Analysis result of X-axis

X-axis (length 360 mm) :


Min limit = 0.0005 * 360 = 0.18 mm
Max limit = 0.003 * 360 = 1.08 mm
Deflection in X-axis = 0.5608 mm
0.18 < 0.5605 < 1.08 is safe.

33
4.1.1.2.3 Von Mises Stress Analysis
Yield Strength of Stainless Steel = 250 MPa.

Von Mises Stress Analysis Y-axis

Figure 42: Von Mises Stress Analysis result of Y-axis

Von Mises Stress = 48.24 MPa


Ny = Sy/σ = 250 / 48.24 = 5.1 is safe.

34
Von Mises Stress Analysis X-axis

Figure 43: Von Mises Stress Analysis result of X-axis

Von Mises Stress = 71.66 MPa


Nx = Sy/σ = 250 / 71.66 = 3.4 is safe.

35
4.1.2 Electrical Connection

4.1.2.1 Circuit 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].

Figure 44: circuit connection

36
4.1.2.2 Current Limit for Stepper Motors

Stepper-motor current limiting serves a few functions. Stepper-motor


overcurrent can cause overheating. At its most extreme, overcurrent can cause
rotor demagnetization. So, any design that uses microstepping needs current
limiting, as different windings require different current levels [17].
The stepper motor driver A4988 allows to set a target current anywhere
between some mA up to a bit less than 2A, this is accomplished by adjusting what
is called the Vref (reference voltage) when turning the potentiometer resistance
of a4988 on a clockwise direction the Vref voltage will increase and decrease
when rotating it counterclockwise [18].
The actual value of Vref can be calculated using the formula:
Vref = Imax * 8 * Rs
Rs: is sensing resistance (it is 0.1 ohm in our a4988).
Imax: is current limits
Our stepper motors have 1.2A rated current, we will operate it at 70% of it’s
rated current for safety, so:
Imax = 1.2A * 0.7 = 840MA
By substituting in Vref eq. we get:

Vref = 840mA * 0.1 * 8 = 0.672V

Now we must adjust potentiometer


of a4988 until we measure 0.672 v on
Vref terminals as shown in figure [45].

Figure 45: Vref terminals

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

4.2.1 The Final CNC-Machine

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.

Figure 46: CNC-machine isometric view

39
Figure 47: CNC-machine front view

Figure 48: CNC-machine side 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.

Figure 49: Firsts results of machining tests

Figure 50: Finale accuracy level

41
Figure 51:engrave on MDF

Figure 52: wood milling

42
Chapter 5
Conclusions, Future works and Problems
5.1 Conclusions

The purpose of this machine is engraving and cutting wood.

• From this project, we learned the principles of CNC machine. We gained


better understanding in the modes of operation of CNC machine.

• 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.

• We had chosen this project because it combines mechanics and electronics,


controlling the machines using computer and this is exactly the mission of
mechatronics. We made a complete mechanical design with stress analysis
using Inventor program from Autodesk.

• 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.

• We used acrylic (PMMA) for the frame, we designed it with an Inverter


program and cut it with a CNC laser.

• We used MDF wood for the base.

• We use drill for engraving.

• 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.

• We used Arduino Uno as a controller

• Inventor CAM program to create 3D model and convert into G-code. The
motion of CNC will be controlled by GRBL program.

5.2 Future works

Future work includes three sections: adding features, some parts


Replacement, and design adjustments.

5.2.1 Adding features

• Converting the CNC machine from 3-axes to 4-axes, this is by adding a


fourth rotating axis on the base of work that will enable the work of the 4-
axis milling as well as turning.

• Adding limit switches to control the


movement limits of the axes, which will
add better control capabilities to the
machine as well as increase its safety.

• Adding a relay switch to control on/off


spindle through the control program. Figure 53: to 4-axes CNC
machine

5.2.2 Parts replacement

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 flexible coupling with the rigid coupling.

• 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.

5.2.3 Design adjustment

• The Y-axis design is designed so that the


Y-axis is hidden under or beside the work
table, which prevents the material chips
from entering the lead screw teeth, which
impedes movement, as shown in figure
[54].
Figure 54: design configuration
to hidden Y-axis under the work
table.

• 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

5.3.1 The cost of the components: -

• 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.

5.3.2 Availability of the components

• 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.

Figure 55: 3-D printed linear bearing block

• 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

[9] Allegro MicroSystems A4988-Datashee

[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

View publication stats

You might also like