This document is the main project report for a 2D robotic plotter (CNC model) created by four students at the Government Engineering College Idukki. It describes the hardware and software used to build a 2D robotic plotter controlled by an Arduino microcontroller. The plotter uses stepper motors for the X and Y axes and a servo motor to control the pen. Software like Inkscape, CAMotics, Arduino IDE and Processing were used to design drawings, generate gcode files, and program the Arduino. The report provides details of the various components, software programs, and overall design and functioning of the 2D robotic plotter built as part of fulfilling B.Tech degree requirements.
This is a unique project of machine tools operations. Primarily it's working with Arduino programming. This machine is detected keen measurements in a solid surface, And also maintaining visual performance while its completed the deeds.
In today’s world, the basic requirement of any industry is to produce large quantity and quality products with low production and installation cost having a high surface finish and great dimensional accuracy. So this can be achieved by a machine which is controlled by Computer. They are basically known as CNC machines. This is the prototype of CNC machines.
This is a 6 week Training report on the topic CNC and Autocad + Delcam + FeatureCam.
This training Report is Submitted by me after completion my 6 week training training in "Krishna Automation Industrial Training Center, Gurgaon".
All the information (Some Standard Values) given in this Training Report is Provided by the KITC , from where i got 6 week training
This is a unique project of machine tools operations. Primarily it's working with Arduino programming. This machine is detected keen measurements in a solid surface, And also maintaining visual performance while its completed the deeds.
In today’s world, the basic requirement of any industry is to produce large quantity and quality products with low production and installation cost having a high surface finish and great dimensional accuracy. So this can be achieved by a machine which is controlled by Computer. They are basically known as CNC machines. This is the prototype of CNC machines.
This is a 6 week Training report on the topic CNC and Autocad + Delcam + FeatureCam.
This training Report is Submitted by me after completion my 6 week training training in "Krishna Automation Industrial Training Center, Gurgaon".
All the information (Some Standard Values) given in this Training Report is Provided by the KITC , from where i got 6 week training
Unit 5 -cellular manufacturing & fmsravis205084
Group Technology(GT),Part Families–Parts Classification and coding–Simple Problems in Opitz Part
Coding system–Production flow Analysis–Cellular Manufacturing–Composite part concept–Types of
Flexibility - FMS – FMS Components – FMS Application & Benefits – FMS Planning and Control–
Quantitative analysis in FMS
CIM is the architecture for integrating the engineering, marketing and manufacturing functions through information technologies. In the broad
sense, CIM involves the integration of all the business processes from supplier to end consumer.
The main objective of this project is to design a low cost three axis(X-Y-Z) plotter using stepper motor, micro controller, motor control software.
The invention of the X-Y-Z plotters is to record or plot three-dimensional data on a cartesian coordinate system. This study emphasizes the fabrication of a XYZ plotter by using mechanism from 3D Printer and microcontroller system (Arduino) to control the movement of XYZ axis.
Modelling and analysis on X-Y-Z plotter is carried out through the computer linked with the Arduino software. It is executed through the algorithm and G-Code and C programmin
This is density based traffic light control system using Programmable logic controller(PLC). Then side which have more vehicles(density) will be getting on first. This process will take place according to number of vehicles.
Seminar Presentation on Programmeble Logic Controller , By an Engineering Student For doing Professional Presentation like Business Presentation, Industrial Use
Design and Optimization of Knuckle Joint Using TrussesAbdul Farhan
A knuckle joint is mainly used to connect two rods under tensile load. These joints are used for different types of connections e.g. tie rods, tension links in bridge structure. In this, one of the rods has an eye at the rod end and the other one is forked with eyes at both the legs. Present paper emphasizes on optimization of Knuckle joint design using Truss design, in this study, modelling and analysis of a knuckle joint is performed by using Finite Element Method. The commercial finite element package ANSYS version 18 is used for the solution of the problem. The modelling of both existing solid and modified truss design is done using 3D software Solidworks 2015.The simulation part is carried out using the Analysis software, ANSYS. With the Boundary constrains and the tensile load applied, the knuckle joint is analysed and the values are tabulated. The truss design was successful as the strength of knuckle joint improved in Model 1 by 61.31%, Deformation in Model 3 decreased by 92.18% and also the weight reduction was 3.43% in Model 7.
Unit 5 -cellular manufacturing & fmsravis205084
Group Technology(GT),Part Families–Parts Classification and coding–Simple Problems in Opitz Part
Coding system–Production flow Analysis–Cellular Manufacturing–Composite part concept–Types of
Flexibility - FMS – FMS Components – FMS Application & Benefits – FMS Planning and Control–
Quantitative analysis in FMS
CIM is the architecture for integrating the engineering, marketing and manufacturing functions through information technologies. In the broad
sense, CIM involves the integration of all the business processes from supplier to end consumer.
The main objective of this project is to design a low cost three axis(X-Y-Z) plotter using stepper motor, micro controller, motor control software.
The invention of the X-Y-Z plotters is to record or plot three-dimensional data on a cartesian coordinate system. This study emphasizes the fabrication of a XYZ plotter by using mechanism from 3D Printer and microcontroller system (Arduino) to control the movement of XYZ axis.
Modelling and analysis on X-Y-Z plotter is carried out through the computer linked with the Arduino software. It is executed through the algorithm and G-Code and C programmin
This is density based traffic light control system using Programmable logic controller(PLC). Then side which have more vehicles(density) will be getting on first. This process will take place according to number of vehicles.
Seminar Presentation on Programmeble Logic Controller , By an Engineering Student For doing Professional Presentation like Business Presentation, Industrial Use
Design and Optimization of Knuckle Joint Using TrussesAbdul Farhan
A knuckle joint is mainly used to connect two rods under tensile load. These joints are used for different types of connections e.g. tie rods, tension links in bridge structure. In this, one of the rods has an eye at the rod end and the other one is forked with eyes at both the legs. Present paper emphasizes on optimization of Knuckle joint design using Truss design, in this study, modelling and analysis of a knuckle joint is performed by using Finite Element Method. The commercial finite element package ANSYS version 18 is used for the solution of the problem. The modelling of both existing solid and modified truss design is done using 3D software Solidworks 2015.The simulation part is carried out using the Analysis software, ANSYS. With the Boundary constrains and the tensile load applied, the knuckle joint is analysed and the values are tabulated. The truss design was successful as the strength of knuckle joint improved in Model 1 by 61.31%, Deformation in Model 3 decreased by 92.18% and also the weight reduction was 3.43% in Model 7.
Computer Vision for Skin Cancer Diagnosis and Recognition using RBF and SOMCSCJournals
Human skin is the largest organ in our body which provides protection against heat, light, infections and injury. It also stores water, fat, and vitamin. Cancer is the leading cause of death in economically developed countries and the second leading cause of death in developing countries. Skin cancer is the most commonly diagnosed type of cancer among men and women. Exposure to UV rays, modernize diets, smoking, alcohol and nicotine are the main cause. Cancer is increasingly recognized as a critical public health problem in Ethiopia. There are three type of skin cancer and they are recognized based on their own properties. In view of this, a digital image processing technique is proposed to recognize and predict the different types of skin cancers using digital image processing techniques. Sample skin cancer image were taken from American cancer society research center and DERMOFIT which are popular and widely focuses on skin cancer research. The classification system was supervised corresponding to the predefined classes of the type of skin cancer. Combining Self organizing map (SOM) and radial basis function (RBF) for recognition and diagnosis of skin cancer is by far better than KNN, Naïve Bayes and ANN classifier. It was also showed that the discrimination power of morphology and color features was better than texture features but when morphology, texture and color features were used together the classification accuracy was increased. The best classification accuracy (88%, 96.15% and 95.45% for Basal cell carcinoma, Melanoma and Squamous cell carcinoma respectively) were obtained using combining SOM and RBF. The overall classification accuracy was 93.15%.
RTK has universal CNC milling machine for manufacturing process. We have CNC machining centers with proven mechanical stability and high production efficiency.
Fiction is a form of narrative, one of the four rhetorical modes of discourse. Fiction-writing also has modes for fiction-writing: action, exposition, description, dialogue, summary, and transition (Morrell 2006, p. 127). Author Peter Selgin refers to methods, including action, dialogue, thoughts, summary, scene, and description (Selgin 2007, p. 38). Currently, there is no consensus within the writing community regarding the number and composition of fiction-writing modes and their uses.
Description is the fiction-writing mode for transmitting a mental image of the particulars of a story. Together with dialogue, narration, exposition, and summarization, description is one of the most widely recognized of the fiction-writing modes. As stated in Writing from A to Z, edited by Kirk Polking, description is more than the amassing of details; it is bringing something to life by carefully choosing and arranging words and phrases to produce the desired effect (Polking 1990, p. 106). The most appropriate and effective techniques for presenting description are a matter of ongoing discussion among writers and writing coaches.Fiction is a form of narrative, one of the four rhetorical modes of discourse. Fiction-writing also has modes for fiction-writing: action, exposition, description, dialogue, summary, and transition (Morrell 2006, p. 127). Author Peter Selgin refers to methods, including action, dialogue, thoughts, summary, scene, and description (Selgin 2007, p. 38). Currently, there is no consensus within the writing community regarding the number and composition of fiction-writing modes and their uses.
Description is the fiction-writing mode for transmitting a mental image of the particulars of a story. Together with dialogue, narration, exposition, and summarization, description is one of the most widely recognized of the fiction-writing modes. As stated in Writing from A to Z, edited by Kirk Polking, description is more than the amassing of details; it is bringing something to life by carefully choosing and arranging words and phrases to produce the desired effect (Polking 1990, p. 106). The most appropriate and effective techniques for presenting description are a matter of ongoing discussion among writers and writing coaches.Fiction is a form of narrative, one of the four rhetorical modes of discourse. Fiction-writing also has modes for fiction-writing: action, exposition, description, dialogue, summary, and transition (Morrell 2006, p. 127). Author Peter Selgin refers to methods, including action, dialogue, thoughts, summary, scene, and description (Selgin 2007, p. 38). Currently, there is no consensus within the writing community regarding the number and composition of fiction-writing modes and their uses.
Description is the fiction-writing mode for transmitting a mental image of the particulars of a story. Together with dialogue, narration, exposition, and summarization, description is one of the most widely recognized of the fiction-w
Since the last fifteen years, Kuwer has been a leading name in the complex field of Holographic Films/ Holographic Paper, Window metallised/ De-metallised films, coatedlacquered films and allied products. At Kuwer we are constantly striving to achieve higher goals and have been adding new machinery and developing new products/ applications with the aim of meeting the ever-changing needs of the discerning customer. With a team of dedicated qualified professionals and Total Quality Management, we are able to deliver the right product to ensure total customer satisfaction.
Mobile networking technologies are the most ubiquitously spread among mankind and with
the technological advances of mobile clients are becoming a prime target for innovative
3D graphics applications.
Our research, presented in this thesis, focuses on new methods of reducing polygonal
models and other commonly used graphical structures in order to bring 3D computer
graphics to devices with limited processor speeds and memory, such as mobile phones.
These environments bring new challenges in algorithm efficiency and data reduction. We
concentrated our effort in three areas: 1. Facial animation on mobile phones, 2. Cooperative
computer graphics in distributed environments and 3. Procedurally generated cities and
buildings.
The aim of the thesis is to be a multidisciplinary publication that combines research
results from fields of computer graphics and mobile networking. We focused on novel
ways to utilize the properties of distributed mobile environments to perform graphical tasks
and overcome various problems in distributed graphical applications caused by occasional
unreliable mobile device network connections.
Explore the innovative world of trenchless pipe repair with our comprehensive guide, "The Benefits and Techniques of Trenchless Pipe Repair." This document delves into the modern methods of repairing underground pipes without the need for extensive excavation, highlighting the numerous advantages and the latest techniques used in the industry.
Learn about the cost savings, reduced environmental impact, and minimal disruption associated with trenchless technology. Discover detailed explanations of popular techniques such as pipe bursting, cured-in-place pipe (CIPP) lining, and directional drilling. Understand how these methods can be applied to various types of infrastructure, from residential plumbing to large-scale municipal systems.
Ideal for homeowners, contractors, engineers, and anyone interested in modern plumbing solutions, this guide provides valuable insights into why trenchless pipe repair is becoming the preferred choice for pipe rehabilitation. Stay informed about the latest advancements and best practices in the field.
Event Management System Vb Net Project Report.pdfKamal Acharya
In present era, the scopes of information technology growing with a very fast .We do not see any are untouched from this industry. The scope of information technology has become wider includes: Business and industry. Household Business, Communication, Education, Entertainment, Science, Medicine, Engineering, Distance Learning, Weather Forecasting. Carrier Searching and so on.
My project named “Event Management System” is software that store and maintained all events coordinated in college. It also helpful to print related reports. My project will help to record the events coordinated by faculties with their Name, Event subject, date & details in an efficient & effective ways.
In my system we have to make a system by which a user can record all events coordinated by a particular faculty. In our proposed system some more featured are added which differs it from the existing system such as security.
Forklift Classes Overview by Intella PartsIntella Parts
Discover the different forklift classes and their specific applications. Learn how to choose the right forklift for your needs to ensure safety, efficiency, and compliance in your operations.
For more technical information, visit our website https://intellaparts.com
Vaccine management system project report documentation..pdfKamal Acharya
The Division of Vaccine and Immunization is facing increasing difficulty monitoring vaccines and other commodities distribution once they have been distributed from the national stores. With the introduction of new vaccines, more challenges have been anticipated with this additions posing serious threat to the already over strained vaccine supply chain system in Kenya.
About
Indigenized remote control interface card suitable for MAFI system CCR equipment. Compatible for IDM8000 CCR. Backplane mounted serial and TCP/Ethernet communication module for CCR remote access. IDM 8000 CCR remote control on serial and TCP protocol.
• Remote control: Parallel or serial interface.
• Compatible with MAFI CCR system.
• Compatible with IDM8000 CCR.
• Compatible with Backplane mount serial communication.
• Compatible with commercial and Defence aviation CCR system.
• Remote control system for accessing CCR and allied system over serial or TCP.
• Indigenized local Support/presence in India.
• Easy in configuration using DIP switches.
Technical Specifications
Indigenized remote control interface card suitable for MAFI system CCR equipment. Compatible for IDM8000 CCR. Backplane mounted serial and TCP/Ethernet communication module for CCR remote access. IDM 8000 CCR remote control on serial and TCP protocol.
Key Features
Indigenized remote control interface card suitable for MAFI system CCR equipment. Compatible for IDM8000 CCR. Backplane mounted serial and TCP/Ethernet communication module for CCR remote access. IDM 8000 CCR remote control on serial and TCP protocol.
• Remote control: Parallel or serial interface
• Compatible with MAFI CCR system
• Copatiable with IDM8000 CCR
• Compatible with Backplane mount serial communication.
• Compatible with commercial and Defence aviation CCR system.
• Remote control system for accessing CCR and allied system over serial or TCP.
• Indigenized local Support/presence in India.
Application
• Remote control: Parallel or serial interface.
• Compatible with MAFI CCR system.
• Compatible with IDM8000 CCR.
• Compatible with Backplane mount serial communication.
• Compatible with commercial and Defence aviation CCR system.
• Remote control system for accessing CCR and allied system over serial or TCP.
• Indigenized local Support/presence in India.
• Easy in configuration using DIP switches.
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdffxintegritypublishin
Advancements in technology unveil a myriad of electrical and electronic breakthroughs geared towards efficiently harnessing limited resources to meet human energy demands. The optimization of hybrid solar PV panels and pumped hydro energy supply systems plays a pivotal role in utilizing natural resources effectively. This initiative not only benefits humanity but also fosters environmental sustainability. The study investigated the design optimization of these hybrid systems, focusing on understanding solar radiation patterns, identifying geographical influences on solar radiation, formulating a mathematical model for system optimization, and determining the optimal configuration of PV panels and pumped hydro storage. Through a comparative analysis approach and eight weeks of data collection, the study addressed key research questions related to solar radiation patterns and optimal system design. The findings highlighted regions with heightened solar radiation levels, showcasing substantial potential for power generation and emphasizing the system's efficiency. Optimizing system design significantly boosted power generation, promoted renewable energy utilization, and enhanced energy storage capacity. The study underscored the benefits of optimizing hybrid solar PV panels and pumped hydro energy supply systems for sustainable energy usage. Optimizing the design of solar PV panels and pumped hydro energy supply systems as examined across diverse climatic conditions in a developing country, not only enhances power generation but also improves the integration of renewable energy sources and boosts energy storage capacities, particularly beneficial for less economically prosperous regions. Additionally, the study provides valuable insights for advancing energy research in economically viable areas. Recommendations included conducting site-specific assessments, utilizing advanced modeling tools, implementing regular maintenance protocols, and enhancing communication among system components.
Courier management system project report.pdfKamal Acharya
It is now-a-days very important for the people to send or receive articles like imported furniture, electronic items, gifts, business goods and the like. People depend vastly on different transport systems which mostly use the manual way of receiving and delivering the articles. There is no way to track the articles till they are received and there is no way to let the customer know what happened in transit, once he booked some articles. In such a situation, we need a system which completely computerizes the cargo activities including time to time tracking of the articles sent. This need is fulfilled by Courier Management System software which is online software for the cargo management people that enables them to receive the goods from a source and send them to a required destination and track their status from time to time.
Cosmetic shop management system project report.pdfKamal Acharya
Buying new cosmetic products is difficult. It can even be scary for those who have sensitive skin and are prone to skin trouble. The information needed to alleviate this problem is on the back of each product, but it's thought to interpret those ingredient lists unless you have a background in chemistry.
Instead of buying and hoping for the best, we can use data science to help us predict which products may be good fits for us. It includes various function programs to do the above mentioned tasks.
Data file handling has been effectively used in the program.
The automated cosmetic shop management system should deal with the automation of general workflow and administration process of the shop. The main processes of the system focus on customer's request where the system is able to search the most appropriate products and deliver it to the customers. It should help the employees to quickly identify the list of cosmetic product that have reached the minimum quantity and also keep a track of expired date for each cosmetic product. It should help the employees to find the rack number in which the product is placed.It is also Faster and more efficient way.
Water scarcity is the lack of fresh water resources to meet the standard water demand. There are two type of water scarcity. One is physical. The other is economic water scarcity.
1. GOVERNMENT ENGINEERING COLLEGE IDUKKI
PAINAVU 685 603
2D ROBOTIC PLOTTER
(CNC MODEL)
MAIN PROJECT REPORT
Submitted By
ALEENA BOBAN (12004725)
ANANDKRISHNAN V S (12004728)
SABANA UNNIKRISHNAN (12004768)
SHIBIL P B (12004772)
In partial fulfilment
of
BACHELOR OF TECHNOLOGY
ELECTRONICS AND COMMUNICATION
ENGINEERING
MAHATMA GANDHI UNIVERSITY
MAY 2016
2. GOVERNMENT ENGINEERING COLLEGE
IDUKKI
PAINAVU 685 603
DEPARTMENT OF
ELECTRONICS AND COMMUNICATION
ENGINEERING
BONAFIDE CERTIFICATE
This is to certify that the project report entitled 2D ROBOTIC PLOTTER (CNC MODEL)
is a bonafide record of the paper presented by ALEENA BOBAN (Reg.no:12004725),
ANANDKRISHNAN V S (Reg. no:12004728),SABANA UNNIKRISHNAN (Reg
.no:12004768), SHIBIL P B (Reg.no:12004772) during their final semester in partial
fulfillment of the requirement for the award of B-Tech Degree in Electronics & Communi-
cation Engineering of Mahatma Gandhi University, Kottayam, Kerala.
PROJECT GUIDE PROJECT COORDINATOR
Linu Shine Dr.S Santhosh Kumar
Asst.Prof ECE Asso.Prof ECE
HEAD OF THE DEPARTMENT
3. DECLARATION
I hereby declare that the project titled 2D ROBOTIC PLOTTER (CNC MODEL) being
submitted in partial fulfillment for the award of B.Tech degree is the original work carried out
by me. It has not formed the part of any other thesis submitted for award of any degree or
diploma, either in this or any other University.
(Signature of the Candidate)
NAME:
Register No:
3
4. ACKNOWLEDGEMNT
We give all honor and praise to the LORD who gave us wisdom and enabled us to complete
this project successfully.
We express our heartfelt thanks to Dr. Asok Kumar N, Government Engineering College,
Idukki for granting us permission to do the project.
We express our sincere thanks to our head of the department Prof.Jalaja M J and project guide
Ms Linu Shine and project coordinator Dr.S Santhosh Kumar for their valuable advice and
guidance.
We also express our gratitude and thanks to all our teachers and other faculty members of the
department of Electronics and Communication, Government Engineering College, Idukki for
their sincere and friendly cooperation in completing this project.
We are extremely grateful to our parents for their silent prayer.
4
5. ABSTRACT
2D Robotic Plotter is an embedded system that works based on the principle Computer
Numerical Control.Robotic 2D Plotter basically works with two stepper motors and a
servo motor, wherein the robot plots the input given from the computer on the drawing
board using ATMEGA 328p microcontroller on a open-source physical computing platform
Arduino. The Robotic 2D plotter has a two axis control and a special mechanism to raise and
lower the pen. Each axis is powered and driven by using an Arduino compactable driver
L293D. Pen control is achieved using a servo.The X and Y axis mainly consists of step-
per motors taken from CD-drives.The software used for programming the Arduino board are
namely Inkscape(0.48.5),Processing (3.0.2),CAMOTICS,Arduino IDE.The correct and efficient
arrangement and proper use of the programs along with the circuit makes up an efficient 2D
Robotic Plotter (CNC).
5
9. Chapter 1
Introduction
1.1 Introduction
CNC stands for Computer Numeric Control and typically refers to a machine whose operation
is controlled by a computer. The most common usage of CNC, and the one relevant to us, is
the name given to devices that, under computer control are able to cut, etch, mill, engrave,
build, turn and otherwise perform manufacturing operations on various materials. Typically,
a CNC machine has the ability to move a cutting or 3D printing head in 2 to 6 axes, meaning
that it can position that tool head at a precise point in or on the material to create the cut
or operation desired at that point. By moving the head through multiple points, the cutting
head can cut or sculpt the design represented by a data stream of positioning points being sent
by the PC. 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 the CNC
machine for it to produce a physical copy of the item designed.
1.2 Computer Numerical Control (CNC)
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
to the metalworking industry. New machine tools in CNC have enabled industry to consis-
tently produce parts 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
9
10. Figure 1.1: Intersecting lines form right an-
gles and establish the zero point (Allen-
Bradley)
Figure 1.2: The three-dimensional coordi-
nate planes (axes) used in CNC. (The Su-
perior Electric Company)
amazing speed, accuracy, efficiency, and repeatability. The ever-increasing use of CNC in in-
dustry 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 accu-
racy.
Cartesian Coordinate System
Almost everything that can be produced on a conventional machine tool can be produced
on a computer numerical control machine tool, with its many advantages. The machine tool
movements used in producing a product are of two basic types: pointto- point (straight-line
movements) and continuous path (contouring movements).
The Cartesian, or rectangular, coordinate system was devised by the French mathematician
and philosopher Rene’ Descartes. With this system, any specific point can be described in
mathematical terms from any other point along three perpendicular axes. This concept fits
machine tools perfectly since their construction is generally based on three axes of motion (X,
Y, Z) plus an axis of rotation. On a plain vertical milling machine, the X axis is the horizontal
movement (right or left) of the table, the Y axis is the table cross movement (toward or away
from the column), and the Z axis is the vertical movement of the knee or the spindle. CNC
systems rely heavily on the use of rectangular coordinates because the programmer can locate
every point on a job precisely.
The three-dimensional coordinate planes are shown in Fig. 1.2. The X and Y planes (axes)
are horizontal and represent horizontal machine table motions. The Z plane or axis represents
10
11. the vertical tool motion. The plus (+) and minus (-) signs indicate the direction from the zero
point (origin) along the axis of movement. The four quadrants formed when the XY axes cross
are numbered in a counterclockwise direction (Fig. 1.3). All positions located in quadrant 1
would be positive (X+) and positive (Y+). In the second quadrant, all positions would be
negative X (X-) and positive (Y+). In the third quadrant, all locations would be negative X
(X-) and negative (Y-). In the fourth quadrant, all locations would be positive X (X+) and
negative Y (Y-). In Fig. 1.3 , point A would be 2 units to the right of the Y axis and 2 units
Figure 1.3: The quadrants formed when the X and Y axes cross are used to accurately located
above the X axis. Assume that each unit equals 1.000. The location of point A would be X +
2.000 and Y + 2.000. For point B, the location would be X + 1.000 and Y - 2.000. In CNC
programming it is not necessary to indicate plus (+) values since these are assumed. However,
the minus (-) values must be indicated. For example, the locations of both A and B would be
indicated as follows:
A X2.000 Y2.000
B X1.000 Y-2.000
11
12. 1.3 2D Robotic Plotter
Robotics is the branch of technology that deals with the design, construction, operation, and
application of robots, as well as computer systems for their control, sensory feedback, and
information processing. The design of a given robotic system will often incorporate principles
of mechanical engineering, electronic engineering and computer science (particularly artificial
intelligence).The term ’robotics’ was coined by Isaac Asimov in his science fiction short story
called ’Liar’. Robot is an electro-mechanical machine which is guided by a electronic circuitry
or computer program to perform various tasks. A robotic arm is a robotic manipulator, usually
programmable, with functions similar to that of human arm. Robotic 2D Plotter is a plotter
that offers the fastest way to efficiently produce very large drawings. Pen plotters will be able
to print by moving a pen or other writing device across the surface of a piece of paper. This
means that plotters are vector graphics devices, rather than raster graphics. Pen plotters can
draw complex line art, including text, but do so slowly because of the mechanical movement
of the writing device such as pen.
1.4 Aim of the Thesis
Aim of the thesis is to set up a 2D Robotic Plotter for the following constraints:
• A general idea of CNC Models.
• Generating GCODE. Integrating the diffrent softwares along with the hardware setup.
1.5 Literature Review
1. Jae Wook Jeon and Young Youl Ha, A Generalized Approach for the Acceleration and
Deceleration of Industrial Robots and CNC Machine Tools, IEEE Transactions on Indus-
trial Electronics, Vol. 47, No. 1, February 2000, pp. 133-139
Many techniques for the acceleration and deceleration of industrial robots and computer
numerical control (CNC) machine tools have been proposed in order to make industrial
robots and CNC machine tools perform given tasks efficiently. Although the techniques
selecting polynomial functions can generate various acceleration and deceleration charac-
teristics, the major problem is the computational load. The digital convolution techniques
are more efficient than the techniques selecting polynomial functions. However, neither
velocity profiles of which the deceleration characteristics is independent from the accel-
eration characteristics nor those of which the acceleration interval is different from the
deceleration interval can be generated by the digital convolution techniques. This paper
proposes a generalized approach for generating velocity profiles that cannot be gener-
ated by the digital convolution techniques. According to the desired characteristics of
12
13. acceleration and deceleration, each set of coefficients is calculated and is stored. Given
a moving distance, and acceleration and deceleration intervals, a velocity profile having
the desired characteristics of acceleration and deceleration can be efficiently generated
by using these coefficients. Several velocity profiles generated by the proposed technique
will be applied to one single-axis control system.
2. Allen G. Morinec, Power Quality Considerations for CNC Machines: Grounding, IEEE
Transactions on Industrial Electronics, Vol. 38, No. 1, January/February 2002, pp. 3-11.
Computer numerical control (CNC) machines are used to shape metal parts by milling,
boring, cutting, drilling, and grinding. A CNC machine generally consists of a computer-
controlled servo-amplifier, servo-motors, spindle motor, and various tooling. The machine
can be programmed to shape a part by use of a front control panel. More sophisticated
models allow a computer-aided design drawing to be uploaded to the machine. The
electronic components within a CNC machine are particularly sensitive to the ground-
ing techniques used in the electrical supply to the machine. Malfunction, degradation,
and damage to the electronics can often be traced to supplemental ground rods and
lightning strikes to earth. Production downtime, product loss, and expensive repair bills
result.With the wide-spread use of CNC machines across the world, these problems have
become a significant financial concern to many CNC machine users and their electric
utility companies. This paper begins with a brief explanation of the fundamentals of
service and equipment grounding. The basic design of CNC machines is also explained.
Based on a survey of several CNC machine representatives, the paper will explore the
common grounding techniques recommended by many CNC machine tool builders with
particular emphasis on the ground-rod problem. In addition, several actual case studies
that support the ground-rod problem will be described. Finally, a recommended power-
ing and grounding practice is presented to help eliminate power quality related operating
problems with CNC machines while maintaining the safety requirements of electrical
codes.
3. .Venkatram Ramachandran, Evaluation of Performance Criteria of CNC Machine Tool
Drive System, IEEE Transactions on Industrial Electronics, Vol. 45, No. 3, June 1998,
pp. 462-468.
The stability, steady-state error analysis, damping factor, and setting time of discrete
data drives for computer numerical control (CNC) machine tools are analyzed to obtain
the necessary information for the design of a practical system. The stability of the drive
is reviewed using Jury’s test and the Mitrovic criterion. The variation of damping factor
and settling time with respect to system parameters are presented based on the Mitrovic
criterion.
13
14. 1.6 Motivation
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].
1.7 Organisation of the Project
The report is organised as follows:
Abstract
Table of Contents
List of Figures
Chapter 1 : Introduction
Chapter 2 : Project Description
Chapter 3 : Software Description
Chapter 4 : Hardware Description
Chapter 5 : Mechanical Setup
Chapter 6 : Conclusion
References
Appendix
1.8 Conclusion
In this chapter,brief introduction of the project,literature review, motivation and organization
of the project has been prensented.
14
15. Chapter 2
Project Description
2.1 Introduction
The three main sections of Robotic 2D Plotter:
• Hardware
• Software
• Industrial Design
2.2 Hardware
Electronic hardware consists of interconnected electronic components which perform analog
or logic operations on received and locally stored information to produce as output or store
resulting new information or to provide control for output actuator mechanisms. Electronic
hardware can range from individual chips/circuits to distributed information processing sys-
tems. Well designed electronic hardware is composed of hierarchies of functional modules
which inter-communicate via precisely defined interfaces The XY-plotter consists of two axes
operating orthogonally to each other. Each axis includes a CD drive system that is driven by
an appropriate means. Additionally, a third axis, with limited motion capability is used to
actuate the write head.
2.3 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 softwares used in this project comes under open source.Open-source
software (OSS) is computer software with its source code made available with a license in which
the copyright holder provides the rights to study, change, and distribute the software to anyone
15
16. and for any purpose. Open-source software may be developed in a collaborative public manner.
Open-source software is the most prominent example of open-source development.
2.4 Industrial Design
Industrial design is a process of design applied to products that are to be manufactured through
techniques of mass production. Its key characteristic is that design is separated from manu-
facture: the creative act of determining and defining a product’s form takes place in advance
of the physical act of making a product, which consists purely of repeated, often automated,
replication.The mechanical part is taken fully from CD-drive.
2.5 Conclusion
In this chapter a brief idea of the main three sections,software,hardware and industrial design
are discussed.
16
17. Chapter 3
Software
3.1 Introduction
Engineering as a discipline often requires more integration than large amounts of original devel-
opment. In a typical project, writing new code presents significant challenges, and the number
of features shared between projects means that it is possible to create shared components which
implement common features. A library or an existing module allows the use of a well developed
and tested component, which saves significant resources in the implementation of the project.
The drawback of components is the need to integrate various potentially conflicting interfaces,
and the need to understand a complex system in order to effectively use the component.
Components can be purchased, or may be freely available, as in the case of Open Source soft-
ware. Open Source also provides the opportunity to contribute new features and bug fixes back
in to the community. The programs and tools we chose for this project are all open source,
and use international standards, which allowed to rapidly develop the features needed.
The project software system consists of:
1. Inkscape (Version 0.48.5).
2. CAMotics.
3. Arduino IDE.
4. Processing 3.0.2.
3.2 Inkscape (0.48.5)
There are two basic types of graphic images: bitmap (or raster) images and vector images.
In the first case, the image is defined in terms of rows and columns of individual pixels, each
with its own color. In the second case, the image is defined in terms of lines, both straight and
17
18. curved. A single straight line is described in terms of its two end points.
The difference in these types of graphic images becomes readily apparent when a drawing is
enlarged. The same line is shown on the left and right. On the left it is displayed as a bitmap
image, while on the right it is displayed as a vector. In both cases, the line has been scaled up
by a factor of four from its nominal size.
When the bitmap resolution of a drawing matches the display resolution, the objects in the
drawing look smooth. The same drawing, but defined as a bitmap image on the left and a
vector image on the right. If the output device has the same resolution as the bitmap image,
there is little difference between the appearance of the two images.
If the bitmap resolution is significantly less than the display resolution, the display will show
jagged lines. The head of the gentleman in the above drawings has been scaled up by a factor
of five. Now one can see a difference in the quality of the bitmap drawing (left) and the vector
drawing (right). Note that the bitmap image uses anti-aliasing, a method of using grayscale to
attempt to smooth the drawing.
All output devices, with few exceptions, use a raster or bitmap image to display graphics. The
real difference between drawing with bitmap graphics and vector graphics is the point at which
the image is converted into a bitmap. In the case of vector graphics, this conversion is done at
the very last step before display, ensuring that the final image matches exactly the resolution
of the output device.
3.2.1 Scalar Vector Graphics(SVG)
SVG stands for Scalable Vector Graphics. Scalable refers to the notion that a drawing can
be scaled to an arbitrary size without losing detail. Scalable also refers to the idea that a
drawing can be composed of an unlimited number of smaller parts, parts that can be reused
many times. The SVG standard is directed toward a complete description of two-dimensional
graphics, including animation in an XML (eXtensible Markup Language) format. XML is an
open standard for describing a document in a way that can be easily extended and is resistant
to future changes in the document specification. A drawing saved in one version of SVG by one
version of a drawing program should be viewable, to the full extent possible, by any previous
or future version of any drawing program that adheres to the SVG standard. If a program
doesn’t support something in the SVG standard, it should just skip over any part of a drawing
that uses it, rendering the rest correctly.
SVG files are small, and drawings described by the standard adapt well to different presenta-
tion methods. This has led to great interest in the standard. Support is included in many web
browsers (Firefox, Chrome, Opera, Safari, and Internet Explorer from version 9), or is avail-
18
19. able through plug-ins (e.g., [Adobe [http://www.adobe.com/svg/viewer/install/, Ssrc SVG
[http://www.savarese.com/software/svgplugin/],and Google [http://www.google.com/chrome
frame]). Over a dozen companies including Apple (iPhone), Blackberry, LG, Motorola, Nokia,
Samsung, and Sony Ericsson produce mobile phones that utilize a subset of the full SVG stan-
dard (SVG Tiny) that has been tailored for devices with limited resources.
Inkscape is a free and open-source vector graphics editor; it can be used to create or edit
vector graphics such as illustrations, diagrams, line arts, charts, logos and complex paint-
ings. Inkscape’s primary vector graphics format is Scalable Vector Graphics (SVG) version
1.1. While Inkscape can import and export several formats, all editing workflow inevitably
occur within the guidelines of the SVG format.
Inkscape can render primitive vector shapes (e.g. rectangles, ellipses, polygons, arcs, spirals,
stars and isometric boxes), text and regions containing raster graphics. It also supports image
tracing, enabling the editor to create vector graphics from photos and other raster sources.
Created shapes can be subjected to further transformations, such as moving, rotating, scaling
and skewing. These objects may be filled with solid colors, patterns, radiant or linear color
gradient, their borders stroked or their transparency changed.
Inkscape SVG-based vector drawing program is useful for drawing:
• Illustrations for the Web.
• Graphics for mobile phones.
• Simple line drawings.
• Cartoons.
• Complex works of art.
• Figures for articles and books.
• Organization charts.
The file format that Inkscape uses is compact and quickly transmittable over the Internet. Yet
it is powerful and can describe complex drawings that are scalable to any size. Support for the
format has been added to web browsers and is already included in many mobile phones.
Inkscape supports the drawing of regular shapes (rectangles, circles, etc.), arbitrary paths, and
text. These objects can be given a wide variety of attributes such as color, gradient or pat-
terned fills, alpha blending, and markers. Objects can be transformed, cloned, and grouped.
Hyperlinks can be added for use in web browsers. The Inkscape program aims to be fully XML,
SVG, and CSS compliant.
Inkscape is available prepackaged for the Windows, Macintosh, and Linux operating systems.
19
20. The program and its source code are freely available. They can be obtained from the Inkscape
website [http://www.inkscape.org/].
Inkscape is undergoing very rapid development with new features being added and compliance
to the SVG standard being constantly improved.
3.2.2 Inkscape Window
Start by opening Inkscape.This window contains several major areas, many containing clickable
icons or pull-down menus. The following figure shows this window and labels key parts.
The Command Bar, Snap Bar, Tool Controls, and Tool Box are detachable by dragging on the
handles (highlighted in blue) at the far left or top. They can be returned to their normal place
by dragging them back. New in v0.48: Some of the bars change position depending on which
option is selected at the bottom of the View menu. When Default is selected, the Command
Bar is on the top while the Snap Bar is on the right. When Custom is selected, the Command
Bar and the Snap Bar are both on the top. When Wide is selected, the Command Bar and
the Snap Bar are both on the right. By default, Default is used if you are not using a “Wide
Screen” display while Wide is used if you are. A width to height aspect ratio of greater than
1.65 is defined to be wide. These bars, as well as the Palette and Status Bar, can be hidden
using the View Show/Hide submenu.
As Inkscape has grown more complex, the area required to include icons and entry boxes for all
the various items has also grown leading to problems when Inkscape is used on small screens.
The Command Bar, Snap Bar, Tool Controls, and Tool Box have variable widths or heights.
If there are too many items to be shown in the width (height) of the Inkscape window, a small
down arrow will appear on the right side or bottom of the bars. Clicking on this arrow will
open a drop-down menu with access to the missing items.
20
21. Figure 3.1: Inkscape Window
3.2.3 Inkscape Program
Inkscape has its roots in the program Gill (GNOME Illustrator application) created by Raph
Levian [http:// www.levien.com/] of Ghostscript fame. This project was expanded on by the
Sodipodi [http://sourceforge.net/projects/ sodipodi] program. A different set of goals led to
the split-off of the current Inkscape development effort.
The goal of the writers of Inkscape is to produce a program that can take full advantage of the
SVG standard. This is not a small task. A link to the road map for future development can
be found on the Inkscape website [http:// www.inkscape.org/].
Instructions on installing Inkscape can be found on the Inkscape website. Full functionality
of Inkscape requires additional helper programs to be installed, especially for importing and
exporting files in different graphic formats.
In this project the use of inkscape is to convert any image(formats) into graphics
code usually known as GCODE. .GCODE formats are generated by integrating
inkscape with necessary extension files.
3.2.4 Generating gcode files using inkscape
1. Download and install Inkscape 0.48.5 version.
2. Install an Add-on that enables the export images to gcode files.
3. Open the Inkscape, go to File menu and click ”Document Properties”.
4. Change the custom size.
21
22. 5. Now close this window.
6. Open the required image.
7. Re-size the image to fit our printing area.
8. Click Path from menu and ”Trace Bitmap”.Make required changes.
9. Click ok and close the window.
10. 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”.
11. Final, go to file menu, click save as and select .gcode. Click ok on next window.
GCode Tools: Gcodetools is an open source Inkscape extension, to export gcode for use
with a CNC machine, written in the Python programming language. Inkscape extensions work
in the standard Unix IO model, taking SVG on standard input, and output transformed SVG on
standard output. The Gcodetools extension generates G-Code from the SVG input and writes
it to a file as a side effect of the SVG transformation. This python extension can be easily
downloaded as a .ZIP file from https://github.com/martymcguire/inkscape-unicorn
3.3 CAMotics
CAMotics is an Open-Source software which simulates 3-axis CNC milling or engraving. It is
a fast, flexible and user friendly simulation software for the DIY and Open-Source community.
CAMotics works on Linux, OS-X and Windows.
Being able to simulate is a critical part of creating CNC tool paths. Programming a CNC
with out a simulator is cutting without measuring; it’s both dangerous and expensive. With
CAMotics we can preview the results of your cutting operation before you fire up your machine.
This will save the time and money and open up a world of creative possibilities by allowing us
to rapidly visualize and improve upon designs without wasting material or breaking tools.
At home manufacturing is one of the next big technology revolut There have been major
advances in desktop 3D printing (e.g. Maker Bot) yet uptake of desktop CNCs has lagged
despite the availability of cheap CNC machines. One of the major reasons for this is a lack of
Open-Source simulation and CAM (3D model to tool path conversion) software. CAM and NC
machine simulation present some very difficult, yet not insurmountable, programming chal-
lenges. Whereas, 3D printing simulation and tool path generation are much easier.
CAMotics aims to be a useful CNC simulation platform for the DIY and Open-Source com-
munity. CAMotics should serve the highly technical user but remain simple and user friendly
enough to support less techie types as well.
22
23. Features
• Fast 3-axis cut-workpiece simulation with 3D visualization.
• Simulates cylindrical, conical, ballnose, spheroid and snubnose tool shapes.
• Tool path 3D visualization.
• Multi-threaded rendering can take advantage of multi-processor CPUs.
• GCode parsing, simulation, verification and annotation.
• Supports LinuxCNC (AKA EMC2) O-codes.
• Export cut workpiece to STL file.
• Tool table editing.
• Add height probing to 2D GCode files. Very useful for circuit board cutting and metal
engraving.
• 2D GCode path optimization.
• Operates in Windows and Linux.
• Released under the GPL v2+ license.
Limitations
• Simulates only snapshots of the cutting process.
• No 5-axis simulation.
• No Lathe simulation.
• No CAM facilities yet, e.g. 3D model to tool path conversion.
• No CNC machine control, not a replacement for LinuxCNC or MACH3.
• Does not yet detect over/under cutting, collisions with the tool shaft or fixtures or rapid
moves in the material.
• Not all of the LinuxCNC G-Code language is implemented, yet.
23
24. 3.4 Arduino IDE
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 is designed to introduce programming to
artists and other newcomers unfamiliar with software development. It includes a code editor
with features such as syntax highlighting, brace matching, and automatic indentation, and
provides simple one-click mechanism to compile and load programs to an Arduino board. A
program written with the IDE for Arduino is called a ”sketch”.
The Arduino IDE supports the languages C and C++ using special rules to organize code. The
Arduino IDE supplies a software library called Wiring from the Wiring project, which provides
many common input and output procedures. A typical Arduino C/C++ sketch consist of two
functions that are compiled and linked with a program stub main() into an executable cyclic
executive program:[.2cm]
• setup(): a function that runs once at the start of a program and that can initialize
settings.
• loop(): a function called repeatedly until the board powers off.
After compiling and linking with the GNU toolchain, also included with the IDE distribution,
the Arduino IDE employs the program avrdude to convert the executable code into a text
file in hexadecimal coding that is loaded into the Arduino board by a loader program in the
board’s firmware.
3.5 Processing 3.0.2
Processing is a simple programming environment that was created to make it easier to develop
visually oriented applications with an emphasis on animation and providing users with instant
feedback through interaction. The developers wanted a means to “sketch” ideas in code. As
its capabilities have expanded over the past decade, Processing has come to be used for more
advanced production-level work in addition to its sketching role. Originally built as a domain-
specific extension to Java targeted towards artists and designers, Processing has evolved into a
full-blown design and prototyping tool used for large-scale installation work, motion graphics,
and complex data visualization.
Processing is based on Java, but because program elements in Processing are fairly simple,
you can learn to use it even if you don’t know any Java. If you’re familiar with Java,
it’s best to forget that Processing has anything to do with Java for a while, until you get
the hang of how the API works. The latest version of Processing can be downloaded at
http://processing.org/download.
24
25. An important goal for the project was to make this type of programming accessible to a wider
audience. For this reason, Processing is free to download, free to use, and open source. But
projects developed using the Processing environment and core libraries can be used for any
purpose. This model is identical to GCC, the GNU Compiler Collection. GCC and its as-
sociated libraries (e.g. libc) are open source under the GNU Public License (GPL), which
stipulates that changes to the code must be made available. However, programs created with
GCC (examples too numerous to mention) are not themselves required to be open source.
Processing consists of:
• The Processing Development Environment (PDE). This is the software that runs when
you double-click the Processing icon. The PDE is an Integrated Development Envi-
ronment (IDE) with a minimalist set of features designed as a simple introduction to
programming or for testing one-off ideas.
• A collection of functions (also referred to as commands or methods) that make up the
“core” programming interface, or API, as well as several libraries that support more ad-
vanced features such as sending data over a network, reading live images from a webcam,
and saving complex imagery in PDF format.
• A language syntax, identical to Java but with a few modifications.
• An active online community, based at http://processing.org.
3.5.1 Sketching with Processing
A Processing program is called a sketch. The idea is to make Java-style programming feel
more like scripting, and adopt the process of scripting to quickly write code. Sketches are
stored in the sketchbook, a folder that’s used as the default location for saving all of your
projects. Sketches that are stored in the sketchbook can be accessed from File Sketchbook.
Alternatively, File Open... can be used to open a sketch from elsewhere on the system.
Advanced programmers need not use the PDE, and may instead choose to use its libraries with
the Java environment of choice. However, for a beginner, it’s recommended to use the PDE to
gain familiarity with the way things are done. While Processing is based on Java, it was never
meant to be a Java IDE with training wheels. The conceptual model (how programs work,
how interfaces are built, and how files are handled) is somewhat different from Java.
25
26. Figure 3.2: Processing Window
3.6 Conclusion
In this chapter a brief introduction about the type of software used,theoretical and some prac-
tical idea about Inkscape, CAMotics, Arduino IDE and Processing are discussed.
26
27. Chapter 4
Hardware
4.1 Introduction
In this hardware system consists of a metallic frame, on which is mounted three axis of motion
in a standard Cartesian coordinate system. X and Y axis is driven by a stepper motor driven
by a adafruit L293D motor driver circuit. Z axis is driven by a servo motor.
The different included parts in the project are:
• Arduino UNO.
• ADAFRUIT:MOtor Driver Shield L293D.
• Stepper Motors.
• Servo Motor.
4.2 Arduino UNO
The Uno is a microcontroller board based on the ATmega328P. It has 14 digital input/output
pins (of which 6 can be used as PWM outputs), 6 analog inputs, a 16 MHz quartz crystal,
a USB connection, a power jack, an ICSP header and a reset button. It contains everything
needed to support the microcontroller; simply connect it to a computer with a USB cable or
power it with a AC-to-DC adapter or battery to get started..Anyone can tinker with the UNO
without worrying too much about doing something wrong, worst case scenario you can replace
the chip for a few dollars and start over again. ”Uno” means one in Italian and was chosen to
mark the release of Arduino Software (IDE) 1.0. The Uno board and version 1.0 of Arduino
Software (IDE) were the reference versions of Arduino, now evolved to newer releases. The Uno
board is the first in a series of USB Arduino boards, and the reference model for the Arduino
27
28. platform; for an extensive list of current, past or outdated boards see the Arduino index of
boards.
The board features an Atmel ATmega328 microcontroller operating at 5 V with 2Kb of RAM,
32 Kb of flash memory for storing programs and 1 Kb of EEPROM for storing parameters.
The clock speed is 16 MHz, which translates to about executing about 300,000 lines of C source
code per second. The board has 14 digital I/O pins and 6 analog input pins. There is a USB
connector for talking to the host computer and a DC power jack for connecting an external
6-20 V power source, for example a 9 V battery, when running a program while not connected
to the host computer. Headers are provided for interfacing to the I/O pins using 22 g solid
wire or header connectors.
Overview of the Board
Figure 4.1: Arduino UNO
28
29. 4.3 Adafruit L293D Motor Shield
Arduino-compatible boards use printed circuit expansion boards called shields, which plug into
the normally supplied Arduino pin headers. Shields can provide motor controls, Global Posi-
tioning System (GPS), Ethernet, liquid crystal display (LCD), or breadboarding (prototyping).
• 2 connections for 5V servos connected to the Arduino’s high-resolution dedicated timer.
• Up to 4 bi-directional DC motors with individual 8-bit speed selection.
• Up to 2 stepper motors (unipolar or bipolar) with single coil, double coil, interleaved or
micro-stepping.
• 4 H-Bridges: L293D chipset provides 0.6A per bridge (1.2A peak) with thermal shutdown
protection, 4.5V to 25V.
• Pull down resistors keep motors disabled during power-up.
• Big terminal block connectors to easily hook up wires (10-22AWG) and power Arduino
reset button brought up top.
• 2-pin terminal block to connect external power, for seperate logic/motor supplies.
• Tested compatible with Mega, Diecimila, Duemilanove.
Before using the Motor shield, we must install the AFM otorArduinolibrary−thiswillinstructtheArduinoho
First, grab the library from github (http://adafru.it/aOA).
Uncompress the ZIP file onto your desktop.
Rename the uncompressed folder AFMotor.
Check that inside AFMotor is AFMotor.cpp and AFMotor.h files. If not, check the steps above.
Place the AFMotor folder into the arduinosketchfolder/libraries folder. For Windows, this will
probably be something like MY Documents/Arduino/libraries for Mac it will be something like
Documents/arduino/libraries. If this is the first time you are installing a library, you’ll need
to create the libraries folder. Make sure to call it libraries exactly, no caps, no other name.
Check that inside the libraries folder there is the AFMotor folder, and inside AFMotor Is
AFMotor.cpp AFMotor.h and some other files.
Quit and restart the IDE. You should now have a submenu called File-Examples-AFMotor-
MotorParty.
29
30. Figure 4.2: Adafruit L293D Motor Shield
4.4 Servo Motor
A servo motor is an electrical device which can push or rotate an object with great precision.
To rotate and object at some specific angles or distance, servo motor is used. It is just made up
of simple motor which run through servo mechanism. If motor is used is DC powered then it is
called DC servo motor, and if it is AC powered motor then it is called AC servo motor. We can
get a very high torque servo motor in a small and light weight packages. Doe to these features
they are being used in many applications like toy car, RC helicopters and planes, Robotics,
CNC Machine etc. The position of a servo motor is decided by electrical pulse and its circuitry
is placed beside the motor.
4.4.1 Working principle of Servo Motors.
A servo consists of a Motor (DC or AC), a potentiometer, gear assembly and a controlling
circuit. First of all we use gear assembly to reduce RPM and to increase torque of motor. Say
at initial position of servo motor shaft, the position of the potentiometer knob is such that there
is no electrical signal generated at the output port of the potentiometer. Now an electrical
signal is given to another input terminal of the error detector amplifier. Now difference between
these two signals, one comes from potentiometer and another comes from other source, will be
processed in feedback mechanism and output will be provided in term of error signal. This error
signal acts as the input for motor and motor starts rotating. Now motor shaft is connected
with potentiometer and as motor rotates so the potentiometer and it will generate a signal.
So as the potentiometer’s angular position changes, its output feedback signal changes. After
sometime the position of potentiometer reaches at a position that the output of potentiometer
30
31. Figure 4.3: Servo Motor
is same as external signal provided. At this condition, there will be no output signal from the
amplifier to the motor input as there is no difference between external applied signal and the
signal generated at potentiometer, and in this situation motor stops rotating.
4.4.2 Controlling Servo Motor
Servo motor is controlled by PWM (Pulse with Modulation) which is provided by the control
wires. There is a minimum pulse, a maximum pulse and a repetition rate. Servo motor can
turn 90 degree from either direction form its neutral position. The servo motor expects to see
a pulse every 20 milliseconds (ms) and the length of the pulse will determine how far the motor
turns. For example, a 1.5ms pulse will make the motor turn to the 90 position, such as if pulse
is shorter than 1.5ms shaft moves to 0 and if it is longer than 1.5ms than it will turn the servo
to 180.
Servo motor works on PWM (Pulse width modulation) principle, means its angle of rotation is
controlled by the duration of applied pulse to its Control PIN. Basically servo motor is made
up of DC motor which is controlled by a variable resistor (potentiometer) and some gears. High
speed force of DC motor is converted into torque by Gears. We know that WORK= FORCE X
DISTANCE, in DC motor Force is less and distance (speed) is high and in Servo, force is High
and distance is less. Potentiometer is connected to the output shaft of the Servo, to calculate
the angle and stop the DC motor on required angle. Servo motor can be rotated from 0 to
180 degree, but it can go up to 210 degree, depending on the manufacturing. This degree of
rotation can be controlled by applying the Electrical Pulse of proper width, to its Control pin.
31
32. Servo checks the pulse in every 20 milliseconds. Pulse of 1 ms (1 millisecond) width can rotate
servo to 0 degree, 1.5ms can rotate to 90 degree (neutral position) and 2 ms pulse can rotate
it to 180 degree.
Figure 4.4: Controlling of Servo Motor (PWM)
4.5 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.
32
33. These properties make the stepper motor an excellent execution element of open-loop control
systems. A stepper motor 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 or reversed in a sudden fashion without losing steps throughout
its operation.
Figure 4.5: Stepper Motor
4.6 Conclusion
In this chapter all the details about the hardwares used such as Arduino UNO board,Adafruit
L293D Motor Shield,Stepper Motors and Servo Motors are discussed.
33
34. Chapter 5
Industrial Design
5.1 Introduction
The complete mechanical system was designed in the metallic CD drive cover.
The designs in the project are :
• X-Y Direction.
• Pen setup.
• Stand holding the Whole.
• Final Setup
Y-axis: basic axis carries X-axis move from front to back.
X-axis: carries Z-axis move from left to right.
Z-axis: carries pen part move up and down.
5.2 X-Y Direction
In computing, an optical disc drive (ODD) is a disk drive that uses laser light or electromagnetic
waves within or near the visible light spectrum as part of the process of reading or writing data
to or from optical discs. Some drives can only read from certain discs, but recent drives can
both read and record, also called burners or writers. Compact discs, DVDs, and Blu-ray discs
are common types of optical media which can be read and recorded by such drives. Optical disc
drives that are no longer in production include CD-ROM drive, CD writer drive, and combo
(CD-RW/DVD-ROM) drive. As of 2015, DVD writer drive is the most common for desktop
PCs and laptops. There are also the DVD-ROM drive, BD-ROM drive, Blu-ray Disc combo
(BD-ROM/DVDRW/CD-RW) drive, and Blu-ray Disc writer drive.
The stepper motor setup of CD drives are used in X-Y direction co-ordinate axis.
34
35. Figure 5.1: Lens Frame in CD Drive (Containing Stepper Motor)
5.3 Stand holding the whole
The stand holding all the parts are made by the outer metallic cover of the cd drive. Two
covers are welded together perpendicularly for holding the x and y axis.
Figure 5.2: CD Drive Cover
5.4 Pen Setup (Z-axis)
For pen setup (z axis) high-density fiberboard (HDF) is used. It is a type of fiberboard, which
is an petroleum by product. It is of light weight.Servomotor is adjusted inside the HDF to get
the up and movement required to plot the object.
5.5 Final Setup
All the sections are integrated together to get a good output.
35
36. Figure 5.3: Pensetup
Figure 5.4: View 1 Figure 5.5: View 2
5.6 Conclusion
In this chapter the design setup used in this project is discussed to give an idea on the me-
chanical section.
36
37. Chapter 6
Overall View and Setup of the Project
6.1 Introduction
The following steps shows the building stages of a low cost mini cnc plotter. For X and Y axis,
the stepper motors from CD drive is used. Servo motor is used for z axis.Inkscape,Processing
and Arduino IDE gives the command from the computer as gcode to the arduino board to get
the plotted output
Main Block Diagram
Figure 6.1: Main Block Diagram
37
38. 6.2 Steps Involved in the Project
Step 1-Industrial Design
1. First step to start building this cnc machine is to disassemble two dvd/cd drives and take
off them the stepper motors. Use the screwdriver to open them and take off them the
rails.
2. The outer metallic cover of cd drive is welded perpendicularly to make the stand holding
the x and y axis.
3. Attach the cd drive stepper motor setup as x and y axis. And make sure that the Y axis
is straight to CNC base and the X axis vertically to it.
4. Z axis (pen setup) is attached to the x axis. The pen setup is made up of HDF, the servo
motor is attached to it and the pen is setup inside the fiber using screw and spring.
5. A metallic base is attached to the Y axis for using as paper base. Then a paper is put
above it with the help some magnets.The printing area is 4x4cm.
Step 2-Arduino and Stepper Motor Setup
1. The adafruit L293D motor driver sheild compactible with the Arduino board is mounted
on it.
2. The Arduino is connected the computer port.
3. Check the stepper motors and the servo motor.
4. The stepper motors and the servo motor are connected to the motor shield.
5. The external power is connected. (Trainer Kit 12v,3A)
Step 3-Burning of Program and Gcode take in
1. The mini cnc plotting sketch is burned to the Arduino microprocessor (ATmega 328) by
using Arduino IDE.
2. Gcode is made by Inkscape program.
3. Then use the gctrl.pde processing program. This program sends ’gcode’ images to the cnc
plotter.
4. Plotting of the image is done.
38
39. 6.3 Result
Integrating the software along with the hardware and mechanical systems makes up an effective
2D plotter.
Figure 6.2: Plotted Output Image
6.4 Conclusion
In this chapter the steps involved in setting-up the plotter and final result are discussed.
39
40. Chapter 7
Applications
The main applications of CNC machines comes in industrial field.Some of them are discussed
below:
• Metal Removal Applications – CNC machines are extensively used in industries where
metal removal is required. The machines remove excess metal from raw materials to create
complex parts. A good example of this would be the automotive industries where gears,
shafts and other complex parts are carved from the raw material. CNC machines are also
used in the manufacturing industries for producing rectangular, square, rounded and even
threaded jobs. All processes, such as milling, grinding, turning, boring, reaming, etc, can
be controlled and carried out by these CNC machines using specific machine tools for each
task.
• Metal Fabrication Industry – Many industries require thin plates for different pur-
poses. These industries use CNC machines for a number of machining operations such
as plasma or flame cutting, laser cutting, shearing, forming and welding to create these
plates. CNC plasma or laser cutters are used for shaping metal, while CNC turret presses
are used for operations like punching holes. Other operations like bending metal plates
can also be carried out with very high precision using CNC press brakes.
• Electrical Discharge Machining Applications – Electrical Discharge Machines, or
EDMs as they are also known, remove metal from the raw material by producing sparks
that burn away the excess metal. EDM machining through CNC automation is carried
out in two different ways; first through Wire EDM and second through Vertical EDM.
CNC automated Wire EDM is used to punch and then die combinations for creating die
sets used in the fabrication industry. CNC automated Vertical EDM requires an electrode
in the same size and shape as the cavity that needs to be carved out.
40
41. Chapter 8
Conclusion and Future Aspects
In modern CNC systems, end-to-end component design is 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 CNCmachines for
production. Since any particular component might require the use of a number of different
tools – drills, saws, etc., modern machines often combine multiple tools into a single ”cell”.
In other installations, a number of different machines are used with an external controller and
human or robotic operators that move the component from machine to machine. In either
case, the series of steps needed to produce any part is highly automated and produces a part
that closely matches the original CAD design.
PCB Mill (Future)
A PCB Mill is a device that etches out a pattern on a copper clad board such that it makes a
Printed Circuit Board (PCB). PCBs are used everywhere in the field of electrical engineering
to connect electrical components to one another. Typically, after a board is designed, the
layout files are sent to a manufacturer who then makes the board and ships it back to the
customer. When prototyping, the delay and setup costs associated with sending a layout to a
manufacturer can often mean days of down time. While this may not seem costly at first, it can
prove to be a significant nuisance since most boards contain a wiring bug that was overlooked
or misunderstood and must then be remade.
41
42. Bibliography
1. Venkatram Ramachandran, Evaluation of Performance Criteria of CNC
Machine Tool Drive System, IEEE Transactions on Industrial Electron-
ics, Vol. 45, No. 3, June 1998, pp. 462-468.
2. Jae Wook Jeon and Young Youl Ha, A Generalized Approach for the
Acceleration and Deceleration of Industrial Robots and CNC Machine
Tools, IEEE Transactions on Industrial Electronics, Vol. 47, No. 1,
February 2000, pp. 133-139.
3. Allen G. Morinec, Power Quality Considerations for CNC Machines:
Grounding, IEEE Transactions on Industrial Electronics, Vol. 38, No. 1,
January/February 2002, pp. 3-11.
4. Dr M Shivakumar, Stafford Michahail, Ankitha Tantry H, Bhawana C K,
Kavana H and Kavya V Rao, Robotic 2D Plotter, International Journal
of Engineering and Innovative Technology (IJEIT), Volume 3, Issue 10,
April 2014, pp.300-303.
5. Venkata Krishna Pabolu et al., Design and Implementation of a Three
Dimensional CNC Machine (IJCSE) International Journal on Computer
Science and Engineering Vol. 02, No. 08, 2010, pp. 2567-2570.
6. Mrs. R. Dayana, Gunaseelan P, Microcontroller Based X-Y Plotter, In-
ternational Journal of Advanced Research in Electrical, Electronics and
Instrumentation Engineering, Vol. 3, Special Issue 3, April 2014.
7. Ahn Luong, Willis Lutz, Jared Springle, Ashton Snelgrove, Computer
numerical control 3 axis plotter, University of Utah, Computer Engi-
neering.
8. Hassam Salamah, Ja’far Yasin, PCB CNC Machine, An-Najah national
University, Computer Engineering.
9. W Durfee, Arduino Microcontroller Guide, University of Minnesota.
10. Steve Krar, Arthur Gill, Computer Numerical Control Programming
Basics.
11. Instuctables.com
12. Wikipedia.com
42
45. .1 Programs
Program in Arduino UNO Board
#include <Servo.h>
#include <AFMotor.h>
#define LINE_BUFFER_LENGTH 512
// Servo position for Up and Down
const int penZUp = 130;
const int penZDown = 87;
// Servo on PWM pin 6
const int penServoPin = 9;
// Should be right for DVD steppers
const int stepsPerRevolution = 20;
// create servo object to control a servo
Servo penServo;
// 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);
/* Structures, global variables */
struct point {
float x;
float y;
float z;
};
// Current position of plothead
struct point actuatorPos;
// Drawing settings, should be OK
float StepInc = 1;
int StepDelay = 0;
int LineDelay =40;
int penDelay = 150;
45
46. // Motor steps to go 1 millimeter.
// Use test sketch to go 100 steps. Measure the length of line.
// Calculate steps per mm. Enter here.
float StepsPerMillimeterX = 100.0;
float StepsPerMillimeterY = 100.0;
// Drawing robot limits, in mm
// OK to start with. Could go up to 50 mm if calibrated well.
float Xmin = 0;
float Xmax = 40;
float Ymin = 0;
float Ymax = 40;
float Zmin = 0;
float Zmax = 1;
float Xpos = Xmin;
float Ypos = Ymin;
float Zpos = Zmax;
void setup() {
// Setup
Serial.begin( 9600 );
penServo.attach(penServoPin);
penServo.write(penZUp);
delay(200);
// 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 ");
46
47. Serial.print(Ymax);
Serial.println(" mm.");
}
/**********************
* void loop() - Main loop
***********************/
void loop()
{
delay(200);
char line[ LINE_BUFFER_LENGTH ];
char c;
int lineIndex;
bool lineIsComment, lineSemiColon;
lineIndex = 0;
lineSemiColon = false;
lineIsComment = false;
while (1) {
// Serial reception - Mostly from Grbl, added semicolon support
while ( Serial.available()>0 ) {
c = Serial.read();
if (( c == ’n’) || (c == ’r’) ) { // End of line reached
if ( lineIndex > 0 ) { // Line is complete. Then execute!
line[ lineIndex ] = ’0’; // Terminate string
if (verbose) {
Serial.print( "Received : ");
Serial.println( line );
}
processIncomingLine( line, lineIndex );
lineIndex = 0;
}
else {
// Empty or comment line. Skip block.
}
lineIsComment = false;
lineSemiColon = false;
Serial.println("ok");
}
47
48. else {
if ( (lineIsComment) || (lineSemiColon) ) { // Throw away all comment characters
if ( c == ’)’ ) lineIsComment = false; // End of comment. Resume line.
}
else {
if ( c <= ’ ’ ) { // Throw away whitepace and control character
}
else if ( c == ’/’ ) { // Block delete not supported. Ignore charact
}
else if ( c == ’(’ ) { // Enable comments flag and ignore all charac
lineIsComment = true;
}
else if ( c == ’;’ ) {
lineSemiColon = true;
}
else if ( lineIndex >= LINE_BUFFER_LENGTH-1 ) {
Serial.println( "ERROR - lineBuffer overflow" );
lineIsComment = false;
lineSemiColon = false;
}
else if ( c >= ’a’ && c <= ’z’ ) { // Upcase lowercase
line[ lineIndex++ ] = c-’a’+’A’;
}
else {
line[ lineIndex++ ] = c;
}
}
}
}
}
}
void processIncomingLine( char* line, int charNB ) {
int currentIndex = 0;
char buffer[ 64 ]; // Hope that 64 is enough for 1 parameter
struct point newPos;
newPos.x = 0.0;
newPos.y = 0.0;
while( currentIndex < charNB ) {
48
49. switch ( line[ currentIndex++ ] ) { // Select command, if any
case ’U’:
penUp();
break;
case ’D’:
penDown();
break;
case ’G’:
buffer[0] = line[ currentIndex++ ]; // /! Dirty - Only works with 2 digit com
// buffer[1] = line[ currentIndex++ ];
// buffer[2] = ’0’;
buffer[1] = ’0’;
switch ( atoi( buffer ) ){// Select G command
case 0: // G00 & G01 - Movement or fast movement. Same here
case 1:
// /! Dirty - Suppose that X is before Y
char* indexX = strchr( line+currentIndex, ’X’ );
char* indexY = strchr( line+currentIndex, ’Y’ );
if ( indexY <= 0 ) {
newPos.x = atof( indexX + 1);
newPos.y = actuatorPos.y;
}
else if ( indexX <= 0 ) {
newPos.y = atof( indexY + 1);
newPos.x = actuatorPos.x;
}
else {
newPos.y = atof( indexY + 1);
indexY = ’0’;
newPos.x = atof( indexX + 1);
}
drawLine(newPos.x, newPos.y );
// Serial.println("ok");
actuatorPos.x = newPos.x;
actuatorPos.y = newPos.y;
break;
}
break;
49
50. case ’M’:
buffer[0] = line[ currentIndex++ ];// /! Dirty - Only works with 3 digit commands
buffer[1] = line[ currentIndex++ ];
buffer[2] = line[ currentIndex++ ];
buffer[3] = ’0’;
switch ( atoi( buffer ) ){
case 300:
{
char* indexS = strchr( line+currentIndex, ’S’ );
float Spos = atof( indexS + 1);
// Serial.println("ok");
if (Spos == 30) {
penDown();
}
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).
* int (x1;y1) : Starting coordinates
* int (x2;y2) : Ending coordinates
**********************************/
void drawLine(float x1, float y1) {
50
51. if (verbose)
{
Serial.print("fx1, fy1: ");
Serial.print(x1);
Serial.print(",");
Serial.print(y1);
Serial.println("");
}
// Bring instructions within limits
if (x1 >= Xmax) {
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("");
51
52. }
// Convert coordinates to steps
x1 = (int)(x1*StepsPerMillimeterX);
y1 = (int)(y1*StepsPerMillimeterY);
float x0 = Xpos;
float y0 = Ypos;
// Let’s find out the change for the coordinates
long dx = abs(x1-x0);
long dy = abs(y1-y0);
int sx = x0<x1 ? StepInc : -StepInc;
int sy = y0<y1 ? StepInc : -StepInc;
long i;
long over = 0;
if (dx > dy) {
for (i=0; i<dx; ++i) {
myStepperX.onestep(sx,MICROSTEP);
over+=dy;
if (over>=dx) {
over-=dx;
myStepperY.onestep(sy,MICROSTEP);
}
delay(StepDelay);
}
}
else {
for (i=0; i<dy; ++i) {
myStepperY.onestep(sy,MICROSTEP);
over+=dx;
if (over>=dy) {
over-=dy;
myStepperX.onestep(sx,MICROSTEP);
}
delay(StepDelay);
}
}
if (verbose)
{
Serial.print("dx, dy:");
52
53. 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(")");
}
// Delay before any next lines are submitted
delay(LineDelay);
// Update the positions
Xpos = x1;
Ypos = y1;
}
// 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;
53
54. digitalWrite(15, HIGH);
digitalWrite(16, LOW);
if (verbose) {
Serial.println("Pen down.");
}
}
*//Program used in Processing for loading Gcode//*
import java.awt.event.KeyEvent;
import javax.swing.JOptionPane;
import processing.serial.*;
Serial port = null;
// 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;
//String portname = Serial.list()[0]; // Mac OS X
//String portname = "/dev/ttyUSB0"; // Linux
//String portname = "COM6"; // Windows
boolean streaming = false;
float speed = 0.001;
String[] gcode;
int i = 0;
void openSerialPort()
{
if (portname == null) return;
if (port != null) port.stop();
port = new Serial(this, portname, 9600);
port.bufferUntil(’n’);
}
void selectSerialPort()
{
54
55. 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);
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;
55
56. 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("G91nG20nG00 X-" + speed + " Y0.000 Z0.000n");
if (keyCode == RIGHT) port.write("G91nG20nG00 X" + speed + " Y0.000 Z0.000n");
if (keyCode == UP) port.write("G91nG20nG00 X0.000 Y" + speed + " Z0.000n");
if (keyCode == DOWN) port.write("G91nG20nG00 X0.000 Y-" + speed + " Z0.000n");
if (keyCode == KeyEvent.VK_PAGE_UP) port.write("G91nG20nG00 X0.000 Y0.000 Z" + spe
if (keyCode == KeyEvent.VK_PAGE_DOWN) port.write("G91nG20nG00 X0.000 Y0.000 Z-" +
if (key == ’h’) port.write("G90nG20nG00 X0.000 Y0.000 Z0.000n");
if (key == ’v’) port.write("$0=75n$1=74n$2=75n");
//if (key == ’v’) port.write("$0=100n$1=74n$2=75n");
if (key == ’s’) port.write("$3=10n");
if (key == ’e’) port.write("$16=1n");
if (key == ’d’) port.write("$16=0n");
if (key == ’0’) openSerialPort();
if (key == ’p’) selectSerialPort();
if (key == ’$’) port.write("$$n");
}
if (!streaming && key == ’g’) {
gcode = null; i = 0;
File file = null;
println("Loading file...");
selectInput("Select a file to process:", "fileSelected", file);
}
if (key == ’x’) streaming = false;
}
void fileSelected(File selection) {
if (selection == null) {
56
57. println("Window was closed or the user hit cancel.");
} else {
println("User selected " + selection.getAbsolutePath());
gcode = loadStrings(selection.getAbsolutePath());
if (gcode == null) return;
streaming = true;
stream();
}
}
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++;
}
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?
}
57
58. .2 Arduino UNO Board
.3 L293D Specifications (Motor Driver IC)
The Device is a monolithic integrated high voltage, high current four channel driver designed to
accept standard DTL or TTL logic levels and drive inductive loads (such as relays solenoides,
DC and stepping motors) and switching power transistors. To simplify use as two bridges each
pair of channels is equipped with an enable input. A separate supply input is provided for
the logic, allowing operation at a lower voltage and internal clamp diodes are included. This
device is suitable for use in switching applications at frequencies up to 5 kHz. The L293D is
assembled in a 16 lead plastic packaage which has 4 center pins connected together and used
for heatsinking The L293DD is assembled in a 20 lead surface mount which has 8 center pins
58
59. connected together and used for heatsinking.
Figure .31: Pin Out
Figure .32: Maximum Ratings
59