Professional Documents
Culture Documents
A PROJECT REPORT ON
CERTIFICATE
This is to certify that the dissertation work entitled Object Counter Using IR sensor is the
work done by ____________________________ submitted in partial fulfillment for the
award of BACHELOR OF ENGINEERING (B.E) in Electronics and Communication
Engineering from _______ College of Engineering affiliated to _________ University,
Hyderabad.
________________
____________
(External Guide)
(Internal Guide)
______________
(External Examiner)
ACKNOWLEDGEMENT
The satisfaction and euphoria that accompany the successful completion of any task
would be incomplete without the mentioning of the people whose constant guidance and
encouragement made it possible. We take pleasure in presenting before you, our project,
which is result of studied blend of both research and knowledge.
We express our earnest gratitude to our internal guide, Assistant Professor
______________, Department of ECE, our project guide, for his constant support,
encouragement and guidance. We are grateful for his cooperation and his valuable
suggestions.
We express our thanks to the Head of the Department, Principal and College
management for all their support and encouragement.
We express our earnest gratitude and heartfelt thanks to M/S Wine Yard Technologies for
their technical support and guidance to complete the project in time.
Finally, we express our gratitude to all other members who are involved either directly
or indirectly for the completion of this project.
DECLARATION
We, the undersigned, declare that the project entitled AUTO
MUTE CAR
, being
__________
__________
_________
_________
_________
_________
INDEX
Technical Specifications
Project Abstract
Project Block Diagram
Introduction
Basic components
AT89S52 Microcontroller
Regulated Power Supply
LDR
Buzzer
Software Tools
Keil Compiler
Proload Flash
Working procedure
Applications
Conclusion
Reference
Technical specifications:
Domain
Software
Microcontroller
AT89S52
Power Supply
Sensor
LDR
Technical support
Phone
ABSTRACT:
Muting cars audio deck, while talking on cell phone is an important yet difficult
task. This project is designed to solve the problem. A sensitive LDR and LED is designed
and fixed to a cell phone holder. Always the cell phone should be placed in the holder.
The transmitter unit continuously transmits light rays. These rays are interrupted
by the cell phone. Whenever the cell phone is lifted from the holder, the rays fall on the
receiver and it sends a signal to microcontroller. Here we are using AT89S52 as our
controller which is heart of the entire system. So that our controller switches off the
music system (here we are indicating as buzzer). Also an LED is also interfaced for the
purpose of indication.
After the completion of the conservation, the cell phone should be kept back in
the holder. Again the rays will be interrupted and the relay will be de-energized. Music
will be played again normally.
This project uses regulated 5V, 500mA power supply. 7805 three terminal voltage
regulator is used for voltage regulation. Bridge type full wave rectifier is used to rectify
the ac out put of secondary of 230/18V step down transformer
BLOCK DIAGRAM:
Power
supply
LED
LDR
Reset switch
Crystal
oscillator
AT89S52
MCU
Current
driver
LED
indicator
Buzzer
Power on
Reset
INTRODUCTION
An embedded system is a combination of software and hardware to perform a dedicated
task. Some of the main devices used in embedded products are Microprocessors and
Microcontrollers.
Microprocessors are commonly referred to as general purpose processors as they simply
accept the inputs, process it and give the output.
In contrast, a microcontroller not only accepts the data as inputs but also manipulates it,
interfaces the data with various devices, controls the data and thus finally gives the result.
BASIC COMPONENTS
RESISTOR:
Resistors "Resist" the flow of electrical current. The higher the value of resistance
(measured in ohms) the lower the current will be. Resistance is the property of a
component which restricts the flow of electric current. Energy is used up as the voltage
across the component drives the current through it and this energy appears as heat in the
component.
Color Code:
CAPACITOR:
Capacitors store electric charge. They are used with resistors
in timing circuits because it takes time for a capacitor to fill with charge. They are used
to smooth varying DC supplies by acting as a reservoir of charge. They are also used in
filter circuits because capacitors easily pass AC (changing) signals but they block DC
(constant) signals.
Circuit symbol:
Electrolytic capacitors are polarized and they must be connected the correct way
round, at least one of their leads will be marked + or -.
Examples:
DIODES:
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.
Circuit symbol:
Diodes must be connected the correct way round, the diagram may be
labeled a or + for anode and k or - for cathode (yes, it really is k, not c, for cathode!). The
cathode is marked by a line painted on the body. Diodes are labeled with their code in
small print; you may need a magnifying glass to read this on
small signal diodes.
Example:
emitting
diodes
are
elements
for
light
signalization
in
electronics.
They are manufactured in different shapes, colors and sizes. For their low price, low
consumption and simple use, they have almost completely pushed aside other light
sources- bulbs at first place.
It is important to know that each diode will be immediately destroyed unless its current is
limited. This means that a conductor must be connected in parallel to a diode. In order to
correctly determine value of this conductor, it is necessary to know diodes voltage drop
in forward direction, which depends on what material a diode is made of and what colors
it is. Values typical for the most frequently used diodes are shown in table below: As
seen, there are three main types of LEDs. Standard ones get full brightness at current of
20mA. Low Current diodes get full brightness at ten times lower current while Super
Bright diodes produce more intensive light than Standard ones.
Since the 8051 microcontrollers can provide only low input current and since their
pins are configured as outputs when voltage level on them is equal to 0, direct
confectioning to LEDs is carried out as it is shown on figure (Low current LED, cathode
is connected to output pin).
Switches and Pushbuttons:
A push button switch is used to either close or open an electrical circuit depending
on the application. Push button switches are used in various applications such as
industrial equipment control handles, outdoor controls, mobile communication terminals,
and medical equipment, and etc. Push button switches generally include a push button
disposed within a housing. The push button may be depressed to cause movement of the
push button relative to the housing for directly or indirectly changing the state of an
electrical contact to open or close the contact. Also included in a pushbutton switch may
be an actuator, driver, or plunger of some type that is situated within a switch housing
having at least two contacts in communication with an electrical circuit within which the
switch is incorporated.
Typical actuators used for contact switches include spring loaded force cap actuators that
reciprocate within a sleeve disposed within the canister. The actuator is typically coupled
to the movement of the cap assembly, such that the actuator translates in a direction that
is parallel with the cap. A push button switch for a data input unit for a mobile
communication device such as a cellular phone, a key board for a personal computer or
the like is generally constructed by mounting a cover member directly on a circuit board.
Printed circuit board (PCB) mounted pushbutton switches are an inexpensive means of
providing an operator interface on industrial control products. In such push button
switches, a substrate which includes a plurality of movable sections is formed of
a rubber elastomeric. The key top is formed on a top surface thereof with a figure, a
character or the like by printing, to thereby provide a cover member. Push button
switches incorporating lighted displays have been used in a variety of applications. Such
switches are typically comprised of a pushbutton, an opaque legend plate, and a back
light to illuminate the legend plate.
MICROCONTROLLERS:
Microprocessors and microcontrollers are widely used in embedded systems
products. Microcontroller is a programmable device. A microcontroller has a CPU in
addition to a fixed amount of RAM, ROM, I/O ports and a timer embedded all on a single
chip. The fixed amount of on-chip ROM, RAM and number of I/O ports in
microcontrollers makes them ideal for many applications in which cost and space are
critical.
The Intel 8052 is a Harvard architecture, single chip microcontroller (C) which was
developed by Intel in 1980 for use in embedded systems. It was popular in the 1980s and
early 1990s, but today it has largely been superseded by a vast range of enhanced devices
with 8052-compatible processor cores that are manufactured by more than 20
independent manufacturers including Atmel, Inferno Technologies and Maxim Integrated
Products.
8052 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-bit pieces to be processed by the
CPU. 8052 is available in different memory types such as UV-EPROM, Flash and NVRAM.
The microcontroller used in this project is AT89S52. Atmel Corporation introduced this
89S52 microcontroller. This microcontroller belongs to 8052 family. 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. AT89S52 is Flash type 8052.
The present project is implemented on Keil Uvision. In order to program the device,
Proload tool has been used to burn the program onto the microcontroller.
The features, pin description of the microcontroller and the software tools used are
discussed in the following sections.
FEATURES OF AT89S52:
4K Bytes of Re-programmable Flash Memory.
RAM is 128 bytes.
Description:
The AT89S52 is a low-voltage, high-performance CMOS 8-bit microcomputer with 4K
bytes of Flash programmable memory. The device is manufactured using Atmels highdensity nonvolatile memory technology and is compatible with the industry-standard
MCS-51 instruction set. By combining a versatile 8-bit CPU with Flash on a monolithic
chip, the Atmel AT89S52 is a powerful microcomputer, which provides a highly flexible
and cost-effective solution to many embedded control applications.
In addition, the AT89S52 is designed with static logic for operation down to zero
frequency and supports two software selectable power saving modes. The Idle Mode
stops the CPU while allowing the RAM, timer/counters, serial port and interrupt system
to continue functioning. The power-down mode saves the RAM contents but freezes the
oscillator disabling all other chip functions until the next hardware reset.
PIN DESCRIPTION:
Vcc
Pin 40 provides supply voltage to the chip. The voltage source is +5V.
GND
Pin 20 is the ground.
XTAL1 and XTAL2
XTAL1 and XTAL2 are the input and output, respectively, of an inverting amplifier that
can be configured for use as an on-chip oscillator, as shown in Figure 11. Either a quartz
crystal or ceramic resonator may be used. To drive the device from an external clock
source, XTAL2 should be left unconnected while XTAL1 is driven, as shown in the
below figure. There are no requirements on the duty cycle of the external clock signal,
since the input to the internal clocking circuitry is through a divide-by-two flip-flop, but
minimum and maximum voltage high and low time specifications must be observed.
RESET
Pin9 is the reset pin. It is an input and is active high. Upon applying a high pulse to this
pin, the microcontroller will reset and terminate all the activities. This is often referred to
as a power-on reset.
EA (External access)
Pin 31 is EA. It is an active low signal. It is an input pin and must be connected to either
Vcc or GND but it cannot be left unconnected.
The 8052 family members all come with on-chip ROM to store programs. In such cases,
the EA pin is connected to Vcc. If the code is stored on an external ROM, the EA pin
must be connected to GND to indicate that the code is stored externally.
PSEN (Program store enable)
This is an output pin.
ALE (Address latch enable)
This is an output pin and is active high.
Ports 0, 1, 2 and 3
The four ports P0, P1, P2 and P3 each use 8 pins, making them 8-bit ports. All the ports
upon RESET are configured as input, since P0-P3 have value FFH on them.
Port 0(P0)
Port 0 is also designated as AD0-AD7, allowing it to be used for both address and data.
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. Therefore, ALE is used for demultiplexing address and
data with the help of an internal latch.
The AT89S52 code memory array is programmed byte-byte in either programming mode.
To program any nonblank byte in the on-chip Flash Memory, the entire memory must be
erased using the Chip Erase Mode.
Programming Algorithm:
Before programming the AT89S52, the address, data and control signals should be set up
according to the Flash programming mode table. To program the AT89S52, the following
steps should be considered:
1. Input the desired memory location on the address lines.
2. Input the appropriate data byte on the data lines.
Data Polling:
The AT89S52 features Data Polling to indicate the end of a write cycle. During a write
cycle, an attempted read of the last byte written will result in the complement of the
written datum on PO.7. Once the write cycle has been completed, true data are valid on
all outputs, and the next cycle may begin. Data Polling may begin any time after a write
cycle has been initiated.
Ready/Busy:
The progress of byte programming can also be monitored by the RDY/BSY output signal.
P3.4 is pulled low after ALE goes high during programming to indicate BUSY. P3.4 is
pulled high again when programming is done to indicate READY.
Chip Erase:
The entire Flash array is erased electrically by using the proper combination of control
signals and by holding ALE/PROG low for 10 ms. The code array is written with all 1s.
The chip erase operation must be executed before the code memory can be reprogrammed.
POWER SUPPLY:
The input to the circuit is applied from the regulated power supply. The a.c. input i.e.,
230V from the mains supply is step down by the transformer to 12V and is fed to a
rectifier. The output obtained from the rectifier is a pulsating d.c voltage. So in order to
get a pure d.c voltage, the output voltage from the rectifier is fed to a filter to remove any
a.c components present even after rectification. Now, this voltage is given to a voltage
regulator to obtain a pure constant dc voltage.
230V AC
50Hz
D.C
Output
Step down
Bridge
transformer
Rectifier
Filter
Regulator
Rectifier:
The output from the transformer is fed to the rectifier. It converts A.C. into
pulsating D.C. The rectifier may be a half wave or a full wave rectifier. In this project, a
bridge rectifier is used because of its merits like good stability and full wave rectification.
Filter:
Capacitive filter is used in this project. It removes the ripples from the output of
rectifier and smoothens the D.C. Output
mains voltage and load is maintained constant. However, if either of the two is varied,
D.C. voltage received at this point changes. Therefore a regulator is applied at the output
stage.
Voltage regulator:
As the name itself implies, it regulates the input applied to it. A voltage regulator
is an electrical regulator designed to automatically maintain a constant voltage level. In
this project, power supply of 5V and 12V are required. In order to obtain these voltage
levels, 7805 and 7812 voltage regulators are to be used. The first number 78 represents
positive supply and the numbers 05, 12 represent the required output voltage levels.
A photo
resistor or light
dependent
resistor (LDR)
is
a resistor whose resistance decreases with increasing incident light intensity. It can also
be referred to as a photoconductor or CdS device (from "cadmium sulfide," which is the
material from which the device is made and that actually exhibits the variation in
resistance with light level. Note that CdS is not a semiconductor in the usual sense of the
word (not doped silicon).)
A photo resistor is made of a high resistance semiconductor. If light falling on the
device is of high enough frequency, photons absorbed by the semiconductor give
bound electrons enough energy to jump into the conduction band. The resulting free
electron (and its hole partner) conduct electricity, thereby lower in resistance.
A photoelectric device can be either intrinsic or extrinsic. An intrinsic
semiconductor has its own charge carriers and is not an efficient semiconductor, e.g.
silicon. In intrinsic devices the only available electrons are in the valence band, and hence
the photon must have enough energy to excite the electron across the entire band gap.
Extrinsic devices have impurities, also called dopants, added whose ground state energy
is closer to the conduction band; since the electrons do not have as far to jump, lower
energy photons (i.e., longer wavelengths and lower frequencies) are sufficient to trigger
the device. If a sample of silicon has some of its atoms replaced by phosphorus atoms
(impurities), there will be extra electrons available for conduction. This is an example of
an extrinsic semiconductor.
Applications:
Photo resistors come in many different types. Inexpensive cadmium sulfide cells can be
found in many consumer items such as camera light meters, street lights, clock
radios, alarm devices, and outdoor clocks.
They are also used in some dynamic compressors together with a small incandescent
lamp or light emitting diode to control gain reduction.
Lead sulfide (PbS) and indium antimonide (InSb) LDRs (light dependent resistor) are
used for the mid infrared spectral region. Ge:Cu photoconductors are among the best farinfrared detectors
available,
and
are
used
for infrared
spectroscopy.
Possible circuits
There are just two ways of constructing the voltage divider, with the LDR at the
top, or with the LDR at the bottom:
You are going to investigate the behaviour of these two circuits. You will also
find out how to choose a sensible value for the fixed resistor in a voltage
divider circuit.
Remember the formula for calculating Vout :
When the light level is low the resistance of the LDR is high. This prevents
current from flowing to the base of the transistors. Consequently the LED does not light.
However, when light shines onto the LDR its resistance falls and current flows
into the base of the first transistor and then the second transistor. The LED lights.
Here in our project to avoid the light from led to fall on to LDR we place a box in
which we will keep our jewelry. If any one removes the box the light from led falls
directly on to the LDR and then the transistor will be on which is monitored by the
microcontroller.
Two cadmium sulphide (cds) photoconductive cells with spectral responses similar to that
of the human eye. The cell resistance falls with increasing light intensity. Applications
include smoke detection, automatic lighting control, batch counting and burglar alarm
systems.
LDR Applications: Photoconductive cells are used in many different types of circuits
and applications.
Analog Applications :
Densitometer
Digital Applications :
Position Sensor
Buzzer
Buzzer circuit
.
.
Buzzers can either be PCB-mounted or connected to the circuit
with flying leads. Usually it is neater to mount them on the PCB.
Applications
Making
Buzzers have a positive and a negative terminal, marked on their
case. The positive terminal should be connected to the positive
voltage supply. The negative terminal should be connected to the
signal from the driver.
The graphic on the left shows how part of the PCB might look for a PCB-mounted buzzer
connected to a driver.
How part of the PCB might look
If a buzzer with flying leads is used then a terminal block is mounted on the PCB and
wires from this are connected to the buzzer.
Build and test the unit that will provide the driving input signal before adding the buzzer.
Testing
Make sure that the buzzer switches on and off as power is applied from the driver unit.
5. Save the Project by typing suitable project name with no extension in u r own
folder sited in either C:\ or D:\
10.
Then Click on OK
11.
12.
13.
14.
Now double click on the Target1, you would get another option Source
15.
Click on the file option from menu bar and select new
16.
The next screen will be as shown in next page, and just maximize it by
17.
18.
19.
Now right click on Source group 1 and click on Add files to Group
Source
20. Now you will get another window, on which by default C files will appear.
20.
Now select as per your file extension given while saving the file
21.
22.
Now Press function key F7 to compile. Any error will appear if so happen.
23.
24.
25.
Then Click OK
26.
Now Click on the Peripherals from menu bar, and check your required
27.
28.
29.
PROLOAD:
Proload is a software which accepts only hex files. Once the machine code is
converted into hex code, that hex code has to be dumped into the microcontroller placed
in the programmer kit and this is done by the Proload. Programmer kit contains a
microcontroller on it other than the one which is to be programmed. This microcontroller
has a program in it written in such a way that it accepts the hex file from the keil
compiler and dumps this hex file into the microcontroller which is to be programmed. As
this programmer kit requires power supply to be operated, this power supply is given
from the power supply circuit designed above. It should be noted that this programmer kit
contains a power supply section in the board itself but in order to switch on that power
supply, a source is required. Thus this is accomplished from the power supply board with
an output of 12volts or from an adapter connected to 230 V AC.
1. Install the Proload Software in the PC.
2. Now connect the Programmer kit to the PC (CPU) through serial cable.
3. Power up the programmer kit from the ac supply through adapter.
4. Now place the microcontroller in the GIF socket provided in the programmer kit.
5. Click on the Proload icon in the PC. A window appears providing the information
like Hardware model, com port, device type, Flash size etc. Click on browse
option to select the hex file to be dumped into the microcontroller and then click
on Auto program to program the microcontroller with that particular hex file.
6. The status of the microcontroller can be seen in the small status window in the
bottom of the page.After this process is completed, remove the microcontroller
from the programmer kit and place it in your system board. Now the system board
behaves according to the program written in the microcontroller.
WORKING PROCEDURE:
1. Power up the entire system by using 230V step down T/F
2. The output of the T/F (18V) is given to the bridge rectifier.
3. The output of the bridge rectifier is give to filter circuit to get pure DC.
4. But the system works for 5V dc for that we require 7805 a voltage regulator.
5. The output of the voltage regulator is used to drive the LDR, relay based driver
and the Music system (FM).
6. Whenever a mobile is placed between White Led and LDR, music system will
gets on automatically.
7. If once the mobiles gets ON (Ringing) automatically Music system turns OFF.
Advantages:
Durability
Low maintenance
Highly sensitive
Low cost
Safety
Applications:
Vehicles
Smoke detection
Batch counting
CONCLUSION
This project presents a AUTO MUTE
FOR
been carried out carefully. The result shows that higher efficiency is indeed achieved
using their Led transmitter and LDR. The proposed method is verified to be highly
beneficial for the purpose of automatic control of audio system in car.
REFERENCES
o www.howstuffworks.com
o Magazines:
o Electronics for you
o Electrikindia