Mechantron Carver

You might also like

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 100

Final Year Project Report

MECHANTRON CARVER
B.S. ELECTRONIC ENGINEERING, BATCH 2008
Internal Advisor
Fahad Ahmed Siddique
Assistant Professor
Electronic Engg.
SSUET, Karachi

External Advisor
Sadia Kazmi
Manager
BU-CIP(SIEMENS)
Karachi

Submitted by

FAHAD SAMI KHAN


SHUEB IQBAL
USAMA KHAN
SYED MUHAMMAD MOIZ
SYED UMAIR ALI

2008-EE-200
2008-EE-201
2008-EE-202
2008-EE-226
2008-EE-253

DEPARTMENT OF ELECTRONIC ENGINEERING


SIR SYED UNIVERSITY OF ENGINEERING AND
TECHNOLOGY, KARACHI
JANUARY 2012

MECHANTRON CARVER
3-AXIS CNC CARVING MACHINE

BY

FAHAD SAMI KHAN


SHUEB IQBAL
USAMA KHAN
SYED MUHAMMAD MOIZ
SYED UMAIR ALI

2008-EE-200
2008-EE-201
2008-EE-202
2008-EE-226
2008-EE-253

Report submitted in partial fulfillment of the requirements


for the degree
of Bachelor of Science
in Electronic Engineering

DEPARTMENT OF ELECTRONIC ENGINEERING


SIR SYED UNIVERSITY OF ENGINEERING AND TECHNOLOGY, KARACHI
JANUARY 2012

ii

ACKNOWLEDGEMENT
With a deep sense and profound gratitude we take this opportunity to convey our sincere
thanks to ALMIGHTY ALLAH for giving us courage and strength to reach this stage of
life.
We also thank our parents who gave us great moral support at every step. We also convey
thanks to all of those who gave us valuable support to complete this challenging project.
The success of this project depends largely on the encouragement and guidelines of my
teachers and friends. I, therefore take this opportunity to express my gratitude to the
people who have been instrumental in the successful completion of this project.
I would like to show my greatest appreciation to ASST.PROF. FAHAD AHMED
SIDDIQUE I cant say enough thanks for their tremendous support and help. I feel
motivated and encouraged every times. Without their encouragement and guidance this
project would not have materialized.
We also wish to express our gratitude to all staff in university. And last but not the least
we acknowledge the efforts of our teachers who have been our source of inspiration
throughout the university years and have shared their knowledge and skills with us.
Fahad Sami Khan
Shueb Iqbal
Usama Khan
Syed Muhammad Moiz
Syed Umair Ali

2008-EE-200
2008-EE-201
2008-EE-202
2008-EE-226
2008-EE-253

January 2012

iii

TABLE OF CONTENTS

ACKNOWLEDGMENT.......................ii
TABLE OF CONTENTS.................................................................................................iv
LIST OF TABLES..........................................................................................................viii
LIST OF FIGURES..........................................................................................................ix
ABSTRACT......................................................................................................................xi

CHAPTER ONE: INTRODUCTION


1.1

INTRODUCTION...................................................................................................1

1.2

ABOUT CNC...........................................................................................................2

1.3

APPLICATIONS OF CNC MACHINES.................................................................3

1.4

WHY CNC?..............................................................................................................4

1.5

BENEFITS OF CNC................................................................................................4

1.6

WHY WE ARE USING CNC AS FYP....................................................................5

1.7

INTRODUCTION TO THE HARDWARE.............................................................6

1.8

INTRODUCTION TO THE ELECTRONIC PART................................................7

1.9

INTRODUCTION TO THE SOFTWARE...............................................................7

CHAPTER TWO: THEORY AND LITERATURE


2.1

THEORY OF CNC...................................................................................................8

2.2

INTERPRETER/SOFTWARE OF CNC..................................................................8

2.3

PART PROGRAM..................................................................................................10

2.4

PROGRAM STRUCTURE....................................................................................10

2.5

DESCRIPTION OF CODES..................................................................................13

2.6

SUMMARY............................................................................................................14

iv

CHAPTER THREE: DETAILS OF THE DESIGNS


3.1

BRIEFING..............................................................................................................15

3.1.1

BALL SCREW................................................................................................15

3.1.2

STEPPER MOTOR.........................................................................................16

3.1.3

GEARS AND CHAINS..................................................................................17

3.2

DESCRIPTION:.....................................................................................................18

3.3

X-AXIS MOVEMENT..........................................................................................19

3.4

Y-AXIS MOVEMENT...........................................................................................21

3.5

Z-AXIS MOVEMENT...........................................................................................23

3.6

CALCULATION OF TORQUE.............................................................................25

CHAPTER FOUR: SYSTEM HARDWARE


4.1

INTRODUCTION OF STEPPER MOTORS........................................................26

4.2

WHY WE ARE USING STEPPER MOTORS?....................................................27

4.3

WHEN STEPPER MOTOR IS USED...................................................................27

4.4

TECHNICAL DESCRIPTION..............................................................................28

4.5

STEPPER MOTOR APPLICATIONS...................................................................30

4.6

STEPPER MOTOR SPECIFICATIONS................................................................30

4.7

STEPPER MOTOR TYPES...................................................................................31

4.7.1

VARIABLE RELUCTANCE(VR)..................................................................31

4.7.2

PERMANENT MAGNET (PM).....................................................................31

4.7.3

HYBRID (HB)................................................................................................32

4.8

STEPPER MOTOR DRIVE TYPES.....................................................................33

4.8.1

UNIPOLAR STEPPER MOTOR...................................................................33

4.8.2

BIPOLAR STEPPER MOTOR......................................................................34

4.8.3

UNIPOLAR VERSUS BIPOLAR..................................................................36

4.9

STEPPER MOTOR WIRING SCHEMES.............................................................37

4.10

STEPPER MOTOR STEPPING MODES.............................................................39

4.10.1 ONE PHASE DRIVE / SINGLE STEP DRIVE / WAVE DRIVE...................39


v

4.10.2 TWO PHASE DRIVE / HIGH TORQUE DRIVE / FULL DRIVE.................39


4.10.3 TWO PHASE DRIVE / HALF STEP DRIVE / DUAL DRIVE.......................40
4.10.4 MICROSTEPPING...........................................................................................41

CHAPTER FIVE: CNC ELECTRONICS


5.1

INTRODUCTION..................................................................................................43

5.2

MOTION CONTROL............................................................................................45

5.3

ELECTRONIC SYSTEM OVERVIEW................................................................45

5.4

DESCRIPTION OF BLOCK DIAGRAM.............................................................46

5.5

SYSTEM FLOW CHART......................................................................................47

5.6

CONTROL UNIT (CU) OF OUR MACHINE......................................................48

5.6.1

THE POWER SUPPLY UNIT........................................................................48

5.6.2

THE CIRCUITRY PROTECTION SYSTEM................................................49

5.6.3

THE MOTOR DRIVERS:..............................................................................49

5.7

STEPPER MOTOR DRIVER IMPLEMENTATION............................................50

5.8

COMPUTER..........................................................................................................57

5.9

STEPPER MOTOR DRIVER................................................................................58

5.10

STEPPER MOTORS..............................................................................................58

5.10.1

FUNCTIONS..................................................................................................59

5.10.2

WAVE SEQUENCE OF STEPPER MOTOR.................................................59

5.11

TRIMMER /MINI ROUTER.................................................................................60

CHAPTER SIX: SYSTEM SOFTWARE


6.1

SYSTEM SOFTWARE..........................................................................................62

6.2

CAD SOFTWARE.................................................................................................63

6.3

CAM SOFTWARE.................................................................................................64

6.4

CONTROLLING SOFTWARE.............................................................................65

6.4.1

MACH3...........................................................................................................66

vi

CHAPTER SEVEN: RESULT & DISCUSSION


7.1

RESULT:................................................................................................................68

7.2

DISCUSSION:.......................................................................................................70

7.2.1

MECHANICAL ISSUES:...............................................................................70

7.2.2

ELECTRONIC ISSUES:................................................................................71

7.2.3

SOFTWARE ISSUES:....................................................................................71

CHAPTER EIGHT: FUTURE ENHANCMENT & CONCLUSION


8.1

FUTURE ENHANCEMENT:................................................................................72

8.2

CONCLUSION:.....................................................................................................73

REFERENCES................................................................................................................74

APPENDIX 1:.....................................................................................................................i
APPENDIX 2:....................................................................................................................ii
APPENDIX 3:...................................................................................................................iii
APPENDIX 4:...................................................................................................................iv

DATASHEETS

vii

LIST OF TABLES

2.1

Typical addresses and associated functions

11

2.2

Summary of address groups based on CNC system function

13

4.1

Stepper motor types and its characteristics

33

4.2

Comparison b/w Unipolar & Bipolar

36

4.3

Wave Driving sequence

39

4.4

Full Step Driving sequence

40

4.5

Half Step Driving sequence

40

4.6

Comparison of stepper motor drive sequence

41

viii

LIST OF FIGURES

1.1

Old times (Handwork)

1.2

CNC PCB Drilling

1.3

CNC Lathe Machine

1.4

Result of handwork (time consuming)

1.5

Precession & Accuracy

2.1

Internal Behaviour

3.1

Ball bearing moving in a screw

15

3.2

Stepper motor NEMA 24

16

3.3

NEMA 23 dimension

16

3.4

Gears of the different size

17

3.5

Chains used between gears

17

3.6

Axis on the structure

18

3.7

X, Y & Z axis

18

3.8

Position of the ball screws

19

3.9

Illustrating X-axis movement

20

3.10

Position of the ball screws

21

3.11

Illustrating Y-axis movement

22

3.12

Position of the ball screws

23

3.13

Illustrating Z-axis movement

24

4.1

Basic shape of a stepper

28

4.2

Cross-section of a variable reluctance

31

4.3

Principle of a PM or tin-can stepper motor

32

4.4

Cross-section of a hybrid stepper motor

32

4.5

Unipolar stepper motor

34

4.6

Bipolar stepper motor

35

4.7

Wire stepper motor configuration

37

4.8

Motor standard wire color

37
ix

4.9

Excitation sequence of driving modes

42

5.1

Components of CNC

43

5.2

Electronic components of CNC

44

5.3

Electronic System overview

45

5.4

Block diagram

46

5.5

System flow chart

47

5.6

CU of our project

50

5.7

Drive circuitry for motors

52

5.8

Breakout board PCB

55

5.9

Diagram of Limit Switches

56

5.10

Laptop

57

5.11

L6203 & L297 driver

58

5.12

Wave timing output

59

5.13

Sencan router for carving

60

5.14

Router bits for carving

61

6.1

Whole process of system software

62

6.2

sample design made by using CAD software

63

6.3

Logo of AutoCAD

64

6.4

Logo of LAZYCAM

64

6.5

Environment of LAZYCAM

65

6.6

Environment of Mach3

66

7.1

Carved result 1

68

7.2

Carved result 2

68

7.3

Carved result 3

69

7.4

Carved result 4

69

MECHANTRON CARVER

ABSTRACT
We are working upon a CNC (computer numerically controlled) machine which basically
carved or engraved the desired objects.
Our project is that we are working on a CNC machine that will carve text and images in 3
axis and the carving will be done on a wooden block .Computer numerically controlled
which means the motors (NEMA23) and the router (SANTEC) that will Carve will be
numerically controlled by the computer via parallel port it means that we will provide
step by step instructions to the motors from computer using Specific softwares. It is
widely used in automated drilling of wood and metals.
Used in lathes: This is a machine for working wood or metal where a piece is worked on
with the aid of a cutting tool. It is used in laser cutting
As it is mentioned earlier that we will be going to carve or engrave the desired objects
upon wooden piece. We are considering many types of software now days because there
are number of softwares available in the market and we will soon select the most
compatible software and produce some vital results. We have diagnosed our mechanical
and circuits only the compatibility with the software is left over. The whole process will
be tested on each and every step when it will compatible with the software.
From all the details that have been mentioned above we can conclude that we will soon
achieve our desired targets as soon as possible. We will be able to produce some carved
results as demanded with the conditions with the extreme support and efforts of our
internal advisor.

xi

CHAPTER # 1
INTRODUCTION

Chapter # 1

Introduction
CHAPTER ONE
INTRODUCTION

1.1 INTRODUCTION
As for introduction we would like to mention that the name of our project is
MECHANTRON CARVER we named it so because it consists of much mechanical as
well as electronic work so we named it after a word which is a combination of
mechanical and electronics.
What does it do? As the name implies it carves and the answer to the question that what
does it carve is that it carves shapes, Alphabets and some sort of images on a wooden
block.
It does so with the help of a CNC mechanism attached with it so now you can have an
idea of our machine that it is basically a CNC machine that will carve certain images and
shapes or alphabets on a wooden block and it will do so with the help of CNC machine
and our CNC machine comprises of 3 stepper motors some threaded rods iron base and a
beam and moreover a Control Unit (CU) which holds all the electronic part of the project
and that Control Unit controls everything that our hardware do.
After knowing how what our machine comprises of we would like to mention or would
like to give an idea of how CNC mechanism works and from where it came and why we
are using CNC for our final year project its applications and its uses and moreover its
advantages over old traditional methods that were used before the invention of CNC.

Sir Syed University of Engineering & Technology

Page 1

Chapter # 1

Introduction

1.2 ABOUT CNC

Figure 1.1 old times (Handwork)

In the old days everything was done by human power and manually by humans but then
we started doing many works by machines and then we controlled machines with motors
mounted on them to move them according to us and then we programmed them so follow
specific instructions given by us and these instructions are given in the form of some
codes that machine and hardware can understand so after all this advancement we started
using the machines with help of computers means we made a relation between machines
and another machine that controls the first machine and the 2 nd machine is computer the
other is called the hardware and when we started doing that with computer involvement
the major benefit we had is that the accuracy and the precision of the work increased
exponentially and the speed also increased and the only decrement was of human
involvement previously where 10 to 15 men were needed to complete some sort of
carving after CNC only 1 man is able to do more than that work in less time with more
accuracy and precision .
It came to popularity in 1940s to 1950s and after that the invention of CAD and CAM
softwares made the work and controlling of CNC easier.

Sir Syed University of Engineering & Technology

Page 2

Chapter # 1

Introduction

Now mentioned below are some applications of CNC machines.

1.3 APPLICATIONS OF CNC MACHINES

They are used in milling machines

They are used in lathe machines

They are used in laser cutting

They also are used in medical field

They are used in wood works


Figure 1.2 CNC PCB Drilling

They are used in metal carving

They are used in PCB making

They are used in coloring big objects like cars and things sort of that in that
case robotic arms are made and they are controlled with the computer
somewhat similar to that of CNC.

They are used

in fabric cutting.

They are used

in welding and spinning


and gluing.

Figure 1.3
Sir Syed University of Engineering & Technology

CNC Lathe machine


Page 3

Chapter # 1

Introduction

In short now in industries wherever heavy motion is required or heavy work needs to be
done CNC are used and by using CNC humans do much benefit to them.

1.4 WHY CNC?


The problem with the old methods was that they required an operator to operate and the
ability of an operator to do quality work for so long is limited
Whereas if we use CNC instead of that we will have numerous of benefits that why
CNCs are used and preferred over previous methods.

Figure 1.4: Result of Handwork (time Consuming)

1.5 BENEFITS OF CNC


There are numerous advantages of CNC machines and some major advantages and
benefits are given below:

Sir Syed University of Engineering & Technology

Page 4

Chapter # 1

Introduction

They are extremely efficient means their work is better and safer than human
work all they need is only they should be programmed once and they will keep
doing that as long as we want them to do the specific work.

They are easy to make and they perform greater work normally they are
comprised of stepper motors and their drivers and some threaded rods that serves
as the path of the machine so that the tool can move in desired direction.

They are very accurate and that is why they are used in many fields where
accuracy is required such as PCB making here extreme accuracy is required and
that is why CNC is used and does its work accurately.

Figure 1.5: precision & accuracy

1.6 WHY WE ARE USING CNC AS FYP


They are being widely used in many fields related to electronics and metal working wood
working and their importance can be shown that every big industry has them. So our aim
is to master our skill specially in such an area which is mostly required in every company
and not only this CNC machines are the requirements of many wood workers and metal
carvers so making a CNC machine and mastering our skills in making CNC or being an
expert in CNC work and knowing CNC will help us make our way in the future because
this project will help us and not only this but also this is a very sound project in which
Sir Syed University of Engineering & Technology

Page 5

Chapter # 1

Introduction

many electronic concepts are being implemented thus fulfilling the requirement of
making a final year project.
Now its enough knowledge about the background of the project now lets come to the
main introduction about the details of the project and hardware and here it goes:

1.7 INTRODUCTION TO THE HARDWARE

Our hardware consists of an iron made structure whose dimensions are 3.5x3
foots.

Other than this is it has a base and the purpose of base is that the thing that need
to carves on will be placed on the base and the base is made very stronger in order
to hold any force applied by the beam and cutting tool and the weight of the
object.

A beam fitted over base so that it can move over it and it will give the motion
along Y axis

A router which fitted over beam and it can move across the beam and thus it will
give the motion along X axis.

And the router will be able to move o upward and downward direction thus
giving the motion along Z axis.

The horizontal motion is called the motion along X axis.

The vertical motion is called and known as the motion along Y axis.

And the motion in upward and downward direction is called and known as the
motion along or in the Z axis direction.

Sir Syed University of Engineering & Technology

Page 6

Chapter # 1

Introduction

There are a total of 2 motors fitted on beam, one on its end and the other in the
router.

The purpose of the motor on one end of the beam is to move the router in X axis
direction.

The purpose of the other motor on the router is to move the cutting tool in the
Direction of Z axis.

1.8 INTRODUCTION TO THE ELECTRONIC PART


The electronics of the project comprises of the following things:

Stepper motors

A cutting tool or trimmer

Motor driver

Parallel breakout circuit board

A power supply

These were the main electronics components of the project and the other components like
transistors and ICs are soldered in the circuits.
And the in depth details of these components are given in the next section of the report
and in the upcoming next section of the report will be having the components details plus
that their theory and specs.

Sir Syed University of Engineering & Technology

Page 7

Chapter # 1

Introduction

1.9 INTRODUCTION TO THE SOFTWARE


The whole software system is based on the three softwares. One is CAD software for
making the design. 2nd is CAM software which generates the G-Code for the controlling
software & the Controlling software which read the G-Code and give instructions to the
motors for the required motion.

Sir Syed University of Engineering & Technology

Page 8

CHAPTER # 2
THEORY AND LITERATURE

Chapter # 2

Theory and Literature


CHAPTER TWO
THEORY AND LITERATURE

2.1 THEORY OF CNC


As the our project is based on CNC machine so in this section where we will be
providing you with the theory and literature of the components first of all we are going to
describe and give u theory about CNC machines
The Numerical Control Kernel (NCK) unit is the key component of a CNC system and
consists of a variety of modules that are sequentially executed in a synchronized
schedule. In this chapter the code interpreter will be addressed. This is responsible for
converting the part program and machine instructions into internal commands for NC. In
order to understand the code interpreter the first thing is to understand the part program
that is the input to the interpreter. After this, the structure and the functions of the code
interpreter will be addressed in detail.

2.2 INTERPRETER/SOFTWARE OF CNC


The code interpreter is a software module, which translates the part program into internal
commands for moving tools and executing auxiliary functions in a CNC system. Figure
2.1 depicts the internal behaviour of the CNC system and shows the functions of the
Man-Machine Control (MMC), Numerical Control Kernel (NCK), and Drives (DRV).
The part program that a programmer generates based on the shape of the part, cutting
conditions, and tools is entered into CNC via the MMC and the NCK subsequently
generates the control commands for the drivers from the part program through various
stages; calculating the movement path by interpreting the part program, generating

Sir Syed University of Engineering & Technology

Page 8

Chapter # 2

Theory and Literature

velocity profile and displacement for each axis by interpolation, smoothing the
movement by acceleration/deceleration (acc/dec) control, and generating position control
command. Among these stages, the interpreter could be considered as a simple task for
the conversion of G/M codes to the CNC-understandable internal data structures.
However, the design and implementation of the interpreter is a large and comprehensive
task because programming rules or grammar described in a programming manual and an
operating concept shown in an operation manual should be considered when developing
the interpreter. Therefore, the interpreter is the representative indicator
That shows the design concept and the functional aspect of a CNC and is a big part of
CNC as it generally spends more than 50% of the total development time to develop the
interpreter. In this chapter, the format and function of CNC part programs will be briefly
addressed and the architecture, such as the structure of an interpreter, execution
procedure, and memory structure, will be addressed. However, because the detailed
function of the CNC and the part program are slightly different for each CNC maker, the
program manual should be referenced to find out the detailed functions of any particular
CNC.

Figure 2.1: Internal behaviour

Sir Syed University of Engineering & Technology

Page 9

Chapter # 2

Theory and Literature

2.3 PART PROGRAM


Although the standard exists for generating a CNC part program, sequentially listing the
commands for executing CNC, each CNC maker has, in practice, their own code system
including their own commands. In this section, the common concept will be described
based on the standard code.

2.4 PROGRAM STRUCTURE


A part program contains the commands, called blocks, for machining a part and each
block can be defined using the following commands.
NC commands such as G, M, S, T, H, D, F code and related address
Call of sub program and displaying message
Setting variable and conditional program calls
In a part program, the English alphabet, Arabic numbers, and symbols are used.
A part program consists of a sequence of NC blocks, each block consists of several
words, and a word is composed of an address and number. The program number is a
number for identifying the particular part program on CNC, where more than one
program part is executed, and is written using a particular address and number in the
heading of a part program. In this book, address P is used but O or # is also used by some
specific CNC makers. A block consists of one block number, at least one word, and the
EOB, meaning the End Of Block. The word is the set of characters in a specific order.
The word is the minimum unit for internal processing and commanding the machine
tools toper form a particular behaviour. The word consists of an address and a subsequent
number NC word: address: value Y 20. The address is constructed from one of the
alphabetic characters (A Z) or a combination of alphabetic characters. The subsequent

Sir Syed University of Engineering & Technology

Page 10

Chapter # 2

Theory and Literature

number provides the data that is required to execute the behaviour related with the
address. Table 2.1 summarizes the
Addresses that have typically been used and the function that is related with the address.
Table 2.1: Typical addresses and associated functions

Among the addresses described in Table 2.1, the G addresses, for preparatory function,
and the M address, for auxiliary function, are largely related to the performance of CNC
system. G addresses denote commands for tool movement by moving the translational
axes or the rotary axes along the specified path. M addressed note commands for
controlling the on/off functions in machine tools. G-codes are classified into two types:
one is a modal code and the other is non-modal code. A modal type code is effective

Sir Syed University of Engineering & Technology

Page 11

Chapter # 2

Theory and Literature

throughout the following blocks until the modal cancel command is used. On the other
hand, a non-modal-type code is effective within the commanded block and automatically
cancelled by the next block. Modal-type codes are
Classified into several groups, called modal groups, with respect to the similarity of
function. In one block, it is prohibited to use more than one G-code that is included in the
same modal group. The address groups based on the functions of CNC system are
summarized in Table 2.2. As the standard for editing a part program based on these
addresses, ISO6983 has been widely used. However, each CNC maker has their own
G&M code system where maker-specific functions have been added to ISO 6983.
Accordingly, current G&M code systems for generating part programs depend on the
CNC system.
If the CNC system is changed, it is almost impossible to reuse the existing part program.
Therefore, in order to create a part program manually, it is necessary to refer to the
programming manual of the particular CNC maker. According to the level of CNC
system, the number of feasible addresses varies from several tens to several hundreds.
This means that the more feasible addresses a CNC system has, so the more advanced the
equipment category to which the CNC system belongs. Further, according to the machine
type, the applicable addresses are defined in different ways. The G-code list and the
modal group for a milling machine and a turning machine are summarized in Appendix
A. In the following, the interpreter is the module that has the function of interpreting the
various addresses, words, and grammar.

Sir Syed University of Engineering & Technology

Page 12

Chapter # 2

Theory and Literature

2.5 DESCRIPTION OF CODES


This table contains the information about the various codes we use in CNC systems and
their fuctions.
Table 2.2: summary of address groups based on CNC system function

Sir Syed University of Engineering & Technology

Page 13

Chapter # 2

Theory and Literature

2.6 SUMMARY
The interpreter plays the role of converting a user-edited part program into the internal
data format for execution. In order to understand the structure and the internal behaviour
of the interpreter, it is necessary to understand the structure of a part program and the
commands used therein.
In a CNC system, various co ordinate systems, such as the machine coordinate system,
work piece coordinate system, and local coordinate system, are supported for the
convenience of editing a part program and setting up the machine. Also, rotation,
mirroring, and scaling of a coordinate system are provided and by using
These functions it is possible to easily edit the part program.
This was the summary of how a CNC system works and it was basically the theory of
CNC systems and in the next upcoming sections we will also be describing to you how
our actual CNC system works and it also works in accordance with this theory. Actually
most of this work is done by our software named as MACH 3 and another LAZYCAM,
and they will be described in next section where we will be giving description of the
software and actual hardware.
So in this section we told you about the theory of CNC and we told how a CNC systems
works whatever is mentioned above are the steps on which any CNC relies to proceed
and now as far as our CNC is concerned the work and the mechanism mentioned above
in our case its all been done by MACH 3 which our controlling software so because of
this powerful software developed by ArtSoft all the above mentioned work is controlled
by mach 3 so we dont have to worry about that we focused ourselves more towards
electronic work rather than on mechanical work or on software.
And in the coming section you will knowing about the detail of the design and much
about how the whole thing is related and is brought to work.

Sir Syed University of Engineering & Technology

Page 14

CHAPTER # 3
DETAILS OF THE DESIGN

Chapter # 3

Details of the

Design

CHAPTER THREE
DETAILS OF THE DESIGN

3.1 BRIEFING
Our project which is a CNC carving machine is based on 3 axes. To carve something one
need to move in all the 3 dimensions to achieve the desired length, breadth and depth.
The trimmer which carves should be in a proper place to carve at an object.
The size of our project according to X and Y axis is 3.5 x 3. To move in such a long
direction certain components are installed which are discussed below:

Ball screws (of the same length of the size of structure)


Stepper motors
Gears
Chains

3.1.1 BALL SCREW


Ball screws are type of threaded rod on which a nut is with ball bearing inside to move
along the thread of the rod. (as shown in the Figure 3.1)

Figure 3.1: ball bearing moving in a ball screw

Sir Syed University of Engineering & Technology

Page 15

Chapter # 3

Details of the

Design

3.1.2 STEPPER MOTOR


We are using stepper motor of torque (12.1 N-m) enough for our structure to move freely.
Its a Nema 23 motor (shown in Figure 3.2 & 3.3). We are using stepper motor because of
precision movement.

Figure 3.2: stepper motor NEMA 24

Figure 3.3: NEMA 23 dimensions

Sir Syed University of Engineering & Technology

Page 16

Chapter # 3

Details of the

Design

3.1.3 GEARS AND CHAINS


Gears are used to provide power to the ball screws to rotate. It is essential to choose right
size of the gear to transfer maximum power the screws. Chains help the power transfer.
They make bond between gears.

Figure 3.4: Gears of different sizes

Figure 3.5: Chains used between gears

Sir Syed University of Engineering & Technology

Page 17

Chapter # 3

Details of the

Design

3.2 DESCRIPTION:
The aim of the motor is to move the gantry in horizontal direction. The X-axis is, on
which the gantry is upon. Along the gantry is the Y-axis and vertical on the gantry which
moves up and down is the Z-axis. The movement of X-axis is the gantry itself moving.
The Y-axis movement is the horizontal movement of the trimmer. Z-axis is the vertical
movement of the trimmer which is in and out of the depth.

Figure 3.6: Axes on the structure

The nut of the ball screw is attached to the gantry wall so as the screw rotate the nut
makes the gantry to move in horizontal direction in such a way that when the screw move
clockwise the gantry moves forward and when the screw moves counter clockwise the
gantry in reverse direction.

Figure 3.7: X, Y& Z axis

Sir Syed University of Engineering & Technology

Page 18

Chapter # 3

Details of the

Design

3.3 X-AXIS MOVEMENT


In X-axis movement the ball screw is attached along the both side of the frame with the
nut sited with the wall of gantry so that balanced movement is achieved. A single motor
is attached in centre of the frame. A gear is attached on the motor and another on each
side of the ball screw. Chain is attached on all the gears and the motor so that power of
the motor is transferred to the ball screw.

Ball
Ball

screw

screw

Figure 3.8: Position of the ball screws

Sir Syed University of Engineering & Technology

Page 19

Chapter # 3

Details of the

Design

As the pulses are given to the stepper motor the motor rotates in steps resulting in the
rotation of ball screw. As the screw rotate the gantry will move forward and backward.
The gantry is supported on bigger wheels which move on tracks at the side wall of the
frame.

X-axis

tracks

that

supports wheels

Figure 3.9: Illustrating X-axis movement

Sir Syed University of Engineering & Technology

Page 20

Chapter # 3

Details of the

Design

3.4 Y-AXIS MOVEMENT


In Y-axis movement the ball screw is attached to the gantry with the nut fixed on the
trimmer box so that the box is moved along the gantry for Y axis movement. Another
motor is attached at the side of wall of the gantry beside the screw. Here also the motor as
well as the screw is attached with the gears on which the chain moves. This transfers the
power from motor to the ball screw.

Ball
screw

Figure 3.10: Position of the ball screws

Sir Syed University of Engineering & Technology

Page 21

Chapter # 3

Details of the

Design

When the pulses are sent through the drive towards the stepper motor the motor rotates in
steps resulting in the movement of ball screw in clockwise and counter clockwise
direction. As the screw rotate the box on which the trimmer is attached move along the
side of gantry. The box is supported with bigger wheel on inside of the box which moves
along the track on the gantry

Y-axis

tracks

that

supports wheels

Figure 3.11: Illustrating Y-axis movement

Sir Syed University of Engineering & Technology

Page 22

Chapter # 3

Details of the

Design

3.5 Z-AXIS MOVEMENT


In Z-axis movement the ball screw is attached on the box of trimmer perpendicular to the
gantry and its nut is fixed with the trimmer. The motor of this screw is also attached to its
side. The same gears and chain setting is also made in this axis so that maximum power
is transferred to the screw.

Ball
screw

Figure 3.12: Position of the ball screws

Sir Syed University of Engineering & Technology

Page 23

Chapter # 3

Details of the

Design

On receiving the pulse from drive, motor rotates which results in the same step wise
rotation of the screw in clockwise and counter clockwise direction. The rotation of screw
causes the trimmer to move in upward and downward direction perpendicular to side of
gantry. It results in different depths of carving. The Z-axis is supported by its screw itself
because there is not that much load to be carried to cause damage in screw.

Z-axis

tracks

that

supports wheels

Figure 3.13: Illustrating Z-axis movement

3.6 CALCULATION OF TORQUE


Torque that is required for the motion of the axis r, that is increase by placing gear
(having more teeth) on the screws as the gear placed on the motor shaft. So the motor
torque m increased as required for the motion.
Sir Syed University of Engineering & Technology

Page 24

Chapter # 3

Details of the

Design

r = m * N

3.1

Where,
r = torque required for the motion
m = motor torque
N= ratio of the gears teeth.

r = 12.1 N-m
N=4
r = m * N
r = 12.1 * 4
r = 48.4 N-m

Sir Syed University of Engineering & Technology

Page 25

CHAPTER # 4
SYSTEM HARDWARE

Chapter # 4

System Hardware
CHAPTER FOUR
SYSTEM HARDWARE

4.1 INTRODUCTION OF STEPPER MOTORS


Stepping motors fill a unique niche in the motor control world. These motors are
commonly used in measurement and control applications. Sample applications include
ink jet printers, CNC machines and volumetric pumps. Several features common to all
stepper motors make them ideally suited for these types of applications.
These features are as follows:
1. Brushless: Stepper motors are brushless. The commutators and brushes of
conventional motors are some of the most failure-prone components, and they create
electrical arcs that are undesirable or dangerous in some environments.
2. Load Independent: stepper motors will turn at a set speed regardless of load as long
as load does not exceed the torque rating for the motor.
3. Open Loop Positioning: Stepper motors move in quantified increments or steps. As
long as the motor runs within its torque specification, the position of the shaft is known
at all times without the need for a feedback mechanism.
4. Holding Torque: stepper motors are able to hold the shaft stationary.
5. Excellent response: to start-up, stopping and reverse.
One of the most significant advantages of stepper motor is its ability to be accurately
controlled in an open loop system. Open loop control means no feedback information
about the position is needed. This type of control eliminates the need for expensive
sensing and feedback devices such as optical encoders. Your position is known simply by
keeping track of the input step pulses.

Sir Syed University of Engineering & Technology

Page 26

Chapter # 4

System Hardware

4.2 WHY WE ARE USING STEPPER MOTORS?


The following point emphasis to use the stepper motor:
1. The rotation angle of the motor is proportional to the input pulse.
2. The motor has full torque at standstill (if the windings are energized).
3. Precise positioning and repeatability of movement since good stepper motors
have an accuracy of 3-5% of a step and this error is non cumulative from one step
to the next
4. Excellent response to starting/ stopping/ reversing.
5. Very reliable since there are no contact brushes in the motor. Therefore the life of
the motor is simply dependant on the life of the bearing.
6. The motors response to digital input pulse provides open-loop control, making the
motor simpler and less costly to the motor.
7. It is possible to achieve very low speed synchronous rotation with a load that is
directly coupled to the shaft
8. A wide range of rotational speeds can be realized as the speed is proportional to
the frequency of the input pulse

4.3 WHEN STEPPER MOTOR IS USED


A stepper motor can be a good choice whenever controlled movement is required, they
can be used to advantage n applications where you need to control rotation angle, speed,
position and synchronism.
Because of the inherent advantage listed previously, stepper motors have found their
place in many different applications. Some of these include printers, plotters, high-end
office equipment, hard disk drives, medical equipment, fax machines, automotive and
many more.

Sir Syed University of Engineering & Technology

Page 27

Chapter # 4

System Hardware

4.4 TECHNICAL DESCRIPTION


Stepper motors are electromechanical equipments converting electrical energy into
rotation movement. Pulses of electricity drive rotor connected shaft. They are connected
to stepper motor drives which have high switching capability. This driver gets pulses
from a digital controller and each pulse drives the shaft of the motor for a determined
angle. This little angle is called step angle and fixed for each motor. The speed direction
of the movement depends on pulse sequence and pulse frequency.

Figure 4.1: Basic shape of a stepper motor

The rotation has not only a direct relation to the number of input pulses, but its speed is
also related to the frequency of the pulse. Stepper motors vary in the amount of rotation
that the shaft turns each time when a winding is energized. The amount of rotation is
called step angle as mentioned before and vary from 0.9 degrees (1.8 degrees is more
common) to 90 degrees Step angle determines the number of step per revolution. A
stepper with a 1.8 degrees step angle must be pulsed 20 times (1.8 x 200 =360) for the
shaft to turn one complete revolution sensitivity of stepper motors increases with the
number of steps in one revolution like its cost.
Obviously, a smaller step angle increases the accuracy of a motor, but stepper motors
have an upper limit to the number of pulses they can accept per second, heavy-duty
steppers usually have a maximum pulse rate (or step rate) of 200 or 200 steps per second,
Sir Syed University of Engineering & Technology

Page 28

Chapter # 4

System Hardware

so they have an effective high speed of one to three revolutions per second (60 to
180rpm).
Some smaller steppers can accept a thousand or more pulses per second, but they dont
provide very torque and are not suitable as driving or steering motors. The stepper motor
coils are typically rated for a particular voltage. The coils ac as inductors when voltage is
supplied to them as such they dont instantly draw their full current and in fact may never
reach full current at high stepping frequencies. The electromagnetic field produces by the
coil is directly related to the amount of current draw. The larger the electromagnetic field
the more torque the motors have the potential of producing. The solution to increasing
the torque is to ensure that the coils reach full current draw during each step.
Stepper motor can be views as electric motors without commutators. Typically, all
windings in the motor are part of the stator, and the rotor is either a permanent magnet or,
In the case of variable reluctance motors, a toothed block of some magnetically soft
material. All of the commutation must be handled externally by the motor controller, and
typically, the motors and the controllers are designed so that the motor may be held in
any fixed position as well as being rotated one way or the other. It should be noted that
stepper motors couldnt be motivated to run at their top speeds immediately from a dead
stop. Applying too many pulses right off the bat simply causes the moor to freeze up. To
achieve top speeds, the motor must be gradually accelerated.
Actuation of one of the windings in a stepper motor advances the shaft. Continue to
apply the current to the winding and the motor wont turn any more. In fact, the shaft will
be locked, as if brakes are applied. As a result of this interesting locking effect, you never
need to add a braking circuit to a stepper motor, because it has its own brakes built in. the
amount of breaking power of a stepper motor is expressed as holding torque.

Sir Syed University of Engineering & Technology

Page 29

Chapter # 4

System Hardware

4.5 STEPPER MOTOR APPLICATIONS


Stepper motors generally used in a variety of applications where precise position control
is desirable and the cost or complexity of a feedback control system is unwarranted
Here are few applications where stepper motors are often found:

Printers

CNC Machines

3D printer/prototyping machines

Laser cutters

Pick and place machines

Linear actuators

Hard disks

4.6 STEPPER MOTOR SPECIFICATIONS

NEMA 17, 23, and 34 frame sizes

3000 rpm max speed

1.8 deg step angle

Up to 1710 oz-in. (12.1 N m) holding torque

200 counts/revolution resolution

NEMA 23 and 34 motor compatibility

Low profile 1 in. (25.4 mm) height design and easy mounting

Industrial construction

Sir Syed University of Engineering & Technology

Page 30

Chapter # 4

System Hardware

4.7 STEPPER MOTOR TYPES


4.7.1 VARIABLE RELUCTANCE(VR)
This type of stepper motor has been around for a long time. It is probably the easiest to
understand from a structural point of view. Figure 1 shows a cross section of a typical
V.R. stepper motor. This type of motor consists of a soft iron multi-toothed rotor and a
wound stator. When the stator windings are energized with DC current the poles become
magnetized. Rotation occurs when the rotor teeth are attracted to the energized stator
poles.

Figure 4.2: Cross-section of a variable reluctance (VR) motor.

4.7.2 PERMANENT MAGNET (PM)


Often referred to as a tin can or canstock motor the permanent magnet step motor is
a low cost and low resolution type motor with typical step angles of 7.5 to 15. (48 24
steps/revolution) PM motors as the name implies have permanent magnets added to the
motor structure. The rotor no longer has teeth as with the VR motor. Instead the rotor is
magnetized with alternating north and south poles situated in a straight line parallel to the
rotor shaft. These magnetized rotor poles provide an increased magnetic flux intensity
and because of this the PM motor exhibits improved torque characteristics when
compared with the VR type.

Sir Syed University of Engineering & Technology

Page 31

Chapter # 4

System Hardware

Figure 4.3: Principle of a PM or tin-can stepper motor.

4.7.3 HYBRID (HB)


The hybrid stepper motor usually is more expensive than the PM stepper motor, but
provides better performance with respect to step resolution, torque and speed. Typical
step angles for the HB stepper motor range from 3.6 to 0.9 (100 400 steps per
revolution). The hybrid stepper motor combines the best features of both the PM and VR
type stepper motors. The rotor is multi-toothed like the VR motor and contains an axially
magnetized concentric magnet around its shaft. The teeth on the rotor provide an even
better path which helps guide the magnetic flux to preferred locations in the air gap. This
Further increases the detent, holding and dynamic torque characteristics of the motor
when compared with both the VR and PM types. Figure 1 shows a cross section of a
typical HB stepper motor.
The two most commonly used types of stepper motors are the permanent magnet and the
hybrid types. Generally speaking, the hybrid motor may be the better choice along with
reducing cost, for it offers better performance with respect to step resolution, torque and
speed.

Figure 4.4: Cross-section of a hybrid stepper motor.

Sir Syed University of Engineering & Technology

Page 32

Chapter # 4

System Hardware

Table 4.1: stepper motor types and its characteristics

Motor type characteristics

PM

VR

Hybrid

Efficiency

High

Low

High

Rotor Inertia

High

Low

Low

Speed

High

High

Low

Torque

Fair

Low

High

Power O/P

High

Low

Low

Damping

Good

Poor

Poor

Typical Step Angle

1.8,15,30

7.5, 15, 30

0.18,0.45

4.8 STEPPER MOTOR DRIVE TYPES


4.8.1 UNIPOLAR STEPPER MOTOR
A unipolar stepper motor has one winding with centre tap per phase. Each section of
windings is switched on for each direction of magnetic field. Since in this arrangement a
magnetic pole can be reversed without switching the direction of current, the
commutation circuit can be made very simple (e.g. a single transistor) for each winding.
Typically, given a phase, the centre tap of each winding is made common: giving three
leads per phase and six leads for a typical two phase motor. Often, these two phase
commons are internally joined, so the motor has only five leads.
A microcontroller or stepper motor controller can be used to activate the drive transistors
in the right order, and this ease of operation makes unipolar motors popular with
hobbyists; they are probably the cheapest way to get precise angular movements.

Sir Syed University of Engineering & Technology

Page 33

Chapter # 4

System Hardware

Figure 4.5: Unipolar stepper motor

(For the experimenter, the windings can be identified by touching the terminal wires
together in PM motors. If the terminals of a coil are connected, the shaft becomes harder
to turn. One way to distinguish the centre tap (common wire) from a coil-end wire is by
measuring the resistance. Resistance between common wire and coil-end wire is always
half of what it is between coil-end and coil-end wires. This is because there is twice the
length of coil between the ends and only half from centre (common wire) to the end.) A
quick way to determine if the stepper motor is working is to short circuit every two pairs
and try turning the shaft, whenever a higher than normal resistance is felt, it indicates that
the circuit to the particular winding is closed and that the phase is working.
4.8.2 BIPOLAR STEPPER MOTOR
Bipolar motors have a single winding per phase. The current in a winding needs to be
reversed in order to reverse a magnetic pole, so the driving circuit must be more
complicated; typically with an H-bridge arrangement (however there are several off the
shelf driver chips available to make this a simple affair). There are two leads per phase,
none are common.
Static friction effects using an H-bridge have been observed with certain drive topologies
because windings are better utilized, they are more powerful than a unipolar motor of the
same weight. This is due to the physical space occupied by the windings. A unipolar
motor has twice the amount of wire in the same space, but only half used at any point in
Sir Syed University of Engineering & Technology

Page 34

Chapter # 4

System Hardware

time, hence is 50% efficient (or approximately 70% of the torque output available).
Though bipolar is more complicated to drive, the abundance of driver chips means this is
much less difficult to achieve.
An 8-lead stepper is wound like a unipolar stepper, but the leads are not joined to
common internally to the motor. This kind of motor can be wired in several
configurations:

Unipolar.

Bipolar with series windings. This gives higher inductance but lower current per
winding.

Bipolar with parallel windings. This requires higher current but can perform
better as the winding inductance is reduced.

Bipolar with a single winding per phase. This method will run the motor on only
half the available windings, which will reduce the available low speed torque but
require less current.

Figure 4.6: Bipolar stepper motor

Sir Syed University of Engineering & Technology

Page 35

Chapter # 4

System Hardware

4.8.3 UNIPOLAR VERSUS BIPOLAR


Permanent magnet and hybrid stepping motors are available with either unipolar or
bipolar or bifilar windings. The choice between using unipolar or bipolar drive system
rests on issues of drive simplicity and power to weight ratio.
Bipolar motors have approximately 30% more torque than an equivalent unipolar motor
of the same volume. The reason for this is that only one half of a winding is energized at
any given time in a unipolar motor. A bipolar motor utilizes the whole of a winding when
energized. The higher torque generated by a bipolar motor does not come without a price.
Bipolar motors require more complex control circuitry than unipolar motors. This will
have an impact on the cost of an application.
If in doubt, a unipolar motor or bifilar motor are good choices. These motors can be
configured as a unipolar or bipolar motor and the application tested with the motors
operating in either mode.
Table 4.2: Comparison b/w Unipolar & Bipolar

Unipolar

Bipolar

Unidirectional current flow

Bidirectional current flow

Half winding energized at a time

Whole winding energized at a time

Less torque as compare to bipolar

More torque as compare to unipolar

Low cost

High cost

Simple drive system

Complex drive system

Usually five or six wires

Usually four wires

Sir Syed University of Engineering & Technology

Page 36

Chapter # 4

System Hardware

You can identify weather the stepper motor is Unipolar or Bipolar by the following:
1- Symbol
2- No. of Wire
3- No. of Coil

4.9 STEPPER MOTOR WIRING SCHEMES


Most stepper motors have 6 wires; however there are motors with 4, 5, or 8 wires also.
Each of the four coils is made up of one length of wire with two ends. One end is called
live and the other end is called common. In a five wire stepper motor all four commons
are joined together, in a six wire stepper motor two pairs of common wires are joined
together, and in an eight wire stepper motor none of the four common wires are joined
together.

Figure 4.7: wire stepper motor configuration

Figure 4.8: Motor standard wire color

Sir Syed University of Engineering & Technology

Page 37

Chapter # 4

System Hardware

If you dont have a schematic diagram for your stepper motor- for example if it was
salvaged from an old printer it is very easy to work out on motor which wire is which!
You can identify the stepper motor wiring sequence by using the following
1- Standard color
2- Resistance measurement
Systematically use a multimeter to measure the resistance between different pairs of
wires. All four coils will have near identical resistance if they did not the motor
would not function properly. Therefore if the pair of wires is a common, why is this?
Because two live wires have two coils between them whereas a common and a live
have just one coil between them
When you have identified the common wires, be sure to label them.
Shortcut for finding proper wiring sequence:
Connect the center tap(s) to the power source (or current-limiting resistor) connect
the remaining 4 wires in any pattern. If it does not work, you only need try these 2
swaps
1

- (arbitrary first wiring order)

- (switch end pair)

- (switch middle pair)

You are finished when the motor turns smoothly in either direction. If the motor turns in
the opposite direction from desired, reverse the wires so that ABCD would become
DCBA.

Sir Syed University of Engineering & Technology

Page 38

Chapter # 4

System Hardware

4.10STEPPER MOTOR STEPPING MODES


Stepper motor drivers often have different modes of operation. These different modes
determine in what sequence the coils are energized to make the motor shaft move
appropriately. There are four types of these stepping modes. However, only three of the
excitation modes are common in most stepper drivers.

4.10.1 ONE PHASE DRIVE / SINGLE STEP DRIVE / WAVE DRIVE


The simplest mode turns one coil ON at a time. 48 pulses are needed to complete one
revolution. Each pulse moves rotor by 7.5 degrees. The following sequence has to be
repeated 12 times for motor to complete one revolution.
Table 4.3 Wave Driving sequence

Pulse
1
2
3
4

Coil a1 Coil b1 Coil a2 Coil b2


ON
ON
ON
ON

4.10.2 TWO PHASE DRIVE / HIGH TORQUE DRIVE / FULL DRIVE


High power / precision mode turns ON two coils on at a time. 48 pulses are needed to
complete one revolution. Each pulse moves rotor by 7.5 degrees. The following sequence
has to be repeated 12 times for motor to complete one revolution.

Table 4.4 Full Step Driving sequence

Pulse

Coil a1 Coil b1 Coil a2 Coil b2

Sir Syed University of Engineering & Technology

Page 39

Chapter # 4

System Hardware
1
2
3
4

ON

ON
ON

ON
ON

ON

ON
ON

4.10.3 TWO PHASE DRIVE / HALF STEP DRIVE / DUAL DRIVE


Stepping is doubled and motor needs 96 pulses to complete one revolution. Each pulse
moves rotor by approximately 3.75 degrees. Notice the mix of single stepping mode
(lighter green) and high torque mode (darker green).
Table 4.5 Half Step Driving sequence

Pulse
1
2
3
4
5
6
7
8

Coil a1 Coil b1 Coil a2 Coil b2


ON
ON
ON
ON
ON
ON
ON
ON
ON
ON
ON
ON

4.10.4 MICROSTEPPING
The micro-stepping mode is the most complex of all the stepping modes. That is why
some stepper drivers only offer full and half step modes. Micro-stepping is when the
current applied to each winding is proportional to a mathematical function, providing a
fraction of a full step. The most common divisions are 1/4th, 1/8th, 1/10th, etc. However,
there are some drivers that provide up to 1/256th of a full step. Micro-stepping provides
greater resolution and smoother motor operation. This is very advantageous as it reduces
The need for mechanical gearing when trying to achieve high resolution. However,
micro-stepping can affect the repeatability of the motor. It is important to take into
consideration the step modes and how best to utilize them when designing the CNC

Sir Syed University of Engineering & Technology

Page 40

Chapter # 4

System Hardware

router drive system. It is also very important when choosing a stepper motor driver. Some
drivers will micro-step more smoothly than others.

Table 4.6 Comparison of stepper motor drive sequence


Name

Polarit

Description

Wave drive, 0001


ce

---+
y

Consumes the least power. Only one phase

One-Phase

0010

--+-

is energized at a time. Assume positional

0100

-+--

accuracy

regardless.

Assures

1000

+---

accuracy

regardless

of

Hi-Torque,

0011

--++

imbalance in the motor.


This sequence energizes

Two-Phase

0110

-++-

phases, which offers an improved torque-

1100

++--

speed product and greater holding torque.

1001
0001

+--+
---+

Effectively doubles the stepping resolution of

0011

--++

the motor, but the torque is not uniform for

0010

--+-

each step. (Since switching occurs between

0110

-++-

Wave Drive and Hi-Torque with each step,

0100

-+--

torque alternates each step).This sequence

1100

++--

reduces

1000

+---

sometimes cause a motor to stall at a

1001

+--+

particular resonant frequency. Note that this

Half-Step

Sequen

motor

resonance

positional

any

winding

two

adjacent

which

can

sequence is 8 steps

The above table describes 3 useful stepping sequences and their relative merits. The
polarity of terminals is indicated with +/-. After the last step in each sequence the

Sir Syed University of Engineering & Technology

Page 41

Chapter # 4

System Hardware

sequence repeats. Stepping backwards through the sequence reverses the direction of the
motor.
Figure 4.9 Excitation sequence for driving modes

Sir Syed University of Engineering & Technology

Page 42

CHAPTER # 5
CNC ELECTRONICS

Chapter # 5

CNC Electronics
CHAPTER FIVE
CNC ELECTRONICS

5.1 INTRODUCTION
CNC electronics are a vital part of any CNC machine aside from the motors and CNC
controllers; there are many electronic components as that assist in the machine operation.

Figure: 5.1: Components of the CNC

There are many electronic aspects of a CNC router that are vital to its function. Things
such as limit and proximity switches, motor wiring, correct cable sizing and selection etc.
These features are, in my opinion, vital to building a reliable machine. Yet many people
neglect these feature because of lack of know how or budget. Many of these add-ons
cost only pennies to install and could save either your machine or the piece you are
working on. For the most part, adding these components is by no means difficult.
There are also some CNC electronic features that are not often required. Such as manual
pulse generators, home and e-stop buttons, touch-off tool sensors etc. These things may
or may not be essential to the machine, depending on the user, but do increase user

Sir Syed University of Engineering & Technology

Page 43

Chapter # 5

CNC Electronics

There are the following objects that are included in the overall system of the CNC
machine. They are:
Wirings

Power supplies

Limit switches

Breakout board

Buttons & Switches

Connectors

Figure: 5.2 Electronic components of the CNC

5.2 MOTION CONTROL


Motion control can be applied in many categories such as robotics, CNC operated
machine tools and kinematics where motion control in kinematics are usually simpler. It
Sir Syed University of Engineering & Technology

Page 44

Chapter # 5

CNC Electronics

can be mainly use now days with packaging, textile, assembly instructions, printing and
semiconductor production. The hardware of a motion control system usually consists of
derive system, motors, controller box, computer. CNC machines used programmable
commands to make input motion to the machine easier rather than using cranks or other
conventional machine tools almost all CNC machine tools can have programmable
motion types whether it would be rapid. The amount of motion the feedback rate in the
axis to move.
Motion control is the simplest function of any CNC machine. It is precise consistent and
automatic system of control. CNC equipment need two or more modes of direction to
which they are called axes .there are two common modes that are linear are rotary.

5.3 ELECTRONIC SYSTEM OVERVIEW

Figure: 5.3: Electronic system overview

Sir Syed University of Engineering & Technology

Page 45

Chapter # 5

CNC Electronics

5.4 DESCRIPTION OF BLOCK DIAGRAM


The block diagram of the system consist of laptop which sends signals to break out board
and these signals are given to motor drives and motors move to our desired positions.
Finally the trimmer is used to carve the things on wooden pieces.

Power Supply
Motor
Driver

Motor

Motor
Breakout board

Driver

Motor

Motor
Driver

Motor

Parallel Port cable

Laptop

Trimmer

Figure: 5.4: Block Diagram

Sir Syed University of Engineering & Technology

Page 46

Chapter # 5

CNC Electronics

5.5 SYSTEM FLOW CHART

Figure: 5.5: System flow chart

Sir Syed University of Engineering & Technology

Page 47

Chapter # 5

CNC Electronics

5.6 CONTROL UNIT (CU) OF OUR MACHINE


The Control Unit (CU) is the brain of a CNC system. A CU completes the all important
link between a computer system and the mechanical components of a CNC machine. The
controller's primary task is to receive conditioned signals from a computer or indexer and
interpret those signals into mechanical motion through motor output. There are several
components that make up a controller and each component works in unison to produce
the desired motor movement. The word CU or controller is a generic term that may
refer to one of several devices, but usually refers to the complete machine control system.
This system may include the protection circuitry, stepper or servo motor drivers, power
source, limit switch interfaces, power controls, and other peripherals. Owners, operators,
designers, and builders of CNC devices should understand the tasks performed by these
components and how they affect machine performance. There are three primary CNC
controller components that make up a CNC controller, the power supply unit, the
circuitry protection system, and the motor driver.

5.6.1 THE POWER SUPPLY UNIT


The same conditions are true for CNC devices. They require a low-voltage
communication line, through which the computer tells the machine what to do, and a
power source that provides the power for moving, cutting, and other such operations. A
power converter, usually referred to as the power supply unit (PSU), is often used to
change the form of the supplied power from alternating current (AC) from the power
grid, to direct current (DC) that is more easily used by the machines drive motors. The
power supply handles large voltages and currents that could be harmful to the NC
circuitry. Therefore, the power source, motor drivers, and motors are often separated

Sir Syed University of Engineering & Technology

Page 48

Chapter # 5

CNC Electronics

from the computer with a circuitry protection system that isolates surges in electrical
power. The power supply that we are using has max ratings of:

13.38 volts (offload)

29 amp

5.6.2 THE CIRCUITRY PROTECTION SYSTEM


The circuitry protection system contains a breakout board to isolate signals from the
computer, distribute the signals to the desired drivers, and also allows easy hook up of
peripherals such as limit switches that feed information back to the computer. Fuses are
also part of the circuitry protection system. Fuses could save the equipment in case of
electrical spikes, shorts, or faulty wiring.
A low-voltage communication signal passes from the computer through the breakout
board unchanged to the motor drivers. This isolated your computer from the CNC
controller circuit but allows the signals to carry through to your motor drivers.

5.6.3 THE MOTOR DRIVERS:


The motor drivers receive the communication signal and then coordinate pulses of the
desired current and voltage to elicit the movement in the drive motors. The motor drivers
may communicate position information one way to the motor (open loop system), or send
and receive position information (closed loop system), depending on the users choice of
drive system. More on these systems may be found in the drivers sections.

Sir Syed University of Engineering & Technology

Page 49

Chapter # 5

CNC Electronics

Figure 5.6: CU of our project

The CU performs all the necessary information that are sent by the laptop and it performs
the movement of the motors and reach to our desired position and at last the trimmer cuts
the designs on wooden pieces. Some carve results have been shown at the end of the
report.

5.7 STEPPER MOTOR DRIVER IMPLEMENTATION


The signals:
The signal lines coming from the computer operate on 5V DC supplied by the computer
communication port, and is a square wave form called a Transistor-to-Transistor Logic
(TTL) signal. This signal is essentially a series of small pulses from 0V to +5V that
represent 0s and 1s in a binary computer language. This signal is a form of a PulseWidth Modulated (PWM) signal where the length of the pulse is varied to indicate

Sir Syed University of Engineering & Technology

Page 50

Chapter # 5

CNC Electronics

information. The width of the pulse determines the binary code sent; either a 0 or a 1
as communicated by the computer and interpreted by the motor driver. More on the
signals may be found in the signals page.
The signal from the computer to the breakout board is the same as that from the breakout
board to the motor driver. Remember, the breakout board provides circuit protection and
signal distribution. Therefore, the signal coming out of the breakout board is also a 5V
TTL signal of the same form. However, as discussed previously, the signal after the
driver has been conditioned as needed to provide the large move voltage and current
needed to drive the machine

Summary Of Components:
The computer generates the signal which passes through the breakout board. The motor
drivers and limits switches hook up to the breakout board. The power supply unit
provides the correct voltage and current required by the motor drivers and the motors.
The motor drivers receive the position signals from the breakout board and supply the
correct power to the motors to make them rotate to the correct positions.

Sir Syed University of Engineering & Technology

Page 51

Chapter # 5

CNC Electronics

Stepper driver board with L297 L6203:


This is a Bipolar stepper driver 4A - 42V for 1 Axis

Figure 5.7: drive circuit for motors

Working of Stepper driver board with L297 L6203:


This Step motor controller uses the L297 and L6203N driver combination; it can be used
as stand alone or controlled by microcontroller. It is designed to accept step pulses at up
to 25,000 per second. An on-board step pulse generator can be used if desired (40-650
pps range). Single supply operation is standard .All eight inputs are pulled up to +5V by

Sir Syed University of Engineering & Technology

Page 52

Chapter # 5

CNC Electronics

RP1 (4.7K) and are buffered by 74HC244. The output driver is capable of driving up to
2Amp into each phase of a two-phase bipolar step motor. The motor winding current is
limited by means of a 35KHZ-chopper scheme. The potentiometer (R6) is for varying the
winding currents. The nature of the chopping scheme eliminates the need for external
current limiting resistors on the motor windings; this simplifies connections and
increases efficiency.
A useful of this design is the idle current reduction mode. The amount of reduction is
fixed at approximately 50% from whatever the running current is set at. Similarly, the
motor current can be commanded to shut entirely off.
The internal +5V voltages required for operation are derived from the stepper motor
supply. The motor supply voltages should be at least 9V, but must never exceed 32V.
The motors currents and voltage must be adjusted the help of potentiometers to maintain
a certain speed and torque to achieve our desired movements.L6203 is efficiently used
for power driving we have used it for high current because we are using high current
motors just have a precise movement of our structure. If we want to move to higher
currents we have to use the other Mosfets to drive them smoothly.

Sir Syed University of Engineering & Technology

Page 53

Chapter # 5

CNC Electronics

Communication with PC:


Breakout boards are common electrical components that take a bundled cable and break
out each conductor to a terminal that can easily accept a hook-up wire for distribution to
another device. They are a common item in electronic projects and enable easy, clean
installation of electronic devices.
The breakout board is positioned between your computer or indexer and the motor
drivers and serves two purposes in the CNC control system: circuit protection and signal
distribution.
Inside the controller box, we see a direction signal and a step signal being distributed
from the breakout cirrus board to each driver. A common ground line is distributed in the
same fashion. A power source also distributes power to each driver.
Most breakout devices are passive devices that do not offer circuit protection, such as
that shown at the top of this article. For CNC applications, it is highly recommended that
you use an active breakout device with some type of circuitry protection. The most
effective solution involves the use of opto-isolators that use pulses of light to transmit
information across an air gap. Others will have fuses that prevent excessive current
passing through your computer.
Some breakout devices allow you to distribute the power from the power source to the
motor drivers. Others simply distribute the signals and require direct hook-up from the
power source to the drives, bypassing the actual board. Some boards require external
power, and if your power source. Be sure to read the manufacturers specifications
carefully and plan accordingly

Sir Syed University of Engineering & Technology

Page 54

Chapter # 5

CNC Electronics

Breakout board:

Figure 5.8 breakout board PCB

Limit switches:
A mechanical limit switch interlocks a mechanical motion or position with an electrical
circuit. A good starting point for limit-switch selection is contact arrangement. The most
common limit switch is the single-pole contact block with one NO and one NC set of
contacts; however, limit switches are available with up to four poles.
Limit switches also are available with time-delayed contact transfer. This type is useful in
detecting jams that cause the limit switch to remain actuated beyond a predetermined
time interval.

Sir Syed University of Engineering & Technology

Page 55

Chapter # 5

CNC Electronics

Other limit switch contact arrangements include neutral-position and two-step. Limit
switches feature a neutral-position or center-off type transfers one set of contacts with
movement of the lever in one direction. Lever movement in the opposite direction
transfers the other set of contacts. Limit switches with a two-step arrangement, a small
movement of the lever transfers one set of contacts, and further lever movement in the
same direction transfers the other set of contacts.
Maintained-contact limit switches require a second definite reset motion. These limit
switches are primarily used with reciprocating actuators, or where position memory or
manual reset is required. Spring-return limit switches automatically reset when actuating
force is removed.

Figure 5.9: diagram of limit switches

In the simplest case, a switch has two conductive pieces, often metal, called contacts,
connected to an external circuit, that touch to complete (make) the circuit, and separate to
open (break) the circuit. The contact material is chosen for its resistance to corrosion,
because most metals form insulating oxides that would prevent the switch from working.

Sir Syed University of Engineering & Technology

Page 56

Chapter # 5

CNC Electronics

5.8 COMPUTER
We purchase a laptop for our work its specifications are:

Pentium 4 (Compaq)

2.4 GHz

1 gb ram

Parallel port

Lan and video card

Fully installed with the required softwares

Figure 5.10: laptop

Sir Syed University of Engineering & Technology

Page 57

Chapter # 5

CNC Electronics

5.9 STEPPER MOTOR DRIVER


The stepper motor driver is made with the combination of l297, l298 & l6203.The l297 is
a logic driver while l6203 is a power driver to drive our motors.

Figure 5.11: l6203 & L297 driver

5.10STEPPER MOTORS

Motor type : Bi- phase pm(permanent magnet) motor

Drive system: bipolar/unipolar

Step angle: 1.8 degrees

Rotation: 200 pulses

Sir Syed University of Engineering & Technology

Page 58

Chapter # 5

CNC Electronics

5.10.1 FUNCTIONS

Smooth drive function

Automatic current down

Automatic current off

Switch function

5.10.2 WAVE SEQUENCE OF STEPPER MOTOR

Figure 5.12: wave Timing output

Sir Syed University of Engineering & Technology

Page 59

Chapter # 5

CNC Electronics

5.11TRIMMER /MINI ROUTER


A router is a tool used to route out (hollow out) an area in the face of a relatively hard
work piece, typically of wood or plastic. The main application of routers is in
woodworking, especially cabinetry.
Like most everything else involving CNC routers, there are a variety of spindle types out
there. Some made for wood, some made for metal, etc. As usual there are many factors
involved when choosing a spindle for either your pre-build machine, or your homemade
CNC machine. We are using a Sencan router that is:

Figure 5.13: sencan router for carving

It is extremely useful for small wood works.

Sir Syed University of Engineering & Technology

Page 60

Chapter # 5

CNC Electronics

Features:

Sencan 560602

No load speed is 30000r/min.

Rated input power is 500W

Collet chuck diameter is 6mm

Contents:

This is our electrical trimmer or cutting tool

Details are given above.

This will carve wood and this will be held on the router.

It will carve with the help of drilling bits different bits are of different uses.

Figure 5.14: router bits for carving

The above bits are used for different shapes carving upon a wooden block. We have used
three different set of bits to have different kinds of designs. Moreover we can have some
other bits for other designing purpose.

Sir Syed University of Engineering & Technology

Page 61

CHAPTER # 6
SYSTEM SOFTWARE

Chapter # 5

System Software
CHAPTER SIX
SYSTEM SOFTWARE

6.1 SYSTEM SOFTWARE


After all the work and construction in the hardware section some sort of software are
must to be used for interfacing the machine or hardware with the computer so for that
purpose we went through many softwares.
The whole software system is based on three softwares, the CAD software, CAM
software and controlling software. Our system will work such like this that whatever
shape design comes in our mind, it will be drawn/ designed in the CAD software. Then
this drawing to be imported to the CAM software, or we can use any image file too. Then
G-code generated through the CAM software will be imported to our controlling
software. The overall software process is shown in figure below:

CAD

CAM

Mach3

Figure 6.1: whole process of system software

Sir Syed University of Engineering & Technology

Page 62

Chapter # 5

System Software

6.2 CAD SOFTWARE


Computer Aided Design is the use of technology for the process of design. It provides the
user with input-tools for the purpose of streamlining design processes. We will make any
shape or design according to our requirement on the Auto CAD.
CAD environments often involve more than just shapes. As in the manual drafting of
technical and engineering drawings, the output of CAD must convey information, such as
materials, processes, dimensions, and tolerances, according to application-specific
conventions.
CAD may be used to design curves and figures in two-dimensional (2D) space; or
curves, surfaces, and solids in three-dimensional (3D) objects.
CAD softwares are not only used in CNC drawings but this combination of CAD CAM
and CNC is making a lot of advancement in many fields.

Figure: 6.2: sample design made by using CAD software

Sir Syed University of Engineering & Technology

Page 63

Chapter # 5

System Software

Uses of CAD software


Cad is used to design cars and their engines , mobile phones ,
homes and by architectures , buildings and mega structures are
somewhere also designed by using CAD softwares

almost

everything that is first imagined is then made on computer using


CAD softwares and then it goes into manufacturing.

Figure 6.3: logo of AutoCAD

6.3 CAM SOFTWARE


Computer Aided Manufacturing is the use of computer software to
control machine tools and related machinery in the manufacturing
of work pieces. CAM may also refer to the use of a computer to
assist in all operations of a manufacturing plant, including
planning, management, transportation and storage.

Figure 6.4: logo of LazyCam

Here we use CAM software to convert our design into the graphical code (G-Code). This
is then imported to our controlling software. The software we going to use as our cam
software is LAZYCAM.
Its purpose is to import standard dxf, cmx, and other file types to allow those that do not
use CAM programs to more easily generate G-code to be run under Mach3.
We can import CAD designs having spesific formats or can import image files ( bitmap ,
jpeg ) .

Sir Syed University of Engineering & Technology

Page 64

Chapter # 5

System Software

CAM software breaks the design into the chains, entities so that G-Code is then
generated according to the parameters.

Figure 6.5: Environment of LAZYCAM

Then the G-code generated from CAM is posted to the Mach3 which we are using as
controlling software.

6.4 CONTROLLING SOFTWARE


After a piece of work we have chosen our controlling software. We have considered
number of softwares and Mach3 developed by ARTSOFT was supposed to be the most
suitable among all the details of Mach3 are given below:

Sir Syed University of Engineering & Technology

Page 65

Chapter # 5

System Software

6.4.1 MACH3
Mach 3 will be used for carving and controlling. Mach 3 was developed by ArtSoft in
2001 and it is known to be as the best pc based CNC software on the internet claimed by
tens of thousands of its users.
The Mach series of software was originally developed for the home hobbyist, but has
quickly turned into one of the most versatile control packages for industrial use as well.

Figure 6.6: Environment of Mach3

Sir Syed University of Engineering & Technology

Page 66

Chapter # 5

System Software

FEATURES OF MACH3

Converts a standard PC to a fully featured, 6-axis CNC controller

Allows direct import of DXF, BMP, JPG, and HPGL files through LazyCam

Visual G-code display

Generates G-code via LazyCam or Wizards

Fully customizable interface

Customizable M-Codes and Macros using VBscript

USES OF MACH3
It is used in many applications for example:

It is used in lathes

it is also used for milling purposes

It is also used in laser works

It is well used in plasma works.

It is also used in gear cutting.

Sir Syed University of Engineering & Technology

Page 67

CHAPTER # 7
RESULT AND DISCUSSION

Chapter # 7

Result And Discussion

7.1 RESULT:

Figure 7.1: Carved Result 1

Figure 7.2: Carved Result 2

Sir Syed University of Engineering & Technology


Page 68

Chapter # 7

Result And Discussion

Figure 7.3: Carved Result 3

Figure 7.4: Carved Result 4

Sir Syed University of Engineering & Technology


Page 69

Chapter # 7

Result And Discussion

7.2 DISCUSSION:
As we all know that we are not perfect and specially at our level i.e. student level we
usually make so much blunders so we did the same as we were in learning process. We
faced so many difficulties during different phases of our project and they are discussed
below:
7.2.1 MECHANICAL ISSUES:
As our mechanical is the most attractive thing in our project so I would like to mention
the issues that we had faced during making of our mechanical.

The first issue aroused that how we should fix our gears and how we will couple
it with the motors for our desired movement we took an idea from the chain
spocket of bike that how a small motor can lift such a heavy weight .So we
adopted the same idea.

Next the issue aroused how to choose the motors that can lift the weight of about
160 kg of iron, and then we selected NEMA 23 motors that are specially used for
CNC.

Then the issue was how to calculate the torque and how should synchronise it
with our structure so we can move it smoothly for this we used hit and trial
method.

The next issue was that how we should couple the motors with the motors we
tried so many things and at last we concluded to use chain mechanism.

Sir Syed University of Engineering & Technology


Page 70

Chapter # 7

Result And Discussion

7.2.2 ELECTRONIC ISSUES:

The main issue was that how to drive the motors either we should use proper
drives or we should make by our own but at the end with the motivation of our
internal advisor we made it by our own.

The next issue was that how parallel port will give signals to our motors because
parallel port does not give enough voltage level to the driver so we used external
supply.

The next issue was that how to provide air flow to the drives because ICs were
dissipating lots of heat.

7.2.3 SOFTWARE ISSUES:

The most important issue was that we are using the demo version of software so
we are not able to use all its features.

We had some difficulty in managing the settings of the software because its a
professional software but our internal advisor really motivated us

Sir Syed University of Engineering & Technology


Page 71

CHAPTER # 8
FUTURE ENHANCEMENT & CONCLUSION

Chapter # 8

Future Enhancement & Conclusion

8.1 FUTURE ENHANCEMENT:


In future you can switch to:

Camera to take any data image as input


PLC (Programmable Logic Controller)
Increase object hardness (up to metal)
HMI (Human Machine Interface)
Machine Downtime Monitoring
Multiple Production System
Pneumatic Mechanical
Auto Tool change
Micro stepping
Laser Cutting
Error Display
Increase Axis

8.2 CONCLUSION:

We have finally achieved our desired results which we want to have at the end of
year.

Now we are looking forward to get our full mechanical structure more precise
and more accurate.

We have achieved our conditions of the project as well.

We have learnt a lot during this project we came to know what CNC (computer
numerically controlled) machine is.

Sir Syed University of Engineering & Technology

Page 72

Chapter # 8

Future Enhancement & Conclusion

We have seen its implementation in industries and its vital uses in industries

We got an idea about image processing during it.

We got an idea how parallel port can control the motors

We have distinguished how machines are more handy than human hands.

At last I would like to say this project has changed our level of knowledge and it
has increased so much by doing everything by our own.

Sir Syed University of Engineering & Technology

Page 73

References

REFERENCES

[1] Working of CNC, CNC Machine blog, , http://www.cncmachines.com


[2] Structure Idea, About CNC, http://www.cncmasters.com/
[3] About CNC ,Ivan Irons, http://www.ivanirons.com
[4] Mechanical structure, design, http://www.cncdudez.co.uk
[5] Software Demo, Artsoft co., http://www.artsoft.com
[6] Stepper motor Specification, Nema 23, http://www.stepperworld.com
[7] Controlling software guide, Artsoft,
http://www.machsupport.com/documentation.php
[8] About Electronic Circuit, CNC information,
http://www.cncinformation.com
[9] About motor coils, Probotics, http://www.probotics.org
[10] About Drive circuitry, cuteminds, http://www.cuteminds.com

Sir Syed University of Engineering & Technology


Page 74

APPENDICES

APPENDICES

APPENDIX 1:

Work Distribution

APPENDICES
APPENDIX 2:

ii

APPENDICES
APPENDIX 3:

Cost Analysis
Total cost of Mechantron carver is approximate Rs 109,999/-. It is quiet cost efficient as
well. The cost is distributed throughout the project in following way

iii

APPENDICES
APPENDIX 4:

Mechanical Structure of Mechantron

iv

DATASHEETS

You might also like