Professional Documents
Culture Documents
2d CNC Pen Plotter Machine FINAL PDF
2d CNC Pen Plotter Machine FINAL PDF
A
Project Report On
2D CNC PEN PLOTTER MACHINE
Prepared by
Vrajesh shah (D20DCS174)
Kushal vadhar (D20DCS184)
Submitted to
DEPSTAR
1|Page
SOFTWARE GROUP PROJECT -I 2D CNC PEN PLOTTER MACHINE
CERTIFICATE
This is to certify that the report entitled “2d CNC PEN PLOTTER
MACHINE ” is a bonafied work carried out by Vrajesh shah (D20DCS174) &
Kushal vadhar( D20DCS184) under the guidance and supervision of Prof.
Aishwariya Budhrani for the subject CE244 Software Group Project-I (CE) of 3rd
Semester of Bachelor of Technology in DEPSTAR at Faculty of Technology &
Engineering – CHARUSAT, Gujarat.
The best of my knowledge and belief, this work embodies the work
of candidate himself, has duly been completed, and fulfills the requirement of the
ordinance relating to the B.Tech. Degree of the University and is up to the standard
in respect of content, presentation and language for being referred to the examiner.
2|Page
SOFTWARE GROUP PROJECT -I 2D CNC PEN PLOTTER MACHINE
ACKNOWLEDGEMENT
The presentation of this report gives us the feeling of fulfilment .
With immense pleasure we would like to present this report on this
Dissertation report of “2D CNC PEN PLOTTER MACHINE”.
The success of any task relies on the efforts made by person but it
cannot be achieved without cooperation of other persons which are being
helpful. So, we would like to thank DEPSTAR for giving us the
opportunity of doing this project.
3|Page
SOFTWARE GROUP PROJECT -I 2D CNC PEN 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 modeling by solid work software 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 215 mm and Y axis is 235 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.
4|Page
SOFTWARE GROUP PROJECT -I 2D CNC PEN PLOTTER MACHINE
Table of Contents
Chapter 1 Introduction……………………………………………………………6-10
Chapter 2 Project Management………………………………………………….11-16
Chapter 3 System requirement study…………………………………….………17-19
Chapter 4 System analysis……………………………………………………….20-26
Chapter 5 system design…………………………………..……………………..27-41
Chapter 6 system implementation and testing…………………………..……….41-42
Chapter 7 future enhancement…………………………..……………………….43-44
Chapter 8 conclusion and references………...…………………………………..45-47
5|Page
SOFTWARE GROUP PROJECT -I 2D CNC PEN PLOTTER MACHINE
CHAPTER 1: INTRODUCTION
6|Page
SOFTWARE GROUP PROJECT -I 2D CNC PEN PLOTTER MACHINE
INTRODUCTION
CNC stands for Computer Numerical Control and typically refers to a machine whose operation is
controlled by a computer . It also is a specialized and versatile form of a Soft Automation and its
applications cover many kinds, although it was initially developed to control the motion and
operation of machine tools. A CNC machine takes codes from a computer and converts the code
using software into electrical signals. The signals from the computer are then used to control
motors. Since the motors can turn very small amounts the machine is able to move in highly
precise movements over and over again .There are many types of CNC machine. The common
CNC machines are two-axis and three-axis CNC machine. The two- axis machine can move on
vertical and horizontal only which are X and Y axis. Three-axis machine can do movement
starting with three primary axis which are X, Y and Z axis. The Z axis is being parallel with the
spindle. By controlling a CNC machine through a PC it is possible for the user to design a product
on-screen , convert it to CNC-readable code and then send that data to CNC machine for it to
produce a physical copy of the item designed.
Mini CNC plotter machine is described as it is based on Arduino controller and CNC shield. CNC
is computer numerical control machine. G codes are preparatory Function. G codes are pre-define
Function Associated with the movement on machine axes. In CNC Plotter Machine only G codes
are used. G codes are giving the Direction to move the pen in X, Y directions .Pen can be changed
by tools of drilling, laser cutting tool, milling it can be worked, if it is made in large size. The aim
of over is to make a mini CNC plotter machine which is capable to draw difficult design in paper
or surface of metal, To cut it with a great accuracy .We have used stepper motors with lead screw
in Cartesian coordinate X,Y directions. Stepper motor is convert digital pulse into lead screw
rotations. Stepper drivers are used to give command to the system. The main aim is to fabricate a
Mini CNC plotter Machine to draw an object with using G codes. We also work on to reduced
cost of the project and increase Reliability and Flexibility. In we have replace pen with mechanical
tools drilling, grinding, machining etc. This will be used for soft material cutting or machining,
laser cutting machine tool is also worked on this setup. We have reduced the cost, in the setup of
mini CNC plotter machine.
Computer Numerical Control takes digitized data, a computer and CAM program is used to
control, automate, and monitor the movements of a machine. The machine can be a milling
machine, lathe, welder, grinder, laser, sheet metal stamping machine, robot, or many other types
of machines. For larger industrial machines, the computer is generally an on-board dedicated
controller. But for more hobbyist types of machines, or with some retrofits, the computer can be
an external PC. The CNC controller works together with a series of motors and drive components
to move and control the machine axes, executing the programmed motions. On the industrial
7|Page
SOFTWARE GROUP PROJECT -I 2D CNC PEN PLOTTER MACHINE
machines there is usually a sophisticated feedback system that constantly monitors and adjusts the
cutter's speed and position.
CAM
CNC code
A special relatively simple computer language that a CNC machine can understand and execute.
These languages were originally developed to program parts directly at the machine keyboard
without the aid of a CAM program. They tell the machine what moves to execute, one by one, as
well as controlling other machine functions such as spindle and feed speeds, coolant. The most
common language is G
8|Page
SOFTWARE GROUP PROJECT -I 2D CNC PEN PLOTTER MACHINE
1.2OBJECTIVE
The objectives of this project are to design the CNC Plotter Machine and to
develop open source software and hardware to control it.
The main objective of this project is to provide plotting operation as an alternative
for traditional manual operations done by manually operated mechanism.
9|Page
SOFTWARE GROUP PROJECT -I 2D CNC PEN PLOTTER MACHINE
1.3 SCOPE
The pen of machine can be replace with laser to make it work like a laser engraving
or cutting machine. The engraving machine can be used on wood. The pen can be
also be replace with a powerful drill machine so that it can be used for both milling
and drilling purpose. The servo motor can be replace with a stepper motor and the
pen with 3D pen to make the 3D printer which can print objects with dimension. And
by extrapolation of the axes, the working area of the machine can be extended
keeping with the algorithm unaltered.
10 | P a g e
SOFTWARE GROUP PROJECT -I 2D CNC PEN PLOTTER MACHINE
11 | P a g e
SOFTWARE GROUP PROJECT -I 2D CNC PEN PLOTTER MACHINE
Step 2: X and Y axis of our CNC machine. Attach it on your surface, in this part you
will need some screws and nuts the X and Y axis. The X axis is attached to two
plastic parts that I took from remaining 'garbage' stuff. I cut it to fit the construction.
This is an easy procedure. Just make sure to put the Y axis straight to CNC base and
the X axis vertically in this (90 degrees)
Step 3: The Z axis That's the most difficult part of our construction. You will need
something to attach it on X 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 Image Notes 1. Servo motor must be able to move up and
down the pen.
Step 4: :Paper base Now you will have to attach a wood (or plastic) surface on Y axis
(5x5cm will be fine).On this you will put the paper piece to print your texts or images
Remember, printing area is a4 size.
Step 5: The Circuit
12 | P a g e
SOFTWARE GROUP PROJECT -I 2D CNC PEN PLOTTER MACHINE
13 | P a g e
SOFTWARE GROUP PROJECT -I 2D CNC PEN PLOTTER MACHINE
Justification
CNC machines deliver a production capacity ideal for creating large quantities of
items which require accurate, consistent, complex cuts. The advantages of this
method of manufacturing has led many companies to completely replace engineer-
operated equipment with the efficient, tireless precision of automated machines.
By solving As it is used worldwide the cost of 3D CNC model is very much. So
taking this initiate to making this project of 2D CNC pen plotting machine in very
less cost . And in future we are planning on making the 3D CNC model in effective
and in less cost.
CNC machines are more expensive and require a greater initial investment than
machines that can be operated manually. However, as this technology becomes the
standard, supply is increasing resulting in costs gradually decreasing.
EFFORT
As we are members of this project we got the idea of the project from a friend by
visiting the company And there we saw a cnc machine. That time we saw a cnc
machine and we thought that we could make it . As we had base knowledge of the
Arduino. We tried our best making the project successful. And we thought of this
project as 3D cnc model cost is very much and by making one in future in low cost
could be effective . So we started with the 2D cnc model . And we had research about
this topic and reference from open source programs
14 | P a g e
SOFTWARE GROUP PROJECT -I 2D CNC PEN PLOTTER MACHINE
Time
Development time : 1.5 months
TIME : Weekend – 8-9 hours
Cost estimation
Arduino uno 400
R3
Stepper motor 200
(70 mm)
L293D 190
(MOTOR
DRIVER IC)
Servo motor 1800
(180
rotation)*2
Jumper wires 100
Drawer 1200
channel *3
Wood Base 400
Steel base 500
PEN 20
Handle for 75
pen
15 | P a g e
SOFTWARE GROUP PROJECT -I 2D CNC PEN PLOTTER MACHINE
16 | P a g e
SOFTWARE GROUP PROJECT -I 2D CNC PEN PLOTTER MACHINE
17 | P a g e
SOFTWARE GROUP PROJECT -I 2D CNC PEN PLOTTER MACHINE
18 | P a g e
SOFTWARE GROUP PROJECT -I 2D CNC PEN PLOTTER MACHINE
HARDWARE REQUIREMENTS
-ARDUINO UNO R3
-SERVO MOTOR
-STEPPER MOTOR
-L293D (MOTOR DRIVER IC)
-12V ADAPTER
SOFTWARE REQUIREMENTS
-ARDUINO IDE
-INKSCAPE
-PROCESSING
-G-CODE
-GRBL CONTROLLER
ASSUMPTIONS
1.Apart from the great advantages, there are major limitations too for Mini CNC
PLOTTER 1. As per the size and capacity of the project, it can't operate in larger
load applications and cutting forces as well. It cannot withstand higher cutting forces
while cutting and the higher weight of cutting tools as well.
2. Because of the circuit used the shapes that can be draft are limited. Arduino Uno
capacity is limited up-to limited shapes considering of Grbl software used as well.
19 | P a g e
SOFTWARE GROUP PROJECT -I 2D CNC PEN PLOTTER MACHINE
3. The maximum height of the cd-drive carriage is limited up to 50-60 mm. Hence
3D projects can be small dimensions only.
20 | P a g e
SOFTWARE GROUP PROJECT -I 2D CNC PEN PLOTTER MACHINE
Software side
ARDUINO IDE-
The Arduino IDE Is a cross-platform application written in java, and is derived from
the IDE for the processing programming language .It is designed to introduce
programming to artists and other newcomers unfamiliar with software development
.It includes a code editor with features such as syntax high lighting ,brace matching,
and automatic identification .and is also capable of compiling and uploading
programs to the board with a single click .There is typically no need to edit make
files or run programs on a command-line interface. The Arduino IDE comes with a
C/C++ library,which makesmany common input/output operation much easier.
Arduino programs are written in C/C++,although users only need define two
functions to make a run able program
Setup()-a function run once at the start of a program that can initialize settings
Loop()-a function called repeatedly until the board powers off
INKSCAPE
21 | P a g e
SOFTWARE GROUP PROJECT -I 2D CNC PEN PLOTTER MACHINE
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.
PROCESSING
Processing is open source programming language software which is used for
electronic drawings. GTCRL processing program is used to send G-code file from
user interface to CNC plotter. The Fig shows the user interface of processing
software after running GTCRL program. The port of Arduino nano is selected by
press in.
g „P‟ button on keyboard hence ―G‟ button is used to upload our desired G
-code file. Immediately CNC machine will start sketching selected G-code file.
Sketching can be stopped by pressing ―X‟ button.
G-CODE :
To draw a text file or design a circuit layout by the CNC plotter firstly the files need
to be converted into G-Code. G-Code is a set of instruction that contains number of
X, Y, Z, coordinates depending on the file. G-Code instructs X axis of the machine to
travel fromX1 to X2 points with a specific speed and same is true for Y axis, but for
Z axis the coordinates are fixed because only vertically up & down movements are
involved. G-code is a type of function used in Numerical Control programming
language that contains the information to position a tool to do actual work. G-code is
separate from M-code and T-code, codes that control the machine and tooling.
Although G-code as after m is often used interchangeably with Numerical Control
(NC), it is actually only one component and works in conjunction with other codes to
perform the appropriate tasks. The standard version of G-code is known as RS-274D,
although other versions do exist for CNC machines with compatibility issues.
Hardware side
Arduino Uno r3
The Arduino Uno 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 pins that may be interfaced to various
expansion boards and other circuits.
22 | P a g e
SOFTWARE GROUP PROJECT -I 2D CNC PEN PLOTTER MACHINE
SERVO MOTOR
A servo motor shown in figure is used for the movement of sketching pen in up and
down. This will help the CNC 2D sketcher to point the pen in A4 sheet and with
drawing it from the sheet to stop drawing. Servo motors are not actually a specific
class of motor but are a combination of specific parts, which happen to include a DC
or AC motor, and are suitable for use in a closed-loop control system. They are used
in robotics, automated manufacturing and computer numerical control (CNC)
machining applications .The servo motor is a closed-loop servomechanism that uses
position feedback in order to control its rotational speed and position. The control
signal is the input, either analog or digital, which represents the final position
command for the shaft. A type of encoder serves as a sensor, providing speed and
position feedback. In most cases, only the position is reported. The final position is
reported to the controller and this is compared to the initial position input, and then if
there is a discrepancy, the motor is moved in order to get to the correct position .The
simplest servo motors use DC motors and position sensing through a potentiometer
and also use big-bang control, which means that the motor moves at maximum speed
until it stops at the designated position or is stopped. This is not widely used in
industrial motion control as it can be quite inaccurate, but these kinds of servo motors
are popular in radio-controlled devices such as model aircraft and toy cars.
Sophisticated servomotors for industrial use have both position and speed sensing as
well as implement proportional-integral-derivative control algorithms, allowing the
motor to be brought to its position quickly and precisely without overshooting, as the
speed of the shaft can also be controlled.
23 | P a g e
SOFTWARE GROUP PROJECT -I 2D CNC PEN PLOTTER MACHINE
STEPPER MOTOR
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. Stepper motors are similar to switched reluctance
motors. The stepper motor uses the theory of operation for magnets to make the
motor shaft turn a precise distance when a pulse of electricity is provided. The stator
has eight poles, and the rotor has six poles. The rotor will require 24 pulses of
electricity to move the 24 steps to make one complete revolution. Another way to say
this is that the rotor will move precisely 15° foreach pulse of electricity that the
motor receives.
24 | P a g e
SOFTWARE GROUP PROJECT -I 2D CNC PEN PLOTTER MACHINE
12V ADAPTER
A 12V adapter as a power supply to run the CNC machine. This adapter enables to
run the microcontroller, servo motor and stepper motor to perform the required
drawing.
25 | P a g e
SOFTWARE GROUP PROJECT -I 2D CNC PEN PLOTTER MACHINE
Process
Uploading the CNC code Here is the main CNC code embedded using code bender
In this part you will see your pen goes up. If don't, change pen Up and pen Down
variables that controlling the servo motor. Press the "Run on Arduino" button and
program your board from your browser!
26 | P a g e
SOFTWARE GROUP PROJECT -I 2D CNC PEN PLOTTER MACHINE
Ready to go! Use the gctrl.pde app to print the g code file on your new
Arduino CNC Plotter!
27 | P a g e
SOFTWARE GROUP PROJECT -I 2D CNC PEN PLOTTER MACHINE
28 | P a g e
SOFTWARE GROUP PROJECT -I 2D CNC PEN PLOTTER MACHINE
5.2 CODE
#include <Servo.h>
#include <AFMotor.h>
// Should be right for DVD steppers, but is not too important here
const int stepsPerRevolution = 48;
// Initialize steppers for X- and Y-axis using this Arduino pins for the L293D H-
bridge
AF_Stepper myStepperY(stepsPerRevolution,1);
AF_Stepper myStepperX(stepsPerRevolution,2);
29 | P a g e
SOFTWARE GROUP PROJECT -I 2D CNC PEN PLOTTER MACHINE
// Needs to interpret
// G1 for moving
// G4 P300 (wait 150ms)
// M300 S30 (pen down)
// M300 S50 (pen up)
// Discard anything with a (
// Discard any other command!
/**********************
* void setup() - Initialisations
***********************/
void setup() {
// Setup
30 | P a g e
SOFTWARE GROUP PROJECT -I 2D CNC PEN PLOTTER MACHINE
Serial.begin( 9600 );
penServo.attach(penServoPin);
penServo.write(penZUp);
delay(100);
// Decrease if necessary
myStepperX.setSpeed(600);
myStepperY.setSpeed(600);
// Notifications!!!
Serial.println("Mini CNC Plotter alive and kicking!");
Serial.print("X range is from ");
Serial.print(Xmin);
Serial.print(" to ");
Serial.print(Xmax);
Serial.println(" mm.");
Serial.print("Y range is from ");
Serial.print(Ymin);
Serial.print(" to ");
Serial.print(Ymax);
Serial.println(" mm.");
}
/**********************
* void loop() - Main loop
***********************/
void loop()
{
delay(100);
char line[ LINE_BUFFER_LENGTH ];
char c;
int lineIndex;
bool lineIsComment, lineSemiColon;
lineIndex = 0;
lineSemiColon = false;
lineIsComment = false;
31 | P a g e
SOFTWARE GROUP PROJECT -I 2D CNC PEN PLOTTER MACHINE
while (1) {
}
else if ( c >= 'a' && c <= 'z' ) { // Upcase lowercase
line[ lineIndex++ ] = c-'a'+'A';
}
else {
line[ lineIndex++ ] = c;
}
}
}
}
}
}
newPos.x = 0.0;
newPos.y = 0.0;
// Needs to interpret
// G1 for moving
// G4 P300 (wait 150ms)
// G1 X60 Y30
// G1 X30 Y50
// M300 S30 (pen down)
// M300 S50 (pen up)
// Discard anything with a (
// Discard any other command!
buffer[1] = '\0';
}
if (Spos == 50) {
penUp();
}
break;
}
case 114: // M114 - Repport position
Serial.print( "Absolute position : X = " );
Serial.print( actuatorPos.x );
Serial.print( " - Y = " );
Serial.println( actuatorPos.y );
break;
default:
Serial.print( "Command not recognized : M");
Serial.println( buffer );
}
}
}
/*********************************
* Draw a line from (x0;y0) to (x1;y1).
* Bresenham algo from https://www.marginallyclever.com/blog/2013/08/how-to-
build-an-2-axis-arduino-cnc-gcode-interpreter/
* int (x1;y1) : Starting coordinates
* int (x2;y2) : Ending coordinates
**********************************/
void drawLine(float x1, float y1) {
if (verbose)
{
Serial.print("fx1, fy1: ");
Serial.print(x1);
Serial.print(",");
Serial.print(y1);
Serial.println("");
}
x1 = Xmax;
}
if (x1 <= Xmin) {
x1 = Xmin;
}
if (y1 >= Ymax) {
y1 = Ymax;
}
if (y1 <= Ymin) {
y1 = Ymin;
}
if (verbose)
{
Serial.print("Xpos, Ypos: ");
Serial.print(Xpos);
Serial.print(",");
Serial.print(Ypos);
Serial.println("");
}
if (verbose)
{
Serial.print("x1, y1: ");
Serial.print(x1);
Serial.print(",");
Serial.print(y1);
Serial.println("");
}
long i;
long over = 0;
36 | P a g e
SOFTWARE GROUP PROJECT -I 2D CNC PEN PLOTTER MACHINE
if (verbose)
{
Serial.print("dx, dy:");
Serial.print(dx);
Serial.print(",");
Serial.print(dy);
Serial.println("");
}
if (verbose)
{
Serial.print("Going to (");
Serial.print(x0);
Serial.print(",");
Serial.print(y0);
Serial.println(")");
}
// Raises pen
void penUp() {
penServo.write(penZUp);
delay(penDelay);
Zpos=Zmax;
digitalWrite(15, LOW);
digitalWrite(16, HIGH);
if (verbose) {
Serial.println("Pen up!");
}
}
// Lowers pen
void penDown() {
penServo.write(penZDown);
delay(penDelay);
Zpos=Zmin;
digitalWrite(15, HIGH);
digitalWrite(16, LOW);
if (verbose) {
Serial.println("Pen down.");
}
}
3-Axis-mini-CNC-machine/gctrl.pde
import java.awt.event.KeyEvent;
import javax.swing.JOptionPane;
import processing.serial.*;
// select and modify the appropriate line for your operating system
// leave as null to use interactive port (press 'p' in the program)
String portname = null;
38 | P a g e
SOFTWARE GROUP PROJECT -I 2D CNC PEN PLOTTER MACHINE
void openSerialPort()
{
if (portname == null) return;
if (port != null) port.stop();
port.bufferUntil('\n');
}
void selectSerialPort()
{
String result = (String) JOptionPane.showInputDialog(this,
"Select the serial port that corresponds to your Arduino board.",
"Select serial port",
JOptionPane.PLAIN_MESSAGE,
null,
Serial.list(),
0);
if (result != null) {
portname = result;
openSerialPort();
}
}
void setup()
{
size(500, 250);
openSerialPort();
}
void draw()
{
background(0);
39 | P a g e
SOFTWARE GROUP PROJECT -I 2D CNC PEN PLOTTER MACHINE
fill(255);
int y = 24, dy = 12;
text("INSTRUCTIONS", 12, y); y += dy;
text("p: select serial port", 12, y); y += dy;
text("1: set speed to 0.001 inches (1 mil) per jog", 12, y); y += dy;
text("2: set speed to 0.010 inches (10 mil) per jog", 12, y); y += dy;
text("3: set speed to 0.100 inches (100 mil) per jog", 12, y); y += dy;
text("arrow keys: jog in x-y plane", 12, y); y += dy;
text("page up & page down: jog in z axis", 12, y); y += dy;
text("$: display grbl settings", 12, y); y+= dy;
text("h: go home", 12, y); y += dy;
text("0: zero machine (set home to the current location)", 12, y); y += dy;
text("g: stream a g-code file", 12, y); y += dy;
text("x: stop streaming g-code (this is NOT immediate)", 12, y); y += dy;
y = height - dy;
text("current jog speed: " + speed + " inches per step", 12, y); y -= dy;
text("current serial port: " + portname, 12, y); y -= dy;
}
void keyPressed()
{
if (key == '1') speed = 0.001;
if (key == '2') speed = 0.01;
if (key == '3') speed = 0.1;
if (!streaming) {
if (keyCode == LEFT) port.write("G91\nG20\nG00 X-" + speed + " Y0.000
Z0.000\n");
if (keyCode == RIGHT) port.write("G91\nG20\nG00 X" + speed + " Y0.000
Z0.000\n");
if (keyCode == UP) port.write("G91\nG20\nG00 X0.000 Y" + speed + "
Z0.000\n");
if (keyCode == DOWN) port.write("G91\nG20\nG00 X0.000 Y-" + speed + "
Z0.000\n");
if (keyCode == KeyEvent.VK_PAGE_UP) port.write("G91\nG20\nG00 X0.000
Y0.000 Z" + speed + "\n");
if (keyCode == KeyEvent.VK_PAGE_DOWN) port.write("G91\nG20\nG00
X0.000 Y0.000 Z-" + speed + "\n");
if (key == 'h') port.write("G90\nG20\nG00 X0.000 Y0.000 Z0.000\n");
if (key == 'v') port.write("$0=75\n$1=74\n$2=75\n");
//if (key == 'v') port.write("$0=100\n$1=74\n$2=75\n");
if (key == 's') port.write("$3=10\n");
if (key == 'e') port.write("$16=1\n");
if (key == 'd') port.write("$16=0\n");
40 | P a g e
SOFTWARE GROUP PROJECT -I 2D CNC PEN PLOTTER MACHINE
void stream()
{
if (!streaming) return;
while (true) {
if (i == gcode.length) {
streaming = false;
return;
}
if (gcode[i].trim().length() == 0) i++;
else break;
}
println(gcode[i]);
port.write(gcode[i] + '\n');
i++;
41 | P a g e
SOFTWARE GROUP PROJECT -I 2D CNC PEN PLOTTER MACHINE
void serialEvent(Serial p)
{
String s = p.readStringUntil('\n');
println(s.trim());
if (s.trim().startsWith("ok")) stream();
if (s.trim().startsWith("error")) stream(); // XXX: really?
}
https://drive.google.com/drive/folders/1tezxEiMLheVel3hP_Vzf_stAA30bifmc
42 | P a g e
SOFTWARE GROUP PROJECT -I 2D CNC PEN PLOTTER MACHINE
43 | P a g e
SOFTWARE GROUP PROJECT -I 2D CNC PEN PLOTTER MACHINE
6.1 RESULT
We have used concept of low cost mini 2d CNC plotter machine, which is user
friendly and easy to operate. By using this we can make difficult and complex design
on paper or any writable material. This is small machine which is easily transportable
and assembled everywhere as per requirement .It will be free to make big size of
design on paper. We have used G codes to giving commands. G-codes are language
to give the command to the machine to move right, left or up and down.
i) Text File
A text file has been designed and sent to the CNC plotter for drawing the text. We
can draw any alphabets small or capital letter .The original file and the plotted files
are shown.
A input
B> output
44 | P a g e
SOFTWARE GROUP PROJECT -I 2D CNC PEN PLOTTER MACHINE
45 | P a g e
SOFTWARE GROUP PROJECT -I 2D CNC PEN PLOTTER MACHINE
FUTURE ENHANCEMENT
The pen of the machine can be replaced by a laser to make it work like a laser
engraving or cutting machine.
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.
A multi station tool can be incorporated in the existing CNC machine.
Automatic clamping mechanism can be installed(Draw bar Mechanism).
Automatic tool changing(ATC) devices using Robotic Arm Technology
By extrapolation of the axes, the working area of the machine can be extended
keeping the algorithm unaltered.
1. Actual industrial CNC milling:
It is planned to scale up the prototype CNC machine in terms of size, use more
powerful motors, strengthen the frame and worktable with materials like aluminum
or cast iron, and augment the CNC control software wilt software for simulation
ahead of actual run. The implementation of 3D printing technology to the same
hardware abstract is going for printing of 3D models.
In the manufacturing of précised PCBs (Printed Circuit Board) ie. etching or printing
the conductive paths which connects
46 | P a g e
SOFTWARE GROUP PROJECT -I 2D CNC PEN PLOTTER MACHINE
CHAPTER 8
CONCLUSION AND REFERENCES
47 | P a g e
SOFTWARE GROUP PROJECT -I 2D CNC PEN PLOTTER MACHINE
CONCLUSION
In this paper we have presented the concept of a low cost three-axis CNC plotter. The
existing CNC machines are of high cost, difficult to maintain and requires highly
skilled operators. Our CNC plotter overcomes these problems. It is of low cost and
easy to control and there is no need of highly skilled operators. It can be used for
long hours at a stretch which is not possible in existing ones. It is hoped to extend
this work for future development. Small drawing machine or CNC was built. It is a
digital electromechanical machine with digital control through a piece of wood and
low cost components. Two main axes (x & y) and a vertical axis (z) were used to
draw image or figure with a specific dimension and speed. This project design was
success prototype design since it can draw any figure or image easily and in a short
time as compared to human drawing time. As per result oriented we can complete
abstract a serial communication based CNC Pen Plotter. 2d Mini CNC Plotter
Machine is an embedded system that works on the Principle on ‘Computer Numeric
control (CNC).CNC is a very popular method of creating parts. These machines offer
extreme precision at a fast rate. CNC machines are very complex and being able to
efficiently operate one takes much time and practice. Although most of the codes are
similar, CNC machines are different from model to model. CNC milling is not easy
at first but mastery of it allows you to create a usable parts in a very short time
frame. In modern CNC systems, end-to-end component design are highly automated
using computer aided design (CAD) and computer-aided manufacturing (CAM)
programs. The programs produce a computer file that is interpreted to extract the
commands needed to operate a particular machine by use of a post processor, and
then loaded into the CNC machines for production. Since any particular component
might require the use of a number of different tools - drills, saws, etc. With the
increasing demand for small scale high precision parts in various industries, the
market for small scale machine tools has grown substantially. Using small machine
tools to fabricate small scale parts can provide both flexibility and efficiency in
manufacturing approaches and reduce capital cost, which is beneficial for small
business owners. In this project, a small scale three axis "2d CNC PEN PLOTTER"
is designed and analyzed under very limited budget.
48 | P a g e
SOFTWARE GROUP PROJECT -I 2D CNC PEN PLOTTER MACHINE
REFERENCES
-https://github.com/beardicus/awesome-plotters
-https://github.com/Tahoor27/3-Axis-mini-CNC-machine
-V.K. Pabolu and K.N.H. Shrinivas, "Design and implementation of a three
dimensional CNC machine", Int. J. Computer Science and Engineering, vol. 2,pp.
2567-2570 2010
-Nae and T. Andrei, "Designing and building a CNC router using stepper
motors", Serial Technical, vo. LXII, pp. 55-62, 2010.
-https://create arduino.cc/projecthub/Yogeshmodi/sketch-it-cnc-ploster-950190
BOOK
Build Your Own CNC Machine (Technology in Action) by Lases Floyd Kelly.
49 | P a g e