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

CONTENTS

1. INTRODUCTION
2. DESIGN PRINCIPLE
3. CIRTCUIT DESCRIPTION
i) Power Supply.
ii) IR Trace passing.
iii) Signal conditioning.
iv) Motor Feedback.
v) LED Indicator.
vi) PMDC motor.
vii) Bi-directional DC motor Driver.
viii) Serial Interface Unit.
ix) Mother Board.
x) 4-input AND gate.
xi) 4X3 Matrix keyboard Interface.
xii) LCD Interface.
xiii) Buzzer driver.

4. FUTURE EXPANSION
5. CONCLUSION
6. APPENDIX
BLOCK DIAGRAM
EXIT

IR TX IR RX

IR
TX

IR
RX
DC
MOTOR L.C.D

ENTRY BI-
DIRECTIONAL
MOTOR DRIVER

1 2 3
5
4 6
RFID RFID 8
CARD READER 9
7 8
3
* 0 #
BUZZER
MOTHER DRIVER
KEYBOARD
S.I.U BOARD

+5V +12V

POWER
SUPPLY
1. INTRODUCTION
In the present scenario security and access control is one of the major application area
in the consumer and industrial segments. The access control system can be designed
with different technology. The manual password entry type system, barcode type
system, magnetic strip type system, RFID tag based system, Finger print reader based
system and finally retina scanning based system. Among all of these technologies the
RFID based system is best and economical.

A significant advantage of RFID devices over the others mentioned above is that
the RFID device does not need to be positioned precisely relative to the scanner. We're
all familiar with the difficulty that store checkout clerks sometimes have in making sure
that a barcode can be read. And obviously, credit cards and ATM cards must be swiped
through a special reader. In contrast, RFID devices will work within a few feet (up to 20
feet for high-frequency devices) of the scanner.

RFID technology has been available for more than fifty years. It has only been recently
that the ability to manufacture the RFID devices has fallen to the point where they can
be used as a "throwaway" inventory or control device.

One reason that it has taken so long for RFID to come into common use is the lack of
standards in the industry. Most companies invested in RFID technology only use the
tags to track items within their control; many of the benefits of RFID come when items
are tracked from company to company or from country to country.

Credit card companies are claiming the following advantages for contact less credit
cards:

• The card is faster to use. To make a purchase, the card owner just waves his
card over the RFID reader, waits for the acceptance indicator - and goes on his
way. American Express, visa and Mastercard have all agreed to waive the
signature requirement for contact less credit card transactions under $25.

If you want to look at the numbers, here is where this technology is taking us in
our need for speed (average transaction speeds):
1. Contact less credit card transaction: 15 seconds
2. Magnetic strip card transaction: 25 seconds
3. Cash transaction: 34 seconds
• The contact less cards uses highly secure data transmission standards.
Contact less cards make use of the most secure encryption standards practical
with current technology. 128-bit and triple DES encryption makes it nearly
impossible for thieves to steal your data.
• The contact less card never transmits your card number
Instead, the RFID chip within the card creates a unique number for the
transaction; if a criminal intercepted the number, it would be useless even if
successfully decrypted.
• Contact-less cards probably use other measures
although this is just speculation, there are certainly other ways to secure the data
on the card. For example, the RFID reader that sits on the merchant's counter
may use some sort of special signal, or offer a special set of frequencies, that
would be difficult for a thief with an off-the-shelf reader to duplicate. One
additional fact that is known about contact less cards is definitely an advantage
for merchants - consumers may feel otherwise. In a 2004 study, the average
number of transactions at a retail location rose by about one percent, and the
average "spend" rose fifteen percent for all contact less credit card users. So, it
appears that there is a correlation between ease of use and total spending.

Contact less Credit Card Disadvantages

The following disadvantages have been noted with contact less credit cards:

• Contact less cards are more exposed than regular credit cards.
If you want to keep your credit card secure, you could keep it safely in an
enclosed wallet or purse; thieves would have absolutely no way to even know if
you have a credit card. However, a thief armed with a suitable reader, within a
few feet of you, would be able to interrogate all of the cards in your wallet or
purse without your knowledge.
Also, a regular credit card transaction is fairly secure; the magnetic strip is
swiped at very close range (less than a millimeter). However, a thief with a
suitable reader could monitor your contact less card transaction while standing at
the counter with you, or just behind you.
These concerns have, of course, been carefully noted by credit card companies.
The RFID chip in the contact less credit card responds to the merchant reader
with a unique number used for that transaction only; it does not simply transmit
the consumer's account number. This number is also encrypted.
• It is easier to spend. Studies have demonstrated that consumers will be more
likely to spend, and will spend more frequently, with contact less credit cards.

Privacy advocates are particularly concerned about this technology; it is feared that
having this much information available "in the open air" will lead inevitably to problems.

2. DESIGN PRINCIPLE

RFID stands for Radio-Frequency Identification. The acronym refers to small


electronic devices that consist of a small chip and an antenna. The chip typically is
capable of carrying 2,000 bytes of data or less.

The RFID device serves the same purpose as a bar code or a magnetic strip on the
back of a credit card or ATM card; it provides a unique identifier for that object. And, just
as a bar code or magnetic strip must be scanned to get the information, the RFID
device must be scanned to retrieve the identifying information.

How does RFID work? A Radio-Frequency Identification system has three parts:

• A scanning antenna
• A transceiver with a decoder to interpret the data
• A transponder - the RFID tag - that has been programmed with information.

The scanning antenna puts out radio-frequency signals in a relatively short range. The
RF radiation does two things:

• It provides a means of communicating with the transponder (the RFID tag) AND
• It provides the RFID tag with the energy to communicate (in the case of passive
RFID tags).

This is an absolutely key part of the technology; RFID tags do not need to contain
batteries, and can therefore remain usable for very long periods of time (maybe
decades).

The scanning antennas can be permanently affixed to a surface; handheld antennas are
also available. They can take whatever shape you need; for example, you could build
them into a door frame to accept data from persons or objects passing through.

When an RFID tag passes through the field of the scanning antenna, it detects the
activation signal from the antenna. That "wakes up" the RFID chip, and it transmits the
information on its microchip to be picked up by the scanning antenna.

In addition, the RFID tag may be of one of two types. Active RFID tags have their own
power source; the advantage of these tags is that the reader can be much farther away
and still get the signal. Even though some of these devices are built to have up to a 10
year life span, they have limited life spans. Passive RFID tags, however, do not require
batteries, and can be much smaller and have a virtually unlimited life span.

RFID tags can be read in a wide variety of circumstances, where barcodes or other
optically read technologies are useless.

• The tag need not be on the surface of the object (and is therefore not subject to
wear)
• The read time is typically less than 100 milliseconds
• Large numbers of tags can be read at once rather than item by item.

Active RFID Tag (or Active Tag)

An RFID tag is an active tag when it is equipped with a battery that can be used as a
partial or complete source of power for the tag's circuitry and antenna. Some
active tags contain replaceable batteries for years of use; others are sealed units.
(Note that It is also possible to connect the tag to an external power source.)

The major advantages of an active rfid tag are:

• It can be read at distances of one hundred feet or more, greatly improving the
utility of the device
• It may have other sensors that can use electricity for power.

The problems and disadvantages of an active RFID tag are:

• The tag cannot function without battery power, which limits the lifetime of the tag.
• The tag is typically more expensive, often costing $20 or more each
• The tag is physically larger, which may limit applications.
• The long-term maintenance costs for an active RFID tag can be greater than
those of a passive tag if the batteries are replaced.
• Battery outages in an active tag can result in expensive misreads.

Active RFID tags may have all or some of the following features:

• longest communication range of any tag


• the capability to perform independent monitoring and control
• the capability of initiating communications
• the capability of performing diagnostics
• the highest data bandwidth
• active rfid tags may even be equipped with autonomous networking; the tags
autonomously determine the best communication path.
Passive RFID Tag (or Passive Tag)

A passive tag is an RFID tag that does not contain a battery; the power is supplied by
the reader. When radio waves from the reader are encountered by a passive rfid tag,
the coiled antenna within the tag forms a magnetic field. The tag draws power from it,
energizing the circuits in the tag. The tag then sends the information encoded in the
tag's memory.

The major disadvantages of a passive rfid tag are:

• The tag can be read only at very short distances, typically a few feet at most.
This greatly limits the device for certain applications.
• It may not be possible to include sensors that can use electricity for power.
• The tag remains readable for a very long time, even after the product to which
the tag is attached has been sold and is no longer being tracked.

The advantages of a passive tag are:

• The tag functions without a battery; these tags have a useful life of twenty years
or more.
• The tag is typically much less expensive to manufacture
• The tag is much smaller (some tags are the size of a grain of rice). These tags
have almost unlimited applications in consumer goods and other areas.

RFID Frequencies
Frequency refers to the size of the radio waves used to communicate between the RFID
system components. It is generally safe to assume that a higher frequency equates to a
faster data transfer rate and longer read ranges, but also more sensitivity to
environmental factors such as liquid and metal that can interfere with radio waves. RFID
systems currently operate in the Low Frequency (LF), High Frequency (HF) and Ultra
high Frequency (UHF) bands.
Each frequency has advantages and disadvantages relative to its capabilities. Generally
a lower frequency means a lower read range and slower data read rate, but increased
capabilities for reading near or on metal or liquid surfaces.
No single frequency is ideal for all applications, even within a single industry. Just as
separate bar code symbologies are used at different levels of consumer goods
packaging, from U.P.C./EAN symbols at the item level to Code 128 and two-
dimensional symbologies on cases and pallets, RFID tags of different frequencies and
functionality will be used together within overall supply chain operations.
Low-Frequency (LF)
Low-frequency RFID systems are typically 125 KHz, though there are systems
operating at 134 KHz as well. This frequency band provides a shorter read range
(< 0.5m or 1.5 ft) and slower read speed than the higher frequencies. LF RFID systems
have the strongest ability to read tags on objects with high water or metal content
compared to any of the higher frequencies. LF systems tend to be less sensitive to
interference than higher frequency options.
Typical low-frequency RFID applications are access control, animal tracking, vehicle
immobilizers, healthcare applications, product authentication and various point-of-sale
applications (such as Mobil/Exxon Speed Pass). The LF spectrum is not considered a
truly global application because of slight differences in frequency and power levels
throughout the world.
High-Frequency (HF)
High-frequency RFID systems operate at 13.56 MHz, and feature a greater read range
and higher-read speed than LF systems. Also, the price of the tags is among the lowest
of all RFID tags. Typical read range is less than 1 meter (3 feet), and the ability to read
tags on objects with high water or metal content is not as good as LF systems but
stronger than UHF systems.
Applications include smart cards and smart shelves for item level tracking, and are also
currently used to track library books, healthcare patients, product authentication and
airline baggage. Another common application is maintenance data logging for sensitive
equipment that needs regular checking such as fire suppression systems. There are
several standards concerning HF systems, including the ISO 15693 standard used for
tracking items.
Ultrahigh Frequency (UHF)
Ultrahigh frequency RFID utilizes the 860 to 930MHz band – typically 868 MHz in
Europe and 915 MHz in North America. UHF tags typically cost about the same as HF
tags. Read range is up to 3m (9.5 ft) and the data transfer rate is faster than HF
systems, though still lower than Microwave based RFID systems, which are discussed
next. One drawback to UHF systems is a limited ability to read tags on objects with or
surrounded by high water or metal content. This is typically the frequency
recommended for distribution and logistics applications and is the basis for the
Electronic Product Code (EPC) standard driven through the Auto-ID Center. Of course,
the EPC standard is the focus of Wal-Mart and the Department of Defense in the United
States. The primary rationale for utilizing this frequency in the supply chain is the
greater read range it offers over the other frequency ranges. However, UHF is also
widely used for electronic toll collection systems on highways, manufacturing
applications and parking lot access based on the greater range provided by the
frequency. The North American market operates at or near 915 MHz, while much of
Western Europe is at the low end of the spectrum, and several Asian companies
recently opened the higher end of the spectrum to RFID usage.
Microwave
The final frequency option is the microwave band, either 2.45GHz or 5.8GHz. Though
microwave based RFID systems offer the highest data read rates, they are the most
expensive systems and have a limited read range of up to 1m (3 ft). Additionally,
microwave based systems are not able to penetrate objects with high water or metal
content which makes it unsuitable for many applications. At this time, microwave is
constrained to specialized applications such as tracking airline baggage or electronic toll
collection. Though it could be used for some supply chain applications with high data
content, the inability to penetrate water or metal combined with the higher cost will limit
its deployments in this realm.
RFID Tag

“The RFID based Toll Gate Collection & Recharge system” is designed
here using a AT89C51 microcontroller. The RFID reader read the RFID TAG which is
transmitting a 125KHz RF signal. The RFID tag used here is a -passive transmitter and
that contains a specific ID or Code. The RFID reader is specifically designed for 125
KHz RFID card. The reader receives the code and converts it into RS232 standard and
transmit to the microcontroller. The controller is programmed in interrupted mode to
receive the data through its serial port. The code received to by the serial port is
compared with the database in the program. If the code received by the controller match
with the pre existing data base then the system grant a access to the card holder else
the access is denied to the card holder.
3. CIRCUIT DESCRIPITION:
i) POWER SUPPLY:
Circuit connection: - In this we are using Transformer (0-12) Vac/1Amp, IC 7805 &
7812, diodes IN 4007, LED & resistors.
Here 230V, 50 Hz ac signal is given as input to the primary of the transformer and the
secondary of the transformer is given to the bridge rectification diode. The o/p of the
diode is given as i/p to the IC regulator (7805 &7812) through capacitor (1000μF/35v).
The o/p of the IC regulator is given to the LED through resistors.
Circuit Explanations: - When ac signal is given to the primary of the transformer, due
to the magnetic effect of the coil magnetic flux is induced in the coil (primary) and
transfer to the secondary coil of the transformer due to the transformer action.”
Transformer is an electromechanical static device which transformer electrical energy
from one coil to another without changing its frequency”. Here the diodes are connected
in a bridge fashion. The secondary
coil of the transformer is given to the bridge circuit for rectification purposes.
During the +ve cycle of the ac signal the diodes D2 & D4 conduct due to the forward
bias of the diodes and diodes D1 & D3 does not conduct due to the reversed bias of the
diodes. Similarly during the –ve cycle of the ac signal the diodes D1 & D3 conduct due
to the forward bias of the diodes and the diodes D2 & D4 does not conduct due to
reversed bias of the diodes. T
he output of the bridge rectifier is not a pure dc along with rippled ac is also present.
VDC = 2Vm / π
or, VDC = (Vm – 2Vk)
= (12 – 1.4)
=10.6
⇒ VDC x 2√2
= 19.1Vdc.
≅ 17Vdc.
To overcome this effect, a capacitor is connected to the o/p of the diodes (D2 & D3).
Which removes the unwanted ac signal and thus a pure dc is obtained.
We knew,
Q=CxV
⇒C = Q / V
=Ixt/V
= 1Amp x 10msec/ 17
= 588.2μF
≅ 1000μF
Here we need a fixed voltage, that’s for we are using IC regulators (7805 &
7812).”Voltage regulation is a circuit that supplies a constant voltage regardless of
changes in load current.” This IC’s are designed as fixed voltage regulators and with
adequate heat sinking can deliver output current in excess of 1A. The o/p of the bridge
rectifier is given as input to the IC regulator through capacitor with respect to GND and
thus a fixed o/p is obtained.
Vmax to 78XX = 35Vdc
Vmin to 78XX = 78XX +2V
Imax = 1Amp DC.
• short ckt protection
• thermal over load protection.

The o/p of the IC regulator (7805 & 7812) is given to the LED for indication purpose
through a series resistor.
Imin to LED = 5mA
Imax to LED = 30mA
Then to find the value of series resistance by using the OHMs law,
R1 = V1 / I
= 5/5mA = 1KΩ.
⇒R2 = V2 / I
= 12 / 5mA =2.4KΩ.
≅ 2.2KΩ.

Due to the forward bias of the LED, the LED glows ON state, and the o/p are obtained
from the pin no-3 and that output is fed to the corresponding sub section as a Vcc.

7 8 0 5 + 5 V
1 k

0 - 1 2 / 1 A
L E D
230V 50H z

7 8 1 2 + 1 2 V

2 . 2 K
1 0 0 0 u F /3 5 V

L E D
I N 4 0 0 7 * 4

P O W E R S U P P L Y
ii) IR TRACEPASSING:
This sub section IR trace-passing its aspect is to detect the passes of the authorized
entry of particular card holder through the gate and this part constitute of two sections
i.e.
1) IR transmitter.
2) IR receiver

ABOUT INFRARED

We experience infrared light every time we feel the heat of the sun on our skin or the
warmth of a camp fire. Technically, what we are experiencing in these instances is
thermal infrared light. Scientists call waves of electromagnetic energy that travel through
space light. We tend to think of light as only the radiant energy that we see with our
eyes. But the light we can detect with our eyes is a very tiny fraction of all the types of
light that exist. Infrared light is one type of light that is invisible to us. Gamma rays, X-
rays, ultraviolet light, microwaves and radio waves are other types of invisible light. All
of these rays and waves are the same type of electromagnetic energy. They are
different only because the length of their waves is different. When we see something by
visible light, our eyes allow us to distinguish the light of different waves as different
colors. The waves that are short are blue and the waves that are long appear as red.
We can't really see the waves, we only see the colors that our mind creates to help us
interpret the world. Every color has a distinct wavelength. For example, violet light can
be seen at light wavelengths of around 0.4 micron(*) and yellow light is made up of
waves that are 0.6 microns long. Reddish colors begin at wavelengths of about 0.65
microns. Your eyes cannot see light that has a wavelength longer than 0.7 microns.
Light with wavelengths from 0.7 micron to about 0.1 millimeter is called infrared light.
The band of infrared light is a thousand times wider than that of visible light. All of it is
invisible to our eyes. Infrared films and normal video cameras are sensitive to what is
called very near infrared light (0.7 to 0.9 microns). This is also the type of light that the
remote control for your TV uses. (Try shining your remote control at your video camera.)
Beyond those waves are the near infrared waves at 2.4 microns that the South Pole
Infrared Explorer (SPIREX) telescope observes from the South Pole. SPIREX uses a
very special video still-frame camera that can detect and make images of stars that emit
this "color" of light. Longer wavelength infrared light is emitted by hot objects in our
world. So, although we can't see the thermal infrared light from a hot piece of metal like
a soldering iron, we can feel it on our skin when we bring our hand close. Scientists use
many types of devices to detect and measure infrared light. Even if we can't see it with
our eyes through a telescope our specialized astronomical cameras can. We know that
infrared radiation is light just like visible light because it has the same properties as
visible light. Infrared can be focused and reflected like visible light. Infrared light can
also be "aligned" like regular light and therefore polarized. This means we can make
infrared telescopes that look and work the way normal visible light telescopes do.
When we talk about infrared radiation, we're really talking about a particular kind
of light. If you combine infrared radiation with radio waves, microwaves, visible light,
ultraviolet radiation, X rays, and gamma rays, you'll end up with a broad band of
radiation frequencies called the electromagnetic spectrum. All of these types of
electromagnetic radiation transfer energy through space via waves of oscillating
electromagnetic fields. What distinguishes them from each other are the frequency of
the oscillation and, consequently, the wavelength.
An object's molecules and electrons are always in motion, vibrating and radiating
electromagnetic waves. When the object heats up and its temperature increases, the
motion will increase and so will the average wave frequency and the intensity of the
radiation. You can see this at work in a toaster oven. When you turn the toaster on, you
can feel some heat, but you see no light. As more electric energy is supplied and the
wires get hotter, they begin to glow red. If you could really turn up the power so that the
temperature reached about 3,000*C, the wires, like the filament in a light bulb, would
glow white. The only problem is that they would probably burn up before they reached
that temperature.
British astronomer Sir William Herschel discovered infrared radiation around 1800. He
used a prism and a sensitive thermometer to detect "invisible" light found just below the
red portion of the spectrum. The term infrared (meaning "below red") came into use
because it describes where you find it on the electromagnetic frequency spectrum.
Any warm object gives off infrared radiation. But remember, warm is a relative term. An
ice cube in a cooler is warmer than a flask of liquid nitrogen, so it gives off more infrared
radiation. Using special infrared scanners, a thermo graphic scanner takes these
differences in radiation intensity, codes them by color, and maps them out so that "hot
spots" can be detected. With this technology, engineers can find heat leaks in buildings,
doctors can find hidden tumors in the body, and biologists can even find diseased
vegetation in a forest.
Infrared imaging can even have applications in space. Astronomers use infrared
imaging to detect warm dust around new stars not "hot" enough to give off visible light.
This gives them a more complete picture of the whole universe, seeing where no one
has seen before!
1) IR TRANSMITTER:

IR LED

The IR LED is also light emitting diode but the junction is made out of such material that
the transition of electron between the bands emits quanta of energy (E=hν ) having a
particular frequency which is having a particular characteristic. When a diode emits a
particular characteristic signal having frequency in the range of infrared then, that diode
is called a infrared emitting diode. The IR data transmitter is a high intensity IR signal
transmitter.
Design:
The design aspects of the IR LED Transmitter are as follows:
The Transmitter section consists of IR LED emitting diode and its circuit is designed on
the basis of current required to glow the IR emitting diode. Here the driver circuit is
required for the following functionality. The IR diode can take 70mA current, so the
diode is connected through a resistor (150E) directly with Vcc 12v.
2) IR RECEIVER:

The IR detector diode is the device, which sense the IR signal. This diode is
normally connected in reverse biased condition in series with a resistance to limit the
PIV. The resistance connected in series develops an I x R drop across it and that drop
increases as the intensity of IR signal. This signal is feed to a comparator to shape the
signal between +Vsat and –Vsat. The comparator out put is not at all compatible with
CMOS logic standard so the output transistor section converts 0 an+12v into 0v and +5
Volt.
A PHOTO DIODE is light sensitive device the junction of the photo diode is such
that it generates carriers when the lights fall on it. There are different type of diodes,
which generates carriers in different magnitudes at different frequency this depends on
the nature and doping of the junction. The liberation of carriers are very small in
magnitude which is very much dependant on the frequency and intensity of the light
signal falling on the junction. In the forward biased condition the majority carrier current
is so high that the current generated due to fall of light signal is very negligible. The
photon bombardment cause the avalanche break down of the junction and generate
current which is in the order of 100s micro ampere to few 10s of mA, due to the above
mentioned causes the photo diodes to connected in the reverse biased condition. In the
reverse biased condition the normal current is always in the order of few microamperes,
the current generated due to fall of light signal on the junction is also in the order of
microampere so the net current through the diode is appreciably increased. The same
current pass through the resistance connected in series and drop across the resistance
is increased. There are two types of arrangements very much widely used in the
circuits, as shown in the Fig.1 and Fig.2.
V CC V CC

R D1

D1 Vout R Vout

Fig.1 Fig.2

If the diode junction is exposed with visible light or invisible light like Infrared / Laser in
the circuit shown in fig.2, the diode current will rise, possibly to as high as
1mA,producing a significant output across R. In use, the photodiode is reversed biased
and the output voltage is taken from across a series-connected load resistor.
Circuit Operation:
Here photodiode is used as a detector to detect the presence of the authorized
entry (IR signal) which converts light / IR signal into an electrical signal. As shown in the
above figure, the photodiode is connected in reverse biased to the Vcc and a series
resistance to the ground which forms a potential voltage across it according to the light
intensity falling on it. The resistance connected in series develops an I x R drop across
it and that drop increases as the intensity of IR signal.

At normal condition during the presence of IR signal at the photo diode, the output of
the photo diode voltage potential voltage (9v) goes to the input of the non-inverting (+)
terminal of the comparator and a set voltage say 7V to the inverting terminal (-) of that
comparator as shown in the circuit diagram below.
In this case non-inverting terminal is greater than the inverting terminal at normal
condition. That means output of the comparator is HIGH i.e, the infrared signal is
presence at the photodiode means no card holder has authorize through the gate.

If the infrared is absent at the photo diode or during the authorization of the
particular card holder through the gate, the IR signal gets absence due to the obstacle
between Tx to Rx then the corresponding voltage will decrease say for example 3V as a
potential voltage according to the signal strength of received IR. That voltage goes to
the input of the non-inverting terminal (which is a reference voltage) of the Op-amp
(lm393) which is configured as a voltage comparator. In this comparator we have set
the voltage say 7V to the inverting terminal. So the non-inverting terminal is greater than
the inverting terminal, that means output of the comparator goes to +Vsat to -Vsat i.e.,
HIGH to LOW transition output. We have connected a led indicator ckt at the o/p of the
comparator to indicate the level of the output, it indicate the presence or absence or
authorized entry of IR signal.
Simultaneously that output is again fed to the signal conditioning circuit which is
configured as a transistor as an inverter /switch. “Signal conditioning is such a circuit
that output signal is compatible with the controller”. Because the output signal of the
comparator is not compatible (with CMOS logic standard) with the controller due to
+12V saturation output. For that reason we have designed a signal conditioning circuit.
Finally that output is fed to the controller as input signal due to the +5V saturation
output.
V C C V C C
3 3 0 E

1 5 0 E / 2 W

1 0 K
P H O T O D I O D E L M 3 9 3

8
1 5 k I R L E D
3 + 6 8 K
1
I R L E D 2 - B C 5 4 7

1 0 0 k 1 0 K V C C

4
O / P

I R T r a n s m i t t e r I R R e c e i v e r

I R T r a n s m i t t e r a n d R e c e i v e r

iii) Signal conditioning:


In this sub section signal conditioning, the output signal of the comparator is not
compatible (with CMOS logic standard) with the controller due to +12V saturation
output. Because the µ -controller can takes 5V as input voltage and gives a 5V as
output voltage. That for we need a signal conditioning circuit. Here the signal
conditioning circuit is designed by using a transistor and that transistor is configured as
a switch / inverter as shown in the below figure:
5 v

1 0 K

1 . 5 K D a t a o u t

B C 5 4 7
D a t a i n

S i g n a l c o n d i t i o n i n g

In the fig1: 0, whenever the base voltage is HIGH the transistor comes to
saturation condition i.e. the emitter current flows to the collector which gives a low
voltage at the output corresponding to GND. The output is taken from the collector
junction through a current limiting resistance and the output signal is given to the µ -
controller or any other circuit which needs a compatible (5V/0V) voltage. Similarly,
whenever the base voltage is LOW the collector current flows from the collector junction
of the transistor, which gives a high voltage at the output corresponding to Vcc. The
output is taken from the emitter junction through a current limiting resistance and the
output signal is given to the µ - controller or any other circuit which needs a compatible
(5V/0V) voltage.
INTRODUCTION:

The application of the transistors is not limited solely to the amplification of the
signals. Through proper design transistors can be used as switches for computers and
control applications.
The network of figure-01 (a) can be employed as an inverter in computer logic circuitry.
Note that the output voltage Vc is opposite to the applied to the base or input terminal.
In addition note the absence of dc supply connected to the base circuit. The only dc
source is connected to the collector or output side, and for computer applications is
typically equal to the magnitude of the “high” side of the applied signal – in this case 5V.
V c c = + 5 V
Vi Vc
R c
5v 5v
O U T
0v R b Q 1 0v
t I N t
B C 5 4 7

IC (mA)
(a)

IB = 80µA
IC sat = 6mA
IB = 60µA
IB = 40µA
IB = 20µA
IB = 10µA
IB = 0µA

Vcc = 5V VCE

(b)
Circuit operation:
Proper design for the inversion process requires that the operating points switch from
cut-off to saturation along the load line depicted in above figure (b). For our purposes
we will assume that IC = ICEO = 0mA, when IB = 0µA (an excellent approximation in light
of improving construction techniques), as shown in above figure (b). In addition, we will
assume that VCE = VCE sat = 0V.

When Vi = 5v, the transistor will be “ON” and design must insured that the network is
heavily saturated by a level of IB greater than that associated if the IB curve appearing
near the saturation level. In the above figure (b), this requires that IB > 50µA.
The saturation level for the collector current for the circuit is defined by,
IC = VCC / RC
The level of IB in the active region just before saturation results can be approximated by
the following equation,
IB max ≈ IC sat / βdc
For the saturation level we must therefore insure that the following condition is satisfied:
IB max >IC sat / βdc
For the network of the above figure (b), when Vi = 5v the resulting level of IB is
IB = Vi – 0.7 / RB
= 5v – 0.7 / 1.5k
= 2866µA

IC sat = VCC / RC
= 5v / 10kΩ
= 0.5mA
Testing the above equation gives:
IB =2866µA > IC sat / βdc = 0.5mA / 300
This is satisfied. Certainly any level of IB greater than 2866µA will pass through a Q-
point on the load line that is very close to the vertical axis.
Finally that output is fed to the controller as input signal due to the +5V saturation
output.

iv) Motor feedback:

This sub section motor feedback its aspect is to inform the


controller that gate motor has been closed through the gate shaft and this part
constitutes of two sections:
a) One part source is light (I.R) as a source. In this section is to transmit a continuous IR
/ light signal.
b) Another part detector is photo detector (I.R receiver). In this section is to detect the
light source and to convert the light source into an electrical signal. And further that
signal passes to the high gain amplifier (comparator). This signal is feed to a
comparator to shape the signal between +Vsat and –Vsat.
Here the IR diode and photo diode are kept facing each other
with a distance apart and in between the IR and Photodiode, the DC motor shaft (gate)
is placed in between them as shown in the block diagram above.
Circuit operation:
IR Transmitter:
As shown in the circuit diagram, here IR diode is taken as source to transmit IR signal
simply by making the IR diode as a forward biased implementation.
It circuit is designed on the basis of current required to glow the IR emitting diode. The
IR diode can take 70mA current, so the diode is connected through a resistor (150E)
directly with Vcc 12v.
IR Receiver:
As shown in the circuit diagram, here photo diode is taken as detector to detect the IR
signal and convert that light source into electrical signal.
This diode is normally connected in reverse biased condition in series with a
resistance to limit the PIV. The resistance connected in series develops an I x R drop
across it and that drop increases as the intensity of IR signal. This signal is feed to a
comparator to shape the signal between +Vsat and –Vsat.
At normal condition the (dc motor) gate shaft is open, means the IR signal
directly falls on the photo diode thus the photo diode develops an I x R drops across it
and a potential voltage is developed say 9v.
To shape the output potential voltage (9v) is further fed to the non-inverting
terminal of the comparator and a threshold voltage is kept at 7v to the inverting terminal
of that comparator. Here non-inverting terminal is greater than the inverting terminal,
means output of the comparator goes to (HIGH) +Vsat.
Whenever the (dc motor) gate shaft is closed, means the IR signal gets
interrupted due to the shaft of the dc motor, thus the photodiode develops an I x R
drops across it and a potential voltage is changed say 3v.
Here non-inverting terminal is now smaller than the inverting terminal and thus
the output of the comparator goes to (LOW) –Vsat.
Finally a transition output is achieved at the output (HIGH-to-LOW) which is
further fed to the controller through signal conditioning.
V C C V C C
3 3 0 E

1 5 0 E / 2 W

1 0 K
P H O T O D I O D E L M 3 9 3
1 5 k I R L E D

8
3 + 6 8 K
1
I R L E D 2 - B C 5 4 7

1 0 0 k 1 0 K V C C

4
O / P

I R T r a n s m i t t e r I R R e c e i v e r

I R T r a n s m i t t e r a n d R e c e i v e r

v) LED Indicator:
The indicator section consists of a light emitting diode and its driver circuit is
designed on the basis of current required to glow the light emitting diode. Here the
driver circuit is required for the following functionality.
1) The CMOS/TTL cannot provide adequate current for glowing the LED.
The LEDs requires a current between 10mA to 20mA of current to glow.
2) The driver circuit provides current to the load from a separate source, so
the load current used not pass through the CMOS/TTL.
3) The driver circuit activates the load on receipt of a logic signal from the
Microcontroller and of the load in the absence of the signal as he current
requirement Is very less to glow a LED a single stage driver is sufficient to drive
the load. The driver circuit is nothing other than a perfect a transistor switch. The
driver transistor goes in to saturation on receipt of base signal and drives into cut-
off region, in absence of base signal.
The driver designs around a BC548/BC547 transistor and designed for a working
voltage of +12Vdc and 25mA current.
Rc= Vcc-VCEsat = 5 - 0.2V
IC 10mA
= 430Ω
As per the design a 150µ A current is sufficient to trigger the driver circuit. As this
current is very small and to avoid mistriggering a base current of more than 100µ A
is assumed
VB - IBRB - VBE=0
⇒ IBRB = 5 - 0.7
RB = 5-0.7V/100µ A = 4.3/100µ A
= 0.043 x 10-6Ω
= 43KΩ
On approximation 68K is connected by calculating back
This is adequate to avoid mis-triggering level also this amount of
current can be drawn from the CMOS/TTL without any problem.

V c c = + 1 2 V

4 7 0 E

L E D

INPUT
6 8 k
B C 5 4 7
vi) PMDC motor
INTRODUCTION TO PMDC MOTOR

The motor being dissected here is a simple PMDC electric motor that is typically find applications in
robotics and control systems also used for techo generator in the industries.

This is a small motor, about as big around as a coin. From the outside the body of the
motor is shown in the picture along with its axle and two battery leads. If the motor is
connected to the battery then, the axle will spin. If the leads are reversed then, it will
spin in the opposite direction. Here are two other views of the same motor. (Note the
two slots in the side of the steel can in the second shot -- their purpose will become
more evident in a moment.)
e nylon end cap is held in place by two tabs that are part of the steel can. By bending
the tabs back, end cap can be free and removed. Inside the end cap are the motor's
brushes. These brushes transfer power from the battery to the commutator as the motor
spins:

The axle holds the armature and the commutator. The armature is a set of
electromagnets in this case three. The armature in this motor is a set of thin metal
plates stacked together, with thin copper wire coiled around each of the three poles of
the armature. The two ends of each wire (one wire for each pole) are soldered onto a
terminal, and then each of the three terminals is wired to one plate of the commutator.
The figures below make it easy to see the armature, terminals and commutator:
The final piece of any DC electric motor is the field magnet. The field magnet in this
motor is formed by the can itself plus two curved permanent magnets:
One end of each magnet rests against a slot cut into the can, and then the retaining clip
presses against the other ends of both magnets.

An electromagnet is the basis of an electric motor. You can understand how things work
in the motor by imagining the following scenario. Say that you created a simple
electromagnet by wrapping 100 loops of wire around a nail and connecting it to a
battery. The nail would become a magnet and have a north and south pole while the
battery is connected.

Now say that you take your nail electromagnet, run an axle through the middle of it and
suspend it in the middle of a horseshoe magnet as shown in the figure below. If you
were to attach a battery to the electromagnet so that the north end of the nail appeared
as shown, the basic law of magnetism tells you what would happen: The north end of
the electromagnet would be repelled from the north end of the horseshoe magnet and
attracted to the south end of the horseshoe magnet. The south end of the
electromagnet would be repelled in a similar way. The nail would move about half a turn
and then stop in the position shown.

vii) Bi directional PMDC motor driver:


Here in this sub section Bi-directional Dc motor driver is configured as relay driver to
remove the loading effect from input to output circuit.
Here we drive a PMDC motor in both the direction using two electromagnetic
relay. When relay1 will ON it rotate in clockwise direction and when relay2 will ON it
rotate in anti clockwise direction of particular motor.
The operation of the relay driver is given below:

Relay driver:

This application is in some ways a continuation of he discussion introduced for diodes


how the effects of inductive kick can be minimized through proper design. In the below
figure (a), a transistor is used to established the current necessary to energize the relay
in the collector circuit. With no input at the base of the transistor, the base current,
collector current, and the coil current are essentially 0A, and the relay sits in the
unenergized state (normally open, NO).
However when a positive pulse is applied to the base, the transistor turns ON,
establishing sufficient current through the coil of the electromagnet to close the relay.
Problem can be now develop when the signal is removed from the base to turn OFF the
transistor and de-energized the relay. Ideally, the current through he coil and the
transistor will quickly drop to zero, the arm of the relay will be released, and the relay
will simply remain dormant until the next “ON” signal. However we know from our basic
circuit courses that the current through the coil cannot change instantaneously, and in
fact the more quickly changes, greater the induced voltage across the coil as defined
by,
VL = L (diL / dt).

In this case, the rapid changing current through the coil will develop a large voltage
across the coil with the polarity shown in figure (a), which will appear directly across the
output of the transistor. The chances are likely that its magnitude will exceeds the
maximum ratings of the transistor, and the semiconductor device will be permanently
damaged. The voltage across the coil will not remain at its highest switching level but
will oscillate as shown until its level drops to zero as the system settles down.
The destructive action can be subdued by placing a diode across the coil as
shown in below figure (b). During the “ON” state of the transistor, the diode is back
biased: it sits like an open circuit and does not affect the thing. However, when the
transistor turns “OFF”, the voltage across the coil will reverse and will forward biased
the diode, placing the diode in its “ON” state. The current through the inductor
established during “ON” state of the transistor can then continue to flow through the
diode, eliminating the severe change in current level. Because the inductive current is
switched to diode almost instantaneously after the “OFF” state is established, the diode
must have a current rating to match the current through the inductor and the transistor
when is in “ON” state. Eventually, because of the resistive elements in the loop,
including the resistance of the coil windings and the diode, the high frequency (quickly
oscillating) variation in voltage level across the coil will decay to zero and the system
will settle down.

V c c
At turn-off
- VL
Vi N O
V L C O M
VON Trouble!
N C High voltage spike
+
R b +
t V i Q 1VCE ≈ VL t
VOFF
- At turn OFF

(a)

V c c

- N O
C O M
D 1 V L
+ N C
When transistor
R b
V i Q 1
turned “OFF”

(b)
R E L A Y D R I V E R

V C C

5
3
4
1
2
I N 4 0 0 7
1 0 u F R E L A Y S P D T

1 . 5 K
D A T A
I N P U T B C 5 4 7

Circuit operation:

At normal condition the output of the controller is low thus making the relay driver

transistor is in off condition means relay is in de-energized condition means the

contactor point i.e. COM & NC is in that position means is in same potential.

When the RFID card is swap, the controller sends a high bit to the one of the input of

the motor driver (relay driver). Then that signal goes to the bi-directional dc motor driver

means to the base of the transistor driver (Relay driver) as shown in below figure.

Whenever a high voltage appears at the input of the base of the particular transistor
driver (Relay driver) thus the transistor goes to ON condition then making the particular

relay in energized condition which gives a (+VE) potential voltage to the particular load

(DC motor) and the DC motor moves in forward direction means the gate is open.

Whenever the authorized passes or interrupts the trace-passing ckt, the

controller sends a high bit to the base of another input of the motor driver (relay driver).

Then that signal goes to the bi-directional dc motor driver means to the base of the

transistor driver (Relay driver) as shown in below figure. Whenever a high voltage

appears at the input of the base of the particular transistor driver (Relay driver) thus the

transistor goes to ON condition then making the particular relay in energized condition

which gives a (-VE) potential voltage to the particular load (DC motor) and the DC motor

moves in reverse direction means the gate is closed.


M O T O R D R I V E R
V c c = + 1 2 V

1 k

1 N 4 0 07

R E L A Y -0 1
1 0 uF

L E D

+
1 . 5 k V c c = + 1 2 V
B C 5 4 7
M
V c c = + 1 2 V
-

1 k
1 N 4 0 07

R E L A Y -0 2
1 0 uF

L E D

1 . 5 k
B C 5 4 7

viii) Serial Interface Unit:

Introduction:

Serial port is a popular means of transmitting data between a computer and a


peripheral device such as a programmable instrument or even another computer. Serial
communication uses a transmitter to send data, one bit at a time, over a single
communication line to a receiver. You can use this method when data transfer rates are
low or you must transfer data over long distances. Serial communication is popular
because most computers have one or more serial ports, so no extra hardware is
needed other than a cable to connect the instrument to the computer or two computers
together.
Figure 1: 1: RS-232 Instrument,2: RS-232 Cable, 3: Serial Port

Serial communication requires that you specify the following four parameters:

• The baud rate of the transmission


• The number of data bits encoding a character
• The sense of the optional parity bit
• The number of stop bits

Each transmitted character is packaged in a character frame that consists of a single


start bit followed by the data bits, the optional parity bit, and the stop bit or bits. Figure 2
shows a typical character frame encoding the letter m.

Figure 2

Baud rate is a measure of how fast data are moving between instruments that use serial
communication. RS-232 uses only two voltage states, called MARK and SPACE. In
such a two-state coding scheme, the baud rate is identical to the maximum number of
bits of information, including control bits, that are transmitted per second.

MARK is a negative voltage, and SPACE is positive. Figure 2 shows how the idealized
signal looks on an oscilloscope. The following is the truth table for RS-232: Signal>3V=0
Signal>-3V=1
The output signal level usually swings between +12 V and -12 V. The dead area
between +3 V and -3 V is designed to absorb line noise.

A start bit signals the beginning of each character frame. It is a transition from negative
(MARK) to positive (SPACE) voltage. Its duration in seconds is the reciprocal of the
baud rate. If the instrument is transmitting at 9,600 baud, the duration of the start bit and
each subsequent bit is about 0.104 ms. The entire character frame of eleven bits would
be transmitted in about 1.146 ms.

Data bits are transmitted upside down and backwards. That is, inverted logic is used,
and the order of transmission is from least significant bit (LSB) to most significant bit
(MSB). To interpret the data bits in a character frame, you must read from right to left
and read 1 for negative voltage and 0 for positive voltage. This yields 1101101 (binary)
or 6D (hex). An ASCII conversion table shows that this is the letter m.

An optional parity bit follows the data bits in the character frame. The parity bit, if
present, also follows inverted logic, 1 for negative voltage and 0 for positive voltage.
This bit is included as a simple means of error handling. You specify ahead of time
whether the parity of the transmission is to be even or odd. If the parity is chosen to be
odd, the transmitter then sets the parity bit in such a way as to make an odd number of
ones among the data bits and the parity bit. This transmission uses odd parity. There
are five ones among the data bits, already an odd number, so the parity bit is set to 0.

The last part of a character frame consists of 1, 1.5, or 2 stop bits. These bits are
always represented by a negative voltage. If no further characters are transmitted, the
line stays in the negative (MARK) condition. The transmission of the next character
frame, if any, is heralded by a start bit of positive (SPACE) voltage.

RS-232 Waveforms

So far we have introduced RS-232 Communications in relation to the PC. RS-232


communication is asynchronous. That is a clock signal is not sent with the data. Each
word is synchronized using it's start bit, and an internal clock on each side, keeps tabs
on the timing.

Figure 4 : TTL/CMOS Serial Logic Waveform

The diagram above, shows the expected waveform from the UART when using the
common 8N1 format. 8N1 signifies 8 Data bits, No Parity and 1 Stop Bit. The RS-232
line, when idle is in the Mark State (Logic 1). A transmission starts with a start bit which
is (Logic 0). Then each bit is sent down the line, one at a time. The LSB (Least
Significant Bit) is sent first. A Stop Bit (Logic 1) is then appended to the signal to make
up the transmission.

The diagram shows the next bit after the Stop Bit to be Logic 0. This must mean another
word is following, and this is it's Start Bit. If there is no more data coming then the
receive line will stay in it's idle state(logic 1). We have encountered something called a
"Break" Signal. This is when the data line is held in a Logic 0 state for a time long
enough to send an entire word. Therefore if you don't put the line back into an idle state,
then the receiving end will interpret this as a break signal.

The data sent using this method, is said to be framed. That is the data is framed
between a Start and Stop Bit. Should the Stop Bit be received as a Logic 0, then a
framing error will occur. This is common, when both sides are communicating at
different speeds.

The above diagram is only relevant for the signal immediately at the UART. RS-232
logic levels uses +3 to +25 volts to signify a "Space" (Logic 0) and -3 to -25 volts for a
"Mark" (logic 1). Any voltage in between these regions (ie between +3 and -3 Volts) is
undefined. Therefore this signal is put through a "RS-232 Level Converter". This is the
signal present on the RS-232 Port of your computer, shown below.

Figure 5 : RS-232 Logic Waveform

The above waveform applies to the Transmit and Receive lines on the RS-232 port.
These lines carry serial data, hence the name Serial Port. There are other lines on the
RS-232 port which, in essence are Parallel lines. These lines (RTS, CTS, DCD, DSR,
DTR, RTS and RI) are also at RS-232 Logic Levels.

RS-232 Cabling

Devices that use serial cables for their communication are split into two categories.
These are DCE and DTE. DCE are devices such as a modem, TA adapter, plotter, and
so on, while DTE is a computer or terminal. RS-232 serial ports come in two sizes, the
D-Type 25-pin connector and the D-Type 9-pin connector. Both of these connectors are
male on the back of the PC. Thus, you require a female connector on the device. Table
1 shows the pin connections for the 9-pin and 25-pin D-Type connectors.
Figure 3
Function Signal PIN DTE DCE
TxD 3 Output Input
Data
RxD 2 Input Output
RTS 7 Output Input
CTS 8 Input Output
Handshake DSR 6 Input Output
DCD 1 Input Output
STR 4 Output Input
Common Com 5 -- --
Other RI 9 Output Input
Table 1

The DB-9 connector is occasionally found on smaller RS-232 lab equipment. It is


compact, yet has enough pins for the core set of serial pins (with one pin extra).

Note:
The DB-9 pin numbers for transmit and receive (3 and 2) are opposite of those on the DB-
25 connector (2 and 3). Be careful of this difference when you are determining if a device
is DTE or DCE.

RS232 bit streams


The RS232 standard describes a communication method where information is sent
bit by bit on a physical channel. The information must be broken up in data words. The
length of a data word is variable. On PC's a length between 5 and 8 bits can be
selected. This length is the net to information length of each word. For proper transfer
additional bits are added for synchronisation and error checking purposes. It is
important, that the transmitter and receiver use the same number of bits. Otherwise, the
data word may be misinterpreted, or not recognized at all.

With synchronous communication, a clock or trigger signal must be present which


indicates the beginning of each transfer. The absence of a clock signal makes an
asynchronous communication channel cheaper to operate. Less line is necessary in the
cable. A disadvantage is that the receiver can start at the wrong moment receiving the
information. Resynchronization is then needed which costs time. All data received in the
resynchronization period is lost. Another disadvantage is that extra bits are needed in
the data stream to indicate the start and end of useful information. These extra bits take
up bandwidth.

Data bits are sent with a predefined frequency, the baud rate. Both the transmitter
and receiver must be programmed to use the same bit frequency. After the first bit is
received, the receiver calculates at which moments the other data bits will be received.
It will check the line voltage levels at those moments.

With RS232, the line voltage level can have two states. The on state is also known
as mark, the off state as space. No other line states are possible. When the line is idle,
it is kept in the mark state.

Start bit

RS232 defines an asynchronous type of communication. This means, that sending


of a data word can start on each moment. If starting at each moment is possible, this
can pose some problems for the receiver to know which is the first bit to receive. To
overcome this problem, each data word is started with an attention bit. This attention bit,
also known as the start bit, is always identified by the space line level. Because the line
is in mark state when idle, the start bit is easily recognized by the receiver.

Data bits

Directly following the start bit, the data bits are sent. A bit value 1 causes the line to
go in mark state, the bit value 0 is represented by a space. The least significant bit is
always the first bit sent.

Parity bit

For error detecting purposes, it is possible to add an extra bit to the data word
automatically. The transmitter calculates the value of the bit depending on the
information sent. The receiver performs the same calculation and checks if the actual
parity bit value corresponds to the calculated value. This is further discussed in another
paragraph.

Stop bits

Suppose that the receiver has missed the start bit because of noise on the
transmission line. It started on the first following data bit with a space value. This causes
garbled date to reach the receiver. A mechanism must be present to resynchronize the
communication. To do this, framing is introduced. Framing means, that all the data bits
and parity bit are contained in a frame of start and stop bits. The period of time lying
between the start and stop bits is a constant defined by the baud rate and number of
data and parity bits. The start bit has always space value, the stop bit always mark
value. If the receiver detects a value other than mark when the stop bit should be
present on the line, it knows that there is a synchronization failure. This causes a
framing error condition in the receiving UART. The device then tries to resynchronize on
new incomming bits.

For resynchronizing, the receiver scans the incomming data for valid start and stop
bit pairs. This works, as long as there is enough variation in the bit patterns of the data
words. If data value zero is sent repeatedly, resynchronization is not possible for
example.

The stop bit identifying the end of a data frame can have different lengths. Actually,
it is not a real bit but a minimum period of time the line must be idle (mark state) at the
end of each word. On PC's this period can have three lengths: the time equal to 1, 1.5
or 2 bits. 1.5 bits is only used with data words of 5 bits length and 2 only for longer
words. A stop bit length of 1 bit is possible for all data word sizes.

RS232 physical properties

The RS232 standard describes a communication method capable of


communicating in different environments. This has had its impact on the maximum
allowable voltages etc. on the pins. In the original definition, the technical possibilities of
that time were taken into account. The maximum baud rate defined for example is
20 kbps. With current devices like the 16550A UART, maximum speeds of 1.5 Mbps
are allowed.

Voltages

The signal level of the RS232 pins can have two states. A high bit, or mark state is
identified by a negative voltage and a low bit or space state uses a positive value. This
might be a bit confusing, because in normal circumstances, high logical values are
defined by high voltages also. The voltage limits are shown below.

RS232 voltage values


Transmitter Receiver
Level
capable (V) capable (V)

Space state (0) +5 ... +15 +3 ... +25

Mark state (1) -5 ... -15 -3 ... -25

Undefined - -3 ... +3

More information about the voltage levels of RS232 and other serial interfaces can
be found in the interface comparison table.

The maximum voltage swing the computer can generate on its port can have influence
on the maximum cable length and communication speed that is allowed. Also, if the
voltage difference is small, data distortion will occur sooner. For example, my Toshiba
laptop mark's voltage is -9.3 V, compared to -11.5 V on my desktop computer. The
laptop has difficulties to communicate with Mitsubishi PLC's in industrial environments
with high noise levels where the desktop computer has no data errors at all using the
same cable. Thus, even far beyond the minimum voltage levels, 2 volts extra can make
a huge difference in communication quality.

Despite the high voltages present, it is not possible to destroy the serial port by short
circuiting. Only applying external voltages with high currents may eventually burn out
the driver chips. Still then, the UART won't be damaged in most cases.

Maximum cable lengths

Cable length is one of the most discussed items in RS232 world. The standard has a
clear answer, the maximum cable length is 50 feet, or the cable length equal to a
capacitance of 2500 pF. The latter rule is often forgotten. This means that using a cable
with low capacitance allows you to span longer distances without going beyond the
limitations of the standard. If for example UTP CAT-5 cable is used with a typical
capacitance of 17 pF/ft, the maximum allowed cable length is 147 feet.

The cable length mentioned in the standard allows maximum communication speed to
occur. If speed is reduced by a factor 2 or 4, the maximum length increases
dramatically. Texas Instruments has done some practical experiments years ago at
different baud rates to test the maximum allowed cable lengths. Keep in mind, that the
RS232 standard was originally developed for 20 kbps. By halving the maximum
communication speed, the allowed cable length increases a factor ten!
RS232 cable length according to Texas Instruments

Baud rate Maximum cable length (ft)

19200 50

9600 500

4800 1000

2400 3000

Even parity

Basically, the parity bit can be calculated in two ways. When even parity is used, the
number of information bits sent will always contain an even number of logical 1's. If the
number of high data bits is odd, a high value parity bit is added, otherwise a low bit will
be used.

Odd parity

The odd parity system is quite similar to the even parity system, but in this situation, the
number of high bits will always be odd.

RS-232 Level Converters


Almost all digital devices which we use require either TTL or CMOS logic levels.
Therefore the first step to connecting a device to the RS-232 port is to transform the
RS-232 levels back into 0 and 5 Volts. As we have already covered, this is done by RS-
232 Level Converters.

Two common RS-232 Level Converters are the 1488 RS-232 Driver and the 1489 RS-
232 Receiver. Each package contains 4 inverters of the one type, either Drivers or
Receivers. The driver requires two supply rails, +7.5 to +15v and -7.5 to -15v. As you
could imagine this may pose a problem in many instances where only a single supply of
+5V is present. However the advantages of these I.C's are they are cheap.
Above: (Figure 6) Pinouts for the
MAX-232,
RS-232 Driver/Receiver.

Right: (Figure 7) Typical MAX-


232 Circuit.

Another device is the MAX-232. It includes a Charge Pump, which generates +10V
and -10V from a single 5v supply. This I.C. also includes two receivers and two
transmitters in the same package. This is handy in many cases when you only want to
use the Transmit and Receive data Lines. You don't need to use two chips, one for the
receive line and one for the transmit. However all this convenience comes at a price, but
compared with the price of designing a new power supply it is very cheap.

There are also many variations of these devices. The large value of capacitors are
not only bulky, but also expensive. Therefore other devices are available which use
smaller capacitors and even some with inbuilt capacitors. (Note : Some MAX-232's can
use 1 micro farad Capacitors). However the MAX-232 is the most common, and thus we
will use this RS-232 Level Converter in our examples.

Circuit operation:

In this sub section S.I.U shown in the below figure the output of the RFID Reader is
fed to the Microcontroller through a SIU circuit, because the transition output signal of
the RFID Reader is not compatible with the Microcontroller serial port. The SIU unit will
converts the TTL output signal into serial transition output signal which is compatible
with the serial port of the controller.

At normal condition, the controller continuously scans or search a serial data to the
RFID reader through SIU unit during the non-swap of the RF tag card at the receiver.
The LCD display the alpha numeric letter on the LCD screen.
Whenever the RF tag card is swap at the RFID reader, the RFID reader reads the
serial data of particular tag and transmits a serial data to the controller through SIU
which converts serial data into a TTL logic level compatible to the serial port of the
controller.

1 0 u F 1 0 u F

V c c = + 5 v 2 3 1
1 6

0 .1 u F

8 3
M A X 2 3 2
2
M O TH E R P 3. 1 ( Tx D ) 7
B O AR D 1 0 5

TO S E R I A L P O RT
CO N N EC T O R
15 6 5 4
1 0 u F

1 0 u F

S E R I A L P O R T I N T E R F A C I N G ( M A X 2 3 2 )

ix) Mother Board:

The motherboard of this project is designed with a MSC –51 core compatible micro
controller. The motherboard is designed on a printed circuit board, compatible for the
micro controller. This board is consisting of a socket for micro controller, input /output
pull-up registers; oscillator section and auto reset circuit.

Introduction
Despite it’s relatively old age, the 89C51 is one of the most popular Micro controller
in use today. Many derivatives Micro controllers have since been developed that are
based on--and compatible with--the 8051. Thus, the ability to program an 89C51 is an
important skill for anyone who plans to develop products that will take advantage of
Micro controller.

Many web pages, books, and tools are available for the 89C51 developer.

The 89C51 has three very general types of memory. To effectively program the 8051 it
is necessary to have a basic understanding of these memory types.

The memory types are illustrated in the following graphic. They are: On-Chip Memory,
External Code Memory, and External RAM.

On-Chip Memory refers to any memory (Code, RAM, or other) that physically exists on
the Microcontroller itself. On-chip memory can be of several types, but we'll get into that
shortly.

External Code Memory is code (or program) memory that resides off-chip. This is often
in the form of an external EPROM.

External RAM is RAM memory that resides off-chip. This is often in the form of
standard static RAM or flash RAM.

Code Memory

Code memory is the memory that holds the actual 8051 program that is to be run. This
memory is limited to 64K and comes in many shapes and sizes: Code memory may be
found on-chip, either burned into the Microcontroller as ROM or EPROM. Code may
also be stored completely off-chip in an external ROM or, more commonly, an external
EPROM. Flash RAM is also another popular method of storing a program. Various
combinations of these memory types may also be used--that is to say, it is possible to
have 4K of code memory on-chip and 64k of code memory off-chip in an EPROM.

When the program is stored on-chip the 64K maximum is often reduced to 4k, 8k, or
16k. This varies depending on the version of the chip that is being used. Each version
offers specific capabilities and one of the distinguishing factors from chip to chip is how
much ROM/EPROM space the chip has.

However, code memory is most commonly implemented as off-chip EPROM. This is


especially true in low-cost development systems and in systems developed by students.

Programming Tip: Since code memory is restricted to 64K, 89C51 programs are
limited to 64K. Some assemblers and compilers offer ways to get around this limit when
used with specially wired hardware. However, without such special compilers and
hardware, programs are limited to 64K.

External RAM

As an obvious opposite of Internal RAM, the 89C51 also supports what is called
External RAM.

As the name suggests, External RAM is any random access memory which is found off-
chip. Since the memory is off-chip it is not as flexible in terms of accessing, and is also
slower. For example, to increment an Internal RAM location by 1 requires only 1
instruction and 1 instruction cycle. To increment a 1-byte value stored in External RAM
requires 4 instructions and 7 instruction cycles. In this case, external memory is 7 times
slower!
What External RAM loses in speed and flexibility it gains in quantity. While Internal RAM
is limited to 128 bytes (256 bytes with an 8052), the 8051 supports External RAM up to
64K.

Programming Tip: The 8051 may only address 64k of RAM. To expand RAM beyond
this limit requires programming and hardware tricks. You may have to do this "by hand"
since many compilers and assemblers, while providing support for programs in excess
of 64k, do not support more than 64k of RAM. This is rather strange since it has been
my experience that programs can usually fit in 64k but often RAM is what is lacking.
Thus if you need more than 64k of RAM, check to see if your compiler supports it-- but if
it doesn't, be prepared to do it by hand.

On-Chip Memory

As mentioned at the beginning of this chapter, the 89C51 includes a certain amount of
on-chip memory. On-chip memory is really one of two types: Internal RAM and Special
Function Register (SFR) memory. The layout of the 89C51's internal memory is
presented in the following memory map:

As is illustrated in this map, the 8051 has a bank of 128 bytes of Internal RAM. This
Internal RAM is found on-chip on the 8051 so it is the fastest RAM available, and it is
also the most flexible in terms of reading, writing, and modifying it’s contents. Internal
RAM is volatile, so when the 8051 is reset this memory is cleared.
The 128 bytes of internal ram is subdivided as shown on the memory map. The first 8
bytes (00h - 07h) are "register bank 0". By manipulating certain SFRs, a program may
choose to use register banks 1, 2, or 3. These alternative register banks are located in
internal RAM in addresses 08h through 1Fh. We'll discuss "register banks" more in a
later chapter. For now it is sufficient to know that they "live" and are part of internal
RAM.

Bit Memory also lives and is part of internal RAM. We'll talk more about bit memory very
shortly, but for now just keep in mind that bit memory actually resides in internal RAM,
from addresses 20h through 2Fh.

The 80 bytes remaining of Internal RAM, from addresses 30h through 7Fh, may be
used by user variables that need to be accessed frequently or at high-speed. This area
is also utilized by the Microcontroller as a storage area for the operating stack. This fact
severely limits the 8051’s stack since, as illustrated in the memory map, the area
reserved for the stack is only 80 bytes--and usually it is less since this 80 bytes has to
be shared between the stack and user variables.

SFR Descriptions

There are different special function registers (SFR) designed in side the 89C51 micro
controller. In this micro controller all the input , output ports, timers interrupts are
controlled by the SFRs. The SFR functionalities are as follows.

This section will endeavor to quickly overview each of the standard SFRs found in the
above SFR chart map. It is not the intention of this section to fully explain the
functionality of each SFR--this information will be covered in separate chapters of the
tutorial. This section is to just give you a general idea of what each SFR does.

P0 (Port 0, Address 80h, Bit-Addressable): This is input/output port 0. Each bit of this
SFR corresponds to one of the pins on the Microcontroller. For example, bit 0 of port 0
is pin P0.0, bit 7 is pin P0.7. Writing a value of 1 to a bit of this SFR will send a high
level on the corresponding I/O pin whereas a value of 0 will bring it to a low level.
Programming Tip: While the 8051 has four I/O port (P0, P1, P2, and P3), if your
hardware uses external RAM or external code memory (i.e., your program is stored in
an external ROM or EPROM chip or if you are using external RAM chips) you may not
use P0 or P2. This is because the 8051 uses ports P0 and P2 to address the external
memory. Thus if you are using external RAM or code memory you may only use ports
P1 and P3 for your own use.

SP (Stack Pointer, Address 81h): This is the stack pointer of the Microcontroller. This
SFR indicates where the next value to be taken from the stack will be read from in
Internal RAM. If you push a value onto the stack, the value will be written to the address
of SP + 1. That is to say, if SP holds the value 07h, a PUSH instruction will push the
value onto the stack at address 08h. This SFR is modified by all instructions which
modify the stack, such as PUSH, POP, LCALL, RET, RETI, and whenever interrupts are
provoked by the Microcontroller.

Programming Tip: The SP SFR, on startup, is initialized to 07h. This means the stack
will start at 08h and start expanding upward in internal RAM. Since alternate register
banks 1, 2, and 3 as well as the user bit variables occupy internal RAM from addresses
08h through 2Fh, it is necessary to initialize SP in your program to some other value if
you will be using the alternate register banks and/or bit memory. It's not a bad idea to
initialize SP to 2Fh as the first instruction of every one of your programs unless you are
100% sure you will not be using the register banks and bit variables.

DPL/DPH (Data Pointer Low/High, Addresses 82h/83h): The SFRs DPL and DPH
work together to represent a 16-bit value called the Data Pointer. The data pointer is
used in operations regarding external RAM and some instructions involving code
memory. Since it is an unsigned two-byte integer value, it can represent values from
0000h to FFFFh (0 through 65,535 decimal).
Programming Tip: DPTR is really DPH and DPL taken together as a 16-bit value. In
reality, you almost always have to deal with DPTR one byte at a time. For example, to
push DPTR onto the stack you must first push DPL and then DPH. You can't simply
plush DPTR onto the stack. Additionally, there is an instruction to "increment DPTR."
When you execute this instruction, the two bytes are operated upon as a 16-bit value.
However, there is no instruction that decrements DPTR. If you wish to decrement the
value of DPTR, you must write your own code to do so.

PCON (Power Control, Addresses 87h): The Power Control SFR is used to control
the 8051's power control modes. Certain operation modes of the 8051 allow the 8051 to
go into a type of "sleep" mode, which requires much, less power. These modes of
operation are controlled through PCON. Additionally, one of the bits in PCON is used to
double the effective baud rate of the 8051's serial port.

TCON (Timer Control, Addresses 88h, Bit-Addressable): The Timer Control SFR is
used to configure and modify the way in which the 8051's two timers operate. This SFR
controls whether each of the two timers is running or stopped and contains a flag to
indicate that each timer has overflowed. Additionally, some non-timer related bits are
located in the TCON SFR. These bits are used to configure the way in which the
external interrupts are activated and also contain the external interrupt flags which are
set when an external interrupt has occurred.

TMOD (Timer Mode, Addresses 89h): The Timer Mode SFR is used to configure the
mode of operation of each of the two timers. Using this SFR your program may
configure each timer to be a 16-bit timer, an 8-bit auto reload timer, a 13-bit timer, or
two separate timers. Additionally, you may configure the timers to only count when an
external pin is activated or to count "events" that are indicated on an external pin.

TL0/TH0 (Timer 0 Low/High, Addresses 8Ah/8Ch): These two SFRs, taken together,
represent timer 0. Their exact behavior depends on how the timer is configured in the
TMOD SFR; however, these timers always count up. What is configurable is how and
when they increment in value.

TL1/TH1 (Timer 1 Low/High, Addresses 8Bh/8Dh): These two SFRs, taken together,
represent timer 1. Their exact behavior depends on how the timer is configured in the
TMOD SFR; however, these timers always count up. What is configurable is how and
when they increment in value.

P1 (Port 1, Address 90h, Bit-Addressable): This is input/output port 1. Each bit of this
SFR corresponds to one of the pins on the Microcontroller. For example, bit 0 of port 1
is pin P1.0, bit 7 is pin P1.7. Writing a value of 1 to a bit of this SFR will send a high
level on the corresponding I/O pin whereas a value of 0 will bring it to a low level.

SCON (Serial Control, Addresses 98h, Bit-Addressable): The Serial Control SFR is
used to configure the behavior of the 8051's on-board serial port. This SFR controls the
baud rate of the serial port, whether the serial port is activated to receive data, and also
contains flags that are set when a byte is successfully sent or received.

Programming Tip: To use the 8051's on-board serial port, it is generally necessary to
initialize the following SFRs: SCON, TCON, and TMOD. This is because SCON controls
the serial port. However, in most cases the program will wish to use one of the timers to
establish the serial port's baud rate. In this case, it is necessary to configure timer 1 by
initializing TCON and TMOD.

SBUF (Serial Control, Addresses 99h): The Serial Buffer SFR is used to send and
receive data via the on-board serial port. Any value written to SBUF will be sent out the
serial port's TXD pin. Likewise, any value which the 8051 receives via the serial port's
RXD pin will be delivered to the user program via SBUF. In other words, SBUF serves
as the output port when written to and as an input port when read from.

P2 (Port 2, Address A0h, Bit-Addressable): This is input/output port 2. Each bit of this
SFR corresponds to one of the pins on the Microcontroller. For example, bit 0 of port 2
is pin P2.0, bit 7 is pin P2.7. Writing a value of 1 to a bit of this SFR will send a high
level on the corresponding I/O pin whereas a value of 0 will bring it to a low level.

Programming Tip: While the 8051 has four I/O port (P0, P1, P2, and P3), if your
hardware uses external RAM or external code memory (i.e., your program is stored in
an external ROM or EPROM chip or if you are using external RAM chips) you may not
use P0 or P2. This is because the 8051 uses ports P0 and P2 to address the external
memory. Thus if you are using external RAM or code memory you may only use ports
P1 and P3 for your own use.

IE (Interrupt Enable, Addresses A8h): The Interrupt Enable SFR is used to enable
and disable specific interrupts. The low 7 bits of the SFR are used to enable/disable the
specific interrupts, where as the highest bit is used to enable or disable ALL interrupts.
Thus, if the high bit of IE is 0 all interrupts are disabled regardless of whether an
individual interrupt is enabled by setting a lower bit.

P3 (Port 3, Address B0h, Bit-Addressable): This is input/output port 3. Each bit of this
SFR corresponds to one of the pins on the Micro controller. For example, bit 0 of port 3
is pin P3.0, bit 7 is pin P3.7. Writing a value of 1 to a bit of this SFR will send a high
level on the corresponding I/O pin whereas a value of 0 will bring it to a low level.
Auto reset Circuit:

MICROCONTROLLER
39 21
38 P 0 .0 / A D 0 P 2 .0 /A 8 22
37 P 0 .1 / A D 1 P 2 .1 /A 9 23
36 P 0 .2 / A D 2 P 2 .2 / A 1 0 24
35 P 0 .3 / A D 3 P 2 .3 / A 1 1 25
34 P 0 .4 / A D 4 P 2 .4 / A 1 2 26
33 P 0 .5 / A D 5 P 2 .5 / A 1 3 27
32 P 0 .6 / A D 6 P 2 .6 / A 1 4 28
P 0 .7 / A D 7 P 2 .7 / A 1 5
1 10
2 P 1 .0 P 3 . 0 /R X D 11
3 P 1 .1 P 3 .1 /T X D 12
4 P 1 .2 P 3 .2 /IN T 0 13
5 P 1 .3 P 3 .3 /IN T 1 14
6 P 1 .4 P 3 .4 /T 0 15
7 P 1 .5 P 3 .5 /T 1 16
8 P 1 .6 P 3 .6 / W R 17
22pF P 1 .7 P 3 .7 /R D
19 30
18 X TA L1 A L E /P R O G 29
4 - 12Mhz X TA L2 P S E N
31
9 E A /V P P
RS T
22pF VC C =+5vdc
A T 89C 51

10uF
R ST

8 .2 k

The auto reset circuit is a RC network as shown in the mother board circuit diagram. A

capacitor of 1-10µF is connected in series with 8k2 resistor the R-C junction is

connected to the micro controller pin –9 which is reset pin. The reset pin is one when

ever kept high( logic 1) the program counter (PC) content resets to 0000h so the

processor starts executing the program from that location. When ever the system is

switched ON the mother board gets power and the capacitor acts as short circuit and

the entire voltage appears across the resistor, so the reset pin get a logic 1 and the

system get reset, whenever it is being switched ON.


Pull-UP Resisters:

VC C =+5V

10k

39 21
38 P 0 .0 /A D 0 P 2 .0 /A 8 22
37 P 0 .1 /A D 1 P 2 .1 /A 9 23
36 P 0 .2 /A D 2 P 2 .2 / A 1 0 24
35 P 0 .3 /A D 3 P 2 .3 / A 1 1 25
PORT-0 34 P
P
0 .4 /A
0 .5 /A
D
D
4
5
P 2 .4 / A 1 2
P 2 .5 / A 1 3
26
33 27
32 P 0 .6 /A D 6 P 2 .6 / A 1 4 28
P 0 .7 /A D 7 P 2 .7 / A 1 5
1 10
2 P 1 .0 P 3 .0 / R X D 11
3 P 1 .1 P 3 .1 /T X D 12
4 P 1 .2 P 3 .2 /IN T 0 13
5 P 1 .3 P 3 .3 /IN T 1 14
6 P 1 .4 P 3 .4 /T 0 15
7 P 1 .5 P 3 .5 /T 1 16
8 P 1 .6 P 3 .6 / W R 17
P 1 .7 P 3 .7 / R D
19 30
18 X TA L1 A L E /P R O G 29
X TA L2 P S E N
31
9 E A /V P P
RS T

A T 89C 51
The PORT0 and PORT2 of the MCS-51 architecture is of open collector type so on
writing logic 0 the pins are providing a perfect ground potential. Where as on writing
logic 1 the port pins behaves as high impedance condition so putting a pull-up resister
enables the port to provide a +5volt (logic 1). Port1 and Port3 are provided with
internal pull-ups. A pull-up resister is normally a 10K resistance connected from the port
pin to the Vcc (+5) volt.

Crystal Oscillator
The 8051 family microcontroller contains an inbuilt crystal oscillator, but the crystal has
to be connected externally. This family of microcontroller can support 0 to 24MHz
crystal and two numbers of decoupling capacitors are connected as shown in the figure.
These capacitors are decouples the charges developed on the crystal surface due to
piezoelectric effect. These decoupling capacitors are normally between 20pf to 30pf.
The clock generator section is designed as follows,

The Microcontroller design consists of two parts:

1) Hardware.

2) Software.

HARDWARE: The controller operates on +5 V dc, so the regulated + 5v is


supplied to pin no. 40 and ground at pin no. 20. The controller is used here need not
required to handle high frequency signals, so as 4 MHz crystal is used for operating the
processor. The pin no. 9 is supplied with a +5V dc through a push switch. To reset the
processor .As prepare codes are store in the internal flash memory the pin no. 31 is
connected to + Vcc

Port assignment: -

Port-1 is taken as output port for the LCD data bits.

Port-2 is taken as input port for the 4 x 3 matrix keyboard.

P2.0, P2.1, P2.2 & P2.3 is taken as input port to the 4-input AND gate.

P0.0 & P0.1 is taken as output port for the bi-directional dc motor driver.

P0.5 is taken as output port for the buzzer driver.


P0.6 is taken as input port from the motor feedback.

P0.7 is taken as input port from the IR tracepassing.

P3.0 & p3.1 is taken as input port from SIU.

P3.2 is taken as input port from AND gate.

P3.5, P3.6 & P3.7 is taken as input port to the LCD control bit.

Software:

Algorithm:

x) 4- input AND gate:


In this sub section AND gate its aspects is to give a transition input signal to the
Interrupt pin (INT0) of the controller on each key press of the keyboard (ROWS). Here
the 4-inputs from the keyboard rows (R1, R2, R3 & R4) is fed to the input of the AND
gate which is configured as a diode design which is connected in reverse biased as
shown in below figure.
Circuit Operation:

A diode in conducting state or cut-off state is used to represents the two values of
Boolean variable. Let us consider the electronic circuit as shown in below figure.
V c c = + 5 V

A
D I O D E -1
C

B
D I O D E -2

DIODE AND GATE


Io = Vcc – Vd / R
= +5V – 0.7 / 10KΩ Vo = Vcc – Vd
= 4.3V / 10000 = +5V – 0.7
=430µA = 4.3V

Here input signal assumes a voltage of 0 or 5volt. From the above figure it is clear that

point C will be +5v only if both inputs to A and B are at +5volts. If either of input to A or

B is at 0 volt, the output will be 0. If we assign a value 1 to represent +5v (on or

conducting) and a 0 to represent 0 volt (non-conducting or off) at the output. That output

signal is further fed to the controller as input signal to the interrupt pin (INT0).

xi) 4 x 3 matrix keyboard Interface:


In this sub section keyboard interface its aspects is to charge the value of
amount to the RFID card to the corresponding card holder. Here 4 x 3 matrix keyboard
is used which is fed to the controller port-2 as input signal. ROWs are connected to p2.0
to p2.3 and COLUMNs are connected to p2.4 to p2.7.

Scanning and identifying the key: A 4 X 4 matrix connected to two ports .The rows is
connected to an output port and the columns are connected to an input port. If no key
has been pressed, reading the input port will yield 1s for all columns since they are
connected to high (Vcc). If all the rows are grounded and a key is pressed, one of the
columns will have 0 since the key press provides the path to ground. It is the function of
the Microcontroller to scan the keyboard continuously to detect and identify the key
press. How it is done to explain next.

Grounding the rows and reading the column:

To detect a pressed key, The Microcontroller grounds all row by providing 0 to


the output latch, then it reads the columns. If the data read from the column is D3-D0 =
1111, no key has been pressed and the process continuous until a key press is
detected. However, if one of the columns bit has a 0, this means that a key press has
occurred. For example, If D3-D0 = 1101, this means that a key in the D1 column has
been pressed. After a key pressed is detected, the Microcontroller will go through the
process of identifying the key. Starting with the Top row the Microcontroller grounds it
by providing a low to row D0 only; then it reads the column. If the data read is all 1s, no
key in that row is activated and the process is moved to the next row. It grounds the
next row, reads the column, and checks for any Zero. This process continuous until the
row is identified. After identification of the row in which the key has been pressed, the
next task is to find out which columns the pressed key belong to. This should be easy
since the Microcontroller knows at any time which row and column are being accessed.

xii) LCD Interface:


LCD panel consists of two patterned glass panels in which crystal is filled
under vacuum. The thickness of glass varies according to end use. Most of the LCD
modules have glass thickness in the range of 0.70 to 1.1mm.
Normally these liquid crystal molecules are placed between glass plates to form a spiral
staircase to twist the twist the light. Light entering the top plate twist 900 before entering
the bottom plate. Hence the LCDs are also called as optical switches. These LCD
cannot display any information directly. These act as an interface between electronics
and electronics circuit to give a visual output.

Technology: - The liquid crystal display (LCD), as the name suggests is a technology
based on the use of liquid crystal. It is a transparent material but after applying voltage it
becomes opaque. This property is the fundamental operating principle of LCDs.

An LCD consists of two-glass panel with a cavity in between. The panels are sealed
together. The inner surface of glass is coated with transparent material to form
characters or symbols for display. The most common type of liquid crystal used is
‘nematis’. In this type of crystal the long rod type molecules are arranged in parallel. It
changes the optical characteristics with change in direction by applying voltage to it.
There are two common type of LCDs which use this material. They are :

1. TN (Twisted nematic):-The twisted nematic field effect mode arranges the


liquid crystal molecules by controlling their movement Witt electric voltage
soaks twist them by 900 in the direction for their thickness. It controls the light
passing through the polarized placed on the two plates of the LCD by
controlling the movements of the liquid crystal molecules. Almost all the
medium and small type segment LCD are these types. Hence this type is
most common type used.
2. STN (Super twisted nematic) While the TN mode arranges the liquid crystal
molecule by twisting them by 900 the STN effect mode arranges them by
giving a still larger twist and provides a display by refringence effect of the
liquid crystal. The LCD structure in STN mode is same as that in TN mode.
But as it has a different arrangement of liquid crystal, and by bi-refringence
effect of liquid crystal. The LCD structure in STN mode is same as that in TN
mode but as it has a different arrangement of liquid crystal and bi-refringence
effect there is a colour in display and also a background colour. In STN mode,
a wide viewing angle is obtained. The STN mode also offers a high contrast
display compare to the TN mode. This mode is widely used in large size full
dot-matrix LCD modules. For colours it has multiple modes depending on the
combination of the polarized and retardation film.

Energy consumption: - LCD normally requires very little energy to operate typically
5µ A to 25µ A at five volts (per square inch) for a display. In addition, auxiliary
lighting will require supplementary energy. ALL LCD require a pure AC drive
voltage. Inadvertent DC voltage, such as DC component in an AC signal, can
significantly reduce the life of LCDs and must be limited to 50mv DC.
Direct drive: - Direct drive, static or simplex drive, means that each segment of the
LCD has an independent connection to the driver. Direct drive LCD has the highest
contrast over the widest temperature ranges. They are widely used in outdoor
application. Direct drives typically requires drive frequency between 30HZ and 60HZ
frequency. Frequency below 30HZ will flicker the display. While frequency above 60HZ
will excessive current draw in the circuit. This is very important for battery mode
operation. If voltage frequency across the limit then LCD ’Off’ segments can be come in
adherently energized. This partial activation of segment is known as cross talk or
ghosting.

LCD is available in a verity of model having one to four rows of 8 to 20 characters each.
A display with two rows of 16 characters is used for this example project. Almost all
aspects of the design can be used with other model of LCD, since the internal structure
of the various LCD models are almost same, differencing only in the number of driver
chips used. The display module is powered from a 5 V supply.

Connecting an LCD to a micro controller is very simple, requiring either bit or an 8-bit
bus. A 4-bit interface saves I/O pins but requires that the command and data be split
into 4-bit pieces, which are sent one after the other. Thus the saving in I/O lines comes
at the price of more complicated software. To simplify understanding of the software the
example uses a 8-bit interface. Three control lines are required in addition to the data
line.
The voltage at the V0 pin adjusts the contrast of the display. Normally this voltage is
provided by an adjustable voltage divider.

The control line E (Enable) enables or disables the display. When the display is
enabling it monitors the value of the other two control lines and interprets the data lines
accordingly. When the display is disabled it ignores the status of the other two control
lines and places its data line drivers in a high impedance state (tri-state). The data bus
can then be used for other purpose. The control line R/W (Read /Write) determines
weather data is read from or written to the LCD. Finally, the RS (Register select) line
distinguishes between commands and display characters.

LCD Controller device characteristics


The HD44780 contains 80 bytes of internal RAM called Data display RAM (DDR) that is
used for presentation of characters in the LCD. The size of the DDR is independent of
the LCD configuration (number of rows and character). For an LCD having two rows of
characters, the leftmost character in the first row is assigned to address 0 of the DDR.
Each following character position in the first display row is assigned to the next following
address in turn until the 40th character location reached, which is assigned to DDR
address 27 hex. The character locations in the second row of the display are assigned
to DDR address 40 hex through 67 hex. If for example a character is to be written to the
third position from the left in the second row of the display, it must be written to DDR, so
that for example with a display, it must be written to DDR location 42hex.If the LCD
module displays fewer than 40 characters per row, then these are mapped into a
‘window’ within the DDR, so that for example with a display of 16 characters per line
only 16 of the 40 available DDR locations per line can be displayed at one time. The
HD44780 supports commands to move this window to the left or to the right to allow
various regions of the DDR to be displayed.

In additions to the DDR the HD44780 has a character generator ROM (CGROM) and a
character-generator RAM (CGRAM).The CG ROM contains the dot-matrix patterns for
the standard (fixed) character set, while the CGRAM allows the user to program
additional character. Either eight 4 X 7-point or four 5 X 10-point characters may be
stored on the CGRAM.

xiii) Buzzer driver:


In this sub section buzzer driver its aspects is to give a audible sound if the RFID card
four times is swap across the RFID reader. The controller sends a high bit to the buzzer
driver to activate the buzzer because the controller cannot produce sufficient current to
drive the buzzer directly for that a driver stage is required.
Introduction:

The conversion of electrical pulses to mechanical vibrations and the conversion of


returned mechanical vibrations back into electrical energy is the basis for ultrasonic
testing. The active element is the heart of the transducer as it converts the electrical
energy to acoustic energy, and vice versa. The active element is basically a piece of
polarized material (i.e. some parts of the molecule are positively charged, while other
parts of the molecule are negatively charged) with electrodes attached to two of its
opposite faces. When an electric field is applied across the material, the polarized
molecules will align themselves with the electric field, resulting in induced dipoles within
the molecular or crystal structure of the material. This alignment of molecules will cause
the material to change dimensions. This phenomenon is known as electrostriction. In
addition, a permanently-polarized material such as quartz (SiO2) or barium titanate
(BaTiO3) will produce an electric field when the material changes dimensions as a
result of an imposed mechanical force. This phenomenon is known as the piezoelectric
effect. Additional information on why certain materials produce this effect can be found
in the linked presentation material, which was produced by the Valpey Fisher
Corporation.

The active element of most acoustic transducers used today is a piezoelectric ceramic,
which can be cut in various ways to produce different wave modes. A large piezoelectric
ceramic element can be seen in the image of a sectioned low frequency transducer.
Preceding the advent of piezoelectric ceramics in the early 1950's, piezoelectric crystals
made from quartz crystals and magnetostrictive materials were primarily used. The
active element is still sometimes referred to as the crystal by old timers in the NDT field.
When piezoelectric ceramics were introduced, they soon became the dominant material
for transducers due to their good piezoelectric properties and their ease of manufacture
into a variety of shapes and sizes. They also operate at low voltage and are usable up
to about 300oC. The first piezoceramic in general use was barium titanate, and that was
followed during the 1960's by lead zirconate titanate compositions, which are now the
most commonly employed ceramic for making transducers. New materials such as
piezo-polymers and composites are also being used in some applications.

The thickness of the active element is determined by the desired frequency of the
transducer. A thin wafer element vibrates with a wavelength that is twice its thickness.
Therefore, piezoelectric crystals are cut to a thickness that is 1/2 the desired radiated
wavelength. The higher the frequency of the transducer, the thinner the active element.
The primary reason that high frequency contact transducers are not produced is
because the element is very thin and too fragile.

Circuit operation:
This section interfaces one audible piezo electric buzzer through the driver stage which
is configured as a transistor as a driver. The transistor or driver stage activates the
buzzer whenever there is 4- times wrong card is swap across the RFID reader.
It is a device that converts e
lectrical signal to an audible signal (sound signal). Whenever a signal received
during the 4- times wrong card is swap, the controller sends a high bit to the base
of the transistor through a base resistance (1.5k) is high, at that time the transistor
comes to saturation condition i.e. ON condition thus the buzzer comes to ON
condition with a audible sound.
V c c = + 1 2 V

B C 5 4 7
1 . 5 k

B U Z Z E R D R I V E R

4. FUTURE EXPANSION:

This project is designed with in a limited period of time and to develop an application on
the basic principle of RFID. This is an emerging field of data communication and
information technology. This project can be expanded in many directions.

1. In this project the EOS designed is not having much flexibility. The
member’s identity code need to be programmed while programming the
microcontroller. The addition and deletion of the members is not possible
by the administrator. The EOS can be suitably modified to include or
exclude members in the data base.
2. A high frequency RFID is used to accept data from ma larger distance so
the user may not come very closer to the reader.
3. A RTC based time recorder program can be included in the EOS to
maintain the exit and entry time of the users.
4. It can be interfaced with the computer to store the recorded data for
analysis and salary calculation etc.

5. CONCLUSION:
The RFID based access controller system is designed in the laboratory and tested very

much ruggedly in the laboratory condition. The operation of the system is quit

satisfactorily in the laboratory test conditions. The error of reading observed is quit less

may be 0.1% to 1%, which is quit less then the experimental tolerance level.

6.REFERENCE:

A. ELECTRONIC DEVICE & CIRCUIT THEIRY, ROBERT L. BOYLESTAD & LOUIS NAS HELSKY

B . PULSE & DIGITAL CIRCUIT, PHI , ANAND KUMAR

C. ELECTRICAL MACHINE, J.B.GUPTA

D. SOLDERING TECHNIQUES, WWW.WIKIPEDIA.COM

E. WWW.ELECTRONICCIRCUITS.COM

F. The 8051 microcontroller and embedded system by Mazidi & Mazidi & McKinlay
G. www.howstuffworks.com

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