Design and Analysis Mini CNC Plotter Machine: Faculty of Engineering Department of Computer Engineering

Download as pdf or txt
Download as pdf or txt
You are on page 1of 46
At a glance
Powered by AI
The document discusses the design and analysis of a mini CNC plotter machine. It covers topics such as the history and technology behind CNC machines, different types of CNC machines, and potential future applications.

Early research on numerical control was conducted at MIT in the 1940s-50s. The first CNC machine was built in 1950s. Key technologies like servo motors and microprocessors enabled the growth of CNC.

The main types of CNC machines discussed are milling machines, lathes, laser cutters, routers, and plasma cutters.

Faculty of Engineering

Department of Computer Engineering

‘Project II’

Design and Analysis Mini CNC Plotter Machine

Presented by:
Suhaibb Masalha, Osama Qanbaz
and Mohammad Jamal

Supervised by :
Eng. Ibtehal Mishal

JAN 2021
Table of contents

TABLE OF CONTENTS…...................................................................................................I
LIST OF FIGURES ......................................................................................................... III
ABSTRACT .................................................................................................................... 1
CH1: INTRODUCTION .................................................................................................. 1
CH2: NUMERICAL CONTROL SYSTEM ......................................................................... 3
2.1 The History of CNC ......................................................................................... 3
2.1.1 Early MIT Research on Numerical Control ........................................... 4
2.1.2 The First CNC Machine ......................................................................... 4
2.1.3 Staples of CNC Technology .................................................................. 5
2.2 Types of CNC Machines ................................................................................. 6
2.2.1 CNC Milling Machine .................................................................................. 6
2.2.2 CNC Lathes Machine ................................................................................... 7
2.2.3 CNC Laser Cutting Machine ....................................................................... 8
2.2.4 CNC Router ................................................................................................... 8
2.2.5 CNC Plasma Cutters .................................................................................... 8
2.3 The Benefits of CNC ....................................................................................... 9
2.4 The Future of CNC ........................................................................................ 10
2.5 CNC Programming with G-code ................................................................... 11
2.5.1 What is CNC Programming? ................................................................... 11
2.5.2 What is G-Code?........................................................................................ 11
CH3: MATERIAL AND METHODOLOGY OF PROJECT ................................................ 12
3.1 Mechanical system design ................................................................................ 12
3.2 Project planning .................................................................................................. 13
3.2.1 Disassembly DVD/CD Drives .................................................................... 13
3.2.2 X-axis........................................................................................................... 14
3.2.3 Y-axis........................................................................................................... 14
3.2.4 Z-axis (Depth) ............................................................................................ 15
3.2.5 Paper Base ................................................................................................. 15

I
3.3 Electronic system and Wiring ............................................................................ 16
3.3.1 Arduino Uno R3 ......................................................................................... 17
3.3.2 Micro Servo Motor .................................................................................... 19
3.3.3 CNC V3 Shield ............................................................................................ 20
3.3.4 L293D Motor Driver Shield....................................................................... 22
3.3.5 Stepper Motors.......................................................................................... 23
3.3.6 Jumper Wires ............................................................................................. 23
3.3.7 Circuit and Wiring ..................................................................................... 24
3.4 Computer and software tools ........................................................................... 25
3.4.1 Arduino IDE ................................................................................................ 25
3.4.2 Easel software ........................................................................................... 26
3.4.3 Inscape Software....................................................................................... 27
3.4.4 Benbox Software ....................................................................................... 29
3.4.5 Pronterface Software ............................................................................... 30
3.4.6 NCPlot Software ..................................................................................... 30
3.5 Implementation (Stepwise procedure) ............................................................. 31
CH4: RESULTS AND DISCUSSION ............................................................................... 38
4.1 Result ....................................................................................................................... 38
4.2 Discussion ............................................................................................................... 39
4.2.1 Advantages ................................................................................................ 25
4.2.2 Disadvantages ........................................................................................... 26
CH5: CONCLUSIONS AND FUTURE SCOPE ................................................................ 39
5.1 CONCLUSIONS ........................................................................................................ 12
5.2 FUTURE SCOPE ....................................................................................................... 13
REFERENCES ............................................................................................................... 40

II
List of Figures

Figure 1. Flow chart to implementation CNC plotter machine ...................................................... 2


Figure 2. The First CNC Machine ..................................................................................................... 5
Figure 3. CNC Milling Machine ........................................................................................................ 6
Figure 4. CNC Lathes Machine. ....................................................................................................... 7
Figure 5. CNC Laser Cutting Machine ............................................................................................. 7
Figure 6. CNC Router ....................................................................................................................... 8
Figure 7. CNC Plasma Cutters ......................................................................................................... 8
Figure 8. Subsystem of CNC plotter Machine ............................................................................... 12
Figure 9. CNC Plotter Machine Design ......................................................................................... 12
Figure 10. Two Steppers Motor after disassembly ....................................................................... 13
Figure 11. X-axis ............................................................................................................................ 14
Figure 12. Y-axis ............................................................................................................................ 14
Figure 13. Z-axis ............................................................................................................................ 15
Figure 14. Paper Base ................................................................................................................... 15
Figure 15. Electrical circuit and wiring .......................................................................................... 16
Figure 16. Arduino Uno circuit ...................................................................................................... 17
Figure 17. Servo motor ................................................................................................................. 19
Figure 18. CNC V3 Shield ................................................................................................................ 20
Figure 19. Micro-stepping jumper location, before inserting A4988 .................................................. 20
Figure 20. CNC Shield V3 on top of Arduino Uno ............................................................................. 21
Figure 21. L293D Motor Driver Shield ............................................................................................. 22
Figure 22. L293D Motor Driver Shield Top of Arduino Uno ............................................................... 22
Figure 23. DVD Stepper Motor ..................................................................................................... 23
Figure 24. Jumper Wires ............................................................................................................... 23
Figure 25. Wiring of CNC Plotter Machine using L293D Shield .................................................... 24
Figure 26. Arduino Software ......................................................................................................... 25
Figure 27. Easel software tools ..................................................................................................... 26

III
Figure 28. Inscape Software.......................................................................................................... 27
Figure 29. Drawing of Luffy ........................................................................................................... 28
Figure 30. Outlines of Luffy ........................................................................................................... 28
Figure 31. Benbox Software .......................................................................................................... 29
Figure 32. Pronterface Software ................................................................................................... 30
Figure 33. NCPlot Software ........................................................................................................... 30
Figure 34. Select port and board version...................................................................................... 31
Figure 35. The Code of our CNC machine ..................................................................................... 32
Figure 36. Inkscape Software ........................................................................................................ 33
Figure 37. File menu...................................................................................................................... 33
Figure 38. Document Properties ................................................................................................... 34
Figure 39. Text on Inkscape software ........................................................................................... 34
Figure 40. Path menu .................................................................................................................... 35
Figure 41. Trace Bitmap Tool ........................................................................................................ 35
Figure 42. Path menu .................................................................................................................... 36
Figure 43. Save as (dialog) ............................................................................................................ 37
Figure 44. Pronterface software ................................................................................................... 37
Figure 45. Ready to print .............................................................................................................. 38
Figure 46. The Sketch of gcode file we created ............................................................................ 38

IV
Design and Analysis Mini CNC Plotter Machine

ABSTRACT
This project shows how to design and building low-cost Arduino plotter machine based
on the open-source hardware and software. The Arduino plotter machine has been
dependent on the principle of Computer Numerical Control with limited area depends on
the motion X, Y and Z axes. The objectives of this project are to design the Plotter and
to develop open-source software for control the machine. Basically, the system of this
plotter machine is designed by wood and old DVD drivers to work with three axes
stepper motors (as X, Y and Z axes), these three stepper motors are controlled by
shield for movement (X, Y and Z axes). This machine’s movement on the X axis is 40
mm and Y axis is 40 mm. Length of travel means the linear movement of stepper
motors that control for X, Y and Z axes from point to another point. The left and right
movement controlled by X axis stepper motor, front-back movement controlled by Y axis
stepper motor and the pen is up-down that is controlled by Z axis stepper motor.

CHAPTER ONE
INTRODUCTION
The world has become a high technology with a lot of things becoming smaller and
thinner. With the fast-growing development of technology and manufacturing, Industrial
requirements such as good and high precision quality have helped in developing the
CNC machine plotter all of those can be achieved through machines that can be
controlled by computers such as Computer Numerical Control (CNC) machine. To
implement a CNC plotter machine, several concepts must be understood such as
understanding fundamentals, Machine Mechanical design, CNC machine hardware,
software development, test each one of three-axis stepper motors and connecting CNC
Machine with the software tools and test it, Figure 1 below shows the steps that have
been used to implement this project. Three axes of CNC plotter machine can do
movement starting with three primary axes which are X, Y, and Z-axis. [1]

Page |1
The Z-axis is being paralleled with the X-axis (Micheal W. Mattson, 2010). Figure 1
shows the steps to implement this project must be understood fundamental of the
plotter machine, Machine design by wood, implementation Machine hardware, and
wiring connection, Development software, test each one of three axes stepper motors,
finally connect the machine with Pronterface software tools and test Machine.[1]

Objectives:
The objectives of this project are to design the CNC Plotter Machine and to develop
open-source software and hardware to control it.

Figure 1. flow chart to implementation CNC plotter machine

Page |2
CHAPTER TWO
NUMERICAL CONTROL SYSTEM
Numerical control system (also computer numerical control, and generally called CNC)
is the computerized control of machining devices, (for example, drills, machines, plants)
and 2D/3D printers by methods for a computer. A CNC machine measures a bit of
material (metal, plastic, wood, fired, or composite) to meet specifications by following a
coded programmed instruction and without a manual operator directly controlling the
machining operation. A CNC machine is a motorized maneuverable tool and often a
motorized maneuverable platform, which are both controlled by a computer, according
to specific input instructions. Instructions are delivered to a CNC machine in the form of
a sequential program of machine control instructions such as G-code and M-code, then
executed. The program can be written by a person or, far more often, generated by
graphical computer-aided design (CAD) software and/or computer-aided manufacturing
(CAM) software. In the case of 3D printers, the part to be printed is "sliced", before the
instructions (or the program) is generated. 3D printers also use G-Code. [2]
CNC is a vast improvement over non-computerized machining that must be manually
controlled (e.g. using devices such as hand wheels or levers) or mechanically controlled
by pre-fabricated pattern guides (cams). In modern CNC systems, the design of a
mechanical part and its manufacturing program is highly automated. The part's
mechanical dimensions are defined using CAD software and then translated into
manufacturing directives by computer-aided manufacturing (CAM) software. The
resulting directives are transformed (by "post processor" software) into the specific
commands necessary for a particular machine to produce the component, and then are
loaded into the CNC machine. [2]

Description Motion is controlling multiple axes, normally at least two (X and Y), [1] and a
tool spindle that moves in the Z (depth). The position of the tool is driven by direct-
drive stepper motors or servo motors in order to provide highly accurate movements, or
in older designs, motors through a series of step-down gears. Open-loop control works
as long as the forces are kept small enough and speeds are not too great. On
commercial metalworking machines, closed loop controls are standard and required in
order to provide the accuracy, speed, and repeatability demanded.

Page |3
2.1 The History of Computer Numerical Control (CNC)
Computer numerical control is a modern concept in the manufacturing and production
industries. However, the concept of CNC harkens back to the basic idea of NC, or
numerical control. The idea of numerical control started when the automation of
machine tools originally incorporated specific concepts of programmable logic. In the
beginning, the first NC machines were built back in the 1940s. Slightly more advanced
machines came along in the 1950s. These manufacturing machines were constructed
based on existing tools that were modified with motors designed to move the controls of
the machine. These controls followed specific points that were fed into the machine on
punched tape. These early mechanisms were soon improved with both analog and
digital computers. The introduction of computer technology into the concept of
numerical control led to what we now know as computer numerical control. [2]

2.1.1 Early MIT Research on Numerical Control


After World War II, John Parsons researched ways to improve aircraft by creating
stiffened skins for them. This eventually led to a series of important Air Force research
projects, which were conducted at the Massachusetts Institute of Technology (MIT).
This research began in 1949. After the early planning and research phases, an
experimental milling machine was designed at MIT. Professor J.F. Reintjes and his
team of researchers were involved in this project. [2]

2.1.2 The First CNC Machine


Before the MIT projects, Parsons Corporation in Traverse City, Michigan developed a
system to produce templates for helicopter blades. John Parsons, who founded the
company, discovered how to calculate airfoil coordinates on an IBM 602A multiplier. He
then fed these data points into a Swiss jig borer. To date, this was considered the first
true numerical control machine as it manufactured goods – helicopter blade templates,
in this case – by feeding punched cards into a system, and the system then read and
produced the parts based on preprogrammed information. [2]

Page |4
As numerical control technology moved into the 1960s and 1970s, a very familiar form
of a CNC machine that most would recognize today started taking shape. Digital
technology then entered the fray, and automation in production processes became
more efficient than ever. In fact, many individuals can purchase – and even design –
their own homemade CNC machines. Because of how advanced computers are
nowadays, it’s more common than ever to find CNC machines in all industries and most
commonly in woodworking. [2]

Figure 2. The First CNC Machine

2.1.3 Staples of CNC Technology


While there has been tremendous change in the history of CNC technology, there are a
few cornerstones that have remained unchanged. All automated motion control
manufacturing machines,, from bare-bones concepts of the early days to highly
advanced systems today, still require 3 primary components. These include a command
function, a drive/motion system, and a feedback system. CNC has had a long and
interesting history. As technology evolves in the future, there may be even more
incredible elements to add to its history as manufacturing continues to promote the use
of robotic and automated processes in nearly every field. [2]

Page |5
2.2 Types of CNC Machines
Computer numerical control (CNC) machines are designed to manufacture a wide
variety of items. As such, there are several different types of commonly used CNC
machines. These machines are not your average machines and require much effort and
practice to be able to produce high quality commercial products. All these machines use
G-code which is the language that a CNC machine understands. Now all the different
types of CNC machines cater to a specific purpose. [2]
Let’s have a look at the different types of CNC machines:

2.2.1 CNC Milling Machine


A CNC mill is a machine that utilizes computer controls to cut various materials. Mills can
translate specific programs of numbers and letters in order to move the spindle in various ways.
Many mills use what is known as G code – a standardized programming language recognized
by most CNC machines. A CNC mill can have a wide array of functions, such as face milling,
shoulder milling, tapping, drilling, and turning. A CNC mill is very big as compared to other tools
and is also very expensive. Some of the CNC milling machine manufacturers are:
Okuma, HAAS and DMG Mori.

Figure 3. CNC Miling Machine

Page |6
2.2.2 CNC Lathes Machine
A lathe is a CNC machine that functions to cut work pieces as they are rotated. CNC lathes can
make precise cuts quickly by using various tools. These CNC machines are quite effective in the
precision they offer compared to manual lathes. They come with similar controls to those of
CNC mills and can read both G code and other proprietary programming languages. With time,
these are getting outdated. Some of the best CNC lathe machine manufacturers are Mori Seiki
& Okuma.

Figure 4. CNC Lathes Machine

2.2.3 CNC Laser Cutting Machine


The CNC laser cutters are similar to CNC plasma machines, the only difference however is the
fact that lasers are mostly used for cutting and are great when it comes to cutting meals, plastic
or hardwood. Depending on the density and strength of the material, the intensity of the laser
can be adjusted.

Figure 5. CNC Laser Cutting Machine

Page |7
2.2.4 CNC Router
A CNC router is a machine that is very similar to the commonly used handheld router utilized
for cutting various materials. A CNC router can aid in the cutting of steel, wood, aluminum,
composites, plastic, and foam. A CNC router is similar to a CNC mill. It comes with the ability to
use computer numerical control to route tool paths that enable the machine to function. CNC
routers reduce waste and increase productivity, producing various items in a much shorter
amount of time than using other machines. Most routers can operate on a particular material in
all three dimensions because of which they are great for smaller projects and creation of
prototype models and complex designs. You can also find 3 axis, 4 axis , 5 axis and 6 axis
routers.

Figure 6. CNC Router

2.2.5 CNC Plasma Cutters


The process of plasma cutting involves the cutting of a material using a plasma torch. This
method is most commonly used to cut heavy
materials, such as steel and other forms of
metal. Gas is blown at a very high speed from
a nozzle. While this is being done, an
electrical arc forms through the gas coming
out of the nozzle to the surface that is being
cut. This converts some of this gas into
plasma and these plasma temperature ranges
from 10,000 – 50,000 degrees. The plasma is
hot enough to melt whatever material is being
cut, and it blows away any molten metal from the site of the cut. In terms of shape and size,
they are very similar to CNC routers. These machines only works on two-dimensional shapes.

Figure 7. CNC Plasma Cutters

Page |8
2.3 The Benefits of Computer Numerical Control (CNC)
Computer numerical control, also called CNC, is a manufacturing concept in which
machines are automated to perform certain functions based on the instructions fed to
those machines. There are many great benefits to utilizing a CNC machine compared to
other forms of manufacturing and production. [2] These benefits include:

1. Saving on manufacturing costs


By using a CNC machine, you can take complete advantage of all raw materials
involved in the manufacturing process. Because of how accurate CNC machines can
operate, they significantly reduce waste. This helps the CNC machine operator
minimize any losses they may incur and, thus, increase profitability over the course of
time.

2. Increased speed of production


CNC machining is an extremely efficient process. Because of this, the production
process of a CNC machine cuts down on the number of steps it takes to produce a
specific part. Therefore, you can produce multiple parts – or items – in a much shorter
amount of time than using other manufacturing processes.

3. Increased safety
The entire fabrication process within a CNC machine is automated. So, the machine
operator is not even involved in the production process. This fosters a safe environment
as the machine does all the work without anyone having to be present. Some
production involves potentially dangerous materials like metal or steel. CNC machining
is so accurate that it will rarely pose any safety risks.

4. Increased efficiency of production


A CNC machine is considered perhaps the most efficient system for designing
components. This is because most CNC machines are equipped with quality assurance
protection measures built within them. As such, any time there is a problem in the
production process, the machine detects it and either shuts down to prevent further
problems or fixes the issue internally.

Page |9
5. Reduced production costs
A properly functioning CNC machine should work flawlessly over a long period of time
without the need of fixing parts or repairing the machine in any other fashion. With a
well-oiled production process in place from the beginning and minimal repair work due
to rare flaws, production costs are very low. Manufacturing can take a tremendous bite
out of any company’s budget. But with CNC machinery, this process can be a significant
money saver. It is very clear that CNC machining is a fantastic way of manufacturing a
wide array of items. While other manufacturing processes and equipment each have
their own advantages, the benefits of CNC machines tend to outweigh any competition
because of how efficient these machines are.

2.4 The Future of Computer Numerical Control (CNC)


Computer numerical control (CNC) has transformed the industrial manufacturing and
homemade design fields tremendously over the past few decades. With automation and
precision being the two key components of CNC, it’s truly amazing what can be
designed today compared to just one generation ago. So, imagine what the future of
CNC technology may hold.
Some leaders in manufacturing have posed the question about whether current forms of
CNC programming developed by humans will even be necessary in the future. With
knowledge-based machining processes, adaptive and closed loop machining, along
with automated feature recognition becoming more advanced each day, many experts
predict that human CNC programmers will be in much less demand in the near future.
This means a programmer-oriented field could endure a very drastic change over the
next several years.

Looking Into The Near Future of CNC Just a few years ago, 3D printing was nothing
more than an afterthought for many individuals. Now, it appears as if it could completely
replace what we’ve come to know as traditional manufacturing methods. Known as
additive manufacturing, 3D printing builds layers of materials to create objects. 3D
printers are currently available on the market, and many are very reasonably priced and
are being used by individuals in their homes for what is essentially personal
manufacturing.

P a g e | 10
As for CNC technology, CNC machines have already begun to drop in price and are
becoming more readily available to the public. Expect to see a continued decrease in
the price of these machines. Plus, they’ve become easier to use, and you don’t have to
be a math whiz or have manufacturing experience to both assemble and utilize a CNC
mill, lathe, or plasma cutter. The main difference between CNC machines and 3D
printers is that CNC tools take away – or subtract – materials for large pieces to create
an object, whereas 3D printers add materials. [3]

2.5 CNC Programming with G-code


G-Code is known as one of the basic languages of CNC Programming and it is actually
an ultimate guide to CNC G-Code Programming. It helps in sharpening your skills so
that you get to know about more CNC G-Code programming by covering a few topics
from the basic CNC Programming all the way through to advanced topics like Macro B
programming. [4]

2.5.1 What is CNC Programming?


CNC programming, which is also known as the Computer Numerical Control
Programming is now used by a lot of manufacturers for making the program instructions
for the computers to control the machine tool. In recent times, CNC is mainly involved in
a whole manufacturing process. It enhances the automation as well as flexibility. [4]

2.5.2 What is G-Code?


CNC machine and G-Code goes hand in hand. G-Code is mainly one of the primary
languages, which is used to control the CNC machines. This is also one type of CNC
programming that all the CNC programmers utilize and another type of CAM
programming. CAM programs will simply create g-code from a CAD drawing, but the
end result is still g-code. The CNC controller of your machine executes the G-Code,
although there are other possibilities–Heidenhain, Shopbot, Mazak, and others have
proprietary formats. There are some of the machines with proprietary formats that can
also run the G-Code. It is the Lingua Franca (working language) of CNC. To make the
part on the CNC machine, you tell it how to make the part using a G-Code Program. [4]

P a g e | 11
CHAPTER THREE
MATERIAL AND METHODOLOGY OF PROJECT
This chapter shows how to build and do experimental the project, method of this project
is generally a guiding principle to handle the problem. The project implementation
method is discussed briefly focusing on basic components. The framework must be
clear to ensure that the project runs smoothly, and project objectives are capable of
success. Figure 8 shows three subsystems of this CNC plotter machine; Mechanical
system design, electronics system, and computer for software tools.

Figure 8. subsystem of CNC plotter Machine

3.1 Mechanical system design


In this section of the project, the structure
of the CNC plotter machine has been
designed from wood and old DVD drivers
with desired dimensions. Before starting
the design, there are many steps of criteria
that must be explained. Length of travel
means the linear movement of stepper
motors that control X, Y, and Z axes. The
left-right motion is controlled by the X-axis

P a g e | 12
stepper motor, the front-back motion controlled by the Y-axis stepper motor and the pen
goes up and down by the Z-axis stepper motor controller. Finally, the length travel of the
CNC plotter machine that decided as 40 mm for the X-axis, 40mm for the Y-axis, and 1
mm up-down for the Z-axis. Figure 9 shows the CNC plotter machine design. [6]
Figure 9. Plotter machine design

3.2 Project planning


3.2.1 Disassembly DVD/CD Drives
First step to start building this CNC machine is to disassemble two DVD/CD drives
and take off them the stepper motors. Use the screwdriver to open them and take off
them the rails. Next step is to choose our base for this CNC machine. I used one
surface from remaining DVD garbage' stuff. Finally, we will need to find something to
attach the one of the stepper-rails vertically to our construction. (you will understand
what I mean in our next step) Watch the above image.

Figure 10. two steppers motor after disassembly

P a g e | 13
3.2.2 X-axis
We place one stepper motor (with rails) on a big wood piece and mark it with a pen in
order to open the (4) holes for the screws. Make sure that is perfectly align! (use a
triangle ruler). Open the holes and mount the motor with nut screws. place on one side
of it the four mounting
angles and then mark it
with a pen in order to open
the (8) holes required for
the screws. Make sure that
the distance between them
is 5mm (thickness of wood
piece). The image above
will help you to understand
more. [6]
Figure 11. X-axis

3.2.3 Y-axis
Place the other stepper motor on two wood pieces and mark them with a pen in order to open
the (4) holes for the
screws. Again, make
sure that the motor is
perfectly align (use a
triangle ruler). we place
the two pieces of wood
on the X axis (big wood
piece) and mark them
with a pen in order to
open the (4) holes
required to fit on the
mounting angles. [6]
Figure 12. Y-axis

P a g e | 14
3.2.4 Z-axis (Depth)
That's the most difficult part of our construction.

You will need something to attach it on Y axis, a flat surface. On


that surface you will attach the servo motor (Z-axis) and the pen
base. Pen (or pencil) must be able to move up and down with
the help of servo motor. Watch the above image to understand
what you need to do to build Z axis. [6]

Tip: Use your imagination!.

Figure 13. Z-axis

3.2.5 Paper base


Now you will have to attach a wood (or plastic) surface
on Y axis (8x8cm will be fine).On this. you will put the
paper piece to print your texts or images Remember,
printing area is 4cmx4cm.

Figure 14. Paper base

P a g e | 15
3.3 Electronic system and Wiring
This section will discuss the electronic parts and wiring which is needed for designing
and building our CNC plotter machine. So, the main electronic component required are
one Arduino UNO R3, one L293D Motor Shield, stepper motors, D.C. power supply, pen
holder, some wires and USB to serial adapter.

Now that we have our contraction ready, it's time to build the circuit and test the stepper
motors (X and Y axis).
Watch the Fig. below with circuit schematic. [12]

Steppers motors wiring is something that need patient. On the next step you will find a
'testing' code for x and y axes. If a stepper doesn't work properly you must find the
correct working combination by changing the cables between them and the L293D ICs.

Figure 15. Electronic circuit and wiring

P a g e | 16
3.3.1 Arduino Uno R3
Arduino is the heart of the project, hence it should be selected by proper selection. In
our project we have selected Arduino Uno R3 which only runs on G-codes. The Uno is a
microcontroller board based on the ATmega328P. It has 14 digital input/output pins (of
which 6 can be used as PWM outputs), 6 analog inputs, a 16 MHz quartz crystal, a USB
connection, a power jack, an ICSP header and a reset button. It contains everything
needed to support the microcontroller; simply connect it to a computer with a USB cable
or power it with a AC-to DC adapter or battery to get started.
The board features an Atmel ATmega328 microcontroller operating at 5 V with 2Kb of
RAM, 32 Kb of cash memory for storing programs and 1 Kb of EEPROM for storing
parameters. The clock speed is 16 MHz, which translates to about executing about
300,000 lines of C source code per second. The board has 14 digital I/O pins and 6
analog input pins. There is a USB connector for talking to the host computer and a DC
power jack for connecting an external 6-20 V power source. [9]

Figure 16. Arduino Uno circuit

P a g e | 17
Here are the specifications of “Arduino Uno R3’’

A microcontroller board, contains on-board power supply, USB port communicate with
PC, and an Atmel microcontroller chip. It simplify the process of creating any control
system by providing the standard board that can be programmed and connected to the
system without the need to any sophisticated PCB design and implementation. It is an
open-source hardware, anyone can get the details of its design and modify it or make
his own one himself.

P a g e | 18
3.3.2 Micro Servo motor
Servos are controlled by sending an electrical pulse of variable width, or pulse width
modulation (PWM) which determines position of the shaft, through the control wire. In
our Project it is Z-axis. To do up and down of any pen or pencil of any angle.
MG90S servo, Metal gear with one bearing Tiny and lightweight with high output power,
this tiny servo is Helicopter, Quad copter or Robot. Durability. Servo can rotate
approximately 180 degrees (90 in each direction, and works just like the standard kinds
but smaller. You can use any servo code, hardware or library to control these servos.
Good for beginners who want to make stuff move without building a motor controller
with feedback & gear box, especially (arms) and hardware.

Specifications:
- Weight: 13.4 g
- Dimension: 22.5 x 12 x 35.5
- Stall torque: 1.8 kgf.cm (4.8V)
- Operating speed: 0.1 s/60 degree
- Operating voltage: 4.8 V
- Dead band width: 5 μs

Figure 17. Servo motor

P a g e | 19
3.3.3 CNC V3 Shield with A4988 stepper Driver Module and Heatsink for Arduino
The Arduino CNC Shield makes it easy to get your CNC projects up and running in a
few hours. It uses open-source computer code on Arduino to control 4 stepper motors
using 4 pieces of A4988 Stepper Motor driver breakout board, with this CNC shield and
Arduino Uno can be build project including CNC routers. The purpose of this CNC
shield to control on the three axes (X, Y, and Z axes) of the CNC plotter machine,
meaning control on the stepper motors.

Figure 18. CNC V3 Shield with A4988 Stepper driver and Heatsink
Each axis has 3 jumpers that can be set to configure the micro stepping for the A4988
plug-in driver board.

Figure 19. Micro-stepping jumper location, before inserting A4988

P a g e | 20
After setting the micro step jumper, you can plug-in A4988 driver boards as shown in
the Fig below. The Fig also shown this CNC sit nicely on top of Arduino Uno board,
without any external jumper wires.

Figure 20. CNC Shield V3 on top of Arduino Uno

Before you can use this CNC shield with Arduino, a control firmware needs to be
downloaded into Arduino board. We are going to use „GRBL‟ to accomplish our job.
GRBL is open-source software that runs on an Arduino Uno that takes G-Code
commands via Serial and turns the commands into motor signals. Grbl is a no-
compromise, high performance, low-cost alternative to parallel-port-based motion
control for CNC machine. It accepts standards-compliant g-code and has been tested
with the output of several CAM tools with no problems. Arcs, circles and helical motion
are fully supported, as well as, all other primary g-code commands. Macro functions,
variables, and most canned cycles are not supported, but we think GUIs can do a much
better job at translating them into straight g-code anyhow.

P a g e | 21
3.3.4 L293D Motor Driver Shield
The shield contains two L293D motor drivers and one 74HC595 shift register. The shift
register expands 3 pins of the Arduino to 8 pins to control the direction for the motor
drivers. The output enable of the L293D is directly connected to PWM outputs of the
Arduino. To increase the maximum current, the L293D allows extra chips with
"piggyback". Piggyback is soldering one or two or three extra L293D drivers on top of
the L293D drivers on the board to increase the maximum current. The L293D allows
parallel operation. The Motor Shield is able to drive 2 servo motors, and has 8 half-
bridge outputs for 2 stepper motors or 4 full H-bridge motor outputs or 8 half-bridge
drivers, or a combination.
The servo motors use the +5V of the
Arduino board. The voltage regulator
on the Arduino board could get hot. To
avoid this, the newer Motor Shields
have connection points for a separate
+5V for the servo motors

Figure 21. L293D Motor Driver Shield

Figure 22. L293D Motor Driver Shield top of Arduino Uno

P a g e | 22
3.3.5 Stepper Motors
A stepper motor is an electromechanical system that is transducing an electrical signal
into a mechanical one. It is designed to accomplish a discrete movement (the notion of
step) and reach a precise position. The movement is achieved through the use of a
magnetic field provided by coils and sensed by magnets. Indeed, when one of the coils
is energized, a magnetic field is created and, if the energy is supplied cyclically (by
means of input pulses), then the magnetic field will vary. When a magnet is placed in
this varying magnetic field, it will position itself in the lowest energy state (equilibrium),
therefore providing motion. This principle is used in the stepper motor, composed of a
fixed part (the stator) made of cyclically energized coils and a moving part (the rotor)
made of ferromagnetic material or magnets.

CD, DVD and BD units, and ink-jet printer, these motors perform flawlessly and its
application probably will not fade on next decades, because of the ease of development
and use.

Digital pulse stepper can be converted into the movement of the pen with respect to the
X, Y, Z axes directions. The stepper motor is a brushless motor that distributes full
rotation in several equal steps [2]. The stepper motor in Fig. 21 is defined by the
property of converting several drives to a specific increase in the position of the column.
Each pulse moves the column through a fixed angle. This machine has used three
stepper motors with a lead screw and two belts.
The output of the motor will be in the form of the rotation of the lead screw with respect
to the X, Y and Z axis.

Figure 23. DVD Stepper Motor

P a g e | 23
3.3.6 Jumper wires
In this project we used male to female jumper wire to connect stepper motor and1293d
motor driver shield. A jump wire (also known as jumper, jumper wire, jumper cable,
DuPont wire, or DuPont cable - named for one manufacturer of them) is an electrical
wire or group of them in a cable with a connector or pin at each end (or sometimes
without them - simply "tinned"), which is normally used to interconnect the components
of a breadboard or other prototype or test
circuit, internally or with other equipment or
components, without soldering.
Individual jump wires are fitted by inserting
their "end connectors" into the slots provided
in a breadboard, the header connector of a
circuit board, or a piece of test equipment.

Figure 24. Jumper Wires

3.3.7 Circuit and Wiring


The wiring of the various components of the electronics system is represented in the
Fig, shown below. The microcontroller of the Arduino board is connected to the
computer system through the USB serial port. The Stepper Motors of three axes (X, Y,
and Z) are connected with the L239D Motor shield driver board as Figure shown below.
D.C. Power supply is provided for all the components of the electronics system.

Figure 25. Wiring of CNC Plotter Machine using L239D Motor Sheild

P a g e | 24
3.4 Computer and software tools
3.4.1 Arduino IDE
"The open-source Arduino Software (IDE) makes it easy to write code and upload it to
the board" (https://www.arduino.cc) It is simplified C /C++ functions language-based
programming can be download functionality with a rich set of library functions. After
download and install on pc can be write the program by C language and from tools and
port must be choose the port connection between computer and Arduino through USB.
After this step can be verify the program by error checking and the message is done
compiling when it finished and no error. After this step can be upload the program on
the Arduino. Figure 26 shows Arduino software IDE.

Figure 26. Arduino Software (IDE)

P a g e | 25
Arduino will be define as, it is received the command or data from the computer and
with the help of USB cable. It is mounted on L239D Motor shield, it will be transfer data
from Arduino to L293D Motor shield with using stepper driver. Arduino UNO is a
microcontroller board, it contains everything needed to support the microcontroller,
simply connect it to a computer with a USB cable and a power source. It controls the
position of stepper motor with help of a program. It is open source platform based on
easy to use hardware and software. It is have digital and analog input/output pins which
can interface into various expansion board an d other circuits and microcontroller with
complementary components that helps in programming and incorporation into other
circuits. [9] Current supplied 5 volts with USB cable.

3.4.2 Easel software


To make the CNC plotter machine plot and write needing a software tools to design the
graphs and then convert this graph to G-code because CNC machine operate and
understanding G language, this tools can be achieved by easel software tools, this
software must be setting material dimensions X is 55 mm, Y is 55 mm, Z is 1 mm and
set Bit to 0.15 mm because Z axis is pen. Through this software can be set positions of
X, Y and Z axes, also can be control on the speed of CNC machine mm/min from feed
rate. Figure 27. showing the tools of easel software.

Figure 27. Easel software tools

P a g e | 26
3.4.3 Inscape Software
An open-source graphics
editing software, Inkscape
can be used to create or edit
vector graphics such as
simple sketch, rough line
diagrams, logos and difficult
paintings. This software
converts the loaded image
into G-codes for the required
2D diagram in to Gerber file
which consist of required G code program to be dumped into the microcontroller.

Figure 28. Inscape Software

Inkscape is used to design the plotted diagram or text. In this project by using this
software G-code file of a selected image or text is created G-code is a commonly used
numerical control programming language which includes X, Y, Z coordinates.

Make your own G-Code using Inkscape


The CNC plotter of our project will work within 40mmx40mm area So we choose the
document properties of the Inkscape 80mmx80mm (Width x Height) which is four times
the working area of the plotter because the plotter can draw only in the first quadrant.
So we have initially kept the axes at the nearest end of the motors which is considered
as origin to easily modify the design. In Fig. 27 the working area of CNC plotter is
shown with the photo in the pre-defined area. The photo is selected using cursor and
then select “object to path” from the drop down window to save the G-code form of the
selected text. To create G-code of an image, the file must have a transparent
background. The image should be dragged into the selected area then select “trace
bitmap” from drop down window to create a transparent image. Scans are selected as 8
and “Edge detection” is selected to create black & white image. After adding this

P a g e | 27
transparent image in the predefined area we’ve used “object to path” command to
create the G-code file of the selected image by following the steps described earlier.

Figure 29. Drawing of Luffy

Figure 30. Outlines of Luffy

P a g e | 28
3.4.4 Benbox Software
The software developed by its own team ‘BENBOX’. After constantly upgrading the
software features improved steadily. The software is mainly used to control the
laser/CNC machine of ‘BENBOX’. After connected upper computer and lower computer,
we can use the software for precise control. The software interface and software details,

we will detail below.

Figure 31. Benbox Software

P a g e | 29
3.4.5 Pronterface Software
Pronterface is a 3D printing host – a program that allows direct control of 3D printers
and CNC (including printing a sliced G-code) through a USB cable. Pronterface is a part
of Print run, a free, open-source software suite.

Figure 32. Pronterface Software.

3.4.6 NCPlot Software


NCPlot is another option for
visual text editing, and it has
extensive functionality for
editing G-code files. Some
of that functionality includes
operations like mirroring,
rotating, shifting, and scaling
a part. It also has a tool to
convert text to G-code
directly, which can save
significant time.

Figure 33. NCPlot Software

P a g e | 30
3.5 Implementation (Stepwise procedure)
Step 1: Connect the Arduino to Laptop using USB cable.
Step 2: Open the Arduino Software, then select port and Arduino board
(Arduino/Genuino Uno) version as shown in the Fig 34.

Figure 34. select port and board version

P a g e | 31
Step 3: Compile the code and upload into Arduino UNO R3

Figure 35. The code of our CNC machine

Link of CNC Code (.ino file):


https://drive.google.com/file/d/15Q90XjNmG-gY7rtzCt3tMTWKYseUioTr/view?usp=sharing

P a g e | 32
Step 4: Open the Inkscape software.

Figure 36. Inkscape software

Step 5: Open document properties in the file menu.

Figure 37. File menu

P a g e | 33
Step 6: In document properties set the page size by width=80mm and height=80mm.

Figure 38. Document Properties

Step 7: As shown in Fig 39 enter the text and we can adjust the text using the pointer in
required size.

Figure 39. Text on Inkscape software

P a g e | 34
Step 8: Go to path menu and click on trace bitmap.

Figure 40. Path menu

Step 9: In trace bitmap set the threshold and click update then ok.

Figure 41. Trace Bitmap Tool

P a g e | 35
Step 10: Now in path menu first click on object to path and then click on dynamic offset.

Figure 42. Path menu

Step 11: Now our text(image) is ready to print and save the document into g-code
extension.

Figure 43. Save as (dialog)

P a g e | 36
Step 12: Open the Pronterface software, then select Port and Baud rate (9600) as
shown in the Fig 44. Then click on Connect.

Figure 44. Pronterface software

Step 13: Now the CNC machine connected successfully to Pronterface, click on load
file and choose the gcode file that we created.

Figure 45. Ready to print

P a g e | 37
CHAPTER FOUR
RESULTS AND DISCUSSION
4.1 Results
After the testing and calibration, a plotter machine was ready to operate. The plotter
machine is implemented and manufactured as planned, therefore it can plot and write,
this plotter machine starts to collect data from programming that is derived from
computer aided design (CAD) and computer aided manufacturing (CAM). The programs
produce the computer file and will then extract the command to run the device. The
program will be transferred via Arduino and then loaded into the plotter machine to start
machining. After calibration and testing, the plotter machine was fully functional ready to
work. Fig. 46 shows the first sketch using our plotter machine.

Figure 46. The sketch of gcode file we created

P a g e | 38
4.2 Discussion
In this section, we will review the advantages and disadvantages of CNC plotter
Machine.

4.2.1 Advantages
[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] CNC machines can be updated by improving the software used to drive the
Machines.

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

4.2.2 Disadvantages
The machine runs in a slow pace and generates excess heat which causes the heat
sink to be heated quickly. A slight error may remain on the image file after it has been
plotted due to one side of the Y-axis fixed to the moving mechanism and the other end
is free to move. The Z-axis is not very rigid so it causes slight vibration.

P a g e | 39
CHAPTER FIVE
CONCLUSIONS AND FUTURE SCOPE
5.1 CONCLUSIONS
In this project, we used the concept of a low-cost plotter machine, which is easily
controlled by the computer and suddenly stopped and paused by clicking on the
computer. This small machine can be easily transported and assembled everywhere as
required. The board size of this device is 4X4 cm. Stepper Motor will run on this
standard for board size. If we have an increase in the size or length of the lead coil, it
will be free to make the large size of the design on paper.

5.2 FUTURE SCOPE


The pen of the machine can be replaced by a laser to make it work like a laser
engraving or cutting machine. Engraving machine can be used on wood. The pen can
also be replaced with a powerful drill so that it can be used for both milling and drilling
purposes. The servo can be replaced with a stepper motor and the pen with a 3-D pen
to make it a 3-D printer which can print objects with dimensions. By extrapolation of the
axes, the working area of the machine can be extended keeping the algorithm
unaltered.

P a g e | 40
REFERENCES
Books
[1] CNC programming: principles and applications 1st edition (2010) by Michael W.
Mattson.
[2] https://www.cnc.com/the-history-of-computer-numerical-control-cnc
[3] https://toolcraftfw.com/news/the-future-of-computer-numerical-control-cnc
[4] https://www.cnccookbook.com/cnc-programming-g-code
[5] CNC programming techniques 3rd edition (2005) by peter smid.
[6] Build Your Own CNC Machine (Technology in Action) 1st edition (2010) by James
Floyd Kelly.
[7] Practical 3D Printers: The Science and Art of 3D Printing 1st (2012) by Brian E.
[8] Printing: The Next Industrial Revolution 3rd edition (2013) by Christopher Barnatt.

Websites
[ 9 ] https://www.arduino.cc
[10] https://inkscape.org/about
[11] http://3dprintingindustry.com
[12] http://www.instructables.com
[13] https://www.3dhubs.com
[14] http://astromachineworks.com/difference-cnc-machining-3d-printing
[15] https://www.informationvine.com

P a g e | 41

You might also like