MSD OBE Based Lab Manual
MSD OBE Based Lab Manual
Pre-requisite(s): -
Contact Hours: 3 Hours/week
Objectives:
The course is aimed at developing the student’s understanding about the synergistic interaction of electronic
engineering, mechanical engineering, control systems and digital systems in system design and product
manufacturing. The objective is to develop skills to find innovative solutions, manage multidisciplinary teams
and work at all levels of an integrated engineering system.
Contents:
The course comprises of experiments and demonstrations related to calculation of Motor parameters, H-Bridge
designing, Arduino programming, CAD/CAM modeling of Encoder and Gears, CNC Milling Machine part
programming and cutting of Gears on CNC.
Grading Policy
Lab Manuals 60%
Lab Project 40%
Total 100%
Text Books:
Reference Books:
1. Modern Control Systems Analysis and Design Using MATLAB, by Richard H Bishop.
2. Introduction to Simulink with Engineering Applications, May 26, 2006, by
Steven T. Karris.
3. Microcontroller Based Applied Digital Control, by Dogan Ebrahim.
Administrative Instructions:
Individual & Team Skills Students demonstrate exceptional Students demonstrate satisfactory Students struggle to demonstrate
CLO3 individual and teamwork skills in individual and teamwork skills in effective individual and
PLO9 multidisciplinary settings, effectively multidisciplinary settings, though teamwork skills in
collaborating on tasks related to motor occasional challenges or multidisciplinary settings,
parameter calculation, circuit design, miscommunications may arise. Overall, leading to conflicts,
CAD/CAM modeling, CNC programming, they contribute effectively to team inefficiencies, or incomplete task
and gear cutting. They communicate efforts, but some areas for improvement fulfillment within the team. They
efficiently, contribute positively to team in communication or collaboration may may exhibit poor
dynamics, and fulfill their roles with be identified. communication, lack of
responsibility and dedication. cooperation, or difficulty in
working effectively with others,
hindering project progress.
EVALUATION
CLOs Aspects of Assessments 1 2 3 4 5 6 7 8 9 10 11 12 13 14 Project
CLO1 Analytical
Proficiency
Design Proficiency
CLO2
Individual & Team Skills
CLO3
Marks Obtained in Each Lab
Signature: Signature:
Lab Instructor: Theory Teacher:
No. Lab Title CLOs Marks Sign.
1 Introduction to Design Project & formation of groups. 1-3
Arduino Familiarization
1. Pre LAB Task
4 2. Blink LED 1-2-3
3. Fading LED
Lab
Introduction to Design Project & formation of groups.
1
Preamble:
Describe a mechatronic system and provide an example of its application in modern technology.
How does the integration of mechanical, electrical, and computer engineering principles contribute
to the functionality and efficiency of such systems in various industries?
KARACHI INSTITUTE OF ECONOMICS AND TECHNOLOGY
Department of Mechatronics Engineering
College of Engineering
Lab
Determination of Motor Parameters.
2
Preamble:
The purpose of this experiment is to become familiar with operating principles, equivalent
circuit models, and basic characteristics of a dc machine. Dc machines are most commonly used
in control and servomechanism, as well as industrial, applications. The applications range from
small permanent-magnet dc motors at a fraction of a Watt in consumer electronics, to large
industrial shunt dc machines having a separate field winding.
Design Considerations:
The maximum allowable current through the motor windings could be increased by decreasing
the thermal resistance of the motor. The rotor-to-case thermal resistance is primarily fixed by
the motor design. The case-to-ambient thermal resistance can be decreased significantly by the
addition of heat sinks. Motor thermal resistances for small DC motors are usually specified with
the motor suspended in free air. Therefore, there is usually some heat sinking which results from
simply mounting the motor into a framework or chassis. Some manufacturers of larger DC
motors specify thermal resistance with the motor mounted into a metal plate of known
dimensions and material.
The preceding discussion does not take into account the change in resistance of the copper
windings as a result of heating. While this change in resistance is important for larger machines,
it is usually not significant for small motors and is often ignored for the sake of calculation.
For the following Tasks, you are required to design experiments to ascertain, the values of the
particular motors that you have acquired for your project.
ω(no load)
Kv = VPeak
60 1
KT = =
2 πK v (rpm) K v (SI)
5. Task # 05: Motor stall current “IS”
Design and conduct an experiment to determine the stall current of the motor.
𝑖 = 𝜋𝑑 4 / 64
Questions:
How do variations in motor parameters impact the overall performance and efficiency of the
mechatronic system in which the motor is integrated?
Discuss the trade-offs between different motor parameters and their influence on system
design, cost, and reliability.
How can the experimental data obtained from measuring motor parameters be used to
optimize the design and control of the mechatronic system for specific applications?
Analyze the potential sources of error in measuring motor parameters and suggest strategies
to minimize these errors for accurate data collection and analysis.
Deliverables:
You are required to design experiments to estimate the necessary motor parameters to aid
in developing an appropriate model of the actuator.
Detailed process of the experiments with step by step instructions of how the experiment
was performed.
KARACHI INSTITUTE OF ECONOMICS AND TECHNOLOGY
Department of Mechatronics Engineering
College of Engineering
Lab
Design the H-Bridge Circuit.
3
Preamble
An H bridge is an electronic circuit that enables a voltage to be applied across a load in opposite
direction. These circuits are often used in robotics and other applications to allow DC motors to run
forwards or backwards.
Most DC-to-AC converters (power inverters), most AC/AC converters, the DC-to-DC push–pull converter,
most motor controllers, and many other kinds of power electronics use H bridges. In particular, a bipolar
stepper motor is almost invariably driven by a motor controller containing two H bridges.
H bridges are available as integrated circuits, or can be built from discrete components.
The term H bridge is derived from the typical graphical representation of such a circuit. An H bridge is
built with four switches (solid-state or mechanical). When the switches S1 and S4 (according to the first
figure) are closed (and S2 and S3 are open) a positive voltage will be applied across the motor. By
opening S1 and S4 switches and closing S2 and S3 switches, this voltage is reversed, allowing reverse
operation of the motor.
Figure 1
Figure 1
Using the nomenclature above, the switches S1 and S2 should never be closed at the same time, as this
would cause a short circuit on the input voltage source. The same applies to the switches S3 and S4. This
condition is known as shoot-through.
The H-bridge arrangement is generally used to reverse the polarity/direction of the motor, but can also
be used to 'brake' the motor, where the motor comes to a sudden stop, as the motor's terminals are
shorted, or to let the motor 'free run' to a stop, as the motor is effectively disconnected from the circuit.
The following table summarizes operation, with S1-S4 corresponding to the diagram above.
S1 S2 S3 S4 Result
1 0 0 1 Motor moves right
0 1 1 0 Motor moves left
0 0 0 0 Motor coasts
1 0 0 0 Motor coasts
0 1 0 0 Motor coasts
0 0 1 0 Motor coasts
0 0 0 1 Motor coasts
0 1 0 1 Motor brakes
1 0 1 0 Motor brakes
1 1 0 0 Short circuit
0 0 1 1 Short circuit
0 1 1 1 Short circuit
1 0 1 1 Short circuit
1 1 0 1 Short circuit
1 1 1 0 Short circuit
1 1 1 1 Short circuit
Preamble
An H bridge is an electronic circuit that enables a voltage to be applied across a load in opposite
direction. These circuits are often used in robotics and other applications to allow DC motors to run
forwards or backwards.
Task 1
Design an H bridge circuit for motor used in your project. Details of the requirement
specification must be developed first before venturing into the design.
Task 2
Justify your choice of components in the design.
Task 3
Low cost may be preferred; it is also advisable to use locally sourced parts.
Task 4
Perform software simulations of your circuit.
Task 5
You must incorporate necessary hardware safeties.
Task 6
Your H bridge design should have Current Sensing capability.
Task 7
Implement Regenerative Braking Solution
Task 8
Construction of the H bridge circuit.
Task 9
Testing of H bridge circuit. Direction reversal and speed checks
Deliverable
Evolving schematic circuit diagrams for the electronic circuitry.
Working Hardware !!
How does the design and implementation of an H bridge circuit contribute to the efficient control and operation of
DC motors, considering factors such as hardware safety, current sensing, regenerative braking, component selection,
cost-effectiveness, simulation validation, construction, and testing procedures?
KARACHI INSTITUTE OF ECONOMICS AND TECHNOLOGY
Department of Mechatronics Engineering
College of Engineering
Lab
Arduino Familiarization.
4
Introduction
Arduino is open-source hardware. The hardware reference designs are distributed under a Creative
Commons Attribution Share-Alike 2.5 license and are available on the Arduino website. Layout and
production files for some versions of the hardware are also available.
Most Arduino boards consist of an Atmel 8bitAVR microcontroller (ATmega8, [24] ATmega168,
ATmega328, ATmega1280, ATmega2560) with varying amounts of flash memory, pins, and features.
The 32-bit Arduino Due, based on the Atmel SAM3X8E was introduced in 2012. The boards use single or
double-row pins or female headers that facilitate connections for programming and incorporation into
other circuits. These may connect with add-on modules termed shields. Multiple and possibly stacked
shields may be individually addressable via an I²C serial bus. Most boards include a 5 V linear regulator
and a 16 MHz crystal oscillator or ceramic resonator. Some designs, such as the LilyPad, run at 8 MHz and
dispense with the onboard voltage regulator due to specific form-factor restrictions.
Software
A program for Arduino may be written in any programming language with compilers that produce binary
machine code for the target processor. Atmel provides a development environment for their
microcontrollers, AVR Studio and the newer Atmel Studio.
Program structure
A minimal Arduino C/C++ program consist of only two functions:
setup(): This function is called once when a sketch starts after power-up or reset. It is used to initialize
variables, input and output pin modes, and other libraries needed in the sketch.
loop(): After setup() has been called, function loop() is executed repeatedly in the main program. It
controls the board until the board is powered off or is reset.
Task 1 - Pre LAB Task
Read chapters 1 to 14 of the tutorial Reference Material available on arduino tutorial.pdf provided.
POST LAB
Browse through tutorial provided and make a list of the hardware components used throughout the text.
References
https://en.wikipedia.org/wiki/Arduino
KARACHI INSTITUTE OF ECONOMICS AND TECHNOLOGY
Department of Mechatronics Engineering
College of Engineering
Lab
Arduino Core Programming Concepts.
5
Preamble
This lab is follow up to the Lab 9, and opportunity to review the core Programming Concepts.
Task 1
Review the Arduino operators chapter from the Arduino tutorial pdf provided. And go through all the
examples in the chapter.
Task 2
Review the Arduino Control Statements chapter from the Arduino tutorial pdf provided. And go through
all the examples in the chapter.
Task 3
Review the Arduino Loops chapter from the Arduino tutorial pdf provided. And go through all the
examples in the chapter.
Task 4
Review the Arduino Functions chapter from the Arduino tutorial pdf provided. And go through all the
examples in the chapter.
Task 5
Review the Arduino Function Libraries chapter from the Arduino tutorial pdf provided. And go through all
the examples in the chapter.
Task 6
Implement the Arduino projects chapter 29 to 34, from the Arduino tutorial pdf provided.
Deliverables
Observations
Submit a log of all the errors encountered during the above process.
KARACHI INSTITUTE OF ECONOMICS AND TECHNOLOGY
Department of Mechatronics Engineering
College of Engineering
Lab
Arduino Pulse Width Modulation Programming beyond 32kHz.
6
Preamble
Chapter 21 of the Arduino tutorial pdf provided.
You must attempt the following tasks using simple delay function available,
and one again using timer’s library.
Task 1
Generate the least and most duty cycle PWM signal and measure the signal using an oscilloscope.
Task 2
With a duty cycle of your choice, suggest technique you would use to go beyond 32 kHz frequency.
Task 3
Generate the highest possible frequency, confirm using an oscilloscope.
Lab
Arduino – Interrupts & High Speed Interrupts.
7
Task 1
Differentiate between the 2 main types of interrupts.
Provide examples of each.
Task 2
Connect the hardware require to generate interrupts
Task 3
Explain how some tasks can also be accomplished using polling feature.
Task 4
What are precautions you must take when not using interrupts, (that a programmer must incorporate in
his /her code).
Post Lab
Low, change and following are the three mode of interrupt, which is most pertinent for you and why?
Arduino High Speed Interrupts Programming
Task 1
Using the function generator or oscillating source generate a high frequency signal.
Update the occurrence of the state, "change", "low" or "falling", on serial monitor of the PC.
Task 2
Which mode provides the best resolution?
Provide reasonable evidence for your response.
Task 3
Connect the encoder readout circuit with Arduino interrupts and display the rotational speed of motor
shaft on the serial monitor.
Task 4
Verify your result using tachometer.
KARACHI INSTITUTE OF ECONOMICS AND TECHNOLOGY
Department of Mechatronics Engineering
College of Engineering
Lab
Encoder Readout Circuit Design.
8
Preamble
Incremental rotary encoders generate an output signal each time the shaft rotates a certain angle. The
number of signals (pulses) per turn defines the resolution of the device. The incremental encoder does
not output an absolute position, which makes the internal components of the encoder much simpler and
more economical.
Besides position tracking, incremental encoders are often used to determine velocity. The position in
relation to the starting point can be calculated by counting the number of pulses. The velocity can be
retrieved by dividing the number of pulses by the measured time interval.
An incremental encoder has at least 1 output signal “A” or typically 2 output signals, called “A” and “B”.
These 2 signals are set up with a 90° offset, which is required for the detection of the encoder’s rotation.
By turning the encoder clockwise, the “A” pulse is rising 90° ahead of the “B” pulse, by turning the shaft
counterclockwise, the “B” pulse is rising ahead of the “A” pulse.
Additionally, some incremental encoders output a “Z” signal. Once every rotation, this Z signal is rising for
typically 90°, on the exact same position. This can be used as an accurate reference point.
Some incremental encoders also have additional differential signals, called “/A”, “/B” and “/Z”. These
signals are inverted “A”, “B” and “Z” signals. Controllers can compare each pair (“A” must be equal to
inverted “/A”) to ensure that there is no error during the transmission.
Additionally, the transmission sensitivity is improved by transmitting the differential signals through a
twisted pair cable.
An incremental rotary encoder outputs a certain amount of Pulses per Revolution. The higher this PPR
number, the smaller the angle between each pulse. This PPR number is fixed for ordinary incremental
encoders. Programmable incremental encoders can adjust this value to a desired number by a software
change.
3. Quadrature:
Every 90 el° the incremental encoder outputs a rising or falling edge on the “A” or “B” output
that can be interpreted as a count. If an encoder outputs 1000 PPR, a counter can interpret 4000
counts (4 counts each pulse).
4. Phase Angle:
The phase angle states the length between 2 edges, given in el°. This parameter is typically
specified with a defined constant phase angle value and phase angle error (also called
quadrature error).
5. Accuracy (DNL):
The Differential Non-Linearity (DNL) accuracy is the phase angle error as an absolute value given in
(mechanical) degrees.
6. Accuracy (INL):
An incremental encoder outputs a defined amount of pulses per revolution, so that every pulse is
expected to be on a defined mechanical position. The maximum deviation between this ideal
position and the actual position is called integral non linearity (INL). The INL accuracy is an
important value if the incremental encoder is used for positioning tasks.
7. Duty Cycle:
The duty cycle describes the ratio between “high” time to “low” time of an incremental encoder.
Typically, this ratio is 50/50, which is equivalent to 180 el° high and 180 el° low.
The performance of magnetic incremental encoders increases with higher PPR settings and
higher rotation speeds (RPM). This is in contrast to optical encoders where the performance
decreases. The DNL and INL accuracy that are stated in our datasheets are worst case values, a
better performance can be expected for higher PPR and RPM.
8. Frequency Response:
This is the maximum frequency that the encoder is able to output via the output lines. For
example, the frequency of a 200 PPR encoder that rotates at 600 RPM is 2000 Hz (200*600/60s).
Task 1
As it is apparent from the preamble that the encoder would provide feedback for the system.
Your task is to design and implement (software simulations of schematics) for the readout circuit.
Implement using any technique. (Resistance, photo coupler or Hall effect sensors).
Task 2
Justify your choices of components and implement.
Deliverables:
1. Circuit Schematic
2. Comparison table of at least three implementation technique.
KARACHI INSTITUTE OF ECONOMICS AND TECHNOLOGY
Department of Mechatronics Engineering
College of Engineering
Lab
Mechanical Design of Encoder Assembly.
9
Preamble
Incremental rotary encoders generate an output signal each time the shaft rotates a certain angle. The
number of signals (pulses) per turn defines the resolution of the device. The incremental encoder does
not output an absolute position, which makes the internal components of the encoder much simpler and
more economical.
Besides position tracking, incremental encoders are often used to determine velocity. The position in
relation to the starting point can be calculated by counting the number of pulses. The velocity can be
retrieved by dividing the number of pulses by the measured time interval.
An incremental encoder has at least 1 output signal “A” or typically 2 output signals, called “A” and “B”.
These 2 signals are set up with a 90° offset, which is required for the detection of the encoder’s rotation.
By turning the encoder clockwise, the “A” pulse is rising 90° ahead of the “B” pulse, by turning the shaft
counterclockwise, the “B” pulse is rising ahead of the “A” pulse.
Additionally, some incremental encoders output a “Z” signal. Once every rotation, this Z signal is rising for
typically 90°, on the exact same position. This can be used as an accurate reference point.
3D printing
3D printing, or additive manufacturing, is the construction of a three-dimensional object from a CAD model or a
digital 3D model. The term "3D printing" can refer to a variety of processes in which material is deposited, joined
or solidified under computer control to create a three-dimensional object, with material being added together
(such as plastics, liquids or powder grains being fused together), typically layer by layer.
In the 1980s, 3D printing techniques were considered suitable only for the production of functional or aesthetic
prototypes, and a more appropriate term for it at the time was rapid prototyping. As of 2019, the precision,
repeatability, and material range of 3D printing have increased to the point that some 3D printing processes are
considered viable as an industrial-production technology, whereby the term additive manufacturing can be used
synonymously with 3D printing. One of the key advantages of 3D printing is the ability to produce very complex
shapes or geometries that would be otherwise impossible to construct by hand, including hollow parts or parts
with internal truss structures to reduce weight. Fused deposition modeling (FDM), which uses a continuous
filament of a thermoplastic material, is the most common 3D printing process in use as of 2020.
Task 1
Design the mechanical assembly of the encoder disc and coupling with dc motor.
Task 2
Also highlight the placement of sensors.
Task 3
Make a model of the encoder disk on the solid works software and convert it into STL format.
Task 4
Use the 3d printer in the lab for manufacturing the encoder disk.
Deliverable
Design drawing of encoder setup and manufactured encoder disk
KARACHI INSTITUTE OF ECONOMICS AND TECHNOLOGY
Department of Mechatronics Engineering
College of Engineering
Lab
Introduction to Gears & determine its parameters.
10
INTRODUCTION TO GEARS
DEFINITION OF GEARS
Gears are toothed members which transmit power / motion between two shafts by meshing without any
slip. Hence, gear drives are also called positive drives. In any pair of gears, the smaller one is called pinion
and the larger one is called gear immaterial of which is driving the other.
When pinion is the driver, it results in step down drive in which the output speed decreases and the torque
increases. On the other hand, when the gear is the driver, it results in step up drive in which the output
speed increases and the torque decreases.
CLASSIFICATION OF GEARS
Gears are classified according to the shape of the tooth pair and disposition into spur, helical, double
helical, straight bevel, spiral bevel and hypoid bevel, worm and spiral gears and this is shown in Figure
below.
Spur Gear
The most common and easy to produce parallel shaft cylindrical gears. Of a pair of gears, the larger one
is called a gear and the smaller one a pinion.
Helical Gear
Quiet and able to transmit larger torque than spur gears. Cylindrical gears with spiral shaped tooth
trace.
Gear Rack
Changes rotary motion to linear motion. A set consisting of rectangular or circular rod shaped gear with
mating small gear.
Bevel Gear
Cone shaped gears used in intersecting shaft applications. There are also bevel gears with spiral shaped
tooth trace called spiral bevel gears.
Miter Gear
Type of bevel gears in which the pair is made of same number of teeth and used where speed reduction
or increase is not needed.
Worm Gear
Used when a large speed reduction is needed. Worm and worm gear set. Normally, different materials
are used for worm and worm gear.
Internal gear
Gear teeth are cut on the inside surface of hollow cylindrical forms and used in planetary gear systems.
The gear teeth are cut using gear shaper machines.
(Important Gear Terminology and Gear Nomenclature in this picture)
Worm
Worm wheel
Internal gear
Gear coupling
Screw gear
Involute spline shafts and bushings
Miter gear
Spur gear
Helical gear
Ratchet
Pawl
Rack
Pinion
Straight bevel gear
Spiral bevel gear
There are three categories of gears in accordance with the orientation of axes.
1) Parallel Axes
Spur Gear
Helical Gear
Rack
Internal Gear
2) Intersecting Axes
Miter Gear
3) Nonparallel,
Nonintersecting Screw Gear
Axes
Worm
Worm Wheel
4) Others
Involute Spline Shaft
& Bushing
Gear Coupling
There are three major categories of gears in accordance with the orientation of their
axes
Configuration:
1. Parallel Axes / Spur Gear, Helical Gear, Gear Rack, Internal Gear
2. Intersecting Axes / Miter Gear, Straight Bevel Gear, Spiral Bevel Gear
3. Nonparallel, Nonintersecting Axes / Screw Gear, Worm, Worm Gear (Worm Wheel)
4. Others / Involute Spline Shaft and Bushing, Gear Coupling, Pawl and Ratchet
Classification of types of gears from the point of positional relations of the attached
shafts
1. When the gears’ two shafts are parallel (parallel shafts) Spur gear, rack, internal gear and helical
gear, etc. Generally, they have a high transmission efficiency.
2. When the gears’ two shafts intersect each other (intersecting shafts) Bevel gear is in this category.
Generally, they have a high transmission efficiency.
3. When the gears’ two shafts are not parallel or intersect (offset shafts) Worm gear and screw gear
belong in this group. Because of the sliding contact, the transmission efficiency is relatively low.
CHARACTERISTICS OF GEARS
TABLE OF SUMMARY AND EVALUATION OF CHARACTERISTICS OF GEAR TYPES
Crossed Skewed shafting. Point Relatively low To be avoided for precision meshes.
Helical contact. velocity ratio; low Point contact limits capacity and
High sliding speeds and light precision. Suitable for right angle drives,
loads only. Any if light load. A less expensive substitute
Low speeds angle skew shafts. for bevel gears. Good lubrication
Light loads essential because of point of contact and
Precision Rating is poor high sliding action.
Internal Parallel shafts Internal drives Not recommended for precision meshes
spur High speeds requiring high because of design, fabrication, and
speeds and high inspection limitations. Should only be
High loads loads; offers low used when internal feature is necessary.
sliding and high
Precision Rating is fair stress loading; good
for high capacity,
long life. Used in
planetary gears to
produce large
reduction ratios.
Bevel Intersecting shafts, Suitable for 1:1 and Good choice for right angle drive,
High speeds, higher velocity particularly low ratios. However
ratios and for right- complicated both form and fabrication
High loads. angle meshes (and limits achievement of precision. Should
Precision Rating is fair to other angles) be located at one of the less critical
good meshes of the train.
Right-angle skew shafts, High velocity ratio Worm can be made to high precision,
Worm High velocity ratio, Angular meshes but worm gear has inherent limitations.
mesh High speeds and loads, High loads To be considered for average precision
Low efficiency, Most meshes, but can be of high precision
designs nonreversible. with care. Best choice for combination
Precision rating is fair to high velocity ratio and right-angle drive.
good High sliding requires excellent
lubrication.
Center distance
Length of path of contact (Line of action)
Backlash
Interference point
Pitch point
Reference pitch
Center line
Tip circle
Reference circle
Base circle
Root circle
Tip diameter
Reference diameter
Base diameter
Root diameter
Pressure angle
Face width
Tooth depth
Addendum
Dedendum
Tooth thickness
Center distance (operating) is the shortest distance between non-intersecting axes. It is measured along
the mutual perpendicular to the axes, called the line of centers. It applies to spur gears, parallel axis or
crossed axis helical gears, and worm gearing.
The center distance is the distance between the center of the shaft of one gear to the center of the shaft
of the other gear. The backlash is inseparably related to the center distance; a positive permissible
deviation of the center distance means a larger backlash, and a negative permissible deviation of the
center distance means a smaller backlash.
The line of centers connects the centers of the pitch circles of two engaging gears; it is also the common
perpendicular of the axes in crossed helical gears and wormgears. When one of the gears is a rack, the
line of centers is perpendicular to its pitch line.
Backlash is the clearance space between the teeth of mating gears Backlash is necessary for smooth
operation of gears.
Backlash In mechanical engineering, backlash is the striking back of connected wheels in a piece of
mechanism when pressure is applied. Another source defines it as the maximum distance through which
one part of something can be moved without moving a connected part. It is also called lash or play. In the
context of gears, backlash is clearance between mating components, or the amount of lost motion due to
clearance or slackness when movement is reversed and contact is re-established. In a pair of gears,
backlash is the amount of clearance between mated gear teeth.
Backlash is unavoidable for nearly all reversing mechanical couplings, although its effects can be negated.
Depending on the application it may or may not be desirable. Reasons for requiring backlash include
allowing for lubrication and thermal expansion, and to prevent jamming. Backlash may also result from
manufacturing errors and deflection under load.
The pitch point is the point of tangency of two pitch circles (or of a pitch circle and pitch line) and is on
the line of centers.
The reference diameter is the diameter of the pitch circle of a gear It is also known as “Pitch diameter”.
The base circle of an involute gear is the circle from which involute tooth profiles are derived.
The root circle coincides with the bottoms of the tooth spaces.
The base diameter of an involute gear is the diameter of the base circle.
Pressure angle is the angle generated with a radial line and a line of the tooth profile, which intersect at
a pitch point. In simple terms, it is described as an angle of the gear tooth leaning against the normal
reference line, and the gear force is transmitted toward this angle in the same direction. Generally,
pressure angle means a pressure angle on base circle. The most frequently used pressure angle is 20°,
however, other angles, such as 14.5°, 15°, 17.5° and 22.5° are also used.
The face width of a gear is the length of teeth in an axial plane. For double helical, it does not include the
gap.
Total face width is the actual dimension of a gear blank including the portion that exceeds the effective
face width, or as in double helical gears where the total face width includes any distance or gap separating
right hand and left hand helices.
For a cylindrical gear, effective face width is the portion that contacts the mating teeth. One member of a
pair of gears may engage only a portion of its mate.
For a bevel gear, different definitions for effective face width are applicable.
The addendum is the height by which a tooth of a gear projects beyond (outside for external, or inside for
internal) the standard pitch circle or pitch line; also, the radial distance between the pitch diameter and
the outside diameter.
p = Pi x Module = πm (2.1)
Calculation Example:
What is the pitch size (p) of the Gear with module m = 3 ?
p = πm = 9.4248
CP (Circular Pitch)
Circular Pitch (CP) denotes the reference pitch (p).
For instance, you can produce gears at an exact integral value, such as CP5/CP10/CP15/CP20.
Calculation Example:
CP10 is transformed to module as follows ;
m = 10 / 3.1416 = 3.1831
DP (Diametral Pitch)
DP stands for Diametral Pitch.
By ISO standards, the unit Millimeter (mm) is designated to express length, however, the unit inch is
used in the USA, the UK and other countries; Diametral Pitch is also used in these countries.
Calculation Example:
DP 8 is transformed to module as follows ;
m = 25.4 / 8 = 3.175
Reference line
Pressure angle
Normal reference line
Pitch
Tooth surface
Root surface
Top land
Number of teeth
Number of teeth denotes the number of gear teeth.
They are counted as shown in the Figure below. The number of teeth of this gear is 10.
Number of teeth
Module (m), Pressure Angle (α), and the Number of Teeth, introduced here, are the three basic
elements in the composition of a gear. Dimensions of gears are calculated based on these elements.
Reference line
Pitch
Tooth thickness
Addendum
Dedendum
Tooth Depth
Tooth tip
Tooth root
Addendum (ha) is the distance between the reference line and the tooth tip.
ha = 1.00 m (2.5)
Dedendum (hf) is the distance between the reference line and the tooth root.
hf = 1.25 m (2.6)
Tooth thickness (s) is basically half the value of pitch (p). * Pitch (p) = πm
s = πm / 2 (2.7)
Calculation Examples:
The following are calculations of Tooth depth (h) / Addendum (ha) / Dedendum (hf) for a gear with
module 2.
h = 2.25 m = 2.25 × 2 = 4.50
ha = 1.00 m = 1.00 × 2 = 2.00
hf = 1.25 m = 1.25 × 2 = 2.50
In the previous pages, we introduced the basics of gears, including ‘Module’, ‘Pressure Angle’, ‘Number
of Teeth’ and ‘Tooth Depth and Thickness’. In this section we introduce the basic parts of Spur
Gears (Cylindrical gears) and dimensional calculations.
Addendum
Dedendum
Root diameter
Reference diameter
Tip diameter
The Addendum and dedendum circle introduced here are a reference circle that cannot be seen on a
gear, as it is a virtual circle, determined by gear size.
Calculation Examples:
The following are calculations of Reference diameter / Tip diameter / Root diameter for a spur gear with
module (m) 2, and 20 teeth (z).
d = z m = 20 x 2 = 40
da = d + 2 m = 40 + 4 = 44
df = d – 2.5 m = 40 – 5 = 35
Practice Test:
Spur Gear Specifications
Module (m) = 4 / Number of teeth (z) = 40 (Pressure angle α = 20°)
Reference diameter d = ??
Tip diameter da = ??
Root diameter df = ??
Working Gear Nomenclature
(Important Gear Terminology and Gear Nomenclature shown in above Figure)
Tip diameter
Reference diameter
Base diameter
Root diameter
Face width
Tooth thickness
Reference pitch
Center line
Pressure Angle
Backlash
Tooth depth
Addendum
Dedendum
Center distance
Tip and Root Clearance
Center distance
Gears can mesh as shown in above Figure, however, it is important to consider a proper backlash (play)
so that the gears can work smoothly. Backlash is a play between tooth surfaces of paired gears in mesh.
Mating gears also have a clearance (play) vertical to tooth depth. This is called Tip and Root Clearance
(c), the distance between tooth root and the tooth tip of mating gears.
Addendum circle
Dedendum circle
Tip and Root Clearance
Calculation Examples:
The following are calculations for Center distance (a) and Tip and root clearance (c), when Module m =
2, Pinion z1 = 20, Gear z2 = 40
Reference diameter of Pinion d 1 = 20 × 2 = 40
Reference diameter of Gear d 2 = 40 × 2 = 80
Center distance a = (40+80) / 2 = 60
c = 0.25 × 2 = 0.5
Calculation Examples:
Practice calculating the dimensions of gears.
Terms Symbols Formula Pinion Gear
Module m 2.5
Pressure Angle α – 20°
No. of Teeth z 15 30
Reference diameter d zm 37.5 75
Addendum ha 1.00 m 2.5 2.5
Dedendum hf 1.25 m 3.125 3.125
Tooth Depth h 2.25 m 5.625 5.625
Tip diameter da d+2m 42.5 80
Root diameter df d - 2.5 m 31.25 68.75
Center distance a d1 + d2 / 2 56.25
Practice Test:
Calculations for the dimensions of gears.
Terms Symbols Formula Pinion Gear
Module m 4
Pressure Angle α – 20°
No. of Teeth z 12 60
Reference diameter d zm
Addendum ha 1.00 m
Dedendum hf 1.25 m
Tooth Depth h 2.25 m
Tip diameter da d+2m
Root diameter df d - 2.5 m
Center distance a d1 + d2 / 2
Spur Gears are the simplest type of gear. The calculations for spur gears are also simple and they are used
as the basis for the calculations for other types of gears. This section introduces calculation methods of
standard spur gears, profile shifted spur gears, and linear racks. The standard spur gear is a non-profile-
shifted spur gear.
1 Module m 3
3 Number of Teeth z 12 24
All calculated values in Table 1 are based upon given module m and number of teeth (z1 and z2). If
instead, the modulem, center distance an and speed ratio i are given, then the number of teeth, z1 and
z2, would be calculated using the formulas as shown in Table below.
1 Module m 3
5 Number of Teeth z 16 20
Note, that the number of teeth will probably not be integer values when using the formulas in Table 2.
In this case, it will be necessary to resort to profile shifting or to employ helical gears to obtain as near a
transmission ratio as possible.
In the meshing of profile shifted gears, it is the operating pitch circle that is in contact and roll on each
other that portrays gear action. Table below presents the calculations where the profile shift coefficient
has been set at x1 andx2 at the beginning. This calculation is based on the idea that the amount of the
tip and root clearance should be 0.25m.
1 Module m 3
6 Working Pressure Angle αw Find from Involute Function Table 26.0886 deg
Center Distance
7 y 0.83329
Modification Coefficient
ha1 ( 1 + y – x2 ) m
12 Addendum 4.420 3.700
ha2 ( 1 + y – x1 ) m
A standard spur gear is, according to Table 4.3, a profile shifted gear with 0 coefficient of shift; that is,
x1=x2=0.
Table below is the inverse formula of items from above of Table.
Center Distance
2 y 0.8333
Modification Coefficient
There are several theories concerning how to distribute the sum of profile shift coefficient (x1 + x2) into
pinion (x1) and gear (x2) separately. BSS (British) and DIN (German) standards are the most often used.
In the example above, the12 tooth pinion was given sufficient correction to prevent undercut, and the
residual profile shift was given to the mating gear.
Above figure of Profile shifted spur gear shows a profile shifted spur gear, with positive correction xm,
meshed with a rack. The spur gear has a larger pitch radius than standard, by the amount xm. Also, the
pitch line of the rack has shifted outward by the amount xm.
Table 5 presents the calculation of a meshed profile shifted spur gear and rack. If the profile shift
coefficientx1 is 0, then it is the case of a standard gear meshed with the rack.
One rotation of the spur gear will displace the rack l one circumferential length of the gear’s reference
circle, per the formula :
The rack displacement, l, is not changed in any way by the profile shifting. Equation (4.2) remains
applicable for any amount of profile shift.
How the various spur gear tooth parameters are fixed in standard gear system is given in above Table?
LAB TASKS
TASK # 1: QUESTION ANSWERS
TASK # 2:
Calculate the Gear Ratios of your complete gear box or gear train? Show proper calculations for your gears
ratios by taking help from the examples giving in this lab manual.
TASK # 3:
Calculate the Output Angular Velocity in RPM of your complete gear box or gear train? Show proper
calculations for your output angular velocity in RPM by taking help from the examples giving in this lab
manual.
TASK # 4:
Calculate the Output Torque of your complete gear box or gear train? Show proper calculations for your
output torque by taking help from the examples giving in this lab manual.
TASK # 5:
Find or calculate the following parameters of your complete gear box:
1. Module
2. Circular Pitch
3. Diametral Pitch
4. Pressure Angle
5. Number of Teeth
6. Addendum & Dedendum
7. Tooth Thickness
8. Tip Diameter & Root Diameter
KARACHI INSTITUTE OF ECONOMICS AND TECHNOLOGY
Department of Mechatronics Engineering
College of Engineering
6. Select the desired unit folder (ANSI Inch for English units).
7. Navigate to the desired part. Gears, sprockets and timing belts are listed under the
“Power Transmission” folder. The “Structural Members” folder contains a comprehensive
selection of aluminum and steel beams and parts that can be used to quickly build a complex
assembly. Explore the subfolders of the Toolbox to get a better idea of what part templates
already exist to help speed the drafting process.
1. Don’t forget to save the part! If the part is to be used in an assembly (search “assembly” in the
“SolidWorks Help” bar for more information), it must be saved in the same folder as all other
parts to be used in the assembly.
2. Gears are listed in the “Power Transmission” folder. Open this folder and open the
“Gears” folder.
3. Navigate and Right click “Spur Gear” from the listed options and left click “Create Part.”
The part should appear in the main editing window.
4. Change the options in the left hand column (titled “Configure Component”) to create the
desired gear. Try varying the dimensions and options from the various drop-down menus in
“configure component” panel to understand how the part can be edited.
Model all the gears from your gear box by following the above giving procedure on SolidWorks and also
take pictures or screenshots of the editing or changing you have made according to your gear design and
attach those pictures in this task.
TASK # 2:
Attach the pictures or screenshots of all your completed gears and that pictures should include the
toolbox appears on your left top screen that contains all the information/details of your gears.
IMPORTANT NOTE: DONOT ATTACH THE PICTURES OR SCREENSHOTS OF YOUR ASSEMBLY OF GEARS IN
THIS LAB MANUAL.
KARACHI INSTITUTE OF ECONOMICS AND TECHNOLOGY
Department of Mechatronics Engineering
College of Engineering
Lab
Introduction to CNC Milling Machine.
12
Line. Used to cut straight lines along an axis or a diagonal at the desired
feedrate.
Arc. Used to cut a circle or partial circle that is part of a series of cuts
that usually includes lines as well.
X = X center
Y = Y center
R = Radius
A = Start angle (absolute)
N = # of holes
H = # of holes to drill
Conversational CNC Programming Example #2
Arcs and Lines (dashed line is tool path for 1/8” diameter endmill)
Conversational CNC Programming Example #2 (con’t)
Below is the actual tool path code for the previous example. After the
user enters the basic parameters, this is the program that is generated
by the conversational interface to run on the CNC.
3. Input the raw material stock size and set the part’s
coordinate origin.
5. For each part feature, select the appropriate tool from the
library and set the parameters necessary for machining that
feature. Typical parameters include spindle speed, depth of
cut, feedrate, number of passes, tool path pattern, etc.
• CNC manufacturing offers advantages on two types of parts: (1) simple parts that are mass
produced and/or (2) complex parts with features requiring multiple axes of simultaneous motion.
For simple parts in low quantity, it is often quicker to produce the parts on manual machines (as in
lab).
• CNC does not inherently imply increased part accuracy. An old CNC with a lot of hours of use will
produce less accurate features than a new quality manual machine and vise-versa; so don’t
automatically associate higher accuracy with CNC machines. (Accuracy has more to do with machine
design, component selection and mechanical wear.)
• Modern CNC machines offer increased productivity due to stiffer machine and spindle designs, more
powerful motors, high pressure coolant (up to 1000 psi) that floods the cutting zone, automatic tool
changers, digital workpiece and tool probing, and/or horizontally mounted spindles.
• Downsides to CNC machines are higher initial cost, larger space and electrical requirements, increased
maintenance cost, required programming skillset and their inherent complexity means there’s a higher
probably of component failure during the useful lifespan.
LAB TASKS
TASK: QUESTION ANSWERS
1. What are the different components of CNC machine tool?
2. What is MCU in CNC and write down its function?
3. What is closed loop control system and open loop control system used in CNC machine? What
are the differences between them? What are the motors used for each type?
4. Write down the differences between incremental positioning and absolute positioning
system used in NC machine?
5. Write down the functions of few G codes like G01, 002 003,004 etc.
16. N0100 G02 X9.000 Y8.000 I5.000 J2.000 F6.000
6. What are the different types of tool used in CNC machine?
KARACHI INSTITUTE OF ECONOMICS AND TECHNOLOGY
Department of Mechatronics Engineering
College of Engineering
Lab
CNC Part Programming.
13
Two types of motion controls are used on NC machines. They are point-to-point or continuous-path controlled. As the name
implies, the point-to-point (PTP) controlled machines move in a series of steps from one point to the other point. A machine with
PTP control can perform very limited number of machining opera ions. In almost all the cases where PTP control is used, its function
is to move the machine table or the spindle to a desired position to perform the machining operation at that position/point. In
general, no machining is performed when the movement from one point to other is taking place, hence movement is made as rapidly
as possible. When there is no need of machining between two points, path to be followed between them is not specified. Continuous
path machines move uniformly and evenly by controlling the motion of two are more axes simultaneously. Here, the paths to be
followed along with the destinations have to be mentioned as the machining is invariably done along that path. Figure 15.15 shows
the cutting paths followed by PTP and continuous path machines.
Depending on the presence of the feedback, they are classified as open-loop system or closed-loop system (Fig.
15.16 and 15.17). In closed-loop systems, a transducer sends the current table position to the control unit and the driving unit
(typically motor) stops running as the table reaches its desired position, hence accurate positioning can be achieved with closed-
loop control systems. Closed-loop NC systems use servomotors whereas open-loop systems use stepper motors.
NC machines are classified into three types: hydraulic, pneumatic or electric based on the type of power used to drive the axes
and spindle. Most of the modern NC machines use electric drives (AC or DC servo motors) to drive its axes and spindle because of
its compact size, ease of control and low cost.
Depending on the positioning system used on the machine, they are classified as incremental or absolute positioning machines.
Modern NC machine tools allow the programmer to choose either of the above mentioned positioning systems or both of them
together through part programme. In absolute positioning system, the end point of the tool for a particular move has to be
mentioned in the programme with respect to the origin. But in incremental system, the end point of the tool for a particular move
has to be mentioned with respect to the current tool position.
Origin is a reference point used within the NC part program as the basis of defining tool location and other geometric entities.
While developing an NC programme the programmer assumes that the tool is located at some specific point relative to the
workpiece to be machined, and this point is designated as origin. In practice, during set-up and before starting the programme the
operator has to move tile tool to a position which is designated as origin in that particular programme and then presses a button on
control panel to select that as the origin. It means that the origin could be anywhere within the machine work space, hence it is
called a floating zero. In the older generation NC machine tools, this facility was not available. The origin was a fixed point and the
programmer had to write the programme with respect to that particular point.
The purpose of any production system is to produce a part in the most economical way without compromising on the desired
qualities. Many large and small industries have undertaken the conversion from manual machines and processes to NC to get
benefits. Some of these are listed below:
* Flexibility is high
* Scheduling is easier
* Set-up lead and processing times arc less
* Greater uniformity and accuracy in cutting
* Lover overall tooling costs
* Low inventory
* Inspection cost is less
* Higher degree of interchangeability of parts and tools
In spite of the above mentioned benefits, there are some negative points as well. The most prominent ones are:
* Large initial investments
* Programming costs
* Training and retraining costs for the existing work force
Numerical-Control Programming
10.1 NC PART PROGRAMMING
In an NC system, each axis of motion is equipped with a separate driving source that replaces the hand wheel of the conventional
machine. The driving source can be a DC motor, a stepping motor, or a hydraulic actuator. The source selected is determined mainly
based on the precision requirements of the machine, as described in Chapter 9.
The relative movement between tools and work pieces is achieved by the motion of the machine tool slides. The three main
axes of motion are referred to as the X, Y. and Z axes. The Z axis is perpendicular to both the X and Y axes in order to create a right-
hand coordinate system, as shown in Figure 10.1.A positive Motion in the Z direction moves the cutting tool away from the work
piece. This is detailed as follows:
Z AXIS
1. On a work piece -rotating machine, such as a lathe, the Z axis is parallel In the spindle, and the positive Motion moves
the tool away from the work piece (figure 10.2).
2. On a tool-rotating machine, such as a milling or boring machine, the Z axis is parallel to the tool axis, and the positive
motion moves the tool away from the work piece (Figures 10.3 and 10.4).
3. On other machines, such as a press, a planning machine, or shearing machine, the Z axis is perpendicular to the tool set,
and the positive motion increases the distance between the tool and the work piece.
X AXIS
1. On a lathe, the X axis is the direction of tool movement, and the positive motion moves the tool away from the work
piece
2. On a horizontal milling machine, the X axis is parallel to the table.
3. On a vertical milling machine, the positive X axis points to the right when the programmer is facing the
machine.
Modern CNC controllers provide several ways of transferring data. Perhaps the most typical data-communication methods
used to transfer part program files is an RS-232C interface (see Chapter 8). An NC part program is stored in a file on a computer or a
CNC controller. The file download (or upload) can be initiated by setting up a transfer mode on the CNC controller. On the other side
of the communication cable is a computer that sends or receives data byte by byte. The operator must start and end the data-
transfer process on both the CNC controller and the computer. Some machines use higher-level protocols to ensure an error-free
data transfer. Two of the higher-level protocols used are Kermit and Xmodem. Kermit and Xmodem arc widely accepted in the
computer-to-computer telecommunication file-transfer process. These protocols allow the file transfer to be controlled by either the
computer or the controller. The computer can send and retrieve data directly. Some machines also provide local-area network (LAN)
instead of serial communication. Ethernet and MAP are two technologies used. Some CNC controllers allow the entire controller
function to be initiated from a remote computer through the data-communication network.
To control a machine, it is necessary to begin by defining the coordinates of the tool motion. It is necessary to specify whether the
motion is a positioning motion (rapid traverse) or a feed motion (cutting). 'The feed motion includes linear motion and circular
motion. Linear motion requires the destination coordinates. When circular interpolation is used, the center of the circle must be
given in addition to the destination. Before a cutting motion is called out, the spindle must be turned to the desired rpm and the
feed speed must be specified. The spindle can rotate either clockwise or counterclockwise.
Sometimes coolant is required in machining, and the coolant may be applied in flood or mist form. If an automatic tool changer is
present, the next tool number has to be known to the controller before a tool can be changed to the machine spindle. The sequence
to change the tool also needs to be specified. It is often desirable to aggregate a fixed sequence of operations such as drilling holes
into a cycle. Using cycle codes can drastically reduce programming effort. Additional information is needed for specific cycle
operations. Finally, there are other programming functions, such as units-inch or metric-positioning system-absolute or incremental,
and so on. All of these activities can (and in some cases must) be controlled through the NC controller and related part program.
These control functions and data requirements are summarized in what follows:
(a) Preparatory functions: the words specify which units, which interpolator, Absolute or incremental
Programming, which circular interpolation plane, cutter compensation, and so on.
(b) Coordinates: define three translational (and three rotational) axes.
(c) Machining parameters: specify feed and speed.
(d) Tool control: specifics tool diameter, next tool number, tool change, and so on.
(e) Cycle functions: specify drill cycle, ream cycle, bore cycle, mill cycle, and clearance plane.
(d) Coolant control: specify the coolant condition, that is, coolant on/off, flood. And mist.
(g) Miscellaneous control: specifies all other control specifics, that is, spindle on/of, tape rewind, spindle rotation
direction, pallet change, clamps control, and so on. (h) Interpolators:
linear, circular interpolation, circle center, and so on.
1 0.1.5.2 NC words A specific NC function may be programmed using an NC word or a combination of NC words. All functions can
be programmed in one block of a program. Many CNC controllers allow several of the same “word" be present in the same block.
Thus, several functions can be included in one block, this is normally done by using a word-address format, which is the most popular
format used in modern CNC controllers. The sequence of the words within one block is usually not important, except for the sequence
number that must be the first word in the block. In order to make a program more readable, it is a good practice to follow a fixed
sequence. Each word consists of a symbol and a numeral. The symbol is either N, G, X, V, and so on. Numerals follow as data in a
prespecified format. For example, the format for an X word might he ".3.4:' which means three, digits before the decimal point and
four digits after the decimal are used. The function of each NC word (code) and their applications are discussed in what follows: N-
code. A part program block usually begins with an “N” word. The N word specifies the sequence number. It is used to identify the
block within the program. It is especially useful for program editing. For example, when the format is “4” a proper sequence number
would be
N00I0
It is a good practice to program N values in increments of 10 or greater. This allows additional blocks to be inserted between two
existing blocks.
G-code. The G-code is also called preparatory code or word. It is used to prepare the MCU for control functions. It indicates that a
given control function is requested or that a certain unit or default be taken. There are modal functions and non-modal functions.
Modal functions are those that do not change after they have been specified once, such as unit selection. Non modal functions are
active in the block where they are specified. For example, circular interpolation is a non-modal function. Some commonly used G-
codes arc listed in the Table 10.1. Some of these functions are explained in what follows.
G00 is the rapid traverse code that makes the machine move at maximum speed. It is used for positioning motion. When G01.
G02, or G03 are specified, the machine moves at the feed speed. G01 is linear interpolation; G02 and G03 are for circular
interpolation. For circular interpolation, the tool destination and the circle center are
Programmed in one block (explained later). G04 (dwell) is used to stop the motion for a time specified in the block. G08 and G09
codes specify acceleration and deceleration, respectively. They are used to increase (decrease) the speed of motion (feed speed)
exponentially to the desired speed. Before an abrupt turn, decelerate the tool. Rapid acceleration in the new direction may cause a
tool to break. The best accuracy can be obtained with acceleration and deceleration codes on and set to lower values. Most NC
controllers interpolate circles on only
XY, YZ, and XZ planes. The interpolation plane can be selected using G 17, G18 or G 19. When a machine is equipped with thread-
cutting capability, (G33-G35), the part program must specify the proper way to cut the thread. Codes G4O-G43 deal with cutter
compensation. They simplify the cutter-center offset calculation. More details of cutter compensation are discussed later in Section
10.2.2. Most canned cycles are manufacturer-defined. They include drilling, peck drilling, spot drilling, milling, and profile turning
cycles. The machine-tool manufacturer may assign them to one of the nine G codes reserved for machine manufacturers (GS)-G89).
A user also can program the machine using either absolute (G90) or incremental (G91) coordinates. In the same program, the
coordinate system can be changed. In order to simplify the presentation, most of the examples given in this chapter use absolute
coordinate. Many controllers also allow the user to use either inch units (G70) or metric units (G71). Because hardwired NC circular
interpolators work only in one quadrant and many CNC systems allow full-circle interpolation, a (G74) code emulates NC circular
interpolation for CNC controllers. G75 returns the CNC back to the full-circle circular interpolation mode. X, Y, Z, A, B and C-Codes.
These words provide the coordinate positions of the tool. X, Y and Z define the three translational (Cartesian) axes of a machine. A.
B. C are used for the three rotational axes about the X, Y, and Z axes. For a three axis there can be only three translational axes. Most
applications only require X. Y. and Z codes in part programs. However, for four, five, or six-axis machine tools. A, B, and C are also
used. The coordinates may be specified in decimal number (decimal programming) or integer number (BLU programming). For a
controller with a data format of "3.4", to move the cutter to (1.12,2.275, 1.0), the codes are:
For circular motion, more information is needed. A circular is defined by the start and end points, the center, and the direction.
Because the start point is always the current tool position, only the end point, the circle center. And the direction needs to be
specified. I, J. and K words are used to specify the center. Usually, circular interpolation works only on either X- Y, Y-Z. or X-Z planes.
When interpolating a circular are on the X- Y plane,
the I word provides the X. coordinate value of the circle center and the J word provides the Y coordinate value. X and Y words specify
the end point. Clockwise or counterclockwise motions me specified by the G-code (G02 versus G03). There are many variations in
circular interpolation programming. Each NC controller vendor has its own form and formal. Also they can depend on the
combination of absolute or incremental, full-circle on or off modes. The following example is based on absolute programming with
full circle on for a hypothetical controller.
F-Code. The F-code specifics the feed speed of the tool motion. It is the relative speed between the cutting tool and the work piece.
It is typically specified in in./min (ipm). From a machinability data handbook, feed is given in in./rev (ipr). A conversion has to be
done either by hand or on-hoard the controller. Some Controllers offer a G-code that specifies the ipr programming mode. When
the ipr programming mode is used, the tool diameter and the number of teeth must he specified by the operator. The F- code must
be given before G01, G02 or G03 can be used. Feed speed can be changed frequently in a program, as needed. When an F-code is
present in a block, it takes effect immediately. To specify a 6.00-ipm feed speed for the cutting motion in Figure 10.7, one would
program.
S-Code. The S-code is the cutting-speed code. Cutting speed is the specification of the relative surface speed of the cutting edge
with respect to the work piece. It is the result of the tool (or work piece in turning) rotation. Therefore, it is programmed in rpm.
The Machinability Data Handbook (Machinability Data Center, 1980) gives these values in surface feet per minute (sfpm), and
conversion is required before programming is done. When a controller is equipped with a sfpm programming option, the operator
must specify the tool diameter. The S-code is specified before the spindle is turned on The S-code does not turn on the spindle. The
spindle is turned on by an M-code. To specify a 1000-rpm spindle speed, the program block is
N0010 S1000
I-Code. The I-code is used to specify the tool number. It is used only when an automatic tool changer is present. It specifies the stot
number on the tool magazine in which the next tool is located. Actual tool change does not occur until a tool-change M-code is
specified.
R –Code. The R -code is used for cycle parameter. When a drill cycle is specified, one must give a clearance height (R plane) (See-
Figure 10.8). The R-code is used to specify this clearance height. In Figure 10.8, the drill cycle consists of five operations:
1. Rapid to location (1.2.2).
2. Rapid down to the R plane.
3. Feed to the x point, the bottom of the hole.
4. Operation at the bottom of the hole, for example, dwelling.
5. Rapid or feed to either the R plane or the initial height. The cycle may be programmed in one block,
such as (cycle programming is vendor-specific)
Figure 10.11 shows the setup, fixturing and cutter path. Write a part program for the part.
Solution The cutting parameters need be converted into rpm and ipm.
Milling:
12V 12 X 620 fpm
rpm = = = 3157 rpm
πD π x 0.75 in
Vf = nf rpm = 4 tpr x 0.005 iprpt x 3157 rpm = 63 ipm
For the milling operation, the cutter is smaller than the slot, and two passes are required. The cutter first moves to p1 (the prime denotes the
upper point). There must be clearance between the cutter and the work piece, so that the cutter will not touch the work piece during rapid
positioning. We will use 0.1in as the clearance. The cutter then plunges down to p1, which is on the slot bottom level. Both p2 and p3 are
outside the work piece to ensure the slot edges are completely cut. The center of the cutter overhangs the edge by 0.1 in. The cutter moves
to p4 from p3 to clear the slot. p5 is the beginning of a circular interpolation and p6 is the end. From p6, the cutter moves to p7 to clear the
center of the circular area and then moves to p8. After the milling operation, a drill is installed in the spindle through an automatic tool
change. The two holes are drilled using a drilling cycle. Combining the information from the process plan and the cutter-location data, a part
program can be written. The program for the example part is shown in Figure 10.12. A step-by-step explanation is presented on the right-
hand-side of the figure. The part program is verified using a program called Mac CNCS, and the results are in Figure 10.13 the result in figure
10.13 is the same as what is shown in Figure 10.11: Thus the program is correct. A three-dimensional view can also be found in Figure 10.14.
N0010 G70 G90 T08 M06 Set the machine to the inch format and absolute
dimension programming.
Rapid to p1
N0020 G00 X2.I25 V-0.475 Z4.000 53157 Down feed to pl. spindle CW
N0030 G01 Z1500 F63 M03 Feed to p2
N0040 G01 Y4.100 To p3
N0050 G01 X2.625 To p4.
N0060 G01 Y.1375 To p5.
N0070 G01 X3.000 Circular interpolation to p6.
N0080 G03 Y2.625 I 3.000 J2.000 To p7.
N0090 G01 Y2.000 To p8
N0100 G01 X2.625 To p9.
N0110 G01 Y-0.100 To p9 spindle off, tool sign.2.
N0120 G00 Z4.000 T02 M05 Tool change, set new feed and speed.
N0130 F9.16 S509 M06 Drill hole 1.
N0140 G81 X0.750 Y1.000 Z-0.1 R2.100 Drill hole 2.
M03
N0150 G81 X0.750 Y3.000 Z-0.1 R2.100 Move to home position, stop the machine.
N0160 G00 X. 1.000 Y-1.000 M30
Figure 10.12 Part program for the part in Figure 10.10
Objective:
To Study the characteristics of CNC Milling Machine Outlines of Procedure.
1. Specification, Size, Model No. of various M/C
2. Note down the names of the measure parts and component of the machine.
3. Note down the particularly feature, Control Systems and geometric form of surfaces
Observation
Machine Type & Size Type of Speed given to Feed given to Types of
Make Bed Tool Work Tool profile or
Work Contour
genrated
CNC
Milling
Part B
R8
01
2X2
5 5 8 15 15
25.4 24 22 20 18
O_ _ _ _ (Program No.)
N15 G95 S… F… M04; (G95-Feed MM per Revolutions-Spindle speed (rpm), F-Feed, M04-Main spindle on CCW)
N20
.
R5
R5
5
R8
28
38
O (Programme No.)
N10 T01 M06 G43 H1; (T01-Tool No., M06- Tool Change, G43- Tool Length
Compensation Positive, H1-Offset Value for tool No. 1)
N15 G90 G21; (G90-Absolute programming, G21-Metric data input)
N20 G94 S… F… M03; (G94-Feed MM Per Minute, S-Spindle speed (rpm), F-Feed, M03-
Main spindle on CW
If the complex-shaped component requires calculations to produce the component are done by
the programming software contained in the computer. The programmer communicates with
this system through the system language, which is based on words. There are various
programming languages developed in the recent past, such as APT (Automatically Programmed
Tools), ADAPT, AUTOSPOT, COMPAT-II, 2CL, ROMANCE, SPLIT is used for writing a computer
program, which has English like statements. A translator known as compiler program is used to
translate it in a form acceptable to MCU.
Attach the file or screenshots or pictures or copy & paste that G-Codes and M-Codes of your
designed compound gears chain that you have generated on “Mill9” software by exporting DXF file
of your CAD modeled gears on “Mill9” software.
TASK # 2:
Attach the screenshots or pictures of your CNC Program file running on “Mach3” software while
your compound gear chain is cutting on CNC Milling Machine
KARACHI INSTITUTE OF ECONOMICS AND TECHNOLOGY
Department of Mechatronics Engineering
College of Engineering
Lab
Spur Gear Cutting in CNC Milling Machine.
14
Introduction:
Spur gears or straight-cut gears are the simplest type of gear. They consist of a cylinder or disk
with the teeth projecting radially, and although they are not straight-sided in form (they are
usually of special form to achieve constant drive ratio, mainly involute), the edge of each
tooth is straight and aligned parallel to the axis of rotation. These gears can be meshed
together correctly only if they are fitted to parallel shafts.
Machine Required:
CNC Milling machine
Measuring Instruments:
Vernier calipers
Cutting Tools:
Plane (face) milling cutter
Marking Tools:
Steel rule, scriber
a. Work holding fixtures: work piece supporting fixtures
b. Miscellaneous tools: Hammer, brush, Allen keys
Sequence of Operations:
i. Measuring of specimen
ii. Fixing of specimen in the milling m/c.
iii. Giving the correct depth and automatic feed cut the specimen
iv. Check the specimen with Vernier caliper at the end.
Calculation:
Z = No. of teeth =
m = module =
Blank Diameter =
Tooth Depth =
Indexing Calculation =
Model Calculations
Indexing Ratio = n / N
Where, n = No. of slots on the periphery of the indexing plate.
N = Required number of divisions
Direct Indexing:
Indexing Ratio = 24 / N
Where N= required number of divisions
Simple Indexing:
Number of holes to move = 40 / N
Where N = required number of divisions
Precautions:
The milling machine must be stopped before setting up or removing a work piece,
cutter or other accessory
Never stop the feeding of job when the cutting operation is going on, otherwise the
tool will cut deeper at the point where feed is stopped.
All the chips should be removed from the cutter. A wiping cloth should be placed on
the cutter to protect the hands. The cutter should be rotated in the clockwise direction only
for right handed tools.
The work piece and cutter should be kept as cool as possible (i.e. coolant should
be used where necessary to minimize heat absorption).
The table surface should be protected with a wiping cloth.
Tool must be mounted as close to the machine spindle as possible.
Spur Gear
Attach the pictures of your gears while, when they are cutting on CNC Milling Machine.
TASK # 2:
Attach the pictures of your gears cut through CNC Milling Machine.