Sie sind auf Seite 1von 65

CHAPTER 1

INTRODUCTION

1.1Objective

Technology is the making, modification, usage, and knowledge of tools, machines,


techniques, crafts, systems, methods of organization, in order to solve a problem,
improve a preexisting solution to a problem, achieve a goal, handle an applied
input/output relation or perform a specific function. It can also refer to the collection
of such tools, machinery, modifications, arrangements and procedures. Technologies
significantly affect human as well as other animal species' ability to control and adapt
to their natural environments. This project entitled “Microcontroller based Cutting
Tool” is focused at improvising the task of cutting and making it an automated
process by using microcontroller.

The project is designed to automatically perform the task of cutting. The project is
aimed at simplifying the process of cutting and at the same time to ensure safety of
workers. The Robotic cutter will accept the distance to be moved as input. Say user
enters 3. Then the robotic cutter will move 3 units and when the distance has been
covered, it will start the task of cutting. So technician can enter the distance of the
location at which cutting is to be performed from a safe distance. Since the task of
cutting will be performed automatically the efficiency will be high and chances of
error will be very low. Moreover it can be used to perform the task of cutting even at
hazardous places without any risk to human life.

1.2 Advantages

1. This setup is relatively simple to design and install.


2. This is very useful at all locations.
3. Micro controllers make system error free.
4. This is safe.
5. Very less manpower is required that too just for instructing the cutter.

CHAPTER 2
1
LITERATURE SURVEY

2.1 Microcontroller

A microcontroller (sometimes abbreviated µC, uC or MCU) is a small computer on a


single integrated circuit containing a processor core, memory, and programmable
input/output peripherals. Program memory in the form of NOR flash or OTP ROM is
also often included on chip, as well as a typically small amount of RAM.
Microcontrollers are designed for embedded applications, in contrast to
the microprocessors used in personal computers or other general purpose applications.

Microcontrollers are used in automatically controlled products and devices, such as


automobile engine control systems, implantable medical devices, remote controls,
office machines, appliances, power tools, toys and other embedded systems. By
reducing the size and cost compared to a design that uses a separate microprocessor,
memory, and input/output devices, microcontrollers make it economical to digitally
control even more devices and processes. Mixed signal microcontrollers are common,
integrating analog components needed to control non-digital electronic systems.

Some microcontrollers may use four-bit words and operate at clock rate frequencies
as low as 4 kHz, for low power consumption (mill watts or microwatts). They will
generally have the ability to retain functionality while waiting for an event such as a
button press or other interrupt; power consumption while sleeping (CPU clock and
most peripherals off) may be just nano watts, making many of them well suited for
long lasting battery applications. Other microcontrollers may serve performance-
critical roles, where they may need to act more like a digital signal processor (DSP),
with higher clock speeds and power consumption.

2.2Embedded Design

Microcontroller can be considered a self-contained system with a processor, memory


and peripherals and can be used as an embedded system.[1] The majority of
microcontrollers in use today are embedded in other machinery, such as automobiles,
telephones, appliances, and peripherals for computer systems. These are
called embedded systems. While some embedded systems are very sophisticated,
many have minimal requirements for memory and program length, with no operating
2
system, and low software complexity. Typical input and output devices include
switches, relays, solenoids, LEDs, small or custom LCD displays, radio frequency
devices, and sensors for data such as temperature, humidity, light level etc. Embedded
systems usually have no keyboard, screen, disks, printers, or other recognizable I/O
devices of a personal computer, and may lack human interaction devices of any kind.

2.3 Programming environments

microcontrollers were originally programmed only in assembly language, but


various high-level programming languages are now also in common use to target
microcontrollers. These languages are either designed specially for the purpose, or
versions of general purpose languages such as the C programming
language. Compilers for general purpose languages will typically have some
restrictions as well as enhancements to better support the unique characteristics of
microcontrollers. Here in this project we have used embedded C.

2.4 Robotics

Robotics is the branch of technology that deals with the design, construction,
operation and application of robots and computer systems for their control, sensory
feedback, and information processing. These technologies deal with automated
machines that can take the place of humans, in hazardous or manufacturing processes,
or simply just resemble humans. Many of today's robots are inspired by nature
contributing to the field of bio-inspired robotics.

The concept in creation of machines that could operate autonomously dates back
to classical times, but research into the functionality and potential uses of robots did
not grow substantially until the 20th century. Throughout history, robotics has been
often seen to mimic human behavior, and often manage tasks in a similar fashion.
Today, robotics is a rapidly growing field, as we continue to research, design, and
build new robots that serve various practical purposes,
whether domestically, commercially, ormilitarily. Many robots do jobs that are
hazardous to people such as defusing bombs, exploring shipwrecks, and mines.

3
This projects is based on the above discussed technologies. It makes use of
microcontroller 8051 and is analogous to an omni directional cutter robot.

CHAPTER 3
ABOUT THE PROJECT

4
3.1 Functional Block Diagram

Figure 3.1 Block Diagram

In this diagram, various blocks present the working of circuit.


3.1.1 Power Supply

Transformers used here are Step down transformers. As output of transformer is AC,
so it gets converted into DC by using capacitor circuit. Above circuit shows output of
first module.

3.1.2 Keypad

Keypad is meant to start the set up and to enter the the distance of the location at
which the task of cutting is to be performed. Increment and decrement buttons are
there to enter the distance to be travelled and enter button is there to start the process.
3.1.3 Microcontroller part
The microcontroller is getting its input from the keypad. Once the distance to be
travelled is entered by the user, microcontroller stores it in its memory. Now
corresponding to the distance required to be travelled, the motor driver IC gets high
input from the controller for a particular duration.
5
3.1.4 Motor and Motor Driver Section

Motor driver is used to drive the motor. Motor is further meant to drive the cutter to
the required location and to move the cutter to perform the task of cutting. After the
task of cutting has been performed the cutter is returned to its original location.

3.2 Working
1. As in most of the electronics projects, the first step is to provide the power
supply. When the device is switched on, it will show the status: “Cutting
Machine Initializing” as shown below.

Figure 3.2: Machine initializing


2. Now once the setup has been initialized it is ready to accept the distance. This the
distance at which the actual task of cutting is to be performed.

6
Figure 3.3: Machine ready to accept input
3. User will enter the distance. Say user enters a distance of 4 units. Even after
entering the distance if user finds that he has made a incorrect entry, even then he has
option to rectify it by using increment and decrement mode. Thus the setup is entirely
user friendly. Even in case of incorrect entry of distance there is a provision for
rectifying the mistake, as machine will accept the distance only after pressing the
ENTER button.

4. When the exact distance to be travelled has been entered and changes if required
have been done, then user has to press “ENTER” button.

After pressing ENTER, the machine will become ready to start the task.

7
Figure 3.4: Cutting Tool getting ready to perform task

5. Now the cutting tool will travel the distance entered by the user. The
microcontroller is preprogrammed to travel the distance according to the pre stored
logic corresponding to the distance entered by the user. Corresponding to the distance
to be travelled, conveyer runs for a particular duration.

As in case in consideration, user has entered a distance of 3 units, so the machine will
travel the distance of 3 units.

6. After travelling the entered distance, the machine will perform the actual task of
cutting.

Once the task of cutting has been accomplished, the status “Task Over” will be
displayed on the LCD. This will tell the user that actual task of cutting has been over
now.

8
Figure 3.5: Cutting Tool task performed

7. After the task has been accomplished, the machine returns to its original position
and gets ready to perform next instruction.

As soon as machine has reached its initial position, it will display the status “Ready
for New Task”. This will ensure user that now next instruction can be given to the
cutting tool.

9
Figure 3.6: Cutting Tool getting ready for new task

9. Again the status “Cutting Machine Initializing” will be displayed. Same process
will be repeated thereafter.

3.3 Organization of the Project

The project organization is done in following modules.


1. Designing of Block Diagram and Circuit Diagram.
2. Selecting various components to be used and to calculate various values.
3. Soldering of various components and IC’s.
4. Mechanical work such as placement of components on Sheet.
Chapter 4 deals with various Components used in project.
Chapter 5 deals with hardware implementation of project.
Chapter 6 consists of various results and conclusions related to project.
Chapter 7 deals with applications of project and further improvements or future scope
of it.

10
CHAPTER 4
SYSTEM ARCHITECTURE

Before going into details of project let us first emphasize on the basic system,
functional units and functional IC’s to be used in it.

4.1 Transformer

4.1.1 Introduction

A transformer is a device that transfers electrical energy from one circuit to another
through inductively coupled conductors—the transformer's coils. A varying current in
the first or primary winding creates a varying magnetic flux in the transformer's core
and thus a varying magnetic field through the secondary winding. This varying
magnetic field induces a varying electromotive force (EMF), or "voltage", in the
secondary winding. This effect is called mutual induction.
A transformer makes use of Faraday's law and the ferromagnetic properties of an iron
core to efficiently raise or lower AC voltages. It of course cannot increase power so
that if the voltage is raised, the current is proportionally lowered and vice versa.

4.1.2 Basic principles

The transformer is based on two principles: first, that an electric current can produce a
magnetic field (electromagnetism), and, second that a changing magnetic field within
a coil of wire induces a voltage across the ends of the coil (electromagnetic
induction). Changing the current in the primary coil changes the magnetic flux that is
developed. The changing magnetic flux induces a voltage in the secondary coil.

4.1.3 Types of Transformer

There are basically two types of Transformers:


1) Step up Transformers
2) Step down Transformers.

11
Step Up Transformer:
Step-Up Transformers are one of the really common and vital electrical tools used in
power transmission and modification. They are usually the first major transformer in
a transmission system and are often used in various forms throughout the system.
A step-up transformer is one whose secondary voltage is greater than its primary
voltage. This kind of transformer "steps up" the voltage applied to it. For instance, a
step up transformer is needed to use a 220v product in a country with a 110v supply.

Step Down Transformer:


Step-Down Transformers are very close to the construction of Step-Up Transformers,
except that the windings on the primary side are always more numerous than those on
the secondary side. In fact, if you are already thinking it, yes, either type of
transformer could be wired in backwards and therefore achieve the opposite
application. The one caveat in this is that one has to assure that the resultant voltage
is equivalent to what is desirable as it is possible to arrive at an output in a range not
at all desirable for one's needs, depending on the proportionate number of windings
on primary and secondary sides. To be safe and effective, the output of a transformer
must be within a few percent of the voltage needed.

4.1.4 Detailed Operation:

The simplified description above neglects several practical factors, in particular the
primary current required to establish a magnetic field in the core, and the contribution
to the field due to current in the secondary circuit.
Models of an ideal transformer typically assume a core of negligible reluctance with
two windings of zero resistance.[31] When a voltage is applied to the primary
winding, a small current flows, driving flux around the magnetic circuit of the core.
[31] The current required to create the flux is termed the magnetizing current; since
the ideal core has been assumed to have near-zero reluctance, the magnetizing current
is negligible, although still required to create the magnetic field.
The changing magnetic field induces an electromotive force (EMF) across each
winding.[32] Since the ideal windings have no impedance, they have no associated
voltage drop, and so the voltages VP and VS measured at the terminals of the
12
transformer, are equal to the corresponding EMFs. The primary EMF, acting as it does
in opposition to the primary voltage, is sometimes termed the "back EMF".[33] This
is due to Lenz's law which states that the induction of EMF would always be such that
it will oppose development of any such change in magnetic field.

4.1.5 Construction:

A transformer consists of a rectangular core of soft iron in the form of sheets insulated
from one another. Two separate coils of insulated wires, a primary coil and a
secondary coil are wound on the core. These coils are well insulated from one another
and from the core. The coil on the input side is called Primary coil and the coil on the
output side is called Secondary coil.

4.1.6 Energy Losses

An ideal transformer would have no energy losses, and would be 100% efficient. In
practical transformers energy is dissipated in the windings, core, and surrounding
structures. Larger transformers are generally more efficient, and those rated for
electricity distribution usually perform better than 98%.
Experimental transformers using superconducting windings achieve efficiencies of
99.85%.[42] The increase in efficiency can save considerable energy, and hence
money, in a large heavily-loaded transformer; the trade-off is in the additional initial
and running cost of the superconducting design.
Losses in transformers (excluding associated circuitry) vary with load current, and
may be expressed as "no-load" or "full-load" loss. Winding resistance dominates load
losses, whereas hysteresis and eddy currents losses contribute to over 99% of the no-
load loss. The no-load loss can be significant, so that even an idle transformer
constitutes a drain on the electrical supply and a running cost; designing transformers
for lower loss requires a larger core, good-quality silicon steel, or even amorphous
steel, for the core, and thicker wire, increasing initial cost, so that there is a trade-off
between initial cost and running cost. (Also see energy efficient transformer).
Transformer losses are divided into losses in the windings, termed copper loss, and
those in the magnetic circuit, termed iron loss. Losses in the transformer arise from:

Winding resistance:
13
Current flowing through the windings causes resistive heating of the conductors. At
higher frequencies, skin effect and proximity effect create additional winding
resistance and losses.
Hysteresis losses
Each time the magnetic field is reversed, a small amount of energy is lost due to
hysteresis within the core. For a given core material, the loss is proportional to the
frequency, and is a function of the peak flux density to which it is subjected.[43]
Eddy currents
Ferromagnetic materials are also good conductors, and a core made from such a
material also constitutes a single short-circuited turn throughout its entire length.
Eddy currents therefore circulate within the core in a plane normal to the flux, and are
responsible for resistive heating of the core material. The eddy current loss is a
complex function of the square of supply frequency and inverse square of the material
thickness. Eddy current losses can be reduced by making the core of a stack of plates
electrically insulated from each other, rather than a solid block; all transformers
operating at low frequencies use laminated or similar cores.
Magnetostriction
Magnetic flux in a ferromagnetic material, such as the core, causes it to physically
expand and contract slightly with each cycle of the magnetic field, an effect known as
magnetostriction. This produces the buzzing sound commonly associated with
transformers, and can cause losses due to frictional heating.
Mechanical losses
In addition to magnetostriction, the alternating magnetic field causes fluctuating
forces between the primary and secondary windings. These incite vibrations within
nearby metalwork, adding to buzzing noise, and consuming a small amount of power.
Stray losses
Leakage inductance is by itself largely lossless, since energy supplied to its magnetic
fields is returned to the supply with the next half-cycle. However, any leakage flux
that intercepts nearby conductive materials such as the transformer's support structure
will give rise to eddy currents and be converted to heat. There are also radiative losses
due to the oscillating magnetic field, but these are usually small.
4.2 Microcontroler 8051

4.2.1 Introduction
14
In 1981,Intel Corporation introduced an 8-bit microcontroller called 8051.This
microcontroller had 128 bytes of RAM,4K bytes of on-chip ROM, two timers, one
serial port and four ports(each 8-bits wide) all on a single chip. At that time it was also
referred to as a “system on a chip”. The 8051 is an 8-bit processor meaning that the
CPU can work on only 8-bits of data at a time. Data larger than 8 bits has to be broken
into 8 bits pieces to be processed by the CPU. The 8051 has a total of four I/O ports,
each 8 bits wide. The 8051 can have a maximum of 64K bytes of on-chip ROM.

4.2.2 Features of 8051

 It provides many functions (CPU, RAM, ROM, I/O, interrupt logic, timer, etc.)
in single package
 8-bit ALU, Accumulator and Registers; hence it is an 8-bit microcontroller

 8-bit data bus - It can access 8 bits of data in one operation

 16-bit address bus - It can access 216 memory locations - 64 kB (65536


locations) each of RAM and ROM

 On-chip RAM - 128 bytes (data memory)

 On-chip ROM - 4 kB (program memory)

 Four byte bi-directional input/output port

 UART (serial port)

 Two 16-bit Counter/timers

 Two-level interrupt priority.

4.2.3 Members of 8051 Family

There are two other members in the 8051 family of microcontrollers. They are 8052
and 8031.

8052 Microcontroller

The 8052 is another member of 8051 family. The 8052 has all the standard features of
8051 as well as an extra 128 bytes of RAM and an extra timer. In other words, the
15
8052 has 256 bytes of RAM and 3 timers. It also has 8K bytes of on-chip program
ROM instead of 4K bytes.

8031 Microcontroller

Another member of 8051 family is the 8031 chip. This chip is often referred to as a
ROM-less 8051 since it has 0K bytes of on-chip ROM. To use this chip external ROM
is added to it. The ROM containing the program attached to the 8031 can be as large
as 64K bytes. In the process of adding external ROM containing the program attached
to the 8031, two ports are lost. This leaves only 2 ports for I/O operations. To solve
this problem, we can add external I/O to the 8031 by interfacing the 8031 with
memory and I/O ports such as 8255 chip.

4.2.4 Comaprison of 8051 Family Members

Table 4.1: 8051 Family Members

FEATURE 8051 8052 8031

ROM 4K 8K 0K

RAM 128 256 128

TIMERS 2 3 2

I/O PINS 32 32 32

SEARIAL PORT 1 1 1

INTERRUPT SOURCES 6 8 6

16
4.2.5 Block Diagram

Figure 4.1 Block Diagram

Figure shows the block diagram of a typical microcontroller, which is a true

computer on a chip. The design incorporates all of the features found in

micro processor CPU: ALU, PC, SP, and registers. It also added the other

features needed to make a complete computer: ROM, RAM, parallel I/O,

serial I/O, counters, and clock circuit.

17
4.2.6 Pin Description

Figure 4.2 Pin Diagram

(i)Vcc

Pin 40 provides supply voltage to the chip. The voltage source is +5V.

(ii)GND

Pin 20 is the ground.

(iii)XTAL1 and XTAL2

The 8051 has an on-chip oscillator but requires an external clock to run it. Most often
a quartz crystal oscillator is connected to inputs XTAL1 (pin 19) and XTAL2 (pin
18).The quartz crystal oscillator connected to XTAL1 and XTAL2 also needs two
capacitors of 30pF value. One side of each capacitor is connected to the ground. There

18
are various speeds of 8051 family. Speed refers to the maximum oscillator frequency
connected to XTAL.

Figure 4.3 Oscillator connections

(iv)RST
Pin 9 is the RESET pin. It is an input and is active high (normally low).Upon applying
a high pulse to this pin, the microcontroller will reset and terminate all activities. This
is often referred to as a power-on reset. Activating a power-on reset will cause all
values in the registers to be lost. It will set program counter to all 0s.

In order for reset input to be effective, it must have a minimum duration of two
machine cycles. In other words, the high pulse must be high for a minimum of two
machine cycles before to go low.

(iv)EA
The 8051 family members such as 8751/52, 89C51/52 all come with on-chip ROM to
store programs. In such cases the this pin is connected to V cc. For family members
such as 8031 and 8052 in which there is no on-chip ROM, code is stored on an
external ROM

and is fetched by the 8051/52.Therefore, for 8051 the EA pin must be connected to
GND to indicate that the code is stored externally. EA which stands for “external
access” is pin number 31 in the DIP packages. It is an input pin and must be
connected to either Vcc or GND. This pin cannot be left unconnected.

19
(v)PSEN

This pin is an output pin. PSEN stands for “program store enable”. In an 8051 based
system in which an external ROM holds the program code, this pin is connected to the
OE pin of the ROM.

(vi) ALE

ALE (address latch enable) is an output pin and is active high. When connecting an
8051 to external memory, port 0 provides both address and data. In other words, the
8051 multiplexes address and data through port 0 to save pins. The ALE pin is used
for demultiplexing the address and data by connecting to the G pin of the 74LS373
chip.

(vii) I/O PORT PINS

The four ports P0, P1, P2, P3 each use 8 pins, making them 8-bit ports. All the ports
upon RESET are configured as inputs, ready to be used as input ports. When the first
0 is written to a port, it becomes an output. To reconfigure it as an input, a 1 must be
sent to the port. To use any of these ports as an input port, it must be programmed.

(vii)PORT 0

Port 0 occupies a total of 8 pins (pins32-39).It can be used for an input or output. To
use the pins of port 0 as both input and output ports, each pin must be connected
externally to a 10K-ohm pull-up resistor. Port 0 is also designated as AD0-AD7,
allowing it to be used for both address and data. When connecting an 8051 to an
external memory, port 0 provides both address and data. The 8051 multiplexes
address and data through port 0 to save pins. ALE indicates if P0 has address or data.
When ALE=0,it provides data D0-D7 but when ALE=1 it has address A0-A7.

(viii)PORT1

Port 1 occupies a total of 8 pins (pins 1 through 8).It can be used as input or output. In
contrast to port 0, this port does not need any pull-up resistors since it already has pull
up resistors. Upon reset, port1 is configured as an input port. If port 1 has been

20
configured as an output port, to make it an input port again, it must be programmed as
such by writing 1 to all its bits.

(ix)PORT2
Port 2 occupies a total of 8 pins (pins 21 through 28).It can be used as an input or
output. Just like P1.port 2 does not need any pull up resistors since it already has pull
up resistors internally. Upon reset port 2 is configured as an input port. To make port 2
as an input, it must be programmed as such by writing 1 to all its bits.

(x)Dual role of port 2

In many 8051 systems, P2 is used as simple I/O. But in 8051-based systems, port 2
must be used along with P0 to provide the 16-bit address for external memory. Port 2
is also designated as A8-A15, indicating its dual function.

(xi)PORT 3

Port 3 occupies a total of 8 pins, pins 10 through 17.It can be used as input or
oputput.P3 does not need any pull up resistors, just like P1 and P2 did not. Although
port 3 is configured as an input port upon reset, this is not the way it is most
commonly used. Port 3 has the additional function of providing some extremely
important signals such as interrupts. Port 3 has an additional function of providing
some extremely important signals such as interrupts. Some of the alternate functions
of P3 are listed below:

P3.0 RXD (Serial input)


P3.1 TXD (Serial output)
P3.2 INT0 (External interrupt 0)
P3.3 INT1 (External interrupt 1)
P3.4 T0 (Timer 0 external input)
P3.5 T1 (Timer 1 external input)
P3.6 WR (External memory write strobe)
P3.7 RD (External memory read strobe).

21
4.2.7 Memory Space Allocation

1. Internal ROM
The 89C51 has 4K bytes of on-chip ROM. This 4K bytes ROM memory has memory
addresses of 0000 to 0FFFh. Program addresses higher than 0FFFh, which exceed the
internal ROM capacity, will cause the microcontroller to automatically fetch code
bytes from external memory. Code bytes can also be fetched exclusively from an
external memory, addresses 0000h to FFFFh, by connecting the external access pin to
ground. The program counter doesn’t care where the code is: the circuit designer
decides whether the code is found totally in internal ROM, totally in external ROM or
in a combination of internal and external ROM.
2. Internal RAM
The 128 bytes of RAM inside the 8051 are assigned addresses 00 to 7Fh. These 128
bytes can be divided into three different groups as follows:
 A total of 32 bytes from locations 00 to 1Fh are set aside for register banks and
the stack.
 A total of 16 bytes from locations 20h to 2Fh are set aside for bit addressable
read/write memory and instructions.
 A total of 80 bytes from locations 30h to 7Fh are used for read and write
storage, or what is normally called a scratch pad. These 80 locations of RAM
are widely used for the purpose of storing data and parameters by 8051
programmers.

4.3 Diode

An electric component that conducts electric current in only one direction, functioning
as a one-way valve. Diodes typically are made from semiconductor materials such as
silicon, germanium or selenium and are uses as voltage regulators, signal rectifiers,
oscillators and signal modulators/demodulators. In computer equipment, diodes are
commonly used to emit light by passing a current through it, as in light emitting
diodes (LEDs).

Abbreviation of light emitting diode, an electronic device that lights up when


electricity is passed through it. LEDs are usually red. They are good for displaying

22
images because they can be relatively small, and they do not burn out. However, they
require more power than LCDs.

The semiconductor diode, also known as a pn junction diode, is a two-element


semiconductor device that makes use of the rectifying properties of a PN junction to
convert alternating current into direct current by permitting current flow in only one
direction.

Figure 4.4: A PN junction diode

4.3.1 Function

Diodes allow electricity to flow in only one direction. The arrow of the circuit symbol
shows the direction in which the current can flow. Diodes are the electrical version of
a valve and early diodes were actually called valves.

4.3.2 Forward Voltage

Electricity uses up a little energy pushing its way through the diode, rather like a
person pushing through a door with a spring. This means that there is a small voltage
across a conducting diode, it is called the forward voltage drop and is about 0.7V for
all normal diodes which are made from silicon. The forward voltage drop of a diode is
almost constant whatever the current passing through the diode so they have a very
steep characterstic (currenet-voltage graph).

23
Figure 4.5 A forward bias PN junction diode

4.3.3 Reverse Voltage

When a reverse voltage is applied a perfect diode does not conduct, but all real diodes
leak a very tiny current of a few uA or less. This can be ignored in most circuits
because it will be very much smaller than the current flowing in the forward direction.
However, all diodes have a maximum reverse voltage(usually 50V or more) and if this
is exceeded the diode will fail and pass a large current in the reverse direction, this is
called breakdown.

Ordinary diodes can be split into two types:

 Signal diodes, which pass small currents of 100mA or less.


 Rectifier diode, which can pass large currents.

Figure.4.6 A
reverse biased PN junction
diode

4.3.4 Biasing

4.3.4.1 Forward biasing

It is an external voltage that is applied to a PN junction to reduce its barrier and,


therefore aid current flow through the junction. To accomplish this function,the
external voltage is connected so that it opposes the electrostatic field of the junction.

24
Figure.4.7 Internal diagram of forward biased PN junction

4.3.4.2 Reverse biasing

It is an external voltage that is connected across a PN junction so that its voltage aids
the junction and thereby, offers a high resistance to the current flow through the
junction.

Figure.4.8 Internal diagram of reverse biased PN junction

4.3.5 V-I Characterstics

The charcterstics are plotted under three heads: Zero external voltage, forward
biasing, reverse biasing. From the chracterstics following points may be noted:

 At Zero external voltage,no current flows through the circuit or diode.


 At forward bias ,the current increases slightly the barrier potential is wiped-
off.
 After knee voltage,the forward current rise abruptly.

25
 The forward current is limited by series resistance and a small value of
junction resistance. If the forward current increase beyond the rated value of
the diode, the diode may be destroyed.
 At reverse bias, the reverse current increases slightly with the increase in
voltage because of the minority carriers. For silicon the maximum value of
reverse current is low as 1uA. However, for Ge, it is about 100uA.
 At a certain reverse voltage, the reverse current rises abruptly to a large value.
It is because at this voltage the junction breaks and the resistance of the barrier
region falls suddenly.
 Breakdown voltage is the reverse votage at which pn junction breaks. At
reverse votage, when the junction breaks the diode may be destroyed.

Figure 4.9 characteristics of PN junction diode

4.4 Oscillator Circuit

Oscillator circuit is the heart of the 8051 microcontroller. The 8051 has an on chip
oscillator but it requires an external clock to run it.
Most often a quartz crystal oscillator is connected to inputs XTAL1(Pin 19) and
XTAL2(Pin 18).The a quartz crystal oscillator connected to inputs XTAL1 and
XTAL2 requires two capacitors of 30pF each.One side of each capacitor is connected
to ground.

26
Figure 4.10: Crystal connection to 8051

4.5 Resistor

A linear resistor is a linear, passive two-terminal electrical component that


implements electrical resistance as a circuit element. The current through a resistor is
in direct proportion to the voltage across the resistor's terminals. Thus, the ratio of the
voltage applied across a resistor's terminals to the intensity of current through the
circuit is called resistance.
This relation is represented by Ohm's law:
I= V/R.
Resistors are common elements of electrical networks and electronic circuits and are
ubiquitous in most electronic equipment. Practical resistors can be made of various
compounds and films, as well as resistance wire (wire made of a high-resistivity alloy,

27
such as nickel-chrome). Resistors are also implemented within integrated circuits,
particularly analog devices, and can also be integrated into hybrid and printed circuits.
The electrical functionality of a resistor is specified by its resistance: common
commercial resistors are manufactured over a range of more than nine orders of
magnitude. When specifying that resistance in an electronic design, the required
precision of the resistance may require attention to the manufacturing tolerance of the
chosen resistor, according to its specific application. The temperature coefficient of
the resistance may also be of concern in some precision applications. Practical
resistors are also specified as having a maximum power rating which must exceed the
anticipated power dissipation of that resistor in a particular circuit: this is mainly of
concern in power electronics applications. Resistors with higher power ratings are
physically larger and may require heat sinks. In a high-voltage circuit, attention must
sometimes be paid to the rated maximum working voltage of the resistor.
Practical resistors have a series inductance and a small parallel capacitance; these
specifications can be important in high-frequency applications. In a low-noise
amplifier or pre-amp, the noise characteristics of a resistor may be an issue. The
unwanted inductance, excess noise, and temperature coefficient are mainly dependent
on the technology used in manufacturing the resistor. They are not normally specified
individually for a particular family of resistors manufactured using a particular
technology.[1] A family of discrete resistors is also characterized according to its form
factor, that is, the size of the device and the position of its leads (or terminals) which
is relevant in the practical manufacturing of circuits using them.
Units:
The behavior of an ideal resistor is dictated by the relationship specified by Ohm's
law:
Ohm's law states that the voltage (V) across a resistor is proportional to the current
(I), where the constant of proportionality is the resistance (R).
Equivalently, Ohm's law can be stated:
This formulation states that the current (I) is proportional to the voltage (V) and
inversely proportional to the resistance (R). This is directly used in practical
computations. For example, if a 300 ohm resistor is attached across the terminals of a
12 volt battery, then a current of 12 / 300 = 0.04 amperes (or 40 milliamperes) occurs
across that resistor.

28
Power dissipation:
The power P dissipated by a resistor (or the equivalent resistance of a resistor
network) is calculated as:

Construction:
1) Lead arrangements
Through-hole components typically have leads leaving the body axially.
Others have leads coming off their body radially instead of parallel to the
resistor axis. Other components may be SMT (surface mount technology)
while high power resistors may have one of their leads designed into the heat
sink.
2) Carbon Composition
Carbon composition resistors consist of a solid cylindrical resistive element
with embedded wire leads or metal end caps to which the lead wires are
attached. The body of the resistor is protected with paint or plastic. Early 20th-
century carbon composition resistors had uninsulated bodies; the lead wires
were wrapped around the ends of the resistance element rod and soldered. The
completed resistor was painted for color coding of its value.

The resistive element is made from a mixture of finely ground (powdered)


carbon and an insulating material (usually ceramic). A resin holds the mixture
together. The resistance is determined by the ratio of the fill material (the
powdered ceramic) to the carbon. Higher concentrations of carbon, a weak
conductor, result in lower resistance. Carbon composition resistors were
commonly used in the 1960s and earlier, but are not so popular for general use
now as other types have better specifications, such as tolerance, voltage
dependence, and stress (carbon composition resistors will change value when
stressed with over-voltages). Moreover, if internal moisture content (from
exposure for some length of time to a humid environment) is significant,
soldering heat will create a non-reversible change in resistance value. Carbon
composition resistors have poor stability with time and were consequently
factory sorted to, at best, only 5% tolerance.[4] These resistors, however, if
29
never subjected to overvoltage nor overheating were remarkably reliable
considering the component's size.

4.6 Capacitors

A capacitor (formerly known as condenser) is a passive two-terminal electrical


component used to store energy in an electric field. The forms of practical capacitors
vary widely, but all contain at least two electrical conductors separated by a dielectric
(insulator). Capacitors are used as parts of electrical systems, for example, consist of
metal foils separated by a layer of insulating film.
When there is a potential difference (voltage) across the conductors, a static electric
field develops across the dielectric, causing positive charge to collect on one plate and
negative charge on the other plate. Energy is stored in the electrostatic field. An ideal
capacitor is characterized by a single constant value, capacitance, measured in farads.
This is the ratio of the electric charge on each conductor to the potential difference
between them.
The capacitance is greatest when there is a narrow separation between large areas of
conductor, hence capacitor conductors are often called "plates," referring to an early
means of construction. In practice, the dielectric between the plates passes a small
amount of leakage current and also has an electric field strength limit, resulting in a
breakdown voltage, while the conductors and leads introduce an undesired inductance
and resistance.
Capacitors are widely used in electronic circuits for blocking direct current while
allowing alternating current to pass, in filter networks, for smoothing the output of
power supplies, in the resonant circuits that tune radios to particular frequencies and
for many other purposes.

4.7 Battery

An electrical battery is one or more electrochemical cells that convert stored chemical
energy into electrical energy. Since the invention of the first battery (or "voltaic pile")
in 1800 by Alessandro Volta, batteries have become a common power source for
many household and industrial applications. According to a 2005 estimate, the
30
worldwide battery industry generates US$48 billion in sales each year, with 6%
annual growth.
There are two types of batteries: primary batteries (disposable batteries), which are
designed to be used once and discarded, and secondary batteries (rechargeable
batteries), which are designed to be recharged and used multiple times. Batteries come
in many sizes, from miniature cells used to power hearing aids and wristwatches to
battery banks the size of rooms that provide standby power for telephone exchanges
and computer data centers.

Principle of operation
A battery is a device that converts chemical energy directly to electrical energy.It
consists of a number of voltaic cells; each voltaic cell consists of two half cells
connected in series by a conductive electrolyte containing anions and cations. One
half-cell includes electrolyte and the electrode to which anions (negatively charged
ions) migrate, i.e., the anode or negative electrode; the other half-cell includes
electrolyte and the electrode to which cations (positively charged ions) migrate, i.e.,
the cathode or positive electrode. In the redox reaction that powers the battery, cations
are reduced (electrons are added) at the cathode, while anions are oxidized (electrons
are removed) at the anode. The electrodes do not touch each other but are electrically
connected by the electrolyte. Some cells use two half-cells with different electrolytes.
A separator between half cells allows ions to flow, but prevents mixing of the
electrolytes.
Each half cell has an electromotive force (or emf), determined by its ability to drive
electric current from the interior to the exterior of the cell. The net emf of the cell is
the difference between the emfs of its half-cells, as first recognized by Volta.
Therefore, if the electrodes have emfs and , then the net emf is ; in other words, the
net emf is the difference between the reduction potentials of the half-reactions.
The electrical driving force or across the terminals of a cell is known as the terminal
voltage (difference) and is measured in volts. The terminal voltage of a cell that is
neither charging nor discharging is called the open-circuit voltage and equals the emf
of the cell. Because of internal resistance, the terminal voltage of a cell that is
discharging is smaller in magnitude than the open-circuit voltage and the terminal
voltage of a cell that is charging exceeds the open-circuit voltage. An ideal cell has

31
negligible internal resistance, so it would maintain a constant terminal voltage of
until exhausted, then dropping to zero. If such a cell maintained 1.5 volts and stored a
charge of one coulomb then on complete discharge it would perform 1.5 joule of
work.In actual cells, the internal resistance increases under discharge, and the open
circuit voltage also decreases under discharge. If the voltage and resistance are plotted
against time, the resulting graphs typically are a curve; the shape of the curve varies
according to the chemistry and internal arrangement employed.
As stated above, the voltage developed across a cell's terminals depends on the energy
release of the chemical reactions of its electrodes and electrolyte. Alkaline and
carbon-zinc cells have different chemistries but approximately the same emf of 1.5
volts; likewise NiCd and NiMH cells have different chemistries, but approximately
the same emf of 1.2 volts.On the other hand the high electrochemical potential
changes in the reactions of lithium compounds give lithium cells emfs of 3 volts or
more.

4.8 Micros witches

A miniature snap-action switch, also trademarked and frequently known as a micro


switch, is an electric switch that is actuated by very little physical force, through the
use of a tipping-point mechanism, sometimes called an "over-center" mechanism.
Switching happens reliably at specific and repeatable positions of the actuator, which
is not necessarily true of other mechanisms. They are very common due to their low
cost and durability, greater than 1 million cycles and up to 10 million cycles for heavy
duty models. This durability is a natural consequence of the design.

The defining feature of micro switches is that a relatively small movement at the
actuator button produces a relatively large movement at the electrical contacts, which
occurs at high speed (regardless of the speed of actuation). Most successful designs
also exhibit hysteresis, meaning that a small reversal of the actuator is insufficient to
reverse the contacts; there must be a significant movement in the opposite direction.
Both of these characteristics help to achieve a clean and reliable interruption to the
switched circuit.

Micro switches are very widely used; among their applications are appliances,
machinery, industrial controls, vehicles, and many other places for control of
32
electrical circuits. They are usually rated to carry current in control circuits only,
although some switches can be directly used to control small motors, solenoids,
lamps, or other devices.

Figure 4.11 Micro switch

4.9 IC1 7806

It is a voltage regulator meant to give regulated 6V supply when provided with


suitable input.

The 78xx (sometimes LM78xx) is a family of self-contained fixed linear voltage


regulator integrated circuits. The 78xx family is commonly used in electronic circuits
requiring a regulated power supply due to their ease-of-use and low cost. For ICs
within the family, the xx is replaced with two digits, indicating the output voltage (for
example, the 7805 has a 5 volt output, while the 7812 produces 12 volts). The 78xx
line are positive voltage regulators: they produce a voltage that is positive relative to a
common ground. There is a related line of 79xx device which are complementary
negative voltage regulators. 78xx and 79xx ICs can be used in combination to provide
positive and negative supply voltages in the same circuit.

78xx ICs have three terminals and are commonly found in the TO220 form factor,
although smaller surface-mount and larger TO3 packages are available. These devices
support an input voltage anywhere from a couple of volts over the intended output
voltage, up to a maximum of 35 or 40 volts, and typically provide 1 or
1.5 amperes of current (though smaller or larger packages may have a lower or higher
current rating).

Advantages

 78xx series ICs do not require additional components to provide a constant,


regulated source of power, making them easy to use, as well as economical and

33
efficient uses of space. Other voltage regulators may require additional
components to set the output voltage level, or to assist in the regulation process.
Some other designs (such as a switching power supply) may need substantial
engineering expertise to implement.

 78xx series ICs have built-in protection against a circuit drawing too much
power. They have protection against overheating and short-circuits, making them
quite robust in most applications. In some cases, the current-limiting features of
the 78xx devices can provide protection not only for the 78xx itself, but also for
other parts of the circuit.

Disadvantages

 The input voltage must always be higher than the output voltage by some
minimum amount (typically 2 volts). This can make these devices unsuitable for
powering some devices from certain types of power sources (for example,
powering a circuit that requires 5 volts using 6-volt batteries will not work using a
7805).

 As they are based on a linear regulator design, the input current required is
always the same as the output current. As the input voltage must always be higher
than the output voltage, this means that the total power (voltage multiplied by
current) going into the 78xx will be more than the output power provided. The
extra input power is dissipated as heat. This means both that for some applications
an adequate heatsink must be provided, and also that a (often substantial) portion
of the input power is wasted during the process, rendering them less efficient than
some other types of power supplies. When the input voltage is significantly higher
than the regulated output voltage (for example, powering a 7805 using a 24 volt
power source), this inefficiency can be a significant issue.

 Even in larger packages, 78xx integrated circuits cannot supply as much


power as many designs which use discrete components, and are generally
inappropriate for applications requiring more than a few amperes of current.

34
In spite of the above mentioned disadvantes, these are widely used for voltage
regulation as their advantages hold good over disadvantages.

4.10 Relay

A relay is an electrically operated switch. Many relays use an electromagnet to


operate a switching mechanism mechanically, but other operating principles are also
used. Relays are used where it is necessary to control a circuit by a low-power signal
(with complete electrical isolation between control and controlled circuits), or where
several circuits must be controlled by one signal. The first relays were used in long
distance telegraph circuits, repeating the signal coming in from one circuit and re-
transmitting it to another. Relays were used extensively in telephone exchanges and
early computers to perform logical operations.
A type of relay that can handle the high power required to directly control an electric
motor is called a contactor. Solid-state relays control power circuits with no moving
parts, instead using a semiconductor device to perform switching. Relays with
calibrated operating characteristics and sometimes multiple operating coils are used to
protect electrical circuits from overload or faults; in modern electric power systems
these functions are performed by digital instruments still called "protective relays"

4.10.1Basic Operation:

A simple electromagnetic relay consists of a coil of wire surrounding a soft iron core,
an iron yoke which provides a low reluctance path for magnetic flux, a movable iron
armature, and one or more sets of contacts (there are two in the relay pictured). The
armature is hinged to the yoke and mechanically linked to one or more sets of moving
contacts. It is held in place by a spring so that when the relay is de-energized there is
an air gap in the magnetic circuit. In this condition, one of the two sets of contacts in
the relay pictured is closed, and the other set is open. Other relays may have more or
fewer sets of contacts depending on their function. The relay in the picture also has a
wire connecting the armature to the yoke. This ensures continuity of the circuit
between the moving contacts on the armature, and the circuit track on the printed
circuit board (PCB) via the yoke, which is soldered to the PCB.

35
Figure 4.12 Relay

When an electric current is passed through the coil it generates a magnetic field that
attracts the armature, and the consequent movement of the movable contact(s) either
makes or breaks (depending upon construction) a connection with a fixed contact. If
the set of contacts was closed when the relay was de-energized, then the movement
opens the contacts and breaks the connection, and vice versa if the contacts were
open. When the current to the coil is switched off, the armature is returned by a force,
approximately half as strong as the magnetic force, to its relaxed position. Usually
this force is provided by a spring, but gravity is also used commonly in industrial
motor starters. Most relays are manufactured to operate quickly. In a low-voltage
application this reduces noise; in a high voltage or current application it reduces
arcing.

When the coil is energized with direct current, a diode is often placed across the coil
to dissipate the energy from the collapsing magnetic field at deactivation, which
would otherwise generate a voltage spike dangerous to semiconductor circuit
components. Some automotive relays include a diode inside the relay case.
Alternatively, a contact protection network consisting of a capacitor and resistor in
series (snubber circuit) may absorb the surge. If the coil is designed to be energized
with alternating current (AC), a small copper "shading ring" can be crimped to the
end of the solenoid, creating a small out-of-phase current which increases the
minimum pull on the armature during the AC cycle.[1]

A solid-state relay uses a thyristor or other solid-state switching device, activated by


the control signal, to switch the controlled load, instead of a solenoid. An optocoupler
36
(a light-emitting diode (LED) coupled with a photo transistor) can be used to isolate
control and controlled circuits.
4.10.2 Pole and throw
Since relays are switches, the terminology applied to switches is also applied to
relays. A relay will switch one or more poles, each of whose contacts can be thrown
by energizing the coil in one of three ways:
Normally-open (NO) contacts connect the circuit when the relay is activated; the
circuit is disconnected when the relay is inactive. It is also called a Form A contact or
"make" contact. NO contacts can also be distinguished as "early-make" or NOEM,
which means that the contacts will close before the button or switch is fully engaged.
Normally-closed (NC) contacts disconnect the circuit when the relay is activated; the
circuit is connected when the relay is inactive. It is also called a Form B contact or
"break" contact. NC contacts can also be distinguished as "late-break" or NCLB,
which means that the contacts will stay closed until the button or switch is fully
disengaged.
Change-over (CO), or double-throw (DT), contacts control two circuits: one
normally-open contact and one normally-closed contact with a common terminal. It is
also called a Form C contact or "transfer" contact ("break before make"). If this type
of contact utilizes a "make before break" functionality, then it is called a Form D
contact.

Figure 4.13 Function of Relay


The following designations are commonly encountered:
SPST – Single Pole Single Throw. These have two terminals which can be connected
or disconnected. Including two for the coil, such a relay has four terminals in total. It

37
is ambiguous whether the pole is normally open or normally closed. The terminology
"SPNO" and "SPNC" is sometimes used to resolve the ambiguity.
SPDT – Single Pole Double Throw. A common terminal connects to either of two
others. Including two for the coil, such a relay has five terminals in total.
DPST – Double Pole Single Throw. These have two pairs of terminals. Equivalent to
two SPST switches or relays actuated by a single coil. Including two for the coil, such
a relay has six terminals in total. The poles may be Form A or Form B (or one of
each).
DPDT – Double Pole Double Throw. These have two rows of change-over terminals.
Equivalent to two SPDT switches or relays actuated by a single coil. Such a relay has
eight terminals, including the coil.

The "S" or "D" may be replaced with a number, indicating multiple switches
connected to a single actuator. For example 4PDT indicates a four pole double throw
relay (with 14 terminals).

EN 50005 are among applicable standards for relay terminal numbering; a typical EN
50005-compliant SPDT relay's terminals would be numbered 11, 12, 14, A1 and A2
for the C, NC, NO, and coil connections, respectively.

4.10.3 Applications:

Relays are used to and for:


 Amplify a digital signal, switching a large amount of power with a small
operating power.
 Detect and isolate faults on transmission and distribution lines by opening and
closing circuit breakers (protection relays).
 Isolate the controlling circuit from the controlled circuit when the two are at
different potentials, for example when controlling a mains-powered device
from a low-voltage switch. The latter is often applied to control office lighting
as the low voltage wires are easily installed in partitions, which may be often
moved as needs change. They may also be controlled by room occupancy
detectors in an effort to conserve energy.

38
 Safety-critical logic. Because relays are much more resistant than
semiconductors to nuclear radiation, they are widely used in safety-critical
logic, such as the control panels of radioactive waste-handling machinery.
 Time delay functions. Relays can be modified to delay opening or delay
closing a set of contacts. A very short (a fraction of a second) delay would use
a copper disk between the armature and moving blade assembly. Current
flowing in the disk maintains magnetic field for a short time, lengthening
release time. For a slightly longer (up to a minute) delay, a dashpot is used. A
dashpot is a piston filled with fluid that is allowed to escape slowly. The time
period can be varied by increasing or decreasing the flow rate. For longer time
periods, a mechanical clockwork timer is installed.

4.11 Driver IC- L293D

The stepper motor and the Dc motors can be controlled using the basic interfacing.
The output of microcontroller has a voltage rating of 5V and current rating of 2-10
mA. But the Dc motor require a current of about 1.2 A. So in order to amplify the
current and to meet with the requirement of the Dc and stepper motor we use drivers.
The IC-L293D is used as a driver for DC and stepper motors. But as an alternative the
circuitry of ULN2803 A can be used for controlling the motors.

L293D is a dual H-bridge motor driver integrated circuit (IC). Motor drivers act as
current amplifiers since they take a low-current control signal and provide a higher-
current signal. This higher current signal is used to drive the motors.
L293D contains two inbuilt H-bridge driver circuits. In its common mode of
operation, two DC motors can be driven simultaneously, both in forward and reverse
direction. The motor operations of two motors can be controlled by input logic at pins
2 & 7 and 10 & 15. Input logic 00 or 11 will stop the corresponding motor. Logic 01
and 10 will rotate it in clockwise and anticlockwise directions, respectively.
Enable pins 1 and 9 (corresponding to the two motors) must be high for motors to
start operating. When an enable input is high, the associated driver gets enabled. As a
result, the outputs become active and work in phase with their inputs. Similarly, when
the enable input is low, that driver is disabled, and their outputs are off and in the
high-impedance state.

39
4.12 DC MOTOR

4.12.1 Introduction

A direct current (DC) motor is widely used device that translates electrical pulses
into mechanical movement. In the DC motor we have only + and - leads. Connecting
them to a DC voltage source moves the motor in one direction. By reversing the
polarity, the DC motor will move in the opposite direction. One can easily experiment
with the DC motor. For example, small fans used in many motherboards to cool the
CPU are run by DC motors. By connecting their leads to + and – voltage source, the
DC motor moves. With a stepper motor in step of 1-15 degrees the DC motor moves
continuously. The maximum speed of dc motor is indicated in rpm. It has two rpm’s
no load and loaded. The manufacturer’s datasheet gives the no load rpm. It can be
from few thousand to tens of thousands. The rpm is reduced when moving a load and
it decreases as the load is increased. In stepper motor if we know the starting position
we can count the number of steps the motor has moved and calculate the final position
of the motor. But this is not possible in DC motor.

4.12.2 Controlling of DC motor

DC motor can be controlled in two ways.

4.10.2.1Unidirectional Control

The DC motor can move only in one direction either clockwise or anticlockwise. For
clockwise rotation, one lead of the DC motor is connected to positive terminal of the
battery and the other is connected to negative terminal of the battery. And for the
reverse direction i.e. anticlockwise direction the terminals are inverted.

40
Fig 4.14 DC Motor Rotation

4.10.2.2 Bidirectional Control

With the help of relays or some specially designed chips we can change the direction
of DC motor rotation. Thus the direction of motor can be changed with the help of H-
bridge.

4.12.3 H bridge control

An H-bridge is an electronic circuit which enables a voltage to be applied across a


load in either direction. These circuits are often used in robotics and other applications
to allow DC motors to run forwards and backwards. 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. 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.

Fig 4.15 Structure of an H-bridge

This condition is known as shoot-through.


41
Operation of H-bridge

The H-Bridge arrangement is generally used to reverse the polarity 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. It has four switches which are connected
with the motor in such a way that when switches present in a diagonal fashion are
closed then the motor operates either in clockwise or in anticlockwise direction.

Table 4.2- DC Motor Operations

S1 S2 S3 S4 Result
1 1 0 0 Not working
1 0 0 1 Clockwise
0 1 1 0 Anti clockwise
0 0 1 1 Not working

4.13 STEPPER MOTOR

4.13.1 Introduction

A stepper motor is a widely used device that translates electrical pulses into
mechanical movement. In applications, the stepper motor is used for position control.
The stepper motors have a permanent magnet rotor called shaft surrounded by a stator.
There are also steppers called variable reluctance stepper motors that do not have a
PM rotor. The stepper motors have four stator findings that are paired with the center
tapped common. These stepper motor are called four phases or unipolar stepper
motor. The center tap allows a change of current direction in each of two coils when a
winding is grounded, thereby resulting in a polarity change of the stator. The stepper
motor shaft moves in a fixed repeatable increment which allows one to move it to a
precise position. This repeatable fixed movement is possible as a result of basic

42
magnetic theory where poles of the same polarity repel and the opposite poles attract.
The direction of rotation is dictated by the stator poles. The stator poles are
determined by the current sent through the wire coils. As the direction of current is
changed the polarity is also changed causing the reverse motion of the motor. As the
sequence of power is applied to each stator winding the rotor will rotate. There are
several widely used sequences where each has a degree of precision.

4.13.2 Step angle

The step angle is minimum degree of rotation associated with a single step. Various
motor have a different step angles. Steps per revolution are the total number of steps
needed to rotate one complete rotation or 360 degree. A stepper motor does not need
more terminals leads for the stator to achieve smaller steps. The relation between rpm,
the steps per revolution, and steps per second is as follows:

Steps per second = (rpm * steps per revolution) / 60

Table 4.3- Relation between Step Angle and Steps per Revolution

Step angle Steps per revolution

.72 500

1.8 200

2.0 180

2.5 144

5.0 72

4.13.3 Types of Stepper motors

43
There are two basic types of stepper motors, unipolar steppers and bipolar steppers.
They are identified by the number of connections to the motor.

4.13.3.1 Unipolar Stepper Motor

The unipolar stepper motor has five or six wires and four coils (actually two coils
divided by center connections on each coil). The center connections of the coils are
tied together and used as the power connection. They are called unipolar steppers
because power always comes in on this one pole.

Unipolar stepper motors require only four transistors switches which greatly simplify
the drive circuitry when compared to the 8 transistors required to drive a bipolar
motor. However, for unipolar stepper motors to 9 have the same number of turns per
winding as a bipolar motor, smaller diameter must be employed so that both windings
may fit in the space of one. The resistance increases due to the smaller wire diameter.

Figure 4.16: Unipolar Stepper Motor

Due to the increased resistance unipolar stepper motors have 30% less torque at low
step rates.

4.13.3.2 Bipolar Stepper Motor

The bipolar stepper motor usually has four wires coming out of it. Unlike unipolar
steppers, bipolar steppers have no common center connection. They have two
independent sets of coils instead. Bipolar steppers can be distinguished from unipolar
steppers by measuring the resistance between the wires. Then two pairs with equal
resistance are founded. The Bipolar Stepper motor has two coils. The coils are

44
identical and are not electrically connected. The separate coils can be identified by
touching the terminal wires together- if the terminals of a coil are connected, the shaft
becomes harder to turn.

Figure 4.17: Bipolar Stepper Motor

One of the benefits of the bipolar drive circuitry is that it allows us to use both
"Bipolar" and "Unipolar" motors. Bipolar motors are simply Unipolar without the
center taps, which simplifies construction of the motor. So four, six, and eight steppers
are drive. Furthermore, Unipolar motors may be used in 2 different configurations—
one, simply ignore the center taps. Two, use half the coil only by using the center tap
and one of the terminals. This will produce less hold torque but allows higher top
speeds because of the lower inductance. There are several widely used sequences
where each has a different degree of precision. The table below shows a two phase
two phase stepping sequence. We can start with any of the sequences in the table once
we start we must continue in the proper order. For example if we start with step3, we
must continue in the sequence of steps 4, 1, 2 etc.

Table 4.4 – Stepper Motor Connections

Step Winding A Winding B Winding C Winding D

1 1 0 0 1

2 1 1 0 0

3 0 1 1 0

4 0 1 1 1

45
46
CHAPTER 5
HARDWARE IMPLEMENTATION

5.1 Hardware Description

5.1.1 Component Used

The various components used in the project are listed as below:


S.No Component Name Quantity
1. Transformer(6-0-6 500 mA) 1
2. Capacitor 30 pF 2
3. Voltage regulator 7806 1
4. General Purpose PCB 1
5. Pin Connectors 2
6. Diodes 1N4007 6
7. Microcontroller 8051(AT89C52P6) 1
8. DC Motor 1
9. Driver IC L293D 1
Besides these some other equipments and materials were also used such as
Soldering iron and Solder wire

5.1.2 Circuit Modules

This project is divided into following modules


1. AC to DC conversion
2. Keypad
3. Controller Section
4. Motor and Motor Driver Section
1) AC to DC Conversion:

The following are the circuit diagrams AC to DC Conversion.


.

47
Figure 5.1 AC to DC conversion

Transformers used here are Step down transformers. As output of transformer is AC,
so it gets converted into DC by using capacitor circuit. Above circuit shows output of
first module.

2) Keypad

Keypad is meant to start the set up and to enter the distance to be travelled as desired
by the user.

3) Microcontroller part

Microcontroller is the heart of the setup.

48
Figure 5.2 Pin diagram 8051
The microcontroller is getting its input from the keypad. Once the distance to be
travelled is entered by the user, microcontroller stores it in its memory. Now
corresponding to the distance required to be travelled, the motor driver IC gets high
input from the controller for a particular duration.
4) Motor and Motor Driver Section

Motor driver is used to drive the motor. Motor is further meant to drive the cutter to
the desired location and to rotate the cutter to perform cutting..

5.2 Tools and Platform Used

Various tools are used in this project as:

5.2.1 Printed Circuit Board:

A printed circuit board, or PCB, is used to mechanically support and electrically


connect electronic components using conductive pathways, tracks or signal traces
etched from copper sheets laminated onto a non-conductive substrate. It is also

49
referred to as printed wiring board (PWB) or etched wiring board. A PCB populated
with electronic components is a printed circuit assembly (PCA), also known as a
printed circuit board assembly (PCBA). Printed circuit boards are used in virtually all
but the simplest commercially-produced electronic devices.
PCBs are inexpensive, and can be highly reliable. They require much more layout
effort and higher initial cost than either wire wrap or point-to-point construction, but
are much cheaper and faster for high-volume production; the production and soldering
of PCBs can be done by totally automated equipment. Much of the electronics
industry's PCB design, assembly, and quality control needs are set by standards that
are published by the IPC organization.
Materials Used:
Conducting layers are typically made of thin copper foil. Insulating layers dielectric
are typically laminated together with epoxy resin prepreg. The board is typically
coated with a solder mask that is green in color. Other colors that are normally
available are blue, black, white and red. There are quite a few different dielectrics that
can be chosen to provide different insulating values depending on the requirements of
the circuit. Some of these dielectrics are polytetrafluoroethylene (Teflon), FR-4, FR-1,
CEM-1 or CEM-3. Well known prepreg materials used in the PCB industry are FR-2
(Phenolic cotton paper), FR-3 (Cotton paper and epoxy), FR-4 (Woven glass and
epoxy), FR-5 (Woven glass and epoxy), FR-6 (Matte glass and polyester), G-10
(Woven glass and epoxy), CEM-1 (Cotton paper and epoxy), CEM-2 (Cotton paper
and epoxy), CEM-3 (Woven glass and epoxy), CEM-4 (Woven glass and epoxy),
CEM-5 (Woven glass and polyester). Thermal expansion is an important
consideration especially with ball grid array (BGA) and naked die technologies, and
glass fiber offers the best dimensional stability.
Here in below figure show images of Printed Circuit board

FR-4 is by far the most common material used today. The board with copper on it is
called "copper-clad laminate".
Copper foil thickness can be specified in ounces per square foot or micrometres. One
ounce per square foot is 1.344 mils or 34 micrometres.

5.2.2 Soldering Iron

50
A soldering iron is a hand tool most commonly used in soldering. It supplies heat to
melt the solder so that it can flow into the joint between two workpieces.
A soldering iron is composed of a heated metal tip and an insulated handle. Heating is
often achieved electrically, by passing an electric current (supplied through an
electrical cord or battery cables) through the resistive material of a heating element.
Another heating method includes combustion of a suitable gas, which can either be
delivered through a tank mounted on the iron (flameless), or through an external
flame.
Less common uses include pyrography (burning designs into wood) and plastic
welding.
Soldering irons are most often used for installation, repairs, and limited production
work. High-volume production lines use other soldering methods

Tips while using Soldering Iron:


Some soldering irons have interchangeable tips, also known as bits, that vary in size
and shape for different types of work.[2] Pyramid tips with a triangular flat face and
chisel tips with a wide flat face are useful for soldering sheet metal. Fine conical or
tapered chisel tips are typically used for electronics work.
Older and very cheap irons typically use a bare copper tip, which is shaped with a file
or sandpaper. This dissolves gradually into the solder, suffering pitting and erosion of
the shape. Copper tips are sometimes filed when worn down. Iron-plated copper tips
have become increasingly popular since the 1980s. Because iron is not readily
dissolved by molten solder, the plated tip is more durable than a bare copper one. This
is especially important when working at the higher temperatures needed for modern
lead-free solders. Solid iron and steel tips are seldom used because they store less
heat, and rusting can break the heating element.
Cleaning:
When burnt flux and oxidized material begin to accumulate on the tip, they can block
heat transfer and contaminate joints, making soldering difficult or impossible.
Therefore, the tips are periodically cleaned. Many soldering stations come with
cellulose sponges which are dampened and used to wipe a hot iron's tip clean. A wire
brush, preferably brass or wire wheel (mounted on a bench grinder), is sometimes
carefully used to remove very severe oxidation, though this may risk damaging the

51
tip's protective iron plating. A small amount of fresh solder is usually then applied to
the clean tip in a process called tinning. The working surface of the tip is usually kept
tinned (coated with wet solder) to minimize oxidation. Oxidation blocks heat transfer,
corrodes the tip, and contaminates the joint

5.2.3 Soldering Wire

Solder (usually pronounced /sɒldər/, /soʊdər/ or in USA /sɒdər/) is a fusible metal


alloy used to join together metal workpieces and having a melting point below that of
the workpiece(s).
Soft solder is what is most often thought of when solder or soldering are mentioned
and it typically has a melting range of 90 to 450 °C (190 to 840 °F). It is commonly
used in electronics and plumbing. Alloys that melt between 180 and 190 °C (360 and
370 °F) are the most commonly used. By definition, using alloys with melting point
above 450 °C (840 °F) is called 'hard soldering', 'silver soldering' or brazing. Soft
solder can contain lead and/or flux but in many applications lead free solder is used.
Perhaps the most common and most familiar form of solder is as a wire or rod, though
plumbers often use bars of solder while jewelers often use solder in thin sheets which
they cut into snippets. Solder can also come in a paste or as a preformed foil shaped to
match the workpiece. The word solder comes from the Middle English word soudur,
via Old French solduree and soulder, from the Latin solidare, meaning "to make
solid".
Eutectic alloys melt at a single temperature. Non-eutectic alloys have markedly
different solidus and liquidus temperature, and within that range they exist as a paste
of solid particles in a melt of the lower-melting phase. The pasty state causes some
problems during handling; it can however be exploited as it allows molding of the
solder during cooling, e.g. for ensuring watertight joint of pipes, resulting in a so
called 'wiped joint'.
With the reduction of the size of circuit board features, the size of interconnects
shrinks as well. Current densities above 104 A/cm2 are often achieved and
electromigration becomes a concern. At such current densities the Sn63Pb37 solder
balls form hillocks on the anode side and voids on the cathode side; the increased
content of lead on the anode side suggests lead is the primary migrating species.
Lead solder
52
Tin/lead solders, also called soft solders, are commercially available with tin
concentrations between 5% and 70% by weight. The greater the tin concentration, the
greater the solder’s tensile and shear strengths. At the retail level, the two most
common alloys are 60/40 Tin/lead (Sn/Pb) which melts at 370 °F or 188 °C and 63/37
Sn/Pb used principally in electrical/electronic work. The 63/37 ratio is notable in that
it is a eutectic mixture, which means:
1) It has the lowest melting point (183 °C or 361.4 °F) of all the tin/lead alloys;
and
2) The melting point is truly a point — not a range.
In plumbing, a higher proportion of lead was used, commonly 50/50. This had the
advantage of making the alloy solidify more slowly, so that it could be wiped over the
joint to ensure watertightness, the pipes being physically fitted together before
soldering. Although lead water pipes were displaced by copper when the significance
of lead poisoning began to be fully appreciated, lead solder was still used until the
1980s because it was thought that the amount of lead that could leach into water from
the solder was negligible from a properly soldered joint. The electrochemical couple
of copper and lead promotes corrosion of the lead and tin, however tin is protected by
insoluble oxide. Since even small amounts of lead have been found detrimental to
health, lead in plumbing solder was replaced by silver (food grade applications) or
antimony, with copper often added, and the proportion of tin was increased (see Lead-
free solder.)
The addition of tin improves wetting properties of the alloy; lead itself has poor
wetting characteristics. Tin however increases the cost of the solder. High-tin tin-lead
alloys have limited use as the workability range can be provided by a cheaper high-
lead alloy.
In electronics, printed circuit boards use solder joints to mount components and create
a circuit. For miniaturised PCB joints with surface mount components, solder paste
has largely replaced solid solder.

5.3 Circuit Diagram

53
Figure 5.3: Circuit Diagram

Figure 5.3: Project Setup

54
CHAPTER 6
RESULT AND DISCUSSION

6.1 Response Time of System

The Microcontroller based Cutting Machine proves to be a real time feedback control
system which monitors and controls all the activities efficiently and automatically.
The controller controls all activities in few milliseconds which is indeed a very fast
response for practical applications.

6.2 Discussion

This project can be used at various purposes say for demolition purposes, for cutting
rocks in hilly area to make roads, to remove any bulky obstacle usually halting roads
after some natural calamity or accident etc.
It is very useful in the sense that human involvement is minimum, so risk to human
life is almost negligible and that too without compromising with efficiency. Infact
efficiency is much higher along with precision in microcontroller based cutting
machine.

6.3 Conclusion

Many automated cutting machines are offered so far but most of the method has some
shortness in practice. This project tries to overcome these problems and implement an
efficient automated cutting machine. The present proposal is a model to modernize the
cutting task with optimum expenditure and much reduced risk to human life. Using
this system, one can save manpower and risk to the life of workers. Being
microcontroller based, precision is much high in this setup.

CHAPTER 7
55
APPLICATIONS AND FUTURE SCOPE

7.1 Applications

This project is very useful. It removes the need of constant human involvement
required during cutting task thereby reducing human efforts to great extent.
Microcontroller monitored cutting machine has following uses:
1. For cutting rocks to make road in hilly area.
2. For cutting wood to make furniture.
3. It is very useful in area where human involvement is risky. Say a tree is about to
fall then it is useful in cutting and removing it.
4. For cutting iron etc during construction work.
5. For demolition purposes.

7.2 Future Scope

Microcontroller monitored cutting machine is a practical project with wide scope in


future. In near future it can be implemented in real world. Moreover there is scope of
improvement in this project. Say addition of wireless camera. Addition of wireless
camera will enable user to control cutting task from a far off location while having
real time view of the actual task being performed. Camera will enable user to control
cutting task at each step. Moreover when designed for more precision, cutting
machine will have even wider area of applications.

REFERENCES

56
[1]http://www.google.co.in/#sclient=psyb&hl=en&source=hp&q=microcontroller+A
T89C52P6+pin+diagram&pbx=1&oq=microcontroller+AT89C52P6
[2] www.electricalprojects.com
[3] Basic electronics by J.B Gupta.
[4]http://www.sensorsmag.com/sensors/acoustic-ultrasound/choosing-ultrasonic-
sensor-proximity-or-distance-measurement-825

APPENDIX A

MICROCONTROLLER 8051 DATASHEET


57
58
59
APPENDIX B

MOTOR DRIVER L293D DATASHEET

60
APPENDIX C
61
LCD DATASHEET

62
APPENDIX D
63
CODING

#include “reg51.h”
#include “lcd.h”
#include “motor.h”
#include “switch.h”

main()
{
lcd_init();
lcd_string_wrt(“Enter Length:”);
lcd_nibble_cmd_wrt(0xC0); //2nd Line
lcd_nibble_cmd_wrt(0x0E); //Cursor Display
lcd_nibble_data_wrt(count/10 | 0×30);
lcd_nibble_data_wrt(count%10 | 0×30);
here:
while(inc==1 && dec==1 && ent==1); //wait for key pressed
if(inc==0)

{
lcd_nibble_cmd_wrt(0xC0);
while(inc==0);
count++;
lcd_nibble_data_wrt(count/10 | 0×30);
lcd_nibble_data_wrt(count%10 | 0×30);
}

if(dec==0)
{
lcd_nibble_cmd_wrt(0xC0);
while(dec==0);
if(count!=0)
count–;
lcd_nibble_data_wrt(count/10 | 0×30);

64
lcd_nibble_data_wrt(count%10 | 0×30);
}

if(ent==0)
{
lcd_string_wrt(“Enter Length:”);
lcd_nibble_cmd_wrt(0xC0);
while(ent==0);
Motor1_Start();
delay1(count);
Motors_Stop();

Motor2_Clock();
delay_ms(1000);
Motor2_AntiClock();
delay_ms(1000);
Motors_Stop();
count=0;
}

goto here;

65

Das könnte Ihnen auch gefallen