Metal Shape Detector: A Project Report On
Metal Shape Detector: A Project Report On
Metal Shape Detector: A Project Report On
On
2007-2011
Under the guidance of: Submitted by:
Gaurav kalra(073030)
1
ACKNOWLEDGEMENT
It is our proud privilege to acknowledge with deep sense of gratitude & devotion for the keen
interest & invaluable to us by revered faculty:
(Project Guide & lecturer of Dept. Of Electronics Engineering in Apeejay Styanand Mr.
Parikshit Vashisht University (Gurgaon)).
Who responded to our queries by providing necessary data and information, thus helping us
to complete the project successfully. It is because of their guidance, constant encouragement
and inspiration that we have able to accomplish this task.
It is our pleasant duty to thank all staff members of Department of Electronics &who never
hesitated in extending the cooperation from time to time during this project.
Gaurav Kalra(073030)
Lokanshu Arora(073052)
2
DECLARATION
We GAURAV KALRA and LOKANSHU ARORA hereby declare that the work presented
in the project report titled METAL SHAPE DETECTOR to the Department of Electronics
Engineering, Apeejay college of engineering , Sohna (Gurgaon) for the partial fulfillment
of the requirement for the award of degree of the “Bachelor of Technology in Electrical
Engineering” is authentic record of our work carried out during final year, 2010-2011 at our
college premises under the supervision of Mr. Parikshit Vashisht (Project Guide & lecturer
of Dept. Of Electronics Engineering in Apeejay Styanand University (Gurgaon)).
The matter embodied in this project report has not been submitted elsewhere by anybody for
the award of any degree or diploma.
(O73030) (073052)
3
APEEJAY COLLEGE OF ENGINEERING
CERTIFICATE
This is to certify that the Project entitled “METAL SHAPE DETECTOR” which is being
submitted by GAURAV KALRA(073030) and LOKANSHU ARORA(073052), to the
department of Electronics Engineering, Apeejay College of Engineering, Sohna
(Gurgaon) for the award of degree in Electronics Engineering, is a record of bonafide project
work, they have carried out under my supervision & guidance.
The result contained in this project has not been submitted to any other university or institute
for the award of a degree or diploma.
4
TABLE OF CONTENTS
1. Introduction.
2. Block diagram
3. Block Diagram Description
4. Main Part or Features of the project.
5. Circuit diagrams or Layout.
6. Different tools used.
7. The original programming code for the project
8. Future scope and applications
9. Reference and data sheets.
5
INTRODUCTION
7
BLOCK DIAGRAM
8
FEATURES OF THE PROJECT:
9
By appropriate selection of the ratio of turns, a
transformer thus allows an alternating current
(AC) voltage to be "stepped up" by making Ns greater
than Np, or "stepped down" by making Ns less
than Np.
In the vast majority of transformers, the windings are
coils wound around a ferromagnetic core, air-
core transformers being a notable exception.
Transformers range in size from a thumbnail-sized
coupling transformer hidden inside a
stage microphoneto huge units weighing hundreds of
tons used to interconnect portions of power grids. All
operate with the same basic principles, although the
range of designs is wide. While new technologies
have eliminated the need for transformers in some
electronic circuits, transformers are still found in
nearly all electronic devices designed for household
("mains") voltage. Transformers are essential for
high-voltage electric power transmission, which
makes long-distance transmission economically
practical.
10
11
DIODES
In electronics, a diode is a two-terminal electronic
componentthat conducts electric current in only one
direction. The term usually refers to a semiconductor
diode, the most common type today. This is a
crystalline piece of semiconductor material connected to
two electrical terminals.[1] A vacuum tube diode(now
little used except in some high-power technologies) is
avacuum tube with two electrodes: a plate and
a cathode.
The most common function of a diode is to allow an
electric current to pass in one direction (called the
diode's forwarddirection) while blocking current in the
opposite direction (thereverse direction). Thus, the diode
can be thought of as an electronic version of a check
valve. This unidirectional behavior is called rectification,
and is used to convert alternating current todirect
current, and to extract modulation from radio signals in
radio receivers.
However, diodes can have more complicated behavior
than this simple on-off action. This is due to their
complex non-linearelectrical characteristics, which can
be tailored by varying the construction of their P-N
junction. These are exploited in special purpose diodes
that perform many different functions. For example,
specialized diodes are used to regulate voltage (Zener
diodes), to electronically tune radio and TV receivers
(varactor diodes), to generate radio
frequency oscillations (tunnel diodes), and to produce
light (light emitting diodes). Tunnel diodes
exhibitnegative resistance, which makes them useful in
some types of circuits.
12
Diodes were the first semiconductor electronic devices.
The discovery of crystals' rectifying abilities was made
by German physicist Ferdinand Braun in 1874. The first
semiconductor diodes, called cat's whisker diodes,
developed around 1906, were made of mineral crystals
such as galena. Today most diodes are made of silicon,
but other semiconductors such as germanium are
sometimes used.
13
14
RESISTANCE
A resistor is a two-terminal passive electronic
component which implements electrical resistance as a
circuit element. When a voltage V is applied across the
terminals of a resistor, a current I will flow through the
resistor in direct proportion to that voltage. This constant
of proportionality is called conductance, G. The
reciprocal of the conductance is known as
the resistance R, since, with a given voltage V, a larger
value of R further "resists" the flow of current I as given
by Ohm's law:
15
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 sinking. In a high voltage circuit,
attention must sometimes be paid to the rated
maximum working voltage of the resistor.
The series inductance of a practical resistor causes
its behavior to depart from ohms law; this
specification can be important in some high-
frequency applications for smaller values of
resistance. 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 position of its leads (or
terminals) which is relevant in the practical
manufacturing of circuits using them.
16
17
CAPACITOR
19
20
ELECTROLYTIC CAPACITOR
21
22
VOLTAGE REGULATOR
24
25
26
PUSH BUTTON
28
29
CRYSTAL OSCILLATOR
30
31
MICROCONTROLLER
A microcontroller (sometimes
abbreviated µC, uC or MCU) is a small computer on a
single integrated circuit containing a processor core,
memory, and programmableinput/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 inpersonal 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, and
toys. 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 (milliwatts 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 nanowatts,
making many of them well suited for long lasting battery
applications. Other microcontrollers may serve
32
performance-critical roles, where they may need to act
more like a digital signal processor (DSP), with higher
clock speeds and power consumption
33
8051 architecture
34
Pins 1-8: Port 1 Each of these pins can be configured
as an input or an output.
Pin 9: RS A logic one on this pin disables the
microcontroller and clears the contents of most
registers. In other words, the positive voltage on this pin
resets the microcontroller. By applying logic zero to this
pin, the program starts execution from the beginning.
Pins10-17: Port 3 Similar to port 1, each of these pins
can serve as general input or output. Besides, all of
them have alternative functions:
Pin 10: RXD Serial asynchronous communication input
or Serial synchronous communication output.
Pin 11: TXD Serial asynchronous communication
output or Serial synchronous communication clock
output.
Pin 12: INT0 Interrupt 0 input.
Pin 13: INT1 Interrupt 1 input.
Pin 14: T0 Counter 0 clock input.
Pin 15: T1 Counter 1 clock input.
Pin 16: WR Write to external (additional) RAM.
Pin 17: RD Read from external RAM.
Pin 18, 19: X2, X1 Internal oscillator input and output. A
quartz crystal which specifies operating frequency is
usually connected to these pins. Instead of it, miniature
ceramics resonators can also be used for frequency
stability. Later versions of microcontrollers operate at a
frequency of 0 Hz up to over 50 Hz.
Pin 20: GND Ground.
Pin 21-28: Port 2 If there is no intention to use external
memory then these port pins are configured as general
inputs/outputs. In case external memory is used, the
higher address byte, i.e. addresses A8-A15 will appear
on this port. Even though memory with capacity of 64Kb
35
is not used, which means that not all eight port bits are
used for its addressing, the rest of them are not
available as inputs/outputs.
Pin 29: PSEN If external ROM is used for storing
program then a logic zero (0) appears on it every time
the microcontroller reads a byte from memory.
Pin 30: ALE Prior to reading from external memory, the
microcontroller puts the lower address byte (A0-A7) on
P0 and activates the ALE output. After receiving signal
from the ALE pin, the external register (usually
74HCT373 or 74HCT375 add-on chip) memorizes the
state of P0 and uses it as a memory chip address.
Immediately after that, the ALU pin is returned its
previous logic state and P0 is now used as a Data Bus.
As seen, port data multiplexing is performed by means
of only one additional (and cheap) integrated circuit. In
other words, this port is used for both data and address
transmission.
Pin 31: EA By applying logic zero to this pin, P2 and P3
are used for data and address transmission with no
regard to whether there is internal memory or not. It
means that even there is a program written to the
microcontroller, it will not be executed. Instead, the
program written to external ROM will be executed. By
applying logic one to the EA pin, the microcontroller will
use both memories, first internal then external (if exists).
Pin 32-39: Port 0 Similar to P2, if external memory is
not used, these pins can be used as general
inputs/outputs. Otherwise, P0 is configured as address
output (A0-A7) when the ALE pin is driven high (1) or as
data output (Data Bus) when the ALE pin is driven low
(0).
Pin 40: VCC +5V power supply
36
8051 INTERFACING:
LED INTERFACING
37
38
LEDs are connected to the port P0. LEDs need
approximately 10mA current to flow through them in
order to glow at maximum intensity. However the
output of the controller is not sufficient enough to drive
the LEDs, so if the positive leg of the LED is connected
to the pin and the negative to ground as shown in the
figure, the LEDwill not glow at full illumination.
To overcome this problem LEDs are connected in the
reverse order and they run on negative logic i.e.,
whenever 1 is given on any pin of the port, the LED will
switch off and when logic 0 is provided the LED will
glow at full intensity.
39
As soon as we provide supply to the controller, the LEDs
start blinking i.e., they become on for a certain time
duration and then become off for the same time
duration. This delay is provided by calling the delay
function. The values inside the delay function have been
set to provide a delay in multiples of millisecond (delay
(100) will provide a delay of 100 millisecond).
40
PROGRAM CODE
ORG 0H
CLR P1.0
AGAIN:
ACALL DELAY
ACALL DELAY
CPL P1.0
ACALL DELAY
ACALL DELAY
SJMP AGAIN
DELAY:
MOV R3, #05Fh
OUTER: MOV R2, #0242
OUTER1:MOV R1, #255
INNER: DJNZ R1, INNER
DJNZ R2,OUTER1
DJNZ R3, OUTER
41
RET
END
CIRCUIT DIAGRAM:
EXPLANATION
42
Circuit performance: Very stable +5V output voltage,
reliable operation
Availability of components: Easy to get, uses only very
common basic components
Design testing: Based on datasheet example circuit, I
have used this circuit succesfully as part of many
electronics projects
Applications: Part of electronics devices, small
laboratory power supply
Power supply voltage: Unreglated DC 8-18V power
supply
Power supply current: Needed output current + 5 mA
Component costs: Few dollars for the electronics
components + the input transformer cost
Circuit description
43
Circuit diagram of the power supply.
The capacitors must have enough high voltage rating to safely
handle the input voltage feed to circuit. The circuit is very
easy to build for example into a piece of veroboard.
Pinout of the 7805 regulator IC.
1. Unregulated voltage in
2. Ground
3. Regulated voltage out
Component list
7805 regulator IC
470 uF electrolytic capacitor, at least
25V voltage rating electrolytic
capacitor, at least 6V voltage rating
100 nF ceramic or polyester capacitor
Modification ideas
More output current
If you need other voltages than +5V, you can modify the
circuit by replacing the 7805 chips with another regulator with
different output voltage from regulator 78xx chip family. The
last numbers in the the chip code tells the output voltage.
Remember that the input voltage muts be at least 3V greater
than regulator output voltage ot otherwise the regulator does
not work well.
45
46
TOOLS USED:
SOLDERING IRON
47
48
Connecting wires
49
STRIPBOARD
51
KEIL SOFTWARE
SUNROM PROGRAMMER
52
seamless embedded project development
environment.
Supported Devices
53
Atmel
AT89C51
AT89C52
AT89S51
AT89S52
AT89S53
AT89S8252
AT89C1051
AT89C2051
AT89C4051
Winbond
W78E51
W78E52
SST
SST89C54
SST89C58
SST89C59
SST89E54RD
SST89E58RD
SST89E554RC
Serial EEPROM
AT24C01
AT24C02
AT24C04
AT24C08
AT24C16
AT24C32
AT24C64
54
AT24C164
AT93C46
AT93C56
AT93C66
55
The original programming code for the project:
56
57
Future scope and applications
59
REFERENCE
60
61