1. CNC DRAWBOT
PROJECT REPORT
A thesis submitted in partial fulfillment for the requirements of the
degree of
Bachelor of Technology
In
Electrical Engineering
Under
Maulana Abdul Kalam Azad University of Technology
Prepared and Submitted by:-
Rahul Chandra Saha 26101614010
Arindam Pal 26101614004
Md. Noor Islam 26101615013
Neeraj Prasad 26101615015
Rajkumar Mandal 26101614011
under the supervision of
Mr. Subhadip Saha
Department Incharge, Electrical Engineering
Surendra Institute of Engineering & Management, Siliguri
West Bengal, India
2. Surendra institute of
engineering & management
(Maulana Abdul Kalam Azad University of Technology)
CERTIFICATE
Certified that the dissertation entitled “CNC Drawbot” was done
by Rahul Chandra Saha, Arindam Pal, Md. Noor Islam, Neeraj
Prasad and Rajkumar Mandal as a partial fulfillment of their
BACHELOR OF TECHNOLOGY Degree from the
DEPARTMENT OF ELECTRICAL ENGINEERING, Surendra
Institute of Engineering and Management, SILIGURI, affiliated to
the MAULANA ABDUL KALAM AZAD UNIVERSITY OF
TECHNOLOGY. The above dissertation is hereby accepted.
Project guide Head of Department
External Examiner
3. ACKNOWLEDGEMENT
The completion of any internal- disciplinary project depends upon the co-
operation, co-ordination and combination effort of several sources of
knowledge, energy and time for us. It is difficult task to pretend to know these
lines trying giving full credit where it is due.
We have a great pleasure in submitting the final year project document. The
project’s successful completion would be without mentioning the names of the
people who really helped us in accomplishing this project a successfulone.
We have taken this opportunity to express our sincere gratitude to our project
guide, mentor and HOD Mr. Subhadip Saha for all the guidance and help that he
provided for developing this project.
Moreover we would also like to express our gratitude to other faculty members
of Electrical Engineering department of our college for providing all the
necessary guidance and supervision that we needed and all the constructive
criticism that helped us with the completion of this project. We also extend our
sincere thanks to all our friends who have patiently helped us in accomplishing
this undertaking.
Rahul Chandra Saha
Arindam Pal
Md. Noor Islam
Neeraj Prasad
Rajkumar Mandal
4. CONTENTS
I. Introduction
II. Abstract
III. Literature Survey
IV. Project Aim
1. Project Theory
1.1. Hardware
1.1.1. Arduino Uno
1.1.2. L293d Motor Driver Shield
1.1.3. Stepper Motor
1.1.4. Servo Motor
1.1.5. Gondola
1.1.6. GT2 Timing Belt
1.1.7. Pulley
1.1.8. Sketch Pen
1.1.9. Cooling Fan
1.1.10. Weight
1.2. Block Diagram
2. Software
2.1. Arduino IDE
2.2. Processing
2.3. Program Code
3. Industrial Design
3.1. Applications and Future Scope
4. Conclusion
References
5. INTRODUCTION
From Petroglyphs to Graffiti, men have always had an instinctive need to leave
a sign of their passage. Be it stone engravings, cave paintings, drawings,
etchings or carvings representing animals and people, they transformed natural
grottos into living places, telling us something about the way people
experienced spaceand social life.
The Drawbot is a Vertical Plotter device travelling on a vertical wall. Its
interactive software allows the real time reproduction of any kind of data and
feeds: notes, messages, pictures, graphics. Once the machine has received the
digital information, the plotter immediately turns it into reality.
Information flow helps reconfigure space with an open source approach to
architecture. Just like in the stone age, when people intervened directly on their
built environment, transforming its walls to tell their stories.
6. ABSTRACT
This document is meant for describing all the features and procedures that were
followed while developing the system. This document especially mentions the
details of the project how it was developed, the primary requirement, as well as
various features and functionalities of the project and the procedures followed in
achieving these objectives. “CNC DRAWBOT” project is to design a low cost
machine which will be able to draw a PCB layout (or any image) on a solid
surface. It is a plotter that operates in two axes of motion ("X" and "Y") in order
to draw continuous vector graphics. The term was used to differentiate it from
standard plotters which had control only of the "y" axis, the "x" axis being
continuously fed to provide a plot of some variable with time.
7. LITERATURE SURVEY
The term numerical control is a widely accepted and commonly used term in the
machine tool industry. Numerical control(NC) enables an operator to
communicate with machine tools through a series of numbers and symbols. NC
which quickly became Computer Numerical Control(CNC) has brought
tremendous changes in the metalworking industry. New machine tools in CNC
have enabled industry to consistently produceparts to accuracies undreamed of
only a few years ago. The same part can be reproduced to the same degree of
accuracy any number of times if the CNC program has been properly prepared
and the computer properly programmed. The operating commands which
control the machine tool are executed automatically with amazing speed,
accuracy, efficiency, and repeatability. The ever-increasing use of CNC in
industry has created a need for personnel who are knowledgeable about and
capable of preparing the programs which guide the machine tools to produce
parts to the required shape and accuracy.
Computer Numeric Control (CNC) refers to a wide variety of machines which
are controlled electronically and have many uses, including milling, drawing,
extruding, cutting, and lathing.
CNC machines are really expensive. They are widely used in the fabrication of
both electronic and mechanical parts of large machines. So our group has
decided to do a model to know about theoretical and practical knowledge about
this concept[2D Robotic Plotter].
8. PROJECT AIM
The main goal of the project is to make a plotter that can be easily attached to a
wall-mounted whiteboard of any size. Most vertical plotters rely on the drawing
surface being slightly inclined so that gravity applies the force necessary for the
pen to write. Since that’s not really an option with wall-mounted whiteboards,
weight will be used to hold the pen against the board. The plotter will draw
using G-Codeinstructions, a common choice for this type of device.
9. Chapter 1
Project Theory
The CNC drawbot is a vertical plotter which uses bipolar coordinates to
producevector drawings using a pen suspended from strings connected to two
pulleys at the top of the plotting surface. This gives it two degrees of freedom
and allows it to scale to fairly large drawings simply by moving the motors
further apart and using longer strings. The system has been used by a number of
artists and makers.
The application that drives it from the computer is written in Processing.
It decodes a bitmap and creates a map of the file using a polar coordinates
system, recording pixel position, size and brightness. The hardware requests
each pixel in turn, and renders it on the page using its own shading and
movement algorithms. You can also use it for plain plotter-type drawings,
because it reads drawings in as SVG vector art files.
1.1 Hardware
The different hardware parts included in this project are :-
Arduino Uno
L293D motor driver shield
Stepper motors
Servo motor
Gondola
Gt2 timing belt
Pulley
Pen
Cooling Fan
Weight
1.1.1 Arduino UNO
The Arduino UNO is a widely used open-sourcemicrocontroller board
based on the ATmega328P microcontroller and developed by Arduino.cc. The
board is equipped with sets of digital and analog input/output (I/O) pins that
may be interfaced to various expansion boards (shields) and other circuits. The
board features 14 Digital pins and 6 Analog pins. It is programmable with
the Arduino IDE (Integrated Development Environment) via a type B USB
cable. It can be powered by a USB cable or by an external 9 volt battery, though
it accepts voltages between 7 and 20 volts.
10. 1.1.2 L293D Motor Driver Shield
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.
11. 1.1.3 Stepper Motor
A stepper motor is a type of DC motor which has a full rotation divided
in an equal number of steps. It is a type of actuator highly compatible with
numerical control means, as it is essentially an electromechanical converter of
digital impulses into proportional movement of its shaft, providing precise
speed, position and direction control in an open-loop fashion, without requiring
encoders, end-of-line switches or other types of sensors as conventional electric
motors require. he steps of a stepper motor represent discrete angular
movements, that take place in a successive fashion and are equal in
displacement, when functioning correctly the number of steps performed must
be equal to the control impulses applied to the phases of the motor. The final
position of the rotor is given by the total angular displacement resulting from
the number of steps performed. This position is kept until a new impulse, or
sequence of impulses, is applied.
12. These properties make the stepper motor an excellent execution element
of open-loop controlsystems. A steppermotor does not lose steps, i.e. no
slippage occurs, it remains synchronous to control impulses even from standstill
or when braked, thanks to this characteristic a stepper motor can be started,
stopped orreversed in a sudden fashion without losing steps throughout its
operation.
1.1.4 Servo Motor
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 stop.
13. 1.1.5 Gondola
The gondola is used to hold the pen for drawing. Belts are connected to
the Gondola and the length of the belts are adjusted according to the size of the
board. Servo motor is connected to the Gondola for lift up and down of the pen
while moving.
1.1.6 GT2 Timing Belt
14. A timing belt is usually a toothed belt - a drive belt with teeth on the
inside surface. It is used for the movement of the gondola, connected to the
stepper motor through pulley.
1.1.7 Pulley
A pulley is a wheel on an axle or shaft that is designed to support
movement and change of direction of a taut cable or belt, or transfer of power
between the shaft and cable or belt. In the case of a pulley supported bya frame
or shell that does not transfer power to a shaft, but is used to guide the cable or
exert a force, the supporting shell is called a block, and the pulley may be called
a sheave.
1.1.8 Pen
A pen is a common writing instrument used to apply ink to a surface,
usually paper, for writing or drawing.
1.1.9 Cooling Fan
15. A cooling fan is any fan inside, or attached to, a caseused for active
cooling, and may refer to fans that draw cooler air into the case from the
outside, expel warm air from inside, or move air across a heat sink to coola
particular component.
1.1.10 Weight
Weight is used to hang the gondola down. This weight may be coins or
batteries.
1.2 Block Diagram
Chapter 2
16. Software
Computer software, or simply software, is that part of a computer system that
consists of encoded information or computer instructions, in contrast to the
physical hardware from which the system is built. The software used in this
project comes under open source. Open-sourcesoftware (OSS) is computer
software with its source codemade available with a license in which the
copyright holder provides the rights to study, change, and distribute the
software to anyone and for any purpose. Open-sourcesoftware may be
developed in a collaborative public manner. Open-sourcesoftware is the most
prominent example of open-sourcedevelopment.
Software used in this project include :-
Arduino IDE
Processing
2.1 Arduino IDE
The Arduino integrated development environment (IDE) is a cross-
platform application (for Windows, macOS, Linux) that is written in the
programming language Java. It originated from the IDE for the languages
Processing and Wiring. It includes a codeeditor 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. The source codefor the IDE is released under the
GNU General Public License, version 2.
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 codeonly 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. The Arduino IDE employs the program
avrdude to convert the executable codeinto a text file in hexadecimal encoding
that is loaded into the Arduino board by a loader program in the board's
firmware.
A program written with the Arduino IDE is called a sketch.[58] 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.
A minimal Arduino C/C++ program consist of only two functions:
17. I. 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.
II. 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.
2.2 Processing
Processing is an open-sourcecomputer programming language and
integrated development environment (IDE) built for the electronic arts, new
media art, and visual design communities with the purposeof teaching non-
programmers the fundamentals of computer programming in a visual context.
The Processinglanguage 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
(formerly a subclass of Java's built-in Applet) 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 codeis translated into pure Java before compiling.
This means that the use of static variables and methods in classes is prohibited
unless Processing is explicitly told to codein 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, RGBA,
hex).
2.2.1 Polargraph Controller
The Polargraph Controller is a little app that is used to specify the
size of the machine, the sprockets, and the motor driver types. You can
see a preview of the machine, and lay out your artwork on it, visualising
many aspects of the drawing. There are precompiled binary versions of
the controller for Windows and Linux in the main software bundle.
The bundle is put in the sketchbookofthe processing and run through it.
2.3 Program Code
18. // 1. Specify what kind of controller board you are using
// ======================================================
//UNO or MEGA. Uncomment the line for the kind of board you have.
#ifndef MICROCONTROLLER
#define MICROCONTROLLER MC_UNO
//#define MICROCONTROLLER MC_MEGA
#endif
// 2. Add some libraries if you have a MEGA
// ========================================
// Uncomment the SPI and SD lines below if you have a MEGA, and are going to use
// the SD features. http://forum.arduino.cc/index.php?topic=173584.0
//#include <SPI.h>
//#include <SD.h>
// 3. Specify what kind of motor driver you are using
// ==================================================
// Only ONE set of lines below should be uncommented.
// i. Adafruit Motorshield v1. The original, and still the best.
// -------------------------------------------------------------
#define ADAFRUIT_MOTORSHIELD_V1
#include <AFMotor.h>
// ii. Adafruit Motorshield v2. It's all squealy.
// ----------------------------------------------
//#define ADAFRUIT_MOTORSHIELD_V2
//#include <Wire.h>
//#include <Adafruit_MotorShield.h>
//#include "utility/Adafruit_PWMServoDriver.h"
// iii. Using discrete stepper drivers? (eg EasyDriver, stepstick, Pololu gear)
// ----------------------------------------------------------------------------
// Don't forget to define your pins in 'configuration.ino'.
//#define SERIAL_STEPPER_DRIVERS
// iv. Using a signal amplifier like a UNL2003?
// --------------------------------------------
// Don't forget to define your pins in 'configuration.ino'.
// #define UNL2003_DRIVER
// 4. Turn on some debugging code if you want horror
// =================================================
//#define DEBUG
//#define DEBUG_COMMS
//#define DEBUG_PENLIFT
//#define DEBUG_PIXEL
// 5. Disable program features if you need to free up space
// ========================================================
25. Chapter 3
Industrial Design
The mechanical structure, that is essentially composed bya whiteboard
with chassis frame of 60cm length and 92cm width .
. At the top (that is to say, at the upper angles) two NEMA 17 stepper
motors at 200 steps/revolution are fixed, each one having a toothed pulley
applied to the axis (and tightened by means of a hexagon socketscrew) on
which an opened belt goes by; the latter is composed oftwo segments, and it
hangs on bothsides and is opportunely stretched (so that it may adhere to the
pulleys) by means of counterweights
The belts are two fragments and in the middle of them a print head has
been fixed: it is composed ofa gondola in which the pen is inserted, and fixed
by means of a metal that is provided with a plastic knob so to easily tighten it
with a hand; a servo command with a plastic lever allows to push away and let
the pen get closer to the sheet, respectively when there is need to draw or not.
A piece of the belt starts from one of the ends of the print head, it turns
around the toothed pulley of a stepper motor and hangs on the side, and is kept
tightened by a counterweight that is screwed to it; the other piece starts from the
oppositeside, it turns around the pulley of the other motor and hangs on the
oppositeside, even in this case it is kept pulled by means of a counterweight.
The end of each belt’s portion creates an eyelet within which the screw that
holds the counterweight is entered.
26. In order to ensure that each belt’s portion is being tightened, at the basis
of the print head there is a further counterweight that, along with the head’s
mass, balances the tension of the side masses; this detail is very important
because if there is no central mass, the head would be raised and always brought
up, with the part attached to the belt being aligned to the upper part of the
stepper motors’ pulleys.
The print head’s mass has the function to bring down the pen when the
motors reduce the belt’s tension, that is to say to have it move down and
sideways, depending on which one of the two motors carries out more steps;on
the subject it should be noted that, in order to have the print head move on a
side, the motor of the correspondingside has to rotate towards the internal part
more than it does on the opposite side.
The counterweights have to be chosenso that the print head remains in
the right position, even with unpowered motors, and they must have a weight
such that they allow the belt to adhere to the pulleys’ teeth, so that it will be
them to move or brake the belt itself, and the print head with it.
3.1 Application and Future Scope
The vertical plotter is a kind of printer that is very much appreciated by
professionals, since it does not print but draws by means of pens, and exactly in
the same way a person would do with his hand; it allows to draw diagrams and
sketches of various kind and with the maximum resolution, since it composes
texts and images with a continuous line (and not with a dot matrix, as the
impact, laser and inkjet printers do).
It can be used for graffiti painting, wall drawing, banner drawing, etc.
27. Chapter 4
Conclusion
In this study, it was attempted to develop vertical plotter that accurately
synchronize with the Arduino software system for better responseon the
movement of X and Y axis. Difference IDE and difference languages have been
tried and used to complete this project to meet the objectives. With a lot of new
technologies being developed nowadays, this project serves to provide a good
platform for future development for vertical plotter system and even other
system.