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

Available

Available online
online at
at www.sciencedirect.com
www.sciencedirect.com

Available
Availableonline
ScienceDirect
onlineatatwww.sciencedirect.com
www.sciencedirect.com
Procedia Manufacturing
Procedia Manufacturing 00
00 (2018)
(2018) 000–000
000–000
ScienceDirect
ScienceDirect www.elsevier.com/locate/procedia
www.elsevier.com/locate/procedia

Procedia Manufacturing 17 (2018) 22–28


Procedia Manufacturing 00 (2017) 000–000
www.elsevier.com/locate/procedia

28th International Conference on Flexible Automation and Intelligent Manufacturing


(FAIM2018), June 11-14, 2018, Columbus, OH, USA

G-code Visualization and Editing Program for Inexpensive Metal 3D Printing


Manufacturing Engineering Society International Conference 2017, MESIC 2017, 28-30 June
a* 2017,
Trung H. Duonga*, Nebojsa I. Jaksic , VigoL.(Pontevedra),
aa Jude a SpainAnsaf aa, D Michael Danielaa, James
DePalmaa, Bahaa
Armijo , and Miguel Galavizaa
aa

Costing models for capacity


Colorado
Colorado State
optimization
State University-Pueblo,
a
2200 Bonforte
University-Pueblo, 2200
a Bonforte Blvd., in CO,
Blvd., Pueblo,
Pueblo, Industry
CO, 81001,
81001, USA
USA
4.0: Trade-off
between used capacity and operational efficiency
Corresponding author.
Corresponding author. Tel:1-719-549-2357;
*
Email: trung.duong@csupueblo.edu
Tel:1-719-549-2357; Email:
* trung.duong@csupueblo.edu

Abstract
Abstract A. Santanaa, P. Afonsoa,*, A. Zaninb, R. Wernkeb
This work
This work focuses
focuses on on improving
improving an an existing
existing system
a
for
for 3D
University
system printing
of Minho,
3D of
of metal
printing4800-058 objects
objects using
metalGuimarães, using aa sinterable
sinterable clay
Portugal clay or
or paste.
paste. The
The existing
existing software
software and
and
firmware
firmware used
used by
by the
the current
current 3D
3D Mini
Mini Metal
Metal Maker
b (MMM) printer produce a high rate of poor quality products that result from either under-extrusion
MakerUnochapecó,
(MMM) printer 89809-000
produce aChapecó,
high rate SC,
of poorBrazil
quality products that result from either under-extrusion
or
or over-extrusion
over-extrusion conditions.
conditions. InIn practice,
practice, to
to successfully
successfully print
print an
an object,
object, different
different extrusion
extrusion rates
rates and
and printing
printing speeds
speeds are
are needed
needed for
for different
different sections
sections
of
of the
the part,
part, such
such as as the
the outline,
outline, the
the infill,
infill, and
and the
the lettering.
lettering. For
For anan MMM
MMM printer,
printer, the
the extrusion
extrusion rate
rate is
is manually
manually controlled
controlled byby aa knob,
knob, which
which is
is
ineffective
ineffective and
and inaccurate
inaccurate given
given the
the noticeable
noticeable lag
lag response
response of of the
the extruder
extruder motor.
motor. InIn this
this paper,
paper, aa 3D3D visualization
visualization MATLAB™
MATLAB™ programprogram is is developed
developed
to
to read
read the
Abstractthe G-code
G-code file,
file, separate
separate the
the G-code
G-code into
into color-coded
color-coded sections
sections andand produce
produce aa 3D
3D graphical
graphical model,
model, andand change
change the
the values
values according
according to to user
user
specifications.
specifications. ItIt allows
allows users
users to
to easily
easily and
and visually
visually recognize
recognize and
and select
select aa separate
separate chunk
chunk of of G-code,
G-code, such
such asas layer
layer by
by layer
layer or
or individual
individual graphical
graphical
elements
elements inin each
each layer,
layer, then
then to
to edit
edit the
the printing
printing speed
speed andand extrusion
extrusion rate
rate accordingly.
accordingly. It also
also allows
allows users
users to
to optimize
optimize these
these printing
printing parameters
parameters in in aa
Under
batch
batch mode
the
mode if
concept
if such
such desired
ofprinting
"Industry
desired printing speeds 4.0",
speeds and
production
and extrusion
extrusion rates
rates for
processes
for aa different
will ofItbethe
different section
section of
pushed
the printing
to are
printing part
be
part are
increasingly
already
already known.
interconnected,
known. Experiments
Experiments conducted
conducted
information
with
with an
an MMM basedand
MMM printer
printer on bronze-paste
and a real timematerials
bronze-paste basis and,
materials show necessarily,in
show improvements
improvements inmuch
both more time
both printing
printing efficient.
time and In this context, capacity optimization
and quality.
quality.
goes beyond the traditional aim of capacity maximization, contributing also for organization’s profitability and value.
© 2018
© 2018The
Indeed,
© 2018 The Authors.
Authors.
lean
The Published
Published
management
Authors. Published by by Elsevier
by Elsevier
and
Elsevier B.V. B.V. improvement approaches suggest capacity optimization instead of
B.V.
continuous
Thisis
This
This isisan
anopen
an open
open access
access
access article
article
article under
under
under the CC
the CCtheBY-NC-ND
CC BY-NC-ND
BY-NC-ND license license
license (http://creativecommons.org/licenses/by-nc-nd/3.0/)
(https://creativecommons.org/licenses/by-nc-nd/4.0/)
(https://creativecommons.org/licenses/by-nc-nd/4.0/)
maximization.
Peer-review under
Peer-reviewunder underThe study of
responsibility capacity
of the
responsibility the scientific
of optimization and
committeecommittee
the scientific of the
the 28thcosting
Flexible models is and
Automation
of the 28th Flexiblean Intelligent
important research
Manufacturingtopic that deserves
(FAIM2018)
Peer-review responsibility of scientific committee of 28th Flexible Automation andAutomation and Intelligent
Intelligent Manufacturing Manufacturing
(FAIM2018)
contributions
Conference. from
(FAIM2018) Conference.
Conference. both the practical and theoretical perspectives. This paper presents and discusses a mathematical
model for capacity management based on different costing models (ABC and TDABC). A generic model has been
Keywords:
Keywords: Additive manufacturing;
developed and it
Additive was used 3D
manufacturing; to printing,
3D Mini Metal
analyzeMini
printing, Metal Maker;
idle Maker; Visualization;
capacity Visualization; G-code
and to design G-code
strategies towards the maximization of organization’s
value. The trade-off capacity maximization vs operational efficiency is highlighted and it is shown that capacity
optimization
1. Introduction
1. Introduction might hide operational inefficiency.
© 2017 The Authors. Published by Elsevier B.V.
Peer-review
Additive under responsibility
Additive manufacturing,
manufacturing, of the scientific
specifically
specifically metal
metal 3D3Dcommittee
printing, of the
printing, has
has Manufacturing
gained
gained traction in Engineering
traction in recent years Society
recent years thanks International
thanks to
to advances
advances in inConference
both
both printing
printing
2017.
material
material [1],
[1], [2]
[2] and
and development
development of of 3D
3D printing
printing machines [3], [4].
machines [3], [4]. Its
Its applications
applications are
are in
in aa wide
wide range
range from
from education
education [5]
[5] to
to industrial
industrial
[3],
[3], [6] and commercial
[6] and commercial products
products [7]. Existing industrial-grade
[7]. Existing industrial-grade machines
machines capable
capable of
of 3D
3D printing
printing metal
metal objects
objects can
can cost
cost in
in the
the range
range of
of
aa hundred
Keywords:
hundredCost thousand to
Models;
thousand millions
toABC; of
of dollars,
TDABC;
millions Capacity
dollars, and the
the process
Management;
and may
processIdle
may introduce
Capacity;
introduce hazards
Operational relating
relating to
hazards Efficiency to handling
handling materials
materials and
and the
the exhausted
exhausted
system.
system. ItIt is
is desirable
desirable to
to develop
develop aa process
process that
that is
is inexpensive,
inexpensive, safe,
safe, and
and open-source
open-source based
based [5],
[5], [8].
[8]. The
The open-source
open-source software
software not
not only
only
helps
helps to lower the cost of the system but also allows users tweaking or even re-writing the source code according to their need. At
to lower the cost of the system but also allows users tweaking or even re-writing the source code according to their need. At the
the
same time,
time, this
this means
1. Introduction
same means the
the system
system might
might be
be aa challenge
challenge to to use
use especially
especially for
for users
users without
without prior
prior experience
experience with
with 3D
3D printing.
printing. There
There are
are

The cost
2351-9789
2351-9789 © ofThe
© 2018
2018 idleAuthors.
The capacity
Authors. is a by
Published
Published fundamental
by Elsevier B.V. information for companies and their management of extreme importance
Elsevier B.V.
in modern
This
This is an
is openproduction
an open access article
access systems.
article under
under CC In
the CC
the general,
BY-NC-ND
BY-NC-ND it is(https://creativecommons.org/licenses/by-nc-nd/4.0/)
license
license defined as unused capacity or production potential and can be measured
(https://creativecommons.org/licenses/by-nc-nd/4.0/)
Peer-review under
Peer-review under responsibility
responsibility of
of the scientific
scientific committee
committee of
of the
the 28th
28th Flexible
Flexible Automation and
and Intelligent
Intelligent Manufacturing
Manufacturing (FAIM2018)
(FAIM2018) Conference.
Conference.
in several ways: tons of the production, available hours of Automation
manufacturing, etc. The management of the idle capacity
* Paulo Afonso. Tel.: +351 253 510 761; fax: +351 253 604 741
E-mail address: psafonso@dps.uminho.pt

2351-9789
2351-9789 ©©2017
2018The
TheAuthors.
Authors. Published by Elsevier
Published B.V. B.V.
by Elsevier
Peer-review underaccess
This is an open responsibility of the scientific
article under committee oflicense
the CC BY-NC-ND the Manufacturing Engineering Society International Conference 2017.
(http://creativecommons.org/licenses/by-nc-nd/3.0/)
Peer-review under responsibility of the scientific committee of the 28th Flexible Automation and Intelligent Manufacturing
(FAIM2018) Conference.
10.1016/j.promfg.2018.10.007
Trung H. Duong et al. / Procedia Manufacturing 17 (2018) 22–28 23
2 Trung Duong et al./ Procedia Manufacturing 00 (2018) 000–000

some commercially available products, such as MMM printer, electrical ceramic kiln, and BRONZpaste3D™ [9], which can potentially
satisfy these conditions. This kind of system is well suited for experimenters, inventors, and scientists [3, 7, 11, and 12].
This work focuses on improving an existing system for 3D printing of metal objects using a sinterable clay or paste. Metal clay/paste
is a special material that generally consists of microscopic metal particles and a water-soluble organic binder. This paste can be printed
layer-by-layer in the same manner as by the traditional plastic 3D printer. However, a metal 3D printer or a traditional plastic 3D printer
with a modified extruding device is needed to deliver and modulate the paste extrusion process [11]. The organic binder of the extruded
clay object (with dimensions larger than the ones of the final product) can be effectively burned out in a kiln. The kilning process
produces a single contiguous solid metal object of the same shape as the extruded object. The printing software compensates for this
shrinkage (10% to 15% depending on the material [9]) by automatically scaling up the dimensions of the printed object.
There are three general steps involved in creating an object from an idea to the printed object (see Fig. 1.a): (1) 3D Modeling, (2)
Slicing and (3) Printing. To keep the process affordable, the choice of open-source software is preferred in all three steps, such as:

 Tinkercad from Autodesk™ [11] program for 3D modeling,


 Slic3r [12] program for slicing and creating G-code representation of the printed object layer by layer,
 Pronterface [13] program for interfacing with the printer’s firmware and controlling the printer’s motors and actuators according
to each command of the G-code file.

However, the existing software and firmware, which were designed with specific hardware configuration setups, often produce a
poor quality products that result from either under-extrusion or over-extrusion conditions. In practice, to successfully print an object,
different extrusion rates and printing speeds are needed for different sections of the part, such as the outline, the infill, and the lettering.
For commercially available 3D MMM printers, the extrusion rate is controlled manually by a knob, which is ineffective and inaccurate
given the noticeable lag response of the extruder motor. In this paper, we develop a 3D visualization MATLAB™ program to interpret,
visualize and edit the G-code file. Then, the printing speed and extrusion rate can be easily adjusted in the layer-by-layer or element-
by-element manner. If the optimal values of such printing parameters are available, users can replace these values in a batch mode.
Figure 1 illustrates the data flow for the 3D metal printing process, which emphasizes the difference between our approach and the
conventional approach. Our new program is inserted between the second and the third step described above.

(a) (b)

Fig. 1: (a): Data flow for the 3D printing process. (b): The experimental setup.
24 Trung H. Duong et al. / Procedia Manufacturing 17 (2018) 22–28
Trung Duong et al./ Procedia Manufacturing 00 (2018) 000–000 3

The rest of the paper is organized as follows. The hardware and experimental setup are presented in Section 2. Section 3 describes
the algorithm and software. Section 3 presents the experimental results following the conclusion in Section 4.

2. Hardware and Experimental Setup

Our setup consists of the MMM 3D printer, a computer, and an electrical ceramic kiln (see Fig. 1.b). We utilize open-source
programs for all three main steps of the 3D printing process. The 3D modeling software can be any program that can create the digital
3D object and save it into a file of the .stl format. The slicing program creates the G-code representation of the printing object layer by
layer. The printing controller program controls the MMM printer according to each command of the G-code file to print the object out
of metal clay/paste. After printing, the clay objects can be cleaned up, touched up and dried before being buried in carbon grains and
sintered in an electrical ceramic kiln. As shown in Fig. 1.b, an MMM 3D printer is used to print the bonze alloy paste to create the clay
extruded object (at the bottom and left); then a kiln is used to burn out the organic binder from the extruded object and to fuse the
remaining metal particles to form the solid bronze alloy object (at the bottom right).

The configuration files for each program have been fine-tuned to work well with the bronze metal clay, such as compensating the
shrinkage in the kilning process. Also, the firmware (written in C and Arduino) resided inside the control board of the MMM printer
has been upgraded from Marlin’s basic version [14]. This firmware handles low-level communication between the printer control board
and its motors, sensors, and peripherals.

The MMM is a relatively simple and inexpensive build, which utilizes an Arduino™ Mega 2650 as its main control board and a
RAMPS 1.4 3-D printer shield to drive four stepper motors [9]. The extrusion and vertical movement (Z-axis) of the extrusion
mechanism are operated by using stepper motors together with ball-screw linear actuators. The X-axis and Y-axis movements of the
base are controlled by using stepper motors with a belt drive mechanism.

(a)

(b) (c) (d)

Fig. 2: (a) Extrusion speed manual control knob and examples of (b) under-extrusion, (c) over-extrusion, and (d) desired extrusion speed.

In practice, when printing a solid object such as a keychain, different print speeds and extrusion rates are needed for different
elements of the object. For example, a much higher extrusion rate is needed for the shell or exterior outline of each layer than for the
infill. With the current system, controlling the extrusion speed is done by manually adjusting the knob on the side of the printer (see
Fig. 2.a). The extrusion speed largely affects the printing quality and the quality of the final metal object. Fig. 2. b, c, and d present
examples of printing with under-extrusion, over-extrusion, and desired extrusion speed, respectively. Under-extrusion speed might lead
to poor layer adhesion, gaps, and missing parts of the printing object. Over-extrusion speed, on the other hand, might lead to a clog at
the extrusion tip, undefined corners, and bulged appearing objects.
Trung H. Duong et al. / Procedia Manufacturing 17 (2018) 22–28 25
4 Trung Duong et al./ Procedia Manufacturing 00 (2018) 000–000

3. Visualization and Editing Program

In the 3D metal printing process, given the noticeable lag response of the extrusion motor, it is ineffective and inaccurate to manually
control the extrusion rate by a physical knob. This section presents our new 3D visualization MATLAB™ program, which is capable
of analyzing and visualizing an input G-code file and altering the values according to user specifications. Referring back to the data
flow in Fig. 1, our new program is inserted between the second and the third step of the printing process, which serves as a tool for
visualization and editing of the G-code file before sending it to the printer controller program.
The program allows users to easily and visually recognize and select a separate chunk of G-code, such as layer by layer or individual
graphical elements in each layer, then to edit the printing speed and extrusion rate accordingly. Figure 3 illustrates the visualization of
a printing object. This particular printing object has 7 different layers. Each layer contains elements and each element can have multiple
“chunks” presented by a different color (total of 40 elements and 107 chunks).

Fig. 3: Visualization of a printing object. Notice that an element can have multiple chunks.

Figure 4 presents an algorithm to read and analyze the G-code file produced by the slicing program, such as Slic3r. It basically scans
through the G-code file line-by-line. If a line contains a G-code (starting with “G”, such as “G1 X21.909 Y44.295 E0.00550” or “G92
E0”), the program will extract the information from that G-code. In particular, it will look for the value corresponding to X, Y, and Z-
axis position, as well as E- the extrusion rate and F- the base movement speed or the printing speed. Obviously, in order to obtain a
good quality printing object, the values of E and F cannot be independent but rather have some relationship dependent on the printing
material, printing conditions, and the printer’s hardware. However, most of the inexpensive printing systems leave this part of adjusting
printing speed to the users, because it is difficult to handle a vast number of possibilities. Our program allows users to quickly adjust
the printing speed and extrusion rate, or alter these values in a batch mode if the optimal values of such printing parameters are available.
In addition, to store all the extracted values of X, Y, X, E, and F, our program will classify them into a layer, element, and chunk, then
color-code them for visualization purposes. Let a group of each value of {X, Y, Z} represent a point belonging to a printing object in
3D space. A layer is defined as the group of points with the same value of Z. A chunk is defined as the group of points corresponding
to the consecutive lines of G-code that contains “G1” command (linear movement). An element is defined as the group of points
corresponding to consecutive lines of G-code that share the same F-value.
26 Trung H. Duong et al. / Procedia Manufacturing 17 (2018) 22–28
Trung Duong et al./ Procedia Manufacturing 00 (2018) 000–000 5

Fig. 4: Algorithm to read and analyze the G-code file.

The Graphic User Interface (GUI) of our program is shown in Fig. 5. For the sake of discussion, the figure is partitioned into six
sections. Partition 1 of the GUI shows the input G-code file. The buttons from left to right in the partition 2 are to load the G-code file,
save the file after it has been edited back into the G-code format, and to exit the program, respectively as their labels suggest. A standard
I/O pop-up window appears when users click on the “Load gcode” button and it allows the user to browse and pick the desired G-code
file for edits. The content of the file is shown in the textbox in partition 1. Partition 6 shows the 3D visualization of the printing object
in the G-code file. It is color-coded to show each chunk with a different color.

Fig. 5: GUI of the program to visualize and edit G-code for 3D printing.

Users can choose a particular layer, element, or chunk to view and edit it by the drop-down menu in partition 3. The corresponding
zoom-out version of the printing object is shown in the partition 5. The editable text boxes in partition 4 are for users to input the
desired E-value and F-value to alter their previous values in the original G-code file. The output file is in the same format as the G-
code file, which is sent to the Pronterface program to control the MMM 3D printer.
Trung H. Duong et al. / Procedia Manufacturing 17 (2018) 22–28 27
6 Trung Duong et al./ Procedia Manufacturing 00 (2018) 000–000

4. Results

As stated earlier, we employ open-source programs in all three main steps of the 3D printing process. The Tinkercad program is
used for 3D modeling. The Slic3r program is used for slicing and creating a G-code representation of the printing object layer by layer.
This G-code file is then visualized and edited in our new program before it is sent to the Pronterface program for controlling the
printer’s motors and actuators to create the 3D printed object. Our program is developed in MATLAB™ R2016 and tested using an
Intel- i5 dual-core 3.2GHz, 8GB RAM computer running the Windows 7- 64bit operating system.

Fig. 6: The shell and the infill of an element.

The program to visualize and edit G-code is used to alter the extrusion rate (E-value) and the printing speed (F-value) in the batch
mode. For example, with the keychain object shown in Fig. 6, any chunk of G-code corresponding to the shell of an element (such as
the boundaries of the letters) will have its E-value increasing by 75% and its F-value decreasing by 25%. While printing the infill of
any element (such as the inside parts of the letters), the E-value is decreased by 35% and the F-value is increased 200%. These changing
ratios are selected based on experiments to achieve a reasonable printing condition (for example to avoid under-extrusion and over-
extrusion conditions). By speeding up while printing the infills and slowing down while printing the shells, the overall printing time is
reduced about 35% for this keychain object while improving the printing quality, especially at the corners and curves.

(a)

(b)

Fig. 7: (a) Example of the microscopic image of a keychain object’s surface. (b) Some printed metal objects.

Figure 7 presents (a) an example of the microscopic image of a keychain object’s surface and (b) some printed metal objects. The
diameter of bronze alloy particles are observed from 23 m to 52 m.
28 Trung H. Duong et al. / Procedia Manufacturing 17 (2018) 22–28
Trung Duong et al./ Procedia Manufacturing 00 (2018) 000–000 7

5. Conclusions

In this paper, we focused on improving an existing system for 3D printing of metal objects using a sinterable clay or paste. Our main
contribution is developing a new 3D visualization program to read an input G-code file and alter the values according to user
specifications. It serves as a tool for visualization and editing a G-code file before sending it to the printer controller program to print
a metal-clay object. It also allows users to optimize these printing parameters in batch mode if such desired printing speeds and
extrusion rates for a different section of the printing part are already known. After printing, the clay objects can be cleaned up, touched
up, and dried before they are buried in carbon grains and sintered in an electrical ceramic kiln. The kilning process burns out the organic
binder from the metal-clay extruded object, fuses the remaining metal particles, and forms the solid metal object.
Experiments conducted with an MMM 3D printer and bronze-paste materials show improvements in both printing time and quality.
Future works include improving the consistency of the sinterable clay and adding the feedback loop (by measuring the extrusion force)
to regulate the extrusion rate of the printer’s servo motor in order to compensate for the non-homogeneity of the clay.

Acknowledgements

Funding for this work is supported by Communities to Build Active STEM Engagement (CBASE) grant.

References

[1] A. Malekjafarian, E. J. OBrien, and L. A. Micu, “Investigation of Buckling Capacity of Metal Materials Manufactured by Laser 3D Printing,” Procedia
Manuf., vol. 7, pp. 696–700, Jan. 2017.
[2] J.-Y. Lee, J. An, and C. K. Chua, “Fundamentals and applications of 3D printing for novel materials,” Appl. Mater. Today, vol. 7, pp. 120–133, Jun. 2017.
[3] J. Horvath, Mastering 3D Printing. Berkeley, CA: Apress, 2014.
[4] L. E. Murr and W. L. Johnson, “3D metal droplet printing development and advanced materials additive manufacturing,” J. Mater. Res. Technol., vol. 6, no.
1, pp. 77–89, Jan. 2017.
[5] N. Jaksic, N. D’Angelo, and G. Vigano, “Inexpensive Metal 3D Printers in Engineering Education : The Revolution Continues,” ASEE Rocky Mt. Sect.
Conf., no. January, 2016.
[6] A. C. Brown and D. de Beer, “Development of a stereolithography (STL) slicing and G-code generation algorithm for an entry level 3-D printer,” in 2013
Africon, 2013, pp. 1–5.
[7] L. Nickels, “3D printing the world’s first metal bicycle frame,” Met. Powder Rep., vol. 69, no. 2, pp. 38–40, Mar. 2014.
[8] J. Armijo, D. M. Daniel, N. Jaksic, B. Ansaf, J. DePalma, and T. Duong, “3-D printing metal objects project,” in 13th Annual Student Research Symposium -
Colorado State University-Pueblo, 2017.
[9] D. Hartkop, Instructions for Setup and Use, V. 160113. 2016.
[10] T. Duda and L. V. Raghavan, “3D Metal Printing Technology,” IFAC-PapersOnLine, vol. 49, no. 29, pp. 103–110, Jan. 2016.
[11] “Tinkercad | Create 3D digital designs with online CAD.” [Online]. Available: https://www.tinkercad.com/. [Accessed: 20-Sep-2017].
[12] “Slic3r - G-code generator for 3D printers.” [Online]. Available: http://slic3r.org/. [Accessed: 20-Sep-2017].
[13] “Printrun: Pure Python 3d printing host software.” [Online]. Available: http://www.pronterface.com/. [Accessed: 11-Feb-2018].
[14] “Marlin 3D Printer Firmware.” [Online]. Available: http://marlinfw.org/. [Accessed: 12-Feb-2018].

You might also like