CNC Plotter Project by SYED ASHFAQ AHMED

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 53

A

PROJECT REPORT
ON
MINI CNC PLOTTER

A PROJECT REPORT SUBMITTED IN PARTIAL FULLFILLMENT OF


THE REQUIREMENTS FOR THE AWARD OF
DIPLOMA
IN
MECHANICAL ENGINEERING
BY
A. TANUSH MANIKANTA 14259-M-005
GODHA SRIKANTH 14259-M-024
SYED ASHFAQ AHMED 14259-M-037
SYED CHANDPASHA 14259-M-050

UNDER THE ESTEEMED GUIDENCE OF


Mr. M. HARI PRASAD
Asst. Professor

SAMSKRUTI COLLEGE OF ENGINEERING AND TECHNOLOGY


II-SHIFT POLYTECHNIC
(Affiliated to State Board of Technical Education & Training, Hyderabad)
Kondapur (V), Ghatkesar (M), Ranga Reddy (Dist) – 501301
(2014 – 2017)
SAMSKRUTI COLLEGE OF ENGINEERING AND TECHNOLOGY
II-SHIFT POLYTECHNIC
(Affiliated to State Board of Technical Education & Training, Hyderabad)
Kondapur (V), Ghatkesar (M), Ranga Reddy (Dist) - 501301

DEPARTMENT OF
MECHANICAL ENGINEERING

CERTIFICATE
This is to certify that the project report work entitled on“MINI CNC
PLOTTER”is being submitted by
A. TANUSH MANIKANTA 14259-M-005
GODHA SRIKANTH 14259-M-024
SYED ASHFAQ AHMED 14259-M-037
SYED CHANDPASHA 14259-M-050

In partial fulfillment of the requirement for the award of the Diploma in Mechanical
Engineering (D.M.E)by State Board of Technical & Training, Hyderabad during the year
2014-2017 is a record bonafide work carried out by them.
The results embodied in this report have not been submitted to any other university
for the award of any Diploma degree.

INTERNAL EXAMINER EXTERNAL EXAMINER

HEAD OF THE DEPARTMENT


ACKNOWLEDGEMENT
It will be a pleasure for me expressing my deep sense of gratitude and sincere
thanks to my guide Mr. A. SHIVA, Asst. Professor Mechanical Engineering
Department, for his excellent guidance and enthusiastic encouragement in
motivating me to take up this challenging task. Especially the extensive comments
and the many discussions and interactions with him had a direct impact on the final
form and quality of dissertation.
I wish to express my deep sense of gratitude to Mr. M. HARI PRASAD,
Head of the Department of Mechanical Engineering, for his immense support and
motivation.

I am deeply indebted to my principal Mr. K. SHIVA KESHAVA REDDY


for his constant support and valuable guidance was a source of inspiration for me.

I would like to thank the Teaching staff Mr. P. THREENADH, Mr. B.


MANISH KUMAR, Mr. A. SHIVA, Mr. B. SHIVA, Mr. G. SHYAM PRASAD,
&Non teaching staff of Department of Mechanical Engineering for sharing their
knowledge with us.
I would like to thank my family who has been a source of constant
encouragement and inspiration throughout the duration of this project.
Last but not the least; I would extend my thanks to my dear friends who
contributed directly or indirectly in the success of this project.
With sincere regards,

A. TANUSH MANIKANTA 14259-M-005


GODHA SRIKANTH 14259-M-024
SYED ASHFAQ AHMED 14259-M-037
SYED CHANDPASHA 14259-M-050
CONTENT

1. Chapter 1-Introduction
 1.1-What is CNC Plotter?
 1.2-Need of CNC Plotter

2. Chapter 2-Literature Survey


 2.1-History of Plotters
 2.2-Need for innovation

3. Chapter 3-Development of CNC Plotter


 3.1-Main Components
 3.2-Aduino Atmega328
 3.3-Servomotors
 3.4-L293D IC
 3.5-CD Drivers
 3.6-Software Handlers
 3.7-Inkscape
 3.8-Arduino 1.0.5
 4.9-Processing 3

4. Chapter 4-Construction

5. Chapter 5-Working of CNC Plotter


 5.1- X-Y Axis
 5.2- Z Axis
6. Chapter 6-Applications

CHAPTER – 1
INTRODUCTION

The plotter is a computer printer for printing vector graphics. In the past,
plotters were used in applications such as computer-aided design, though they have
generally been replaced with wide-format conventional printers. A plotter gives a
hard copy of the output. It draws pictures on a paper using a pen. Plotters are used
to print designs of ships and machines, plans for buildings and so on.
Digitally controlled plotters evolved from earlier fully analog XY-
writers used as output devices for measurement instruments and analog computers.
Pen plotters print by moving a pen or other instrument across the surface of a piece
of paper. This means that plotters are vector graphics devices, rather than raster
graphics as with other printers. Pen plotters can draw complex line art, including
text, but do so slowly because of the mechanical movement of the pens. They are
often incapable of efficiently creating a solid region of color, but can hatch an area
by drawing a number of close, regular lines.
Plotters offered the fastest way to efficiently produce very large drawings or color
high-resolution vector-based artwork when computer memory was very expensive
and processor power was very limited, and other types of printers had limited
graphic output capabilities.
Pen plotters have essentially become obsolete, and have been replaced by large-
format inkjet printers and LED toner based printers. Such devices may still
understand vector languages originally designed for plotter use, because in many
uses, they offer a more efficient alternative to raster data.
Electrostatic plotters

Electrostatic plotters used a dry toner transfer process similar to that in


many photocopiers. They were faster than pen plotters and were available in large
formats, suitable for reproducing engineering drawings. The quality of image was
often not as good as contemporary pen plotters. Electrostatic plotters were made in
both flat-bed and drum types.

Cutting plotters

Cutting plotters use knives to cut into a piece of material (such as paper, mylar
or vinyl) that is lying on the flat surface area of the plotter. It is achieved because
the cutting plotter is connected to a computer, which is equipped with specialized
cutting design or drawing computer software programs. Those computer software
programs are responsible for sending the necessary cutting dimensions or designs
in order to command the cutting knife to produce the correct project cutting needs.

In recent years the use of cutting plotters (generally called die-cut machines) has
become popular with home enthusiasts of paper crafts such
as cardmaking and scrapbooking. Such tools allow desired card shapes to be cut
out very precisely, and repeated perfectly identically.
CHAPTER – 2
HISTORY

A number of printer control languages were created to operate pen plotters, and
transmit commands like "lift pen from paper", "place pen on paper", or "draw a
line from here to here". Three common ASCII-based plotter control languages
are Hewlett-Packard's HP-GL, its successor HP-GL/2 and Houston
Instruments DMPL. Here is a simple HP-GL script drawing a line :
SP1;
PA500,500;
PD;
PR0,1000;
PU;
SP;

This program instructs the plotter, in order, to take the first pen (SP1 = Select Pen
1), to go to coordinates X=500, Y=500 on the paper sheet (PA = Plot Absolute), to
lower the pen against the paper (PD = Pen Down), to move 1000 units in the Y
direction (thus drawing a vertical line - PR = Plot Relative), to lift the pen (PU =
Pen Up) and finally to put it back in its stall.
Programmers using FORTRAN or BASIC generally did not program these directly,
but used software packages, such as the Calcomp library, or device
independent graphics packages, such as Hewlett-Packard's AGL libraries or
BASIC extensions or high end packages such as DISSPLA. These would establish
scaling factors from world coordinates to device coordinates, and translate to the
low level device commands. For example, to plot X*X in HP 9830 BASIC, the
program would be

10 SCALE -1,1,1,1
20 FOR X =-1 to 1 STEP 0.1
30 PLOT X, X*X
40 NEXT X
50 PEN
60 END

Label plotter

Early pen plotters, e.g., the Calcomp 565 of 1959, worked by placing the paper
over a roller that moved the paper back and forth for X motion, while the pen
moved back and forth on a track for Y motion. The paper was supplied in roll form
and had perforations along both edges that were engaged by sprockets on the
rollers.
Another approach, e.g. Computervision's Interact I, involved attaching ball-point
pens to drafting pantographs and driving the machines with stepper
motors controlled by the computer. This had the disadvantage of being somewhat
slow to move, as well as requiring floor space equal to the size of the paper, but
could double as a digitizer. A later change was the addition of an electrically
controlled clamp to hold the pens, which allowed them to be changed, and thus
create multi-colored output.
Hewlett Packard and Tektronix produced small, desktop-sized flatbed plotters in
the late 1960s and 1970s. The pens were mounted on a traveling bar, whereby the
y-axis was represented by motion up and down the length of the bar and the x-axis
was represented by motion of the bar back and forth across the plotting table. Due
to the mass of the bar, these plotters operated relatively slowly.
In the 1980s, the small and lightweight HP 7470 introduced the "grit wheel"
mechanism, eliminating the need for perforations along the edges, unlike the
Calcomp plotters two decades earlier. The grit wheels at opposite edges of the
sheet press against resilient polyurethane-coated rollers and form tiny indentations
in the sheet. As the sheet is moved back and forth, the grit wheels keep the sheet in
proper registration due to the grit particles falling into the earlier indentations,
much like the teeth of two gears meshing. The pen is mounted on a carriage that
moves back and forth in a line between the grit wheels, representing the orthogonal
axis. These smaller "home-use" plotters became popular for desktop business
graphics and in engineering laboratories, but their low speed meant they were not
useful for general printing purposes, and different conventional printer would be
required for those jobs. One category, introduced by Hewlett
Packard's MultiPlot for the HP 2647, was the "word chart", which used the plotter
to draw large letters on a transparency. This was the forerunner of the modern
Powerpoint chart. With the widespread availability of high-
resolution inkjet and laser printers, inexpensive memory and computers fast
enough to rasterize color images, pen plotters have all but disappeared. However,
the grit wheel mechanism is still found in inkjet-based, large format engineering
plotters.

Plotters were also used in the Create-A-Card kiosks that were available for a while
in the greeting card area of supermarkets that used the HP 7475 six-pen plotter.
Plotters are used primarily in technical drawing and CAD applications, where they
have the advantage of working on very large paper sizes while maintaining high
resolution. Another use has been found by replacing the pen with a cutter, and in
this form plotters can be found in many garment and sign shops.

If a plotter was commanded to use different colors it had to replace the pen and
select the wanted color and/or
A niche application of plotters is in creating tactile images for visually
handicapped people on special thermal cell paper.
Unlike other printer types, pen plotter speed is measured by pen speed and
acceleration rate, instead of by page printing speed. A pen plotter's speed is
primarily limited by the type of pen used, so the choice of pen is a key factor in
pen plotter output speed. Indeed, most modern pen plotters have commands to
control slewing speed, depending on the type of pen currently in use.
There are many types of plotter pen, some of which are no longer mass-
produced. Technical pen tips are often used, many of which can be renewed using
parts and supplies for manual drafting pens. Early HP flatbed and grit wheel
plotters used small, proprietary fiber-tipped or plastic nib disposable pens.
One type of plotter pen uses a cellulose fiber rod inserted through a circular foam
tube saturated with ink, with the end of the rod sharpened into a conical tip. As the
pen moves across the paper surface, capillary wicking draws the ink from the
foam, down the rod, and onto the paper. As the ink supply in the foam is depleted,
the migration of ink to the tip begins to slow down, resulting in faint lines. Slowing
the plotting speed will allow the lines drawn by a worn-out pen to remain dark, but
the fading will continue until the foam is completely depleted. Also, as the fiber tip
pen is used, the tip slowly wears away on the plotting medium, producing a
progressively wider, smudged line.
CHAPTER – 3
DEVELOPMENT OF CNC PLOTTER
3.1 Main Components

 Arduino uno

 Breadboard

 2x L293D ICs Motor driver

 Mini Servo Motor

 2x DVD/CD Drives

 ATmega328p (with Arduino Bootloader)

 28 pin DIP IC Socket

 16MHz Crystal Oscillator

 2x 22pF and 1x 100nF capacitors

 10K resistor

 USB to Serial adapter

 2x L293D ICs
 Mini Servo Motor

 2x DVD/CD Drives

 Prototyping PCB Circuit Board Stripboard

 4x 2pins Screw Terminal Connector (or 2x 4 pins Screw Terminal


Connector)***

3.2 Arduino Nano – Atmel 328


Specifications

The Atmel 8-bit AVR RISC-based microcontroller combines


32 kB ISP flash memory with read-while-write capabilities, 1 kB EEPROM,
2 kB SRAM, 23 general purpose I/O lines, 32 general purpose working registers,
three flexible timer/counters with compare modes, internal and external interrupts,
serial programmable USART, a byte-oriented 2-wire serial interface, SPI serial
port, 6-channel 10-bit A/D converter (8-channels
in TQFP and QFN/MLF packages), programmable watchdog timer with
internal oscillator, and five software selectable power saving modes. The device
operates between 1.8-5.5 volts. The device achieves throughput approaching
1 MIPS per MHz.

Programming
Pinout of ATmega 48A/PA/88A/PA/168A/PA/328/P in 28-PDIP (datasheet)

Reliability qualification shows that the projected data retention failure rate is much
less than 1 PPM over 20 years at 85 °C or 100 years at 25 °C.[4]

Parallel program mode

Programming
Pin Name I/O Function
signal

High means the MCU is ready for a


RDY/BSY PD1 O
new command, otherwise busy.

OE PD2 I Output Enable (Active low)

WR PD3 I Write Pulse (Active low)


Byte Select 1 (“0” = Low byte, “1” =
BS1 PD4 I
High byte)

XA0 PD5 I XTAL Action bit 0

XA1 PD6 I XTAL Action bit 1

Program memory and EEPROM Data


PAGEL PD7 I
Page Load

Byte Select 2 (“0” = Low byte, “1” =


BS2 PC2 I
2nd High byte)

Bi-directional data bus (Output when


DATA PC[1:0]:PB[5:0] I/O
OE is low)

Programming mode is entered when PAGEL (PD7), XA1 (PD6), XA0 (PD5), BS1
(PD4) is set to zero.[2] RESET pin to 0V and VCC to 0V. VCC is set to 4.5 - 5.5V.
Wait 60 μs, and RESET is set to 11.5 - 12.5 V. Wait more than 310 μs. [2] Set
XA1:XA0:BS1:DATA = 100 1000 0000, pulse XTAL1 for at least 150 ns, pulse
WR to zero. This starts the Chip Erase. Wait until RDY/BSY (PD1) goes high.
XA1:XA0:BS1:DATA = 100 0001 0000, XTAL1 pulse, pulse WR to zero. This is
the Flash write command.And so on..

Serial Programming[2]

Symbo
Pins I/O Description
l

MOSI PB3 I Serial data in


MISO PB4 O Serial Data out

SCK PB5 I Serial Clock

Serial data to the MCU is clocked on the rising edge and data from the MCU is
clocked on the falling edge. Power is applied to VCC while RESET and SCK are set
to zero. Wait for at least 20 ms and then the Programming Enable serial instruction
0xAC, 0x53, 0x00, 0x00 is sent to the MOSI pin. The second byte (0x53) will be
echoed back by the MCU.

Series alternatives

A common alternative to the ATmega328 is the "picoPower" ATmega328P. A


comprehensive list of all other member of the megaAVR series can be found on the
Atmel website.

Applications

As of 2013 the ATmega328 is commonly used in many projects and autonomous


systems where a simple, low-powered, low-cost micro-controller is needed.
Perhaps the most common implementation of this chip is on the popular
Arduino development platform, namely the Arduino Uno and Arduino
Nano models.

3.3 Servomotors
A servomotor is a rotary actuator or linear actuator that allows for precise control
of angular or linear position, velocity and acceleration.[1] It consists of a suitable
motor coupled to a sensor for position feedback. It also requires a relatively
sophisticated controller, often a dedicated module designed specifically for use
with servomotors.
Servomotors are not a specific class of motor although the term servomotor is often
used to refer to a motor suitable for use in a closed-loop control system.
Servomotors are used in applications such as robotics, CNC
machinery or automated manufacturing.

Mechanism

A servomotor is a closed-loop servomechanism that uses position feedback to


control its motion and final position. The input to its control is a signal (either
analogue or digital) representing the position commanded for the output shaft.The
motor is paired with some type of encoder to provide position and speed feedback.
In the simplest case, only the position is measured. The measured position of the
output is compared to the command position, the external input to the controller. If
the output position differs from that required, an error signal is generated which
then causes the motor to rotate in either direction, as needed to bring the output
shaft to the appropriate position. As the positions approach, the error signal reduces
to zero and the motor stops.
The very simplest servomotors use position-only sensing via
a potentiometer andbang-bang control of their motor; the motor always rotates at
full speed (or is stopped). This type of servomotor is not widely used in
industrial motion control, but it forms the basis of the simple and
cheap servos used for radio-controlled models.

More sophisticated servomotors use optical rotary encoders to measure the speed
of the output shaft[2] and a variable-speed drive to control the motor speed. [3] Both
of these enhancements, usually in combination with a PID control algorithm, allow
the servomotor to be brought to its commanded position more quickly and more
precisely, with less overshooting.

Servomotors vs. stepper motors

A servomotor consumes power as it rotates to the commanded position but then the
servomotor rests. Stepper motorscontinue to consume power to lock in and hold
the commanded position.
Servomotors are generally used as a high-performance alternative to the stepper
motor. Stepper motors have some inherent ability to control position, as they have
built-in output steps. This often allows them to be used as an open-loop position
control, without any feedback encoder, as their drive signal specifies the number of
steps of movement to rotate, but for this the controller needs to 'know' the position
of the stepper motor on power up. Therefore, on first power up, the controller will
have to activate the stepper motor and turn it to a known position, e.g. until it
activates an end limit switch. This can be observed when switching on an inkjet
printer; the controller will move the ink jet carrier to the extreme left and right to
establish the end positions. A servomotor will immediately turn to whatever angle
the controller instructs it to, regardless of the initial position at power up.
The lack of feedback of a stepper motor limits its performance, as the stepper
motor can only drive a load that is well within its capacity, otherwise missed steps
under load may lead to positioning errors and the system may have to be restarted
or recalibrated. The encoder and controller of a servomotor are an additional cost,
but they optimise the performance of the overall system (for all of speed, power
and accuracy) relative to the capacity of the basic motor. With larger systems,
where a powerful motor represents an increasing proportion of the system cost,
servomotors have the advantage.
There has been increasing popularity in closed loop stepper motors in recent years.
They act like servomotors but have some differences in their software control to
get smooth motion. The top 3 manufacturers of closed loop stepper motor systems
employ magnetic encoders as their feedback device of choice due to low cost and
resistance to vibration. The main benefit of a closed loop stepper motor is the cost
to performance ratio. There is also no need to tune the PID controller on a closed
loop stepper system
Many applications, such as laser cutting machines, may be offered in two ranges,
the low-priced range using stepper motors and the high-performance range using
servomotors.

Encoders

The first servomotors were developed with synchros as their encoders. Much work
was done with these systems in the development of radar and anti-aircraft
artillery during World War II. Simple servomotors may use resistive
potentiometers as their position encoder. These are only used at the very simplest
and cheapest level, and are in close competition with stepper motors. They suffer
from wear and electrical noise in the potentiometer track. Although it would be
possible to electrically differentiate their position signal to obtain a speed
signal,PID controllers that can make use of such a speed signal generally warrant a
more precise encoder.Modern servomotors use rotary encoders,
either absolute or incremental. Absolute encoders can determine their position at
power-on, but are more complicated and expensive. Incremental encoders are
simpler, cheaper and work at faster speeds. Incremental systems, like stepper
motors, often combine their inherent ability to measure intervals of rotation with a
simple zero-position sensor to set their position at start-up.

Instead of servomotors, sometimes a motor with a separate, external linear encoder


is used.These motor + linear encoder systems avoid inaccuracies in the drivetrain
between the motor and linear carriage, but their design is made more complicated
as they are no longer a pre-packaged factory-made system.

Motors

The type of motor is not critical to a servomotor and different types may be used.
At the simplest, brushed permanent magnet DC motors are used, owing to their
simplicity and low cost. Small industrial servomotors are typically electronically
commutated brushless motors.For large industrial servomotors, AC induction
motors are typically used, often withvariable frequency drives to allow control of
their speed. For ultimate performance in a compact package, brushless AC motors
with permanent magnet fields are used, effectively large versions of Brushless DC
electric motorsDrive modules for servomotors are a standard industrial component.
Their design is a branch of power electronics, usually based on a three-phase
MOSFET or IGBT H bridge. These standard modules accept a single direction and
pulse count (rotation distance) as input. They may also include over-temperature
monitoring, over-torque and stall detection features.As the encoder type, gearhead
ratio and overall system dynamics are application specific, it is more difficult to
produce the overall controller as an off-the-shelf module and so these are often
implemented as part of the main controller.

Control

Most modern servomotors are designed and supplied around a dedicated controller
module from the same manufacturer. Controllers may also be developed
around microcontrollers in order to reduce cost for large-volume applications
3.4 L293D IC

The L293D is quadruple high-current


half-H drivers.It is designed to provide
bidirectional drive currents of up to 600-
mA at voltages from 4.5 V to 36 V. Both
devices are designed to drive inductive loads
such as relays, solenoids, dc and
bipolar stepping motors, as well as other high-current/high-voltage loads in
positive-supply applications. All inputs are TTL compatible. Each output is a
complete totem-pole drive circuit, with a Darlington transistor sink and a pseudo-
Darlington source. Drivers are enabled in pairs, with drivers 1 and 2 enabled by
1,2EN and drivers 3 and 4 enabled by 3,4EN. When an enable input is high, the
associated drivers are enabled, and their outputs are active and in phase with their
inputs. When the enable input is low, those drivers are disabled, and their outputs
are off and in the high-impedance state. With the proper data inputs, each pair of
drivers forms a full-H (or bridge) reversible drive suitable for solenoid or motor
applications.
Features

 8-Bit Serial-In, Parallel-Out Shift

 Wide Operating Voltage Range of 2 V to 6 V

 High-Current 3-State Outputs Can Drive Up To 15 LSTTL Loads

 Low Power Consumption, 80-µA Max ICC

 Typical tpd = 13 ns

 Low Input Current of 1

 Shift Register Has Direct Clean

3.5 CD Drivers
The optical drives in the photos are shown right side up; the disc would sit on top
of them. The laser and optical system scans the underside of the disc.
With reference to the top photo, just to the right of image center is the disc motor, a
metal cylinder, with a gray centering hub and black rubber drive ring on top. There
is a disc-shaped round clamp, loosely held inside the cover and free to rotate; it's
not in the photo. After the disc tray stops moving inward, as the motor and its
attached parts rise, a magnet near the top of the rotating assembly contacts and
strongly attracts the clamp to hold and center the disc. This motor is an
"outrunner"-style brushless DC motor which has an external rotor – every visible
part of it spins.
Two parallel guide rods that run between upper left and lower right in the photo
carry the "sled", the moving optical read-write head. As shown, this "sled" is close
to, or at the position where it reads or writes at the edge of the disc. To move the
"sled" during continuous read or write operations, a stepper motor rotates a
leadscrew to move the "sled" throughout its total travel range. The motor, itself, is
the short gray cylinder just to the left of the most-distant shock mount; its shaft is
parallel to the support rods. The leadscrew is the rod with evenly-spaced darker
details; these are the helical grooves that engage a pin on the "sled".
In contrast, the mechanism shown in the second photo, which comes from a
cheaply made DVD player, uses less accurate and less efficient brushed DC
motors to both move the sled and spin the disc. Some older drives use a DC motor
to move the sled, but also have a magnetic rotary encoder to keep track of the
position. Most drives in computers use stepper motors.
The gray metal chassis is shock-mounted at its four corners to reduce sensitivity to
external shocks, and to reduce drive noise from residual imbalance when running
fast. The soft shock mount grommets are just below the brass-colored screws at the
four corners (the left one is obscured).
In the third photo, the components under the cover of the lens mechanism are
visible. The two permanent magnets on either side of the lens holder as well as the
coils that move the lens can be seen. This allows the lens to be moved up, down,
forwards, and backwards to stabilize the focus of the beam.
In the fourth photo, the inside of the optics package can be seen. Note that since
this is a CD-ROM drive, there is only one laser, which is the black component
mounted to the bottom left of the assembly. Just above the laser are the first
focusing lens and prism that direct the beam at the disc. The tall, thin object in the
center is a half-silvered mirror that splits the laser beam in multiple directions. To
the bottom right of the mirror is the main photodiode that senses the beam reflected
off the disc. Above the main photodiode is a second photodiode that is used to
sense and regulate the power of the laser.
The irregular orange material is flexible etched copper foil supported by thin sheet
plastic; these are "flexible printed circuits" that connect everything to the
electronics (which is not shown).

3.6 Software Handlers


The mini CNC Plotter is controlled by a board which comprises of Atmega chip
and L293d chip. Coordinates are uploaded into the machine controller from a
separate program. CNC plotter owners often have three software applications—one
program to translate those images into a 'G-Code' program of instructions for the
machine and other two to extract and dump it into the chips . As with CNC milling
machines, CNC plotters can be controlled directly by manual programming, and
CAD/CAM opens up wider possibilities for contouring, speeding up the
programming process and in some cases creating programs whose
manual programming would be, if not truly impossible, certainly commercially
impractical.
In order to plot an image using CNC Plotter, first of all the image must be
converted into vector graphics and then decrypted into respective G-code and M-
codes. After all of it is done the program must be dumped into the board. For this
programming it requires three softwares, namely

 Inkscape

 Arduino 1.0.5

 Processing 3

3.7 Inkscape
Inkscape began in 2003 as a code fork of the Sodipodi project.[5] Sodipodi,
developed since 1999, was itself based on RaphLevien's Gill (GNOME Illustration
Application)
The Inkscape FAQ interprets the word Inkscape as a compound of ink and scape.
Four former Sodipodi developers (Ted Gould, Bryce Harrington, Nathan Hurst,
and MenTaLguY) led the fork; they identified differences over project objectives,
openness to third-party contributions, and technical disagreements as their reasons
for forking. With Inkscape, they said they would focus development on
implementing the complete SVG standard, whereas Sodipodi development
emphasized developing a general-purpose vector graphics editor, possibly at the
expense of SVG
Object creation

The basic objects in Inkscape are:

 Rectangles & Squares tool: creates rectangles and squares, corners of


squares and rectangles can be rounded.

 3D Boxes tool: creates 3D boxes that have adjustable XYZ perspectives and
configurable values for vanishing points. 3D boxes are in fact groups of paths
and after ungrouping can be further modified.

 Circles/Ellipses/Arcs tool: circles and ellipses can be transformed into arcs


(e.g. open half-circle) and segments (e.g. closed half-circle).

 Stars & Polygons tool: Multi-pointed (3 to 1,024 points) stars with two
(base and tip) radius control handles can be used to
emulate spirographs. Polygons with one control (base) handle can be used to
create items based on the number of sides hexagons, pentagons, etc.

 Spirals tool: creates spirals that have a configurable number of turns


(revolutions), divergence (density/sparseness of outer turns), inner radius (roll
out from center)

 Pencil tool(Paths): which allows freehand drawing of lines.

 Pen (Bézier) tool (Paths): creates a Bézier node-by-node curve and or line
segments in the same path.

 Calligraphy tool (Paths): creates freehand calligraphic or brush-like strokes,


optionally the tool can use pressure and tilt readings from a graphics tablet.

 Text tool: creates texts that can use any of the Operating Systems (OS)
outline and Unicode fonts including right-to-left scripts. Text conversion to
paths, Normal, Bold, Italic, Condensed and Heavy, Alignments (left, right,
center, full), Superscript, Subscript, Vertical and Horizontal text are
implemented. All text objects can be transformed via Line Spacing, Letter
Spacing, Word Spacing, Horizontal Kerning, Vertical Shift and Character
Rotation either manually or via menu settings. Text can be put along a path
(both text and path remain editable), flowed into a shape or spell checked.
Bullet lists, numbered lists, indentations, and underlined text are not available
as of version 0.91.

 Spray tool: creates copies or clones of one or several items, select the
item(s), then to Spray click on the canvas, move the mouse or scroll the mouse
wheel.

 Paint Bucket tool: fills bounded areas of a given object (vector). The Paint
Bucket tool works optically rather than geometrically[clarification needed] and can
assist with image tracing.

 Connector tool: creates object based connected paths, often use


Object manipulation

Screenshot of Inkscape 0.45 on Ubuntu, showing outline view

Every object in the drawing can be subjected to arbitrary affine transformations:


moving, rotating, scaling, skewing and a configurable matrix. Transformation
parameters can be also specified numerically in the Transform dialog.
Transformations can snap to angles, grids, guidelines and nodes of other objects.
Grids, guides and snapping properties are defined on a per-document basis. As an
alternative to snapping, an Align and Distribute dialog is provided, which can
perform common alignment tasks on selected objects: e.g. line them up in a
specified direction, space them equally, scatter them at random and remove
overlaps between objects.
Objects can be arbitrarily grouped together. Groups of objects behave in many
respects like "atomic" objects: for instance, they can be cloned or assigned a paint.
Objects making up a group can be edited without having to ungroup it first, via an
Enter Group command: the group can then be edited like a temporary layer.
The Z-order determines the order in which objects are drawn on the canvas.
Objects with a high Z-order are drawn last and therefore drawn on top of objects
lower in the Z-order. Order of objects can be managed either using layers, or by
manually moving the object up and down in the Z-order. Layers can be locked or
hidden, preventing modifying and accidental selection.
A special tool, Create Tiled Clones, is provided to create symmetrical or grid-like
drawings using various plane symmetries.
Operations on paths

Inkscape has a comprehensive tool set to edit paths, as they are the basic element
of a vector file.

 Edit Path by Node tool: allows for the editing of single or multiple paths and
or their associated node(s). There are four types of path nodes; Cusp (corner),
Smooth, Symmetric and Auto-Smooth. Editing is available for the positioning
of nodes and their associated handles (angle and length) for Linear
and Bézier paths or Spiro curves. A path segment can also be adjusted by
dragging (left click + hold). .

 Path-Conversion; Object to Path: conversions of Objects; Shapes (square,


circle, etc.) or Text into paths.

 Path-Conversion; Stroke to Path: conversions of the Stroke of a shape to a


path.

 Path-Simplify: a given path's node count will reduce while preserving the
shape.

 Path-Operations (boolean operations): use of multiple objects to Union,


Difference, Intersection, Exclusion, Division and Cut Path.
Inkscape includes a feature called Live Path Effects (LPE), which can apply
various modifiers to a path. Envelope Deformation is available via the Path Effects
and provides a perspective effect. There are more than a dozen of these live path
effects. LPE can be stacked onto a single object and have interactive live on canvas
and menu-based editing of the effects.
3.8 Arduino 1.0

A program for Arduino may be written in any programming language for a


compiler that produces binary machine code for the target processor. Atmel
provides a development environment for their microcontrollers, AVR Studio and
the newer Atmel Studio.[37][38][39]
The Arduino project provides the Arduino integrated development
environment (IDE), which is a cross-platform application written in the
programming language Java. It originated from the IDE for the
languages Processing and Wiring. It includes a code editor with features such as
text cutting and pasting, searching and replacing text, automatic indenting, brace
matching, and syntax highlighting, and provides simple one-click mechanisms to
compile and upload programs to an Arduino board. It also contains a message area,
a text console, a toolbar with buttons for common functions and a hierarchy of
operation menus.
A program written with the IDE for Arduino is called a sketch.[40] Sketches are
saved on the development computer as text files with the file extension .ino.
Arduino Software (IDE) pre-1.0 saved sketches with the extension .pde.
The Arduino IDE supports the languages C and C++ using special rules of code
structuring. The Arduino IDE supplies a software library from the Wiring project,
which provides many common input and output procedures. User-written code
only requires two basic functions, for starting the sketch and the main program
loop, that are compiled and linked with a program stub main() into an
executable cyclic executive program with the GNU toolchain, also included with
the IDE distribution.A minimal Arduino C/C++ sketch, as seen by the Arduino IDE
programmer, consist of only two functions:[41]

 setup: This function is called once when a sketch starts after power-up or
reset. It is used to initialize variables, input and output pin modes, and other
libraries needed in the sketch.[42]

 loop: After setup has been called, function loop is executed repeatedly in the
main program. It controls the board until the board is powered off or is reset.[43]
Most Arduino boards contain a light-emitting diode (LED) and a load resistor
connected between pin 13 and ground, which is a convenient feature for many tests
and program functions.[44] A typical program for a beginning Arduino programmer
blinks an LED repeatedly.

#define LED_PIN 13 // Pin number attached to LED.

void setup() {
pinMode(LED_PIN, OUTPUT); // Configure pin 13 to be a digital output.
}

void loop() {
digitalWrite(LED_PIN, HIGH); // Turn on the LED.
delay(1000); // Wait 1 second (1000 milliseconds).
digitalWrite(LED_PIN, LOW); // Turn off the LED.
delay(1000); // Wait 1 second.
}

Applications

 Xoscillo, an open-source oscilloscope[48]

 Arduinome, a MIDI controller device that mimics the Monome

 OBDuino, a trip computer that uses the on-board diagnostics interface found
in most modern cars

 Ardupilot, drone software and hardware

 Gameduino, an Arduino shield to create retro 2D video games[49]

 ArduinoPhone, a do-it-yourself cellphone[50][51]

 Water quality testing platform[52]

 Automatic titration system based on Arduino and stepper motor[53]

 Low cost data glove for virtual reality applications[54]

 Impedance sensor system to detect bovine milk adulteration[55]

 Homemade CNC using Arduino and DC motors with close loop control by
Homofaciens[56]

 DC motor control using Arduino and H-Bridge[57]


3.9 Processing 3.0.1

Processing is an open source computer programming language and integrated


development environment (IDE) built for the electronic arts, new media art,
and visual design communities with the purpose of teaching the fundamentals
of computer programming in a visual context, and to serve as the foundation for
electronic sketchbooks.
The project was initiated in 2001 by Casey Reas and Benjamin Fry, both formerly
of the Aesthetics and Computation Group at the MIT Media Lab. In 2012, they
started the Processing Foundation along with Daniel Shiffman, who joined as a
third project lead.
One of the aims of Processing is to allow non-programmers to start computer
programming aided by visual feedback. The Processing language builds on
the Java language, but uses a simplified syntax and a graphics user interface.
Processing includes a sketchbook, a minimal alternative to an integrated
development environment (IDE) for organizing projects.
Every Processing sketch is actually a subclass of the PApplet Java class which
implements most of the Processing language's features.
When programming in Processing, all additional classes defined will be treated
as inner classes when the code is translated into pure Java before compiling. This
means that the use of static variables and methods in classes is prohibited unless
you explicitly tell Processing that you want to code in pure Java mode.
Processing also allows for users to create their own classes within the PApplet
sketch. This allows for complex data types that can include any number of
arguments and avoids the limitations of solely using standard data types such
as: int (integer), char (character), float (real number), and color (RGB, ARGB,
hex).
CHAPTER – 4
CONSTRUCTION
For X and Y axis we will use stepper motors and rails from two dvd/cd
roms! Printing area will be max 4x4cm.

 Breadboard

 2x L293D ICs Motor driver

 Mini Servo Motor

 2x DVD/CD Drives

 ATmega328p (with Arduino Bootloader)*

 28 pin DIP IC Socket

 16MHz Crystal Oscillator

 2x 22pF and 1x 100nF capacitors

 10K resistor

 USB to Serial adapter

 2x L293D ICs

 Mini Servo Motor


 2x DVD/CD Drives

 Prototyping PCB Circuit Board Stripboard

 4x 2pins Screw Terminal Connector (or 2x 4 pins Screw Terminal


Connector)***

You will need also an Arduino UNO board to program the ATmega328 micro
possessor. USB to Serial adapter will allow the circuit to communicate with the
computer through the USB cable, just like Arduino uno does.

Tools

 Screwdriver

 Soldering iron

 Solder

 Cutting tool (e.g. Dremel) (Optional for cutting plastic parts)

Step 1: Desassembly DVD/CD Drives


First step to start building 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.

Step 2: X and Y Axis


In first image above you will see the Y axis of our CNC machine. Attach it on your
surface, in this part you will need some screws and nuts.

In second image you will see 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 duild Z axis.

Tip! Use your imagination ;)


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 4x4cm.


Step 5: The Circuit

Now that we have our contraction ready, it's time to build the circuit and test
stepper motors (X and Y axis).

Watch the above image with breadboard circuit schematic.

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

On mine cnc, X axis motor connection are: L293 A: Pins 1 and 3 & B: 2 and 4, but
on Y axis motor connection are A: 1 and 2 & B: 3 and 4.

CHAPTER – 5
WORKING OF CNC PLOTTER

Make Gcode Files!


Show All Items

To make gcode files that are compatible with this cnc machine you
have to use the Inkscape.
Inkscape is professional quality vector graphics software which runs on Windows,
Mac OS X and Linux. It is used by design professionals and hobbyists worldwide,
for creating a wide variety of graphics such as illustrations, icons, logos, diagrams,
maps and web graphics. Inkscape uses the W3C open standard SVG (Scalable
Vector Graphics) as its native format, and is free and open-source software..

Setup Inkscape for first use

Open the Inkscape, go to File menu and click "Document Properties". See the 1st
image above and make the changes, make sure to change first to "cm". Now close
this window.

We will use the area within 4 to 8 cm. See the 2nd image above.

How to print texts

Put text, change font to Times New Roman and size to 22. Now click on cursor
icon and center the text like the 3rd image above. Select Path from menu and
"Object to Path".

How to print images

This is more difficult than texts. Images must have a transparent background. Drag
and drop the arduino logo image (download it from files) in Inkscape. Click ok to
the next window. Now you have to re-size the image to fit our printing area, see the
4th image above. Click Path from menu and "Trace Bitmap".

Make changes as the 5th image above. Click ok and close the window. Now, move
the gray scale image, and delete the color one behind it. Move the grey image to
the correct place again and click from Path menu "Object to path". The 6th image
above show how to delete image outline.

Testing X and Y Axis Movement


Uploading the CNC Code
In this part you will see your pen goes up. If don't, change penUp and penDown
variables that controlling the servo motor.

Press the "Run on Arduino" button and program your board from your browser!

The GCTRL Program


Now we are ready to print our image! To do this we will use the gctrl.pde
processing program. This program sends 'gcode' images to the cnc plotter.

Gcode is a file with X,Y and Z coordinates. Header of this file is set to:

M300 S30.00 (Servo down)


G1 X10.00 Y10.00 F2500.00

G1 X20.00 Y10.00 F2500.00

M300 S50.00 (Servo up)

Now press 'p' and select your Arduino serial port.


Press 'g' and select the 'drawing.gcode' file

(If something goes wrong, press 'x' to stop the plotter)

Hence the image we selected and processed is successfully plotted by our mini CNC plotter

CHAPTER – 6
APPLICATIONS

Applications
 CNC plotters are used for drawing point-to-point lines and vector
graphics.

 CNC plotters are efficient and simple in making the impression of


a design on a surfaces like sheet metals, charts, wood boards etc..,

 Plotters are typically used in engineering to draw blueprints using


CAD (computer aided design) and CAM (computer aided
manufacturing). These printers were the first type of printer that
could print color graphics. Plotter technology has advanced, and
the once high-tech pen plotters have fallen into obscurity.

 Another form of plotter is a cutting plotter, which uses knives to


cut material used in graphics for advertising materials like the
magnetic signs used on vehicles.
CONCLUSION

We were able to successfully complete the design of and modification of the


mini CNC Plotter powered by Atmega 329 and L293D IC. The model designed
by us is a small scale working model of the CNC plotter. When scaled to higher
levelit can be used for plotting large designs on papers as well as surface using
a sharp point tool. The technology of CNC machines is not new.

Theconclusion is summerised as follows :

1). The movement of the pen is mainly by servo motor which moves as
programmed by the codes.

2) The X,Y axis movement is achieved by the movement of board and pen
by the drivers.

3) The prototype has a good efficiency and the power consumption is as low
as 10 W [ 5V/2Amp].

4) A single pen can plot as many pages or designs possible, so the process
is full economical.

This is a best innovation not only economically but also energy


efficient. This addresses both the problems of higher cost equipments and
minimalistic size.
REFERENCE
 Arduino based CNC Plotter

http://www.instructables.com/id/Mini-CNC-Plotter-Arduino-Based/

 Mini CNC Plotter using Arduino, L293D motor shield

https://www.youtube.com/watch?v=opZ9RgmOIpc

 L293D structural design connections

http://www.athlosaustin.org/ourpages/auto/2016/1/7/57892400/Mini-
CNC-Plotter-Arduino-Based.pdf

 Servomechanism | Theory and Working Principle of Servo


https://www.electrical4u.com/servo-motor-servo-mechanism-theory-and-
working-principle/

 Overview of Ardunio Microcontroller with Working Principle and


Design
https://www.elprocus.com/arduino-basics-and-design/

 Tips and Tricks Inkscape


http://wiki.inkscape.org/wiki/index.php/Tricks_and_tips

 Disassembling a CD/DVD Reader and Reusing Its Parts - Instructables


http://www.instructables.com/id/Disassembling-a-CDDVD-reader-and-
reusing-its-parts/

 https://create.arduino.cc/projecthub/Yogeshmodi/sketch-it-cnc-plotter-
95019d
 http://triangoo.eu/workshop/cnc-plotter/

You might also like