Вы находитесь на странице: 1из 223

Laboratory Manual for TA202A

Manufacturing Processes II

Prepared by:
Dr. Mohit Law, ME, IITK
mlaw@iitk.ac.in

Contributions by:
Mr. Karthik R, Mr. Pankaj Deora, Mr. Anurag Singh, Mr. Arijit
Roy, Mr. Govind Sahu, Mr. Pulkit Jain, and Mr. Srijan Bharati

July 2019
TA202A: Manufacturing Processes II – Schedule of labs for 2019, 1st Semester

Introduction to machines; Lab


exercises; Formation of project Project finishing
groups; Finalization of ideas; Project work touches and
Preparation of detailed project Evaluation period
models and drawings

1 2 3 4 5 6 7 8 9 10 11 12 13 – 14

Mondays 29/7 5/8 17/81 19/8 26/8 2/9 9/9 16/09 23/9 30/9 14/10 21/10 28/10
5/10 –

Tuesdays 30/7 6/8 13/8 20/8 27/8 3/9 7/93 24/9 1/10 13/10 15/10 22/10 29/10
21/09 4 – 8 Nov. 2019
Mid-
Wednesdays 31/8 7/8 14/8 21/8 28/8 4/9 11/9 Mid- 25/9 19/104 16/10 23/10 30/10 and
sem
sem
recess 11 – 15 Nov. 2019
Thursdays 1/8 8/8 17/82 22/8 29/8 5/9 12/9 exams 26/9 3/10 17/10 24/10 31/10

Fridays 2/8 9/8 16/8 23/8 30/8 6/9 13/9 27/9 4/10 18/105 25/10 1/11

1
In lieu of the lab you will miss on account of a holiday on 12th August for Id-Ul-Zuha (Bakrid), there will be a make-up lab for the Monday batch on 17/8/2019
from 9 am to 12 pm.
2
In lieu of the lab you will miss on account of a holiday on 15th August for Independence Day there will be a make-up lab for the Thursday batch on 17/8/2019
from 2 – 5 pm
3
In lieu of the lab you will miss on account of a holiday on 10th Sept. for Muharram there will be a make-up lab for the Tuesday batch on 7/9/2019 from 9 am
– 12 pm
4
In lieu of the lab you will miss on account of a holiday on 2nd Oct. for Gandhi Jayanti there will be a make-up lab for the Wednesday batch on 19/10/2019
from 9 am – 12 pm
5
In lieu of the lab you will potentially miss on account of a holiday on 18th Oct. for Antaragni a suitable make-up lab will be held for the Friday batch, likely on
26/10/2019 from 9 am to 12 pm. This has to be confirmed.

1
General set of instructions – read these very carefully

1. Safety first: since this course involves laboratory exercises with machines, students must
always practice the following safety procedures:
a. All students must come to the laboratory in shoes.
b. No student must wear loosely fitting clothes – these can get caught in rotating
machinery.
c. Students with long hair must tie their hair.
d. Students must take permission of the Lab Staff/Tutor before handling any machine.
e. Students must ensure that the floor around the machine they are operating is dry and
not oily to avoid slipping.
f. Students must not lean on any machine in operation.
g. When operating machines, students must wear safety glasses and gloves as
necessary. All students will be issued an apron, a set of safety glasses, and a set of
safety gloves. Students not wearing aprons will not be permitted to work on any
equipment.
2. Discipline also first: Lab runs from 2 – 5 pm. Please make sure you are in the TA202A labs by
1:50 pm. Those students who turn up after 2:05 pm will be marked absent from the day’s
exercise, and will be given a ‘0’ for that exercise. Guides/TAs/Tutors reserve their right to also
deny students entry, if the students are late.
3. All students must possess a hard copy of part ‘A’ of this manual. Part ‘B’ must be issued from
the stores in the lab.
4. Students must handle all equipment in the lab with care.
5. While working on their respective projects, students may issue instruments and tools from
the tool room by depositing their ID card. ID cards will be returned on the safe return of
tools/instruments borrowed.
6. Power to the machines will be turned off 10 minutes before the end of the laboratory session
to allow students to return the tools/instruments they may have borrowed.
7. Students are required to clear off the chips from the machine they were using/operating and
lubricate the guides etc. at the end of the lab session.
8. Lab exercises 3 – 5 will require at least two students in every group to bring their laptops to
the lab. These exercises are to be conducted on the student’s own laptop during the lab. For
further instructions, please read the ‘Instructions for lab exercises 3 – 5’ section.
9. Students must pre-install the software necessary to complete the lab exercise 3 – 5. Links to
download the software to be used are provided in the ‘Download software for lab exercises’
section.
10. In the case any student misses any of the lab exercises 2 – 5 for valid reasons (duty leave,
medical leave, other valid reasons), those students must make up for the exercise within the
same week by joining another section. Please discuss this with the Instructor. If making up for
the exercise is not possible in the same week, students must contact the Instructor to work
out alternatives. If the student does not reach out to the Instructor to make up for a missed
exercise(s), even with valid reasons for missing the exercise, the student will be awarded a ‘0’
grade for the exercise(s) missed. In the case that a student has missed a lab exercise, and has
no valid reason for missing the exercise(s), that student will be awarded a ‘0’ for that exercise.
No make-up of the missed exercise(s) will be permitted to such students.

2
Organization of this manual

This manual is organized in two parts – Part A and Part B.

Part A outlines the overview of the lab exercises with instructions on expectations and grading policies
etc.

Part B details the lab exercises.

Please note:

Though a soft copy of this manual will be provided to all students, students are expected to only have
with them at all times they are in the labs - a hard copy of Part ‘A’ of this manual. Hard copies of part
‘A’ will be sold to you in the labs for a nominal cost. You may also print your own copies. Copies of
part ‘B’ of this manual will be provide to you in the labs, which have to be issued from and returned
to the stores in the labs. Since part ‘B’ of the manual spans 150+ pages, lets save some trees.

3
Part A

4
Contents
General set of instructions – read these very carefully .......................................................................... 2
Organization of this manual .................................................................................................................... 3
Part A....................................................................................................................................................... 4
Overview of the lab and lab exercises for TA202A ................................................................................. 6
Lab exercise 1: Introduction to machines and machining processes ................................................. 7
Lab exercise 2: Assembling, printing with, and disassembling a 3D printing machine ...................... 7
Lab exercise 3: CAD – computer aided design .................................................................................... 7
Lab exercise 4: CAM – computer aided manufacturing...................................................................... 7
Lab exercise 5: Arduino board-based DC motor control .................................................................... 7
Lab exercise 1: Introduction to machines and machining processes ..................................................... 8
Turning on a lathe machine ................................................................................................................ 9
Milling machine................................................................................................................................. 11
Drilling machine ................................................................................................................................ 12
Lab exercise 2: Assemble + disassemble 3D printers (5% of grade) ..................................................... 13
Common instructions for lab exercises 3 – 5 ........................................................................................ 14
Download software for lab exercises.................................................................................................... 15
Lab exercise 3: Computer aided design - CAD (5% of grade)................................................................ 16
Grading:............................................................................................................................................. 16
Lab exercise 4: Computer aided manufacturing – CAM (5% of grade)................................................. 17
CAM for CNC machines ..................................................................................................................... 17
CAM for 3D printing .......................................................................................................................... 17
Grading.............................................................................................................................................. 18
Lab exercise 5: Arduino board-based DC motor control (5% of grade) ................................................ 19
Grading.............................................................................................................................................. 20
Note .................................................................................................................................................. 20
Log Sheet - To be submitted by Individual Students ............................................................................ 21
List of material available in the labs for you to use for your projects: ................................................. 22
Hand tools and measuring equipment you might encounter in the lab .............................................. 23
Part B..................................................................................................................................................... 28

5
Overview of the lab and lab exercises for TA202A

TA202A is a lab-based course, with an emphasis on experiential learning, i.e., learning by doing and
making. Students, on being introduced to the working of machines, and on completion of certain lab
exercises, are expected to make a project in the lab during the semester. There will be five lab
exercises dedicated to introducing the working of machines and equipment to be used by students in
the lab during the semester. Each exercise will take place in one turn of the lab, i.e., in one week. Since
a semester typically has 12 – 13 weeks of engagements, lab turns 6 - 13 will be dedicated solely for
project work.

The project that students are expected to make in groups, consists of conceptualizing a
device/product/task, followed by designing the parts and making drawings for manufacturing those
parts, followed by planning of machining and other operations, and fabrication of the components,
including 3D printing some parts, followed by controlling some parts using a programmable board and
a motor, and finally, assembly of the device/product. A detailed project report must be submitted
during the final evaluation of the completed project. This report should contain general descriptions
of the completed project, design details, detailed drawings, and assembly drawings, followed by
suggestions for improvements, if any, and any other information the students think is important.

Each project must necessarily have at least one part that is 3D printed and one part that is made on
the CNC machine. Each project must also use the Arduino kit supplied to the group.

An outline of the week-wise lab schedule is:

Lab Activity Milestone

1 Intro. to machines and machining processes -

Assemble + Disassemble 3D printers. Assign Groups formed. Groups to brainstorm


2
groups & guides about ideas as homework

Discussion on feasibility of project


3 CAD exercise + project discussions
ideas conceptualize

4 CAM exercise + project discussions Finalization of project idea

Groups to demonstrate progress in


5 Arduino exercise + project discussions
modelling and drafting

6 Start of project work Submit project files

6 – 13 Project work -

13 - 14 Evaluation -

An overview of the five lab exercises is provided below, and detailed instructions for all exercised are
provided in subsequent sections of this manual.

6
Lab exercise 1: Introduction to machines and machining processes
Emphasis in this lab and course is to use secondary manufacturing processes such as machining,
traditional and not, to make parts for the respective projects. Traditional manufacturing processes
that students will be introduced to in the labs are:

 turning (to make round parts)


 milling (to make parts of other shapes)
 drilling (to make holes)

Above processes will be introduced to students on manually operated machines, and on machines
controlled through computers, called Computer Numeric Controller machines, or CNC machines.
Students will also be expected to operate machines on their own to make parts necessary for their
projects. Students will be provided training before being allowed to use the machines on their own.
Detailed instructions on what this exercise will constitute is provided later in this manual.

Lab exercise 2: Assembling, printing with, and disassembling a 3D printing machine


In addition to using conventional machine tools, manual and/or CNC, students will also be introduced
to additive manufacturing, i.e. 3D printing. In one lab exercise, each group of students will be given a
machine in a box and students will be expected to assemble the machine, and then again disassemble
the machine. This will constitute a lab exercise and is aimed at introducing concepts of assembly
following a detailed set of instructions. Students will also be expected to print at least one or more
parts for use in their respective projects. Parts to be printed will be made of PLA. Detailed instructions
are provided later in the manual.

Lab exercise 3: CAD – computer aided design


Since the goal of this lab-based course is to make something, and since students are expected to make
3D CAD models of their parts and assemblies, and since students may or not have been introduced to
CAD before, an exercise on CAD is planned in the labs. More on this later in the manual.

Lab exercise 4: CAM – computer aided manufacturing


Since each project is required to have at least one part made on a CNC machine, and at least one part
made by 3D printing, a lab exercise on generating CNC codes (G codes) for representative parts to be
made on the CNC machine and on the 3D printer will be conducted. This will be a two-part exercise,
and detailed instructions are provided later in the manual.

Lab exercise 5: Arduino board-based DC motor control


Since this is the era of DIY (do-it-yourself), and since a lot of DIY projects involve use of programmable
boards to control motors and other things, students will be introduced to controlling a DC motor using
a programmable Arduino board. A kit including an Arduino board, a motor driver, a battery pack, and
a DC motor will be issued to each group of students. A lab exercise will instruct the use of these things
to drive the motor. Each group is expected to use the kit provided to them in their projects to drive
whatever the group deems fit. Detailed instructions on the exercise are provided later in the manual.

7
Lab exercise 1: Introduction to machines and machining processes

For this exercise, the students will be divided into three sections (A, B, and C) as below. Each section
will have approximately 35 students divided into groups of 7 or more students in every group –
depending on the number of students doing the exercise on that day. Each group will be assigned a
guide. Guides are trained technical staff in the TA202A labs. Guides will introduce working of the
turning, milling, and drilling machines in the labs along with the kind of possible machining operations
on each of the machines. Students will spend one hour each on each type of machine and process.

Activity
Time
Turning Milling Drilling
2 pm – 3 pm A B C
3 pm – 4 pm B C A
4 pm – 5 pm C A B

Students will not be trained to operate machines during this orientation, instead the objective is
simply to introduce the machines that the students will use when they will make parts to execute their
respective projects. Training to operate these machines will be provided by guides assigned to groups
when the respective groups must use the machines, i.e., week six onwards, when actual project work
will begin.

CNC machines will not be introduced in this lab exercise. Working of CNC machines will instead be
discussed in class. Moreover, since each group must necessarily make at least one part of their project
on a CNC machine, its working will be explained to students by their respective guides, as and when
the group needs to use the machine in the labs. This will happen week six onwards, when actual
project work will begin.

In general, machining is a secondary manufacturing process, and it is subtractive in nature, i.e., the
part is given its final form by removing material. The mechanics of metal removal are complex in
nature and studying cutting mechanics is beyond the ambit of this course. However, the general
principle of material removal is by providing a relative motion between the work material being cut,
and the cutting tool. This relative motion can be obtained by a combination of rotary and translatory
movements of either the tool or the workpiece, or both. Machine tools, in general, provide two kinds
of relative motions. The primary motion is responsible for the cutting action and absorbs most of the
power required to perform the machining action. The secondary motion of the feed may proceed in
steps or continuously and absorbs only a fraction of the total power required for machining. When
the secondary motion is added to the primary motion, machine surfaces of desired geometric
characteristics are produced. The tool shears away material, i.e. material transitions from elastic to
plastic and shears/chips away resulting in a new surface. The kind of surface that is produced by the
operation depends on the shape of the tool and the path it traverses through the materials.

Having outlined the general principle of material removal in machining, an overview of the machines,
their parts, and the possible machining operations on each of the machines is discussed below for the
benefit of those interested. Though there are plenty of types of machines and machining operations,
this lab, and hence this manual, will primarily involve the use only of turning, milling and drilling
processes, and as such, only these are outlined below.

8
Turning on a lathe machine
A schematic of a typical manually operated turning machine, also known as a lathe machine, is shown
below. Your guide will explain to you the working principle of this machine and will also outline the
function of different major components of the machine.

Fig. 1 Schematic of a lathe machine

Lathe machines are primarily used to make round parts. When the workpiece is rotated about an axis
and the tool is traversed in a definite path relative to the axis, a surface of revolution is generated.
When the tool path is parallel to the axis, the surface generated is a cylinder - as in straight turning or
boring operations. Turning machines can also be used for hole making, i.e. drilling. An overview of
some possible machining operations on the lathe machine is shown below. Your guide will provide
you an overview of some of these machining operations.

Fig. 2 Schematic of some possible machining operations on the lathe machine. Figure source:
Kalpakjian and Schmid’s book

9
Of all the possible machining operations on a lathe machine, straight turning, shown above is the most
common, and the tool used to perform this operation, with all its geometry is shown in the schematic
below. Your guide may demonstrate this geometry to you in the lab.

Fig. 3 Typical tool geometry for a turning tool. Figure source: Kalpakjian and Schmid’s book

Lathe machines, as well as all other machines can be operated over a range of feeds, speeds, and other
cutting parameters. Selection of these parameters is a function of the material being cut. More about
this will be discussed in class.

10
Milling machine
A schematic of a typical manually operated milling machine is shown below. Your guide will explain to
you the working principle of this machine and will also outline the function of different major
components of the machine.

Milling machines are usually used to make parts with varying shapes. Milling is also a multipoint
cutting operation as opposed to turning, which is usually only a single point machining operation. In
plane milling, the cutter revolves and moves over the work piece as shown. The axis of the cutter is
parallel to the surface generated.

Fig. 4 Schematic of a milling machine

An overview of some possible machining operations on milling machines is shown below. Your guide
will provide you an overview of some of these machining operations. The milling machine will also be
used in this lab for making gears using form cutters as shown below.

Fig. 5 Schematic of some possible machining operations on the milling machine. Figure source:
Kalpakjian and Schmid’s book

11
Drilling machine
A schematic of a typical manually operated drilling machine is shown below. Your guide will explain to
you the working principle of this machine and will also outline the function of different major
components of the machine. Pay attention to the continuously variable speed transmission
mechanism of this machine. It is interesting and different than the speed changes in the turning and
milling machines.

In drilling, the drill may turn and be fed into the workpiece that is clamped in the vice on the machine.
Drilling may also be performed on a lathe machine, in which the workpiece may revolve while the drill
is fed into it.

Fig. 6 Schematic of a drilling machine

An overview of some possible machining operations on drilling machines is shown below. Your guide
will provide you an overview of some of these machining operations, and will also show you the
geometry of typical drills.

Fig. 7 Schematic of some possible machining operations on the drilling machine. Figure source:
Kalpakjian and Schmid’s book

12
Lab exercise 2: Assemble + disassemble 3D printers (5% of grade)

The goal of this lab exercise is to assemble a 3D printer followed by disassembling the same. Each
group of students will be given a machine in a box and will students will be expected to assemble the
machine, and then again disassemble the same machine – all within three hours. This will constitute
a lab exercise and is aimed at introducing concepts of assembly following a detailed set of instructions.

Please read these instructions carefully before start of this exercise:

1. This exercise is worth 5% of your grade.


2. For a full grade, the assembly and disassembly must be successfully completed with the
stipulated three hours of lab time. No extra time will be provided.
3. DO NOT TURN ON THE MACHINE. This is written in CAPS for a reason. If machines are turned
on with the wrong electrical connections made by the students, it may damage the machine.
Hence students should not turn on the machine. If any group turns on the machine, that group
will be awarded a ‘0’ for the exercise.
4. On successful assembly of the machine, the students must have the assembly checked by their
assigned guide/TAs/Tutor.
5. Once the guide assesses the assembly and is satisfied that the assembly is complete, students
must proceed with carefully disassembling the machine and putting back all components in
their respective pouches/boxes.
6. Successful completion of the exercise also includes:
a. no damage to any of the parts
b. no missing screws or any other parts
7. The guide/Tutor will asses the disassembled machine in the box, and:
a. if any screw is found to be missing, 1% will be deducted from all members of the group
for every missing screw
b. if any part is found to be damaged due to mishandling etc., depending on the criticality
of the part, the guide/TAs/Tutor may penalize all students in the group anywhere
between 0% - 5% of the grade.
8. If the group cannot complete this task in time, but has completed the assembly process – a
grade of 2.5% will be assigned to all students in the group, i.e. 2.5% will be deducted.
9. 3D printing will be demonstrated to the students on a separate pre-assembled machine during
this exercise. Each group will have the opportunity to print parts for their respective projects
and may operate the machines at a later stage during the semester.

Students are requested to be careful during this exercise. The disassembled machine in the box will
serve as the starting point for the lab exercise to be conducted on subsequent days. Furthermore, the
same 3D printers will be used during the lab for printing parts necessary for projects. Hence, further
care is encouraged during the exercise.

13
Common instructions for lab exercises 3 – 5

Please carefully note the following:

1. Lab exercise 3 and 4 are fully computer-based exercises, and lab-exercise 5 is partly computer-
based.
2. Each of these exercises are worth 5% of your grade, and the exercise must be done within lab
hours only, i.e. the exercise must be started and completed during the allotted three lab
hours. Students who may have attempted the exercise before coming to the labs, must repeat
the exercise afresh in the lab. The guides/TAs/Tutors will monitor this.
3. At least two students from every group are expected to bring their personal laptops with pre-
installed software for conducting these exercises in the labs.
4. Two plug points per group will be provided to help charge laptops as necessary.
5. If, for whatever reason, software necessary to conduct labs has not been pre-installed on the
laptops, i.e. pre-installation should be complete before coming to the labs, and if it is not,
students will be penalized at the rate of -2% of their grade.
6. Exercises have been designed such that they can be easily completed within the allotted three
hours. Yet, if student groups are not able to complete the exercise, student groups will be
graded based on what they have successfully completed within the allotted three hours.
Details for grading for each exercise is detailed in the relevant section for that exercise.

14
Download software for lab exercises

Please download and install the following software before coming to the labs

Lab Software Download link System requirements


3 CAD: Autodesk https://www.autodesk.in/products/inventor/overview? https://knowledge.autodesk.com/support/inventor-
Inventor referrer=%2Fproducts%2Finventor%2Foverview#0 products/troubleshooting/caas/sfdcarticles/sfdcarticles/System-
Professional 2020* requirements-for-Autodesk-Inventor-2020.html
4 CAM for CNC: https://www.autodesk.com/products/fusion- If you can install the above software, your system is fine to handle
Autodesk Fusion 360/students-teachers-educators these too
360*
CAM for 3D https://craftbot.com/craftware/
printing: Craftware
5 Arduino https://www.arduino.cc/en/Main/Software

*Select the free trial version, and the user category of a student or a teacher. Follow the instructions. Make sure to check for compatibility of your laptop
with the system requirements.

15
Lab exercise 3: Computer aided design - CAD (5% of grade)

Since the goal of this lab-based course is to make something, and since students are expected to make
3D CAD models of their parts and assemblies followed by making part drawings to manufacture things,
and since students may or not have been introduced to CAD before, this exercise on CAD is planned
in the labs to introduce and orient students in the use of CAD.

Since students have already taken the TA101 course, this exercise will assume students are familiar
with ideas of sketching, projections, dimensioning, sectional views, etc., and as such this exercise will
not review those ideas.

This exercise is more like a tutorial, with explicit and detailed instructions provided below for students
to be able to successfully complete five tasks (i) make the rectangular part; (ii) make the stepped shaft;
(iii) make a pair of spur gears; (iv) assemble the parts made in (i – iii); (v) make a part drawing. Students
should have all tasks assessed by the guide/TAs/Tutor. Grades will be assigned for each task.

An overview of the parts, assembly and drawing to be made is shown below:

Grading:
1. A rectangular bar with a hole (successful completion is worth 1%),
2. A stepped shaft (successful completion is worth 1%),
3. A pair of spur gears (successful completion is worth 1%),
4. Assembling the above parts in an assembly (successful completion is worth 1%), and
5. Making a part drawing of the rectangular part (successful completion is worth 1%)

This exercise is designed such that it can be easily completed within the three hour lab duration. If any
group finishes before time, that group is expected to work on their respective project. If any group of
students is unable to finish this lab exercise in time, grades will be assigned for the tasks completed.
No extra time will be permitted.

The tutorials provided in part ‘B’ are self-explanatory. Please follow all steps shown for successful
completion of this exercise.

16
Lab exercise 4: Computer aided manufacturing – CAM (5% of grade)

Since each project is required to have at least one part made on a CNC machine, and at least one part
made by 3D printing, a lab exercise on generating CNC codes (G codes) for representative parts to be
made on the CNC machine and on the 3D printer will be conducted. This will be a two-part exercise.
One part will involve a CAM exercise for pocket milling, and the other part will involve generating a G
code to 3D print a spur gear.

Numerical controlled machines are more accurate than manually operated machines, and can produce
components more uniformly, faster and in the long-run tooling costs are smaller but the initial
investment is higher. Numerical Control (NC) involves a system in which actions are controlled by
direct insertion of numerical data. The system automatically interprets symbolic instructions to
control machine tools and other manufacturing systems. Symbolic instructions or the numerical data
required to produce a part is called a 'part program'. The CNC machine, and the 3D printer, are both
numerically controlled. Hence, this exercise is geared towards making such ‘part programs’ to control
these machines to make the desired parts.

CAM for CNC machines


Making a part program starts with a CAD model for the part. In the case of CNC machines, this is
followed by selection of the tools required to make the part, defining cutting parameters, and then
selecting a tool path to be followed. Modern ‘part-programming’ methods use advanced software
tools to do all this. Since your project will require you to make a part on the CNC machine, this lab
exercise will guide you through the requisite steps in making a part program using ‘Autodesk Fusion
360’ – a modern CAM software. The part for which the G code is to be generated is shown below.
Detailed steps are provided in the tutorial. The tutorial provided is self-explanatory.

CAM for 3D printing


In the case of controlling 3D printing machines, we will also start with the CAD model of the part to be
printed. This will be followed by defining parameters for printing speed, layer height, and also the
internal constructional details of the part to be printed. The part for which the G code is to be
generated in this lab exercise is shown below. There are several mechanisms for 3D printing. In this
lab we will use the ‘Fused deposition modelling – FDM’ type. An overview of additive manufacturing
processes will be discussed in class. The lab exercise is simply to outline the detailed steps involves in
generating G codes for the part to be printed. The tutorial provided is self-explanatory.

17
Grading
This lab-exercise is worth 5% of your grade:

 2.5% for the CAM for the CNC, and


 2.5% for CAM for the 3D printer.

This exercise is designed such that it can be easily completed within the three hour lab duration. If any
group finishes before time, that group is expected to work on their respective project. If any group of
students is unable to finish this lab exercise in time, grades will be assigned for the tasks completed.
No extra time will be permitted.

18
Lab exercise 5: Arduino board-based DC motor control (5% of grade)

Since this is the era of DIY (do-it-yourself), and since a lot of DIY projects involve use of programmable
boards to control motors and other things, students will be introduced to controlling a DC motor using
a programmable Arduino board. A kit including an Arduino board, a motor driver, a battery pack, and
a DC motor will be issued to each group of students. This lab exercise will instruct the use of these
things to drive the motor. Each group is expected to use the kit provided to them in their projects to
drive whatever the group deems fit.

An overview about Arduino, sourced from: https://www.arduino.cc/ is provided below.

What is Arduino?

Arduino is an open-source electronics platform based on easy-to-use hardware and software. It's
intended for anyone making interactive projects.

What is an Arduino board?

Arduino senses the environment by receiving inputs from many sensors, and affects its surroundings
by controlling lights, motors, and other actuators.

Which board will you use?

Arduino Uno. This is a microcontroller board. It has 14 digital input/output pins (of which 6 can be
used as PWM - pulse width modulation outputs), 6 analog inputs, a 16 MHz quartz crystal, a USB
connection, a power jack, an ICSP header and a reset button. It contains everything needed to support
the microcontroller; simply connect it to a computer with a USB cable or power it with a AC-to-DC
adapter or battery to get started. You can tinker with your UNO without worrying too much about
doing something wrong, worst case scenario you can replace the chip for a few hundred rupees and
start over again.

What does the Arduino software do?

You can tell your Arduino what to do by writing code in the Arduino programming language and using
the Arduino development environment.

Overview of the lab exercise:

A schematic of what is expected in this lab exercise is shown below. You will write a program (detailed
instructions in the tutorial later). That program will instruct the Uno board, which will drive a DC motor
through a motor driver as shown. The motor driver will be powered by a 12 V DC battery pack as
shown below.

19
Grading
This lab-exercise is worth 5% of your grade:

 1% for successfully making all electrical connections as per the schematic shown in the tutorial
 2% for successfully controlling the speed of the motor, and
 2% for successfully controlling the spin direction of the motor.

This exercise is designed such that it can be easily completed within the three hour lab duration. If any
group finishes before time, that group is expected to work on their respective project. If any group of
students is unable to finish this lab exercise in time, grades will be assigned for the tasks completed.
No extra time will be permitted.

Note
Kits have to be issued from the tool room, and must also be returned at the end of the exercise.
Students are liable to replace any item that they may damage in this kit.

20
Log Sheet - To be submitted by Individual Students

Group # Sec.

Name:-

Job Assigned

(1) No. of parts fully completed from the planned and approved main drawing. (As per index
submitted earlier)

S.N. Part Name Work done


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

(2) No. of parts assembled together

S.N. Names of parts assembled


1
2
3
4
5
6
7

21
List of material available in the labs for you to use for your projects:

22
Hand tools and
measuring
equipment you
might encounter
in the lab

23
24
25
26
27
Part B

28
Contents for Part B Page
number

Lab Exercise on CAD …………………………………………………………………………………………………………… 30


 Task (i) …………………………………………………………………………………………………………………… 37
 Task (ii) ………………………………………………………………………………………………………………….. 55
 Task (iii) …………………………………………………………………………………………………………………. 67
 Task (iv) …………………………………………………………………………………………………………………. 87
 Task (v) ………………………………………………………………………………………………………………….. 110

Lab Exercise on CAM …………………………………………………………………………………………………………… 136


 G code of CNC machined part ………………………………………………………………………………… 136
 G code for 3D printed part …………………………………………………………………………………….. 183

Lab Exercise on CAD ……………………………………………………………………………………………………………. 202

29
CAD exercise

Contributed by:
Karthik R, Senior Project
Associate, MadLab, IITK

30
Preliminaries

31
Load the software

32
You might see an interface like this after loading the software

First, configure default units to SI

33
*Click on File and then click on options

34
*Click on Configure Default Template

35
*Change Measurement units to Millimeters and Drawing Standard to ISO,
and ‘Apply’ the changes. Your default units should now be SI.

36
Task (i)
make a rectangular
bar with a hole

37
Objective: To make Rectangular bar with hole

38
*Click on “Part”, to begin Part Modeling

39
Your interface should look like this

40
*Click on Origin and select any one of the planes – preferably the XY plane
*Click on “Start 2D Sketch” to start sketching

41
You will see the cross-hair

42
RECTANGULAR BAR:
Select a type of Rectangle from the rectangle drop down menu to start.
Preferably select the ‘two-point center’ rectangle option

43
*Draw a rectangle. Click on the origin and then drag your mouse to define a
rectangle

44
Click on “Dimension” and select the required line to change the dimension (30
mm x 30 mm – more like a square!)

45
*Click on “Finish Sketch”

46
*Click on “3D Model”
*Click on “Extrude” and input the distance (200 mm) and direction in
which it should be extruded

47
This is what your extruded bar should look like.

48
Now go to the ‘Start a 2D sketch’ again to make a hole on one of the longer
faces of the bar that you have extruded

49
Click on “Start 2D Sketch” and select the face on which the sketch is to be drawn

50
Draw the required shape (circle) and give appropriate dimensions

51
Click on ”Extrude”, reverse the direction if required and click on through all

52
Done, your part is made.
Click on File -> Save As

53
Define a path that is easy for you to retrieve. All parts should be saved in the
same folder. Will make the assembly process easier for us.

54
Task (ii)
make a stepped shaft

55
Objective: To make Stepped Shaft

56
*Click on Part, to begin Part Modeling

57
Your interface should look like this

58
*Click on Origin and select any one of the planes – preferably the XY plane
*Click on “Start 2D Sketch” to start sketching

59
You will see the cross-hair

60
Stepped Shaft:
*Draw a sketch on chosen plane as shown below using line option. This is
one continuous curve

61
Use “Symmetric” constrain to make the highlighted line symmetric about the
axis
*Click on “Symmetric” constrain
*Holding Ctrl key, select end points of the line and axis about which it should be
symmetric (Y axis)

62
The sketch is now symmetric

63
Click on “Dimension” and provide the necessary dimensions

64
*Click on “3D Model”
*Click on “Revolve” and select the sketch to be revolved and the axis about
which it is to be revolved

65
Done, your part is made.
Click on File -> Save As

66
Task (iii)
making spur gears

67
Objective: is to make a gear pair as shown

68
Spur gears will be made in a pair.
Since a pair is plural, these gears
will be made as an assembly, and
not as individual parts

69
Click on “Assembly” to start a new assembly

70
Or
Click on File -> New -> Assembly

71
Click on Design and select Spur Gear

72
Save the assembly

73
*Fill in the required specifications of gear and click calculate to check if the design is
compliant. There are many, many ways to make gears herein. We will specify the ‘center
distance’ as 100 mm, the ‘gear ratio’ as 4, the ‘module’ as 2, and the face width as 20 mm.
Gear 1 will have 20 teeth, and because the gear ratio is 4, gear 2 will have 80 teeth.
The software has an in-built algorithm to check if what you specify is feasible. So, after
selecting “component” option for Gear 1 and Gear 2, click on ‘calculate’. More about
what calculations are performed in the background will be discussed in class.

74
If you would like, after calculating, you can click on “preview” to see the
meshing of gears, and you can also animate this using the ‘play’ button

75
After ‘calculating’ and ‘previewing’, and if there are no errors, click on ‘Ok’,
you will see the two gears as shown below.

76
Since the overall assembly requires

that the spur gears are mounted on

a driving and a drive shaft,

provision for holes in the gears to

pass the shaft through the gear

must be made. Hence, we will now

make holes

77
*Click on “Sketch” and select “Start 2D Sketch”.
*Select the face on which the sketch is to be drawn

78
Draw circles on two gears and provide dimensions. Do not finish the sketch yet.

79
Make the circle concentric with the gear
*Click on “Concentric” in Constrain
*Click on the drawn circle and root circle. Then finish the sketch.

80
Click on Extrude, select the two circles, reverse the direction if necessary and
select through all.

81
You have now made through holes for the shafts to pass through. The next
steps will involve constraining these spur gears such that their faces are
aligned and are parallel to a plane or are on a plane. We will further constrain
the gears such that axes of the gear(s) are aligned with the global axes of the
assembly. This will make things easier when we want to build the final
assembly.

82
Click on “Assemble” and select “Constrain” option

83
Select “Mate” option in assembly constrain and choose XY Plane of assembly
and Face of any of the two Spur Gears. This will align the face of the gears with
the XY plane.

84
Select “Mate” option in assembly constrain and choose Z Axis of assembly and
Z Axis of Spur Gear 1. This will align the Z axes of the spur gear pair to the
global Z axis.

85
Select “Mate” option in assembly constrain and choose YZ Plane of assembly
and Z Axis of Spur Gear 1. This step will come useful when assembling other
parts. Save the file, but do not close the assembly.

Completion of this step completes this task of making spur


gears. Have your guides/TAs/Tutors assess this.

86
Task (iv)
Assembling all parts

87
Objective: To make this assembly

1. Spur Gear 1
2. Spur Gear 2
3. Rectangular Bar
2 4. Stepped Shaft
4

1
3

88
Please note that assembling parts by
constraining parts is not trivial. It is a
skill acquired with practice. Given
below is one way of assembly. There
are many other ways.

89
Click on “Place” option.
We will now place the shafts and the rectangular bars you made earlier. We
will place the shaft twice, constrain it appropriately, and then also place the
rectangular bars four times, and constrain those appropriately.

90
Select “Stepped Shaft” and click on “Open”. This will bring in the shaft into
the present assembly

91
We must now constrain the shaft you have brought in.
Select “Mate” option in assembly constrain and choose Axis of Stepped Shaft
and Z Axis of Spur Gear 1. This will align their axes.

92
Select “Mate” option in assembly constrain and choose Faces as shown below
and give an offset of 10 mm. This will ensure that the face of the spur gear is 10
mm away from the step on the shaft.

93
Your assembly should look as below. We will now bring in a rectangular bar
and constrain it appropriately.
Select “Place Component” option

94
Select “Rectangular Bar”

95
Select “Mate” option in assembly constrain and choose Axis of Stepped Shaft
and Axis of the hole in Rectangular Bar. This will align the axis of the hole in the
bar with the axes of the spur gear and the shaft. The rectangular bar still needs
additional constraints.

96
Select “Mate” option in assembly constrain, choose face of Stepped Shaft and
face of Rectangular Bar and click on “Flush”

Flush

97
Select “Mate” option in assembly constrain and choose XZ Plane of Assembly
and YZ Plane of Rectangular Bar.
This completes the assembly process for one shaft and one rectangular bar. We
will now repeat the procedure for the other shaft and the other rectangular bars.

98
Use “Place” option and select stepped shaft

99
As before, mate the axis of Stepped Shaft 2 with hole axis of Spur Gear 2

100
Mate the YZ plane of Stepped Shaft 2 with face of Spur Gear 2.
After this bring in another rectangular bar.

101
As before, mate the axis of Stepped shaft and the hole axis of Rectangular bar

102
Select the “Mate” option in assembly constrain and select the faces of Rectangular
bar and Stepped shaft, as shown

103
Select “Mate” option in assembly constrain and select the faces of two Rectangular
bars, as shown and click on “Flush” to make them parallel

104
Your assembly should look as below. When it does, bring in the other rectangular
bars and complete the assembly process by appropriately constraining the parts.

105
Mate the axis of Stepped shaft with the hole axis of Rectangular bar

106
Mate the faces of Stepped shaft and the Rectangular bar

107
Select the “Angle” option in assembly constrain, select “Undirected Angle”, select
the faces as shown and give the value as 0deg

Undirected Angle

108
Similarly, assemble the fourth Rectangular bar

This concludes this task

109
Task (v)
To make a 2D manufacturing
drawing from a 3D part

110
Click on “Drawing”

111
This is what you should see. The default layout is a A3 sheet, which we want
to make into an A4 sheet.

112
Right click on “Sheet” and select “Edit Sheet”

113
Select the required Sheet Size (A4) and Orientation (portrait).

114
This is what you should now see. We will not bring in the rectangular part to
make manufacturing drawing for it.

115
Click on “Base”

116
Click on “Browse” icon

117
Select the required file and click “Open”

118
This is what you should see

119
Select the required Base View, adjust the scale and click on OK

2
3

120
Click on the view and drag it to the required location in the sheet

121
Click on “Projected”

122
*Place the required views
*Right click and select “Create”. You can create three views at the least.

123
You may end up with something like this

124
To create Section View
*Click on “Section” and select the view from which you need the Sectional View

125
Draw a line along which you need sectional view and click on “Continue”

126
Place the view and click OK

127
128
To give dimensions:
*Click on “Annotate” and click on “Dimension”

2 1

129
Your drawing may look something like this after dimensioning

130
To add text in the drawing sheet
*Click on “Text”

131
*Selection a location where you would like to place your text.
*Type the text and click on OK

132
*Click on File and click on Save As

133
Save where you must

1
2

134
This completes the lab
exercise on CAD. Have the
guide/TA/Tutor assess your
exercise for grading you.

135
CAM exercise for the
CNC milling machine
Pocketing

Contributed by:
Pankaj Deora (Y16), MadLab, IITK

136
Preparatory steps

137
Load the software

138
You should see this interface

139
Load the part that you want to cut on the
CNC. This part will be provided to you.

140
Go to file and open

141
Open the part provided

142
Select the CAD file from the computer which will be used to
perform machining operations (CAM)
Part name: pocketing for TA lab

143
You should see this part

144
Go to ‘Manufacture’ under the ‘Model’ tab

145
Go to ‘Setup’

146
In setup, a new window will open on the
right as shown. Click on milling.

147
In ‘setup’, under ‘model orientation’, select: ‘select z
axis/plane & Y axis’. This is to define a coordinate
system to be consistent with the machine’s axes.

148
Click on the top face of the box to point the z-axis
upwards.

149
It should look like this. Click now on ‘box point’. This
is to move the origin of the axes to some point on
the block.

150
Move the axes origin to the location highlighted

151
Under the ‘stock’ tab, ensure that the stock is ‘0’ everywhere as shown.
If the pocket was to be machined from a block which had a bigger initial
geometry than its final size, that stock would have to be added here.

152
Do not go to the ‘post process’ tab yet. We will
post-process later

153
Have your guide/TA/Tutor assess that you have
reached this stage correctly before proceeding.

154
Now we will define the tool path
strategy to be used, along with the
tool and its cutting parameters

155
Go to the ‘2D’ tab and select the ‘2D pocket’

156
This new window should have opened up. In
the first tab, select the tool

157
This new window should have opened up. Under
‘libraries’ on the left, scroll down and click on
‘Tutorial-Metric’

158
Select the 10 mm diameter flat end mill as
highlighted below. Click ‘OK’.

159
You should see the tool as shown. We will cut without
coolant, so after selecting the tool, ‘disable’ the
coolant a shown

160
Select feeds and speeds based on the work piece
material and tool from the catalogue. Leave the
default values as is.

161
If you had to, this is how you can define speeds and
feeds

162
Now go to the second tab to select the geometry of
the pocket to be machined

163
Select the bottom face of the pocket as is
highlighted below

164
The pocket selected will be highlighted as shown.
Now, go to the fourth tab on ‘passes’ as shown below. Do not
bother with the third tab. It is not relevant for us. Here we will
decide on the number of passes we will machine the pocket in

165
Under ‘passes’ you will see the interface shown below.
Select ‘climb milling’. More about these strategies will be
discussed in class.

166
Under the ‘passes’ tab, we have to decide what the radial engagement
of the tool should be in every pass. We will use the ‘adaptive clearing’
strategy, in which the algorithm will make this decision for us.

167
Under the ‘passes’ tab, we also have to decide about how
many steps in which we want to make the pocket in. We will
use the ‘multiple depth of cuts’ option

168
We will make the pocket in multiple passes, with a 3
mm depth of cut in every pass. Enter this value.

169
Again, under the ‘passes’ tab, we must decide if we want to leave
some material to be finished in a separate finishing operation.
Leave a default stock of 0.5 mm as shown.

170
Under the last tab under 2D pocket, we must decide on the
tool path strategy to follow. We will use the ‘Helix’ option –
which is recommended for such machining operations.

171
Under the last tab under 2D pocket, we must also decide on what
the ramp angle is for the ‘helix’ option we choose earlier. Ramping
will allow the tool to gradually enter the pocket. Select a ramp
angle of 2 degrees.

172
Done! If you’ve reached thus far, you’ve most likely done
everything correct. We’ve defined the origin, the tool, the cutting
parameters to be used and the pocketing strategy. Click on ‘Ok’.

173
We can now simulate the tool path and preview what we will be
actually doing on the CNC machine. Select as shown below.

174
You may now start the simulation. (Make sure that the ‘stock’
option is checked). You can use the ‘play’ button to simulate.

175
Have your guide/TA/Tutor assess that you have
reached this stage correctly before proceeding.
You will now generate and export the CNC code.

176
Go to the ‘Actions’ tab as highlighted below.

177
This window will open up. Select ‘milling’ as shown.

178
All CNC machines have different processors + controllers. The
machines in the labs use a FANUC controller, so, from the
drop-down menu, select FANUC as shown.

179
Give your part program a number and ‘post’ it, i.e. specify
where to save it.

180
Save the program

181
After saving, load the file you have saved in Notepad. Your G
code should look something like this:

Done, this is the exercise!


Congratulations!
You will need to do
something similar when
you actually make a G
code to cut a part that
goes into your project.

182
CAM Task B

Generating a G-Code for the 3D


Printed Part
Contributed by:
Srijan Bharati, Govind N Sahu, Pulkit Jain
MadLab, IITK

183
Objective
Generate a G-code to manufacture a gear using the 3D printing
machine. CAD model for the part will be provided to you.

184
About the Printer
• We will use the Fused Deposition Modeling (FDM) method of rapid
prototyping, i.e. 3D printing. There are other methods too. Those will
be discussed in class.
• The printer is a cartesian Printer (x-y-z)

185
About the printer

Cartesian Printer
1. X Direction
2. Y Direction
3. Z Direction
4. Filament
5. Extrusion Nozzle
6. Heated Platform
7. Printed Part

186
Printing Procedure

CAD file Slicing to Gcode 3D Printing Product

187
At first, you must export the CAD model in a neutral format
• Go to file Export  CAD Format and select file type as STL files (*.stl)

188
Exporting the CAD model
• After selecting file type click on options to save the file with high
resolution.
• Select resolution as high and save the file
• A high resolution file makes for a better
printed product

189
Open the Craftware software and click on ‘Options’ to set the
printer properties in the software.

190
The procedure to slice to generate a G-code involves many
steps. Start with:
• Go to the Printer in the popup
window and put the following
properties of printer we will be
using – the same one you
assembled.
• Width (X) = 220 mm;
• Depth (Y) = 220 mm;
• Height (Z) = 250 mm;
• Offset (X) = 5mm;
• Offset (Y) = 5mm;
• Click on store to save
• Click Ok.
191
Next, click on Add to import the saved .stl file.

192
Next, Click on ‘Drop’ and select the base surface.
We would like that we build from the base up.

193
Next, Click on the ‘move’ button to move the part in the middle
(approximately). You can select any axis and move the part in that
particular direction.

194
Next, Click on the ‘Slice’ button and select ‘Switch to expert
mode’ if prompted and go to ‘Basic’. There are five steps (1-5)
to be followed now, detailed in the next slides

4.
1.

2.

3.

5.

195
1. Section: Resolution under the ‘Basic’ tab
• Set the ‘Extrusion width’ to 0.4 mm. This is determined by the nozzle diameter on the
machine you will use, which has a 0.4 mm opening.
• Layer Height is the Z axis resolution and defines thickness of each layer. Set this value
to be 0.2 mm. The finer this layer thickness, the better the printed product, but more
the time it will take.
• Draw speed controls the speed at which the filament is drawn from the spool. This
also governs the printing speed and quality. Set this value to be 60 mm/s.
2. Section: ‘Extruder’ under the ‘Basic’ tab
• Filament diameter helps software to calculate material flow. We will be using a
filament of diameter 1.75 mm. Set this value.
• Keep the ‘flow adjust’ at 100 %. If underflow or over flow occurs, flow adjust is used
to correct it
196
3. Section: Vertical Shell under the ‘Basic’ tab:
This section determines the properties of the vertical layer at the boundary of the part.
• Set the ‘Loop count = 6 loops’
• ‘Unlock’ the H and V Shell Thickness to manually set the top and vertical layer properties
• Set the ‘Vertical Shell Offset = 0 mm’; the ‘Perimeter Width = 100%’, and the ‘Perimeter Speed =
60%’

4. Section: Top/Bottom Shell under the ‘Basic’ tab:


This section determines the Properties of the Top and Bottom layer at the boundary of the part.
• Set the ‘Type = Parallel Lines’, and se the ‘Top and Bottom Layers = 6 (both)’
• Leave all the other parameters unchanged, i.e., keep them the same as in the screenshot shown
in the slide before last.

5. Section: Infill under the ‘Basic’ tab:


This section determines the properties for printing inside of the object.
• Set the ‘Type = Triangle Grid’; ‘Density/Width = 80% and 120 %’ and ‘Speed = 150%’
197
Next, Go to Foundation and select Brim and don’t change the
default values
Types
• Brim – Creates few loops at a
distance from the main object and
is useful to determine levelling
problems.
• Skirt – Creates an extra layer
connected around the perimeter of
the main object which helps better
sticking and prevents warping
when print cools down.
• Raft – Creates a support platform
on which the main object is
printed. Raft is used to prevent
warping, levelling problems and
unsticking of the print but
consumes more material.
198
Next, go to the ‘Temperature’ tab, and

Set the following:


• Bed Temperature = 600 𝐶
• Head Temperature =
2150 𝐶

On completion of the above


steps:
• Click on slice button

199
If you’ve done everything correctly, you may now:
• In the bottom, move the Layer slider to view the printing simulation
• Click on Save button to save the G-code.

200
• Open the saved G-code in the note pad

• Done, this is the exercise!


• Congratulations!
• You will need to do something similar
when you actually make a G code to print
a part that goes into your project.

201
Arduino board-based DC
motor control

Contributed by:
Mr. Anurag Singh (Y16) and Mr. Arijit Roy, MadLab, IITK

202
Objectives:

• To be introduced to Arduino based


programming
• To program a DC motor to control
its speed
• To program a DC motor for spin
(direction) control

203
Your kit includes:
An Arduino Uno board A motor driver A DC motor

Some jumper wires A USB AB Cable A 12 V battery


Your laptop with
Arduino software
installed

204
Arduino Uno pin diagram

• You will power the board


using the USB cable from
the laptop
• You will only control one
motor is this lab, and as
such, only pins 6, 7 and 9
will be used for this
exercise

https://www.ntu.edu.sg/home/ehchua/programming/arduino/Arduino.html
205
Motor driver pin diagram • You will power the board
using 12 V battery supplied
• You will control only one
motor, so only the ‘Motor
A’ connections will be used
in this exercise

https://howtomechatronics.com/tutorials/arduino/arduino-dc-motor-control-tutorial-l298n-pwm-h-bridge/ 206
• For more on how the Arduino board works, see:
https://www.ntu.edu.sg/home/ehchua/program
ming/arduino/Arduino.html
• For more on how the driver works, including
what a H-bridge is, and what a PWM signal is,
please see:
https://howtomechatronics.com/tutorials/ardui
no/arduino-dc-motor-control-tutorial-l298n-
pwm-h-bridge/
207
Schematic of connections to be made:
Pin connections :-
1. Connect pin 7 of Arduino to pin IN1 of
the motor controller (Digital signal)
2. Connect pin 6 of Arduino to pin IN2 of
the motor controller (Digital signal)
3. Connect pin 9 of Arduino to pin ENA of
the motor controller (PWM signal)
4. Connect DC motor with OUT1, OUT2 of
the Motor A Lead Out
5. Connect 𝑉 + of battery to the 12Volt pin
(+5-35V DC input) of the motor
controller
6. Connect 𝑉 − of battery to the Ground
pin of the motor controller

Note :- Connect battery in the last step


i.e. after uploading the code to Arduino
board

208
Make sure that the battery is not connected to the
motor driver!

After successfully making all pin connections as per


the schematic, have it assessed by your
guide/TA/Tutor before proceeding further.

Once assessed, load the Arduino software on your


laptop.
209
On loading the software, you should see something like:

Open a new sketch

210
New sketch default window:

211
Selection of Board: Under ‘Tool’s, select the board correctly – in this case
‘Uno’.

212
Selection of port: Under ‘Tools’, after connecting the USB AB cable to your
computer and Arduino board, check the port connection as shown. Make
sure to do this every time you connect the board to the computer

213
Type out the following code as is. Comments should be self-explanatory. This
code is to control the speed of the motor.

214
Save the code
1 2

215
Verify the code as shown. If you find any errors in the code, correct them.
Press here to verify the code

216
After verifying the code and connecting the USB AB cable to Arduino and
computer, upload the code into Arduino board : -
Press here to upload the code

If you are getting any error in code correct it. Sometimes the error may also be due to not selection of ‘port’ option. 217
Now, after uploading the program into the Arduino board and doing connections
other than connecting battery.

Connect battery to motor controller as shown in figure below.

218
Your setup should look something like, only that the shaft on your motor should
be spinning with the speed you have programmed:

Have this assessed by your


guide/TA/Tutor before
proceeding to the next step.

219
Now, load a new sketch – as you did earlier. And type out the code below – as is. This code is
for spin direction control. Save the code. Verify it. Upload it. If all is well, you can now change
the spin of the motor by changing levels form ‘High’ to ‘Low’ as shown in the table

IN1 Input IN2 Input Motor State


HIGH HIGH Brake
HIGH LOW Forward direction motion
of motor

LOW LOW Brake


LOW HIGH Reverse direction motion
of motor

220
Done!

If you’ve been able to control the speed and the


spin direction, your exercise is complete.

Arduino has some lovely tutorials for those


interested.

You will have to use this kit in your project to drive


and control whatever it is that you like.
221
Some references:
• https://lastminuteengineers.com/l298n-dc-stepper-driver-arduino-
tutorial/
• https://www.arduino.cc/
• https://slideplayer.com/slide/3255631/
• https://www.theengineeringprojects.com/2018/06/introduction-to-
arduino-uno.html
• https://www.teachmemicro.com/use-l298n-motor-driver/
• https://www.tutorialspoint.com/arduino/arduino_dc_motor

Software:
• Arduino - https://www.arduino.cc/en/Main/Software
• Electrical circuit schematic diagram - http://fritzing.org/home/
222

Вам также может понравиться