Está en la página 1de 48

AUTOMATIC SPEED CONTROLLER

Design and fabrication project report


submitted in partial fulfillment of the requirements
for the award of degree
of
BACHELOR OF TECHNOLOGY
in
MECHANICAL ENGINEERING
By
N. SYAM MANOHAR T. SHARON ROSE KUMAR
(Regd. No. 15FE1A03C4) (Regd. No. 15FE1A03C7)

T. NIKHIL SASTRY S. AKHIL KRISHNA


(Regd. No. 16FE5A0335) (Regd. No. 15FE1A03C3)

under the guidance of


Sri. K. SIVA KRISHNA, M.Tech
Assistant Professor

DEPARTMENT OF MECHANICAL ENGINEERING


VIGNAN'S LARA INSTITUTE OF TECHNOLOGY & SCIENCE
(Approved by AICTE, New Delhi & Affiliated to JNTUK, Kakinada)
Vadlamudi-522 213, Andhra Pradesh
September, 2018

(i)
DEPARTMENT OF MECHANICAL ENGINEERING
VIGNAN'S LARA INSTITUTE OF TECHNOLOGY & SCIENCE
(Approved by AICTE New Delhi & Affiliated to JNTUK, Kakinada)
Vadlamudi-522 213, Andhra Pradesh

CERTIFICATE

This is to certify that the Design and fabrication project work entitled “AUTOMATIC

SPEED CONTROLLER" is submitted by N. SYAM MANOHAR (Regd. No. 15FE1A03C4);

T. SHARON ROSE KUMAR (Regd. No. 15FE1A03C7); T. NIKHIL SASTRY (Regd. No.

16FE5A0335); S. AKHIL KRISHNA (Regd. No. 15FE1A03C3) to the Department of Mechanical

Engineering, Vignan’s Lara Institute of Technology & Science, Vadlamudi in partial fulfilment of

the requirements for the award of Degree of Bachelor of Technology in Mechanical Engineering.

Dr. P. Bhaskara Rao, Ph.D. K. SIVA KRISHNA, M. Tech


Head of the Department Assistant Professor
Guide

(ii)
DECLARATION
We hereby declare that the work presented in this project report entitled "Automatic Speed

Controller" is an authentic record of original workdone by us under the guidance of Sri. K. SIVA

KRISHNA, Assistant Professor and submitted for the award of Degree of Bachelor of Technology

to the Department of Mechanical Engineering of Vignan's Lara Institute of Technology & Science,

Vadlamudi. This work has not been submitted elsewhere for the award of any other

diploma/degree.

Place: Vadlamudi N. Syam Manohar (Reg. No. 15FE1A03C4)

Date: T. Sharon Rose Kumar (Reg. No. 15FE1A03C7)

T. Nikhil Sastry (Reg. No. 16FE5A0335)

S. Akhil Krishna (Reg. No. 15FE1A03C3)

(iii)
ACKNOWLEDGEMENT

We am highly indebted to my guide, Sri. K. Siva Krishna, Assistant Professor for

his sincere involvement and contribution to this project.

This project would not have been completed without the help and support received

from Head of the Department of Mechanical Engineering, Dr. P. Bhaskara Rao, Professor.

Hence, the author is very much grateful to him.

We would like to express my glad and proud gratitude to the honorable Principal,

Dr. K. Phaneendra Kumar, Ph.D., Professor of Mechanical Engineering for his encouragement

and support given to complete this project.

We are grateful for the support received from the Apex Innovations Pvt. Ltd, IC

Engine Research Laboratory to complete this project.

My heartfelt thanks are due to Mr. Radha Krishna Gopidesi, Research Associate,

VIT University, Vellore for his encouragement and technical support given to complete this

project.

We would like to thank all my classmates, teaching and non-teaching staff of this

college for all the support and encouragement given during this work.

Last, but not least, we would like to thank my parents for all the support.

N. SYAM MANOHAR. (Reg. No. 15FE1A03C4)

T. SHARON ROSE KUMAR. (Reg. No. 15FE1A03C7)

T. NIKHIL SASTRY. (Reg. No. 16FE5A0335)

S. AKHIL KRISHNA. (Reg. No. 15FE1A03C3)

(iv)
ABSTRACT

In present situations, controlling the speed of the vehicles at the sensitive zones is a

complicated process as it requires manpower and mobile speed measuring mechanism to control.

So, we developed an innovative mechanism to automatically control the vehicles speed

irrespective of the driver`s recklessness.

This mechanism is kept in the vehicle and it reads for the RF code to know whether

any kind of sensitive zone is started or not. When it receives a code for sensitive zone, it

automatically takes over control to reduce speed.

The above project is designed with the popular microcontroller MCS51series 89C52

&RF transponders TK5530, U2270 chips. The RF transmitter in the vehicle continuously transmits

the data and searches for the RF code. When it receives a code, it transmits that code to the micro

controller and comparison of that code is done in the micro controller. If that code matches with

sensitive zone`s starting code, it activates the control relay and car speed is reduced. Again, if the

sensitive zones ending code is received, the micro controller automatically de-activates the control

relay and the vehicle`s speed is attained to normal state.

(v)
CONTENTS

Certificates (i) - (ii)

Declaration (iii)

Acknowledgement (iv)

Abstract (v)

List of Figures (vi) - (ix)

CHAPTER 1 INTRODUCTION 1–2

1.1 Block Diagram

1.2 Circuit Diagram

CHAPTER 2 LITERATURE REVIEW 3 - 10

2.1 Microcontroller89C52

2.1.1 Features

2.1.2 Pin Diagram and its Description

2.1.2.1 Pin Diagram

2.1.3 Architecture of 89C52

2.2 The On-Chip Oscillators

2.2.1 Program Memory Lock Bits

2.2.2 Program Counter and Data Pointer

2.2.3 A & B Registers

2.2.4 Flags & The Program Status Word (PSW)


CHAPTER 3 MATERIAL AND METHODS 11 - 26

3.1 Crystal Oscillator

3.2 Power Supply

3.2.1 Description

3.2.2 Circuit Diagram

3.3 Voltage Regulator

3.3.1 Positive Voltage Regulator

3.4 Transformer

3.4.1 Introduction

3.4.2 Principle

3.4.3 Step-Down Transformer

3.5 Voltage Regulator

3.6 Buzzer

3.8.1 Buzzer Driver

3.7 Liquid Crystal Display (L.C.D)

3.7.1 Introduction

3.7.2 Features

3.7.3 L.C.D Screen

3.7.4 L.C.D Basic Commands

3.7.5 L.C.D Initialization

3.7.6 L.C.D Interfacing with the microcontroller


CHAPTER 4 EXPERIMENTATION 27 - 30

4.1 Working

4.1.1 Resistor

4.1.2 Capacitor

4.1.3 Transistor

4.1.4 Infrared Sensors

4.1.4.1 Active Infrared Sensors

4.1.4.2 Passive Infrared Sensors

4.2 Applications

CHAPTER 5 PROGRAM CODE 31 - 36

CHAPTER 6 CONCLUSION AND REFERENCES 37 - 38


LIST OF FIGURES

FIG NO. TITLE PAGE NO.

1 Block Diagram 1

2 Circuit Diagram 2

3 Pin Diagram 4

4 Architecture of 89C52 5

5 Reset Connection 8

6 On-Chip Oscillator 9

7 Crystals for Timing Purpose 11

8 Oscillator Circuit in microcontroller 13

9 Example of a Crystal Oscillator 14

10 Block Diagram of Power Supply 15

11 Step-Down Transformer 19

12 Block Diagram of R.P.S 19

13 Voltage Regulator 20

14 Buzzer Drive 22

15 Alphanumerical L.C.D 23

16 L.C.D Screen 24

17 Model of Automatic Speed Limiter 27


CHAPTER 1

INTRODUCTION

1.1 BLOCK DIAGRAM


On the road:

VEHICLE RF
ID IN ANTENNA
TK5530

In the vehicle:

RF
RECEIVER 125 KHz RF
ANTENNA RECEIVENG
MODULE

MICRO
RF CONTROL LCD MODULE
READER LER
MODULE

REL RELAY
AY
DRIV
ER
RESET LOGIC

OSCILLATOR

BUZZER
DRIVER BUZZER

Fig 1: Block Diagram


1
VCC
D? U?
4007 L7805
1 2
VIN VOUT

GN D
9v ? C? + GND C? +
BATTERY 1000/25 100/16

3
J?A

VCC
14A
13A
12A R?
11A 8.2K
RN1=? 10A
9A
VCC 8A
CON9
7A R?
6A 8.2K
VCC 5A

1
2
3
4
5
6
7
8
9
4A
VCC

1
2
3
4
5
6
7
8
9
3A
VCC 10k 2A
10/16 10mf /16v 1A

40
31
1.2 CIRCUIT DIAGRAM

9 39
10k 38 LCD
8.2K 37
36
35
34
10 33
32
AT89C52 +12v
RF Antenna 125KHz

RL?
28
33p 27 5
C? 26 3
18 4
Y? D? 1
33p 23 4148 2
C?
11.0592 22
19 21

20
1
2

Q?
BC547
VCC

Fig 2: Circuit Diagram


12 V

+
RFID Tag Buz
-
TK5530 D?
4007
Q?
BC547 Motor

2
CHAPTER 2

LITERATURE REVIEW
2.1 MICROCONTROLLER89C52

2.1.1 FEATURES:
 Compatible with MCS-51 Products.
 8K Bytes of In-System Reprogrammable Flash Memory.
 Endurance: 1,000 Write/Erase Cycles.
 Fully Static Operation: 0 Hz to 24 MHz
 Three-level Program Memory Lock.
 256 x 8-Bit Internal RAM.
 32 Programmable I/O Lines.
 Three 16-bit Timer/Counters.
 Eight Interrupt Sources.
 Programmable Serial Channel.
 Low Power Idle and Power Down Modes

2.1.2 PIN DIAGRAM AND ITS DESCRIPTION:

The microcontroller generic part number actually includes a whole family of


microcontrollers that have numbers ranging from 8031to 8751 and are available in N-Channel
Metal Oxide Silicon (NMOS) and Complementary Metal Oxide Silicon (CMOS) construction in
a variety of package types.

3
2.1.2.1 PIN DIAGRAM:

Fig 3: Pin Diagram

With 4Kbytes of Flash Programmable and Erasable Read Only Memory (PEROM).
The device is manufactured using Atmel’s high density nonvolatile memory technology and is
compatible with the industry standard MCS-51 instruction set and pinout. The on-chip Flash
allows the program memory to be reprogrammed in-system or by a conventional nonvolatile
memory programmer. By combining a versatile 8-bit CPU with Flash on a monolithic chip, the
Atmel AT89C52 is a powerful microcomputer which provides a highly flexible and cost-effective
solution to many embedded control applications.

4
The AT89C52 provides the following standard features: 4 Kbytes of Flash, 256 bytes
of RAM, 32 I/O lines, two 16-bit timer/counters, a five vector two-level interrupt architecture, a
full duplex serial port, on-chip oscillator and clock circuitry. In addition, the AT89C52 is designed
with static logic for operation down to zero frequency and supports two software selectable power
saving modes. The Idle Mode stops the CPU while allowing the RAM, timer/counters, serial port
and interrupt system to continue functioning. The Power Down Mode saves the RAM contents but
freezes the oscillator disabling all other chip functions until the next hardware reset.

2.1.3 ARCHITECTURE OF 89C52:

Fig 4: Architecture of 89C52

5
Port 0:

Port 0 is an 8-bit open drain bidirectional I/O port. As an output port each pin can sink
eight TTL inputs. When 1s are written to port 0 pins, the pins can be used as high-impedance
inputs. Port 0 may also be configured to be the multiplexed low order address/data bus during
accesses to external program and data memory. In this mode P0 has internal pull-ups. Port 0 also
receives the code bytes during Flash programming, and outputs the code bytes during program
verification. External pull-ups are required during program verification

Port 1:

Port 1 is an 8-bit bi-directional I/O port with internal pull-ups. The Port 1 output
buffers can sink/source four TTL inputs. When 1s are written to Port 1 pins they are pulled high
by the internal pull-ups and can be used as inputs. As inputs, Port 1 pins that are externally being
pulled low will source current (IIL) because of the internal pull-ups. Port 1 also receives the low-
order address bytes during Flash programming and program verification.

Alternate functions of port are,

Port 2:

Port 2 is an 8-bit bidirectional I/O port with internal pullups. The Port 2 output buffers
can sink/source four TTL inputs. When 1s are written to Port 2 pins they are pulled high by the
internal pull-ups and can be used as inputs. As inputs, Port 2 pins that are externally being pulled
low will source current (IIL) because of the internal pullups. Port 2 emits the high-order address
byte during fetches from external program memory and during accesses to external data
. 6
memory that use 16-bit addresses (MOVX A,@DPTR). In this application it uses strong internal
pull-ups when emitting 1s. During accesses to external data memory that uses 8-bit addresses
(MOVX A,@RI), Port 2 emits the contents of the P2 Special Function Register. Port 2 also receives
the high-order address bits and some control signals during Flash programming and verification.

Port 3:

Port 3 is an 8-bit bidirectional I/O port with internal pullups. The Port 3 output buffers
can sink/source four TTL inputs. When 1s are written to Port 3 pins they are pulled high by the
internal pullups and can be used as inputs. As inputs, Port 3 pins that are externally being pulled
low will source current (IIL) because of the pullups. Port 3 also serves the functions of various
special features of the AT89C52 as listed below:

Alternate functions of port 3 are,

RST:

RST means RESET; 89C52 uses an active high reset pin. It must go high for two
machine cycles. The simple RC circuit used here will supply voltage (Vcc) to reset pin until
capacitance begins to charge. At a threshold of about 2.5V, reset input reaches a low level and
system begin to run.

7
Fig 5: Reset Connection

ALE/PROG:

Address Latch Enable output pulse for latching the low byte of the address during
accesses to external memory. This pin is also the program pulse input (PROG) during Flash
programming. In normal operation ALE is emitted at a constant rate of 1/6 the oscillator frequency,
and may be used for external timing or clocking purposes. Note, however, that one ALE pulse is
skipped during each access to external Data Memory. If desired, ALE operation can be disabled
by setting bit 0 of SFR location 8EH. With the bit set, ALE is active only during a MOVX or
MOVC instruction. Otherwise, the pin is weakly pulled high. Setting the ALE-disable bit has no
effect if the microcontroller is in external execution mode.

PSEN:

Program Store Enable is the read strobe to external program memory. When the
AT89C52 is executing code from external program memory, PSEN is activated twice each
machine cycle, except that two PSEN activations are skipped during each access to external data
memory.

EA/VPP:

External Access Enable. EA must be strapped to GND in order to enable the device
to fetch code from external program memory locations starting at OOOOH up to FFFFH. Note,
however, that if lock bit 1 is programmed, EA will be internally latched on reset. EA should be
strapped to Vcc for internal program executions. This pin also receives the 12-volt programming

. 8
XTAL1: Input to the inverting oscillator amplifier and input to the internal clock operating circuit

XTAL2: Output from the inverting oscillator amplifier.

T2: External count input to Timer/Counter 2, Clock out.

T2EX: Counter 2 capture/reload trigger & direction control.

2.2 THE ON-CHIP OSCILLATORS:

Pins XTAL1 and XTAL2 are provided for connecting a resonant network to form an
oscillator. The crystal frequency is basic internal clock frequency. The maximum and minimum
frequencies are specified from 1to 24MHZ.

Program instructions may require one, two or four machine cycles to be executed
depending on type of instructions. To calculate the time any particular instructions will take to be
executed, the number of cycles ‘C’,

T = C*12d / Crystal frequency

Here, we chose frequency as 11.0592MHZ. This is because,

baud= 2*clock frequency/(32d. 12d[256d-TH1]).The oscillator is chosen to help generate both


standard and nonstandard baud rates. If standard baud rates are desired, an 11.0592MHZ crystal
should be selected. From our desired standard rate, TH1 can be calculated. The internally
implemented value of capacitance is 33 pf.

Fig 6: On-Chip Oscillators 9


2.2.1 Program Memory Lock Bits:

On the chip there are three lock bits which can be left unprogrammed (U) or can be
programmed (P) to obtain the additional features. When lock bit 1 is programmed, the logic level
at the EA pin is sampled and latched during reset. If the device is powered up without a reset, the
latch initializes to a random value, and holds that value until reset is activated. It is necessary that
the latched value of EA agree with the current logic level at that pin in order for the device to
function properly.

2.2.2 Program Counter and Data Pointer:

The 89C52 contains two 16-bit registers: the program counter (PC) and the data
pointer (DPTR), Each is used to hold the address of a byte in memory. The PC is the only register
that does not have an internal address. The DPTR is under the control of program instructions and
can be specified by its 16-bit name, DPTR, or by each individual byte name, DPH and DPL. DPTR
does not have a single internal address, DPH and DPL are each assigned an address.

2.2.3 A & B Registers:

The 89C52 contains 34 general-purpose, working, registers. Two of these, registers A


and B, hold results of many instructions, particularly math and logical operations, of the 89C52
CPU. The other 32 are arranged as part of internal RAM in four banks, B0-B3, of eight registers.
The A register is also used for all data transfers between the 89C52 and any external memory. The
B register is used for with the A register for multiplication and division operations.

2.2.4 Flags and the Program Status Word (PSW):

Flags may be conveniently addressed, they are grouped inside the program status word
(PSW) and the power control (PCON) registers.

10
CHAPTER 3
MATERIALS AND METHODS
3.1 CRYSTAL OSCILLATOR

A crystal oscillator (sometimes abbreviated to XTAL on schematic diagrams) is


an electronic circuit that uses the mechanical resonance of a physical crystal of piezoelectric
material along with an amplifier and feedback to create an electrical signal with a very precise
frequency.

It is an especially accurate form of an electronic oscillator. This frequency is


used to keep track of time (as in quartz wristwatches), to provide a stable clock signal for
digital integrated circuits, and to stabilize frequencies for radio transmitters.

Crystal oscillators are a common source of time and frequency signals. The
crystal used therein is sometimes called a "timing crystal".

Fig 7: Crystals for timing purposes

A miniature 4.000 MHz quartz timing crystal enclosed in an hermetically sealed


package.
A crystal is a solid in which the constituent atoms, molecules, or ions are packed
in a regularly ordered, repeating pattern extending in all three spatial dimensions.
11
Almost any object made of an elastic material could be used like a crystal, with
appropriate transducers, since all objects have natural resonant frequencies of vibration. For
example, steel is very elastic and has a high speed of sound. It was often used in mechanical
filters before quartz.
The resonant frequency depends on size, shape, elasticity and the speed of sound
in the material. High-frequency crystals are typically cut in the shape of a simple, rectangular
plate. Low-frequency crystals, such as those used in digital watches, are typically cut in the
shape of a tuning fork.
For applications not needing very precise timing, a low-cost ceramic resonator is
often used in place of a quartz crystal.
When a crystal of quartz is properly cut and mounted, it can be made to bend in
an electric field, by applying a voltage to an electrode near or on the crystal. This property is
known as piezoelectricity.
When the field is removed, the quartz will generate an electric field as it returns
to its previous shape, and this can generate a voltage. The result is that a quartz crystal behaves
like a circuit composed of an inductor, capacitor and resistor, with a precise resonant
frequency.
Quartz has the further advantage that its size changes very little with temperature.
Therefore, the resonant frequency of the plate, which depends on its size, will not change
much, either. This means that a quartz clock, filter or oscillator will remain accurate.
For critical applications the quartz oscillator is mounted in a temperature-
controlled container, called an crystal oven, and can also be mounted on shock absorbers to
prevent perturbation by external mechanical vibrations.
Quartz timing crystals are manufactured for frequencies from a few tens of
kilohertz to tens of megahertz. More than two billion (2 × 109) crystals are manufactured
annually. Most are small devices for wristwatches, clocks, and electronic circuits. However,
quartz crystals are also found inside test and measurement equipment, such as counters, signal
generators, and oscilloscopes.

12
Fig 8: Oscillator circuit in Micro controller

The crystal oscillator circuit sustains oscillation by taking a voltage signal from
the quartz resonator, amplifying it, and feeding it back to the resonator. The rate of expansion
and contraction of the quartz is the resonant frequency, and is determined by the cut and size
of the crystal.
A regular timing crystal contains two electrically conductive plates, with a slice
or tuning fork of quartz crystal sandwiched between them. During startup, the circuit around
the crystal applies a random noise AC signal to it, and purely by chance, a tiny fraction of the
noise will be at the resonant frequency of the crystal.
The crystal will therefore start oscillating in synchrony with that signal. As the
oscillator amplifies the signals coming out of the crystal, the crystal's frequency will become
stronger, eventually dominating the output of the oscillator. Natural resistance in the circuit
and in the quartz crystal filter out all the unwanted frequencies.
One of the most important traits of quartz crystal oscillators is that they can
exhibit very low phase noise. In other words, the signal they produce is a pure tone. This
makes them particularly useful in telecommunications where stable signals are needed, and in
scientific equipment where very precise time references are needed.
The output frequency of a quartz oscillator is either the fundamental resonance
or a multiple of the resonance, called an overtone frequency.
A typical Q for a quartz oscillator ranges from 104 to 106. The maximum Q for
a high stability quartz oscillator can be estimated as Q = 1.6 × 107/f, where f is the resonance
13
Environmental changes of temperature, humidity, pressure, and vibration can
change the resonant frequency of a quartz crystal, but there are several designs that reduce
these environmental effects. These include the TCXO, MCXO, and OCXO (defined below).
These designs (particularly the OCXO) often produce devices with excellent
short-term stability. The limitations in short-term stability are due mainly to noise from
electronic components in the oscillator circuits. Long term stability is limited by aging of the
crystal.
Due to aging and environmental factors such as temperature and vibration, it is
hard to keep even the best quartz oscillators within one part in 10-10 of their nominal
frequency without constant adjustment. For this reason, atomic oscillators are used for
applications that require better long-term stability and accuracy.
Although crystals can be fabricated for any desired resonant frequency, within
technological limits, in actual practice today engineers design crystal oscillator circuits around
relatively few standard frequencies, such as 10 MHz, 20 MHz and 40 MHz. Using frequency
dividers, frequency multipliers and phase locked loop circuits, it is possible to synthesize any
desired frequency from the reference frequency.
Care must be taken to use only one crystal oscillator source when designing
circuits to avoid subtle failure modes of metastability in electronics. If this is not possible, the
number of distinct crystal oscillators, PLLs, and their associated clock domains should be
rigorously minimized, through techniques such as using a subdivision of an existing clock
instead of a new crystal source.
Each new distinct crystal source needs to be rigorously justified since each one
introduces new difficult to debug probabilistic failure modes, due to multiple crystal
interactions, into equipment.

Fig 9: Example of A Crystal Oscillator


14
3.2 POWER SUPPLY

3.2.1 Description:

The Power Supply is a Primary requirement for the project work. The required DC
power supply for the base unit as well as for the recharging unit is derived from the mains line.
For this purpose center tapped secondary of 12V-012V transformer is used. From this transformer
we getting 5V power supply. In this +5V output is a regulated output and it is designed using 7805
positive voltage regulator.

Rectification is a process of rendering an alternating current or voltage into a


1unidirectional one. The component used for rectification is called ‘Rectifier’. A rectifier permits
current to flow only during positive half cycles of the applied AC voltage. Thus, pulsating DC is
obtained to obtain smooth DC power additional filter circuits required.

3.2.2 Circuit diagram:

+12v

1N4007 X
2

230v / 12v- 0 -12v 2200µF/25


500mA v
Transformer
100µF/25v

Fig 10: Block diagram of power supply

A diode can be used as rectifier. There are various types of diodes. However,
semiconductor diodes are very popularly used as rectifiers. A semiconductor diode is a solid-state

15
device consisting of two elements is being an electron emitter or cathode, the other an electron
collector or anode. Since electrons in a semiconductor diode can flow in one direction only-form
emitter to collector-the diode provides the unilateral conduction necessary for rectification.The
rectified Output is filtered for smoothening the DC, for this purpose capacitor is used in the filter
circuit. The filter capacitors are usually connected in parallel with the rectifier output and the load.
The AC can pass through a capacitor but DC cannot, the ripples are thus limited and the output
becomes smoothed. When the voltage across the capacitor plates tends to rise, it stores up energy
back into voltage and current. Thus, the fluctuation in the output voltage is reduced considerable.

3.3 VOLTAGE REGULATOR:

The LM 78XXX series of the three terminal regulations is available with several
fixed output voltages making them useful in a wide range of applications. One of these is
local on card regulation. The voltages available allow these regulators to be used in logic
systems, instrumentation and other solid state electronic equipment. Although designed
primarily as fixed voltage regulators, these devices can be used with external components to
obtain adjustable voltages and currents. The LM78XX series is available in aluminum to 3
packages which will allow over 1.5A load current if adequate heat sinking is provided.
Current limiting is included to limit the peak output current to a safe value. The LM 78XX is
available in the metal 3 leads to 5 and the plastic to 92. For this type, with adequate heat
sinking. The regulator can deliver 100mA output current.

The advantage of this type of regulator is, it is easy to use and minimize the number
of external components.

The following are the features voltage regulators:

a) Output current in excess of 1.5A for 78 and 78L series

b) Internal thermal overload protection

c) No external components required

d) Output transistor sage area protection

16
3.3.1 POSITIVE VOLTAGE REGULATOR:
The positive voltage regulator has different features like,

Output current up to 1.5A.

No external components.

Internal thermal overload protection.

High power dissipation capability.

Internal short-circuit current limiting.

Output transistor safe area compensation.

Direct replacements for Fairchild microA7800 series.

Nominal Regulator

Output
Voltage
5V uA7805C
6V uA7806C
8V uA7808C
8.5V uA7885C
10V uA7810C
12V uA7812C
15V uA7815C
18V uA7818C
24V uA7824C

3.4 TRANFORMER

3.4.1 INTRODUCTION:
A transformer is an electrical device that transfers energy from one circuit to another
by magnetic coupling, without requiring relative motion between its parts. A transformer
comprises two or more coupled windings, and, in most cases, a magnetic core to concentrate
magnetic flux. A changing voltage applied to one winding creates a time-varying magnetic flux
in the core, which induces a voltage in the other windings. The transformer is one of the simplest
of electrical devices, yet transformer designs and materials continue to be improved.
17
Transformers come in a range of sizes from a thumbnail-sized coupling transformer hidden
inside a stage microphone to huge gigawatt units used to interconnect large portions of national
power grids. All operate with the same basic principles and with many similarities in their parts.

3.4.2 PRINCIPLE:

A transformer can be likened to a mechanical gearbox, which transfers mechanical


energy from a high-speed, low torque shaft to a lower-speed, higher-torque shaft, but which is
Not a source of energy itself. A transformer transfers electrical energy from a high-current, low-
voltage circuit to a lower-current, higher-voltage circuit.

3.4.3 STEP DOWN TRANSFORMER:

The Power Supply is a Primary requirement for the project work. The required
DC power supply for the base unit as well as for the recharging unit is derived from the mains
line. For this purpose, center tapped secondary of 12V-012V transformer is used. From this
transformer we getting 5V power supply. In this +5V output is a regulated output and it is
designed using 7805 positive voltage regulators. This is a 3 Pin voltage regulator, can deliver
current up to 800 milliamps.
Rectification is a process of rendering an alternating current or voltage into a
unidirectional one. The component used for rectification is called ‘Rectifier’. A rectifier
permits current to flow only during positive half cycles of the applied AC voltage. Thus,
pulsating DC is obtained to obtain smooth DC power additional filter circuits required.
A diode can be used as rectifier. There are various types of diodes. However,
semiconductor diodes are very popularly used as rectifiers. A semiconductor diode is a solid-
state device consisting of two
The supply given is the +5V D.C. The incoming power is 230V A.C there is a
need to convert it into +5V D.C.

18
+12v

1N4007 X
2

230v / 12v- 0 -12v 2200µF/25


500mA v
Transformer
100µF/25v

Fig 11: Step-Down Transformer

The input A.C supply is stepped down from 230V to 9-0-9V. The rectifier
consists of diodes D1 and D2 makes the supply D.C. that is, unidirectional waveform. The
output from rectifier is a URDC, whose value is 12.726V peak to peak. The voltage regulator
makes this URDC to RDC of +5V. The capacitor C1 is used to maintain constant voltage
between two consecutive positive cycles where as C2 is used to remove the fluctuations
caused by regulator. Here we are selecting 12.726V as a peak value. Because of fluctuations,
the peak voltage may decrease, then regulator cannot step up to +5V. If we select peak value,
a higher one, then the problem can be overcome.

Fig 12: Block Diagram of R.P.S

19
A regulated power supply which maintains the output voltage constant
irrespective of A.C mains fluctuations or load variations is known as regulated power supply.
A regulated power supply consists of an ordinary power supply and voltage regulating device.
The output of ordinary power supply is fed to the voltage regulator which produces the final
output. The output voltage remains constant whether the load current changes or there are
fluctuations in the input A.C voltage.
The rectifier converts the transformer secondary A.C voltage into pulsating
voltage. The pulsating D.C voltage is applied to the capacitor filter. This filter reduces the
pulsations in the rectifier D.C output voltage. Finally, it reduces the variations in the filtered
output voltage.

3.5 VOLTAGE REGULATOR:

As the name itself implies, it regulates the input applied to it. A voltage regulator
is an electrical regulator designed to automatically maintain a constant voltage level. In this
project, power supply of 5V and 12V are required. In order to obtain these voltage levels,
7805 and 7812 voltage regulators are to be used. The first number 78 represents positive
supply and the numbers 05, 12 represent the required output voltage levels. The L78xx series
of three-terminal positive regulators is available in TO-220, TO-220FP, TO-3, D2PAK and
DPAK packages and several fixed output voltages, making it useful in a wide range of
applications. These regulators can provide local on-card regulation, eliminating the
distribution problems associated with single point regulation.

Fig 13: Voltage Regulator

20
Each type employs internal current limiting, thermal shut-down and safe area

protection, making it essentially indestructible. If adequate heat sinking is provided, they can

deliver over 1 A output current. Although designed primarily as fixed voltage regulators, these

devices can be used with external components to obtain adjustable voltage and currents.

3.6 BUZZER:
A buzzer or beeper is a signaling device, usually electronic, typically used in
automobiles, household appliances such as a microwave oven, or game shows. It most
commonly consists of a number of switches or sensors connected to a control unit that
determines if and which button was pushed or a preset time has lapsed, and usually illuminates
a light on the appropriate button or control panel, and sounds a warning in the form of a
continuous or intermittent buzzing or beeping sound.
Initially this device was based on an electromechanical system which was
identical to an electric bell without the metal gong (which makes the ringing noise). Often
these units were anchored to a wall or ceiling and used the ceiling or wall as a sounding board.
Another implementation with some AC- connected devices was to implement a circuit to
make the AC current into a noise loud enough to drive a loudspeaker and hook this circuit up
to a cheap 8-ohm speaker. Now-a-days, it is more popular to use a ceramic-based piezo-
electric sounder like a Son alert which makes a high-pitched tone. Usually these were hooked
up to “driver” circuits which varied the pitch of the sound or pulsed the sound on and off

3.6.1 Buzzer Driver:

The circuit is designed to control the buzzer. The buzzer ON and OFF is
controlled by the pair of switching transistors (BC 547). The buzzer is connected in the Q2
transistor collector terminal. When high pulse signal is given to base of the Q1 transistors, the
transistor is conducting and close the collector and emitter terminal so zero signals is given to
base of the Q2 transistor.
21
Transistor and buzzer is turned OFF state. When low pulse is given to base of
transistor Q1, the transistor is turned OFF. Now 12V is given to base of Q2 transistor so the
transistor is conducting and buzzer is energized and produces the sound signal.

VCC
12 V

+
Buz
-

Q?
BC547
D?
4007

Fig 14: Buzzer Driver

3.7 LIQUID CRYSTAL DISPLAY

3.7.1 INTRODUCTION:

LCD stands for Liquid Crystal Display. LCD is finding wide spread use replacing
LEDs (seven segment LEDs or other multi segment LEDs) because of the following reasons:

1. The declining prices of LCDs.


2. The ability to display numbers, characters and graphics. This is in contrast to
LEDs, which are limited to numbers and a few characters.
3. Incorporation of a refreshing controller into the LCD, thereby relieving the
CPU of the task of refreshing the LCD. In contrast, the LED must be refreshed by the
CPU to keep displaying the data.
4. Ease of programming for characters and graphics.

These components are “specialized” for being used with the microcontrollers,
which means that they cannot be activated by standard IC circuits. They are used for writing
different messages on a miniature LCD.
22
A model described here is for its low price and great possibilities most frequently
used in practice. It is based on the HD44780 microcontroller (Hitachi) and can display
messages in two lines with 16 characters each. It displays all the alphabets, Greek letters,
punctuation marks, mathematical symbols etc. In addition, it is possible to display symbols
that user makes up on its own. Automatic shifting message on display (shift left and right),
appearance of the pointer, backlight etc. are considered as useful characteristics.

3.7.2 FEATURES:

 Interface with either 4-bit or 8-bit microprocessor.


 Display data RAM
 80 8 bits (80 characters).
 Character generator ROM
 160 different 5 7 dot-matrix character patterns.
 Character generator RAM
 8 different user programmed 5 7 dot-matrix patterns.
 Display data RAM and character generator RAM may be
 accessed by the microprocessor.
 Numerous instructions
 Clear Display, Cursor Home, Display ON/OFF, Cursor
 ON/OFF, Blink Character, Cursor Shift, Display Shift.
 Built-in reset circuit is triggered at power ON.

Fig 15: A general purpose alphanumeric LCD,


with two lines of 16 characters.
23
3.7.3 LCD SCREEN:

LCD screen consists of two lines with 16 characters each. Each character consists
of 5x7 dot matrix. Contrast on display depends on the power supply voltage and whether
messages are displayed in one or two lines. For that reason, variable voltage 0-Vdd is applied
on pin marked as Vee. Trimmer potentiometer is usually used for that purpose. Some versions
of displays have built in backlight (blue or green diodes). When used during operating, a
resistor for current limitation should be used (like with any LE diode).

Fig 16: LCD Screen

3.7.4 LCD BASIC COMMANDS:

All data transferred to LCD through outputs D0-D7 will be interpreted as


commands or as data, which depends on logic state on pin RS:
RS = 1 - Bits D0 - D7 are addresses of characters that should be displayed. Built
in processor addresses built in “map of characters” and displays corresponding symbols.
Displaying position is determined by DDRAM address. This address is either previously
defined or the address of previously transferred character is automatically incremented.
RS = 0 - Bits D0 - D7 are commands which determine display mode. List of
commands which LCD recognizes are given in the table below:

I/D 1 = Increment (by 1) R/L 1 = Shift right

0 = Decrement (by 1) 0 = Shift left

24
S 1 = Display shift on DL 1 = 8-bit interface

0 = Display shift off 0 = 4-bit interface

D 1 = Display on N 1 =Display in two lines

0 = Display off 0 = Display in one line

U 1 = Cursor on F 1 = Character format 5x10 dots2

0 = Cursor off 0 = Character format 5x7 dots

B 1 = Cursor blink on D/C 1 = Display shift

0 = Cursor blink off 0 = Cursor shift

3.7.5 LCD INITIALIZATION:

Once the power supply is turned on, LCD is automatically cleared. This process
lasts for approximately 15mS. After that, display is ready to operate. The mode of operating is
set by default. This means that:
1. Display is cleared
2. Mode
DL = 1 Communication through 8-bit interface
N = 0 Messages are displayed in one line
F = 0 Character font 5 x 8 dots

3. Display/Cursor on/off
D = 0 Display off
U = 0 Cursor off
B = 0 Cursor blink off

25
4. Character entry
ID = 1 Addresses on display are automatically incremented by 1
S = 0 Display shift off

Automatic reset is mainly performed without any problems. Mainly but not
always! If for any reason power supply voltage does not reach full value in the course of
10mS, display will start perform completely unpredictably? If voltage supply unit can not
meet this condition or if it is needed to provide completely safe operating, the process of
initialization by which a new reset enabling display to operate normally must be applied.
Algorithm according to the initialization is being performed depends on whether
connection to the microcontroller is through 4- or 8-bit interface. All left over to be done after
that is to give basic commands and of course- to display messages.

3.7.6 LCD INTERFACING WITH THE MICROCONTROLLER:

Vcc
P2.0 4 (RS) 1
5 (R/W) 2 Gnd
P2.1
P2.2 6(EN) 3

LCD PRESET
(CONTRA
ST
CONTROL
89C51 P1.0 D0
P1.1 D1
P1.2 D2
P1.3 D3
P1.4 D4
D5 15 Vcc FOR
P1.5
D6 16 BACK
P1.6 Gnd
D7 LIGHT
P1.7

26
CHAPTER 4
EXPERIMENTATION
4.1 WORKING:

Fig 17: Model of Automatic Speed Limiter

4.1.1 RESISITOR:
Resistors limit current. In a typical application, a resistor is connected in series
with an LED:
Enough current flows to make the LED light up, but not so much that the LED is
damaged.
The 'box' symbol for a fixed resistor is popular in the UK and Europe. A 'zig-zag'
symbol is used in America and Japan:

Resistors are used with transducers to make sensor subsystems. Transducers


are electronic components which convert energy from one form into another, where one of
the forms of energy is electrical. A light dependent resistor, or LDR, is an example of an
input transducer. Changes in the brightness of the light shining onto the surface of the LDR
result in changes in its resistance. An input transducer is most often connected along with a
resistor to make a circuit called a potential divider.
27
In this case, the output of the potential divider will be a voltage signal which
reflects changes in illumination
Microphones and switches are input transducers. Output transducers include
loudspeakers, filament lamps and LEDs.
In other circuits, resistors are used to direct current flow to particular parts of the
circuit, or may be used to determine the voltage gain of an amplifier. Resistors are used with
capacitors to introduce time delays.
Most electronic circuits require resistors to make them work properly and it is
obviously important to find out something about the different types of resistor available, and
to be able to choose the correct resistor value, in , , or M , for a particular application.

4.1.2 CAPACITORS:

A capacitor or condenser is a passive electronic component consisting of a pair


of conductors separated by a dielectric. When a voltage potential difference exists between
the conductors, an electric field is present in the dielectric.
This field stores energy and produces a mechanical force between the plates.
The effect is greatest between wide, flat, parallel, narrowly separated conductors.
An ideal capacitor is characterized by a single constant value, capacitance,
which is measured in farads. This is the ratio of the electric charge on each conductor to the
potential difference between them.
In practice, the dielectric between the plates passes a small amount of leakage
current. The conductors and leads introduce an equivalent series resistance and the dielectric
has an electric field strength limit resulting in a breakdown voltage.
The properties of capacitors in a circuit may determine the resonant frequency
and quality factor of a resonant circuit, power dissipation and operating frequency in a
digital logic circuit, energy capacity in a high-power system, and many other important
system characteristics.
Many of these capacitors also have a capital letter to indicate their tolerance rating,
according to the following coding system.
28
4.1.3 TRANSISTOR:

A transistor is a semiconductor device used to amplify and switch electronic


signals. It is made of a solid piece of semiconductor material, with at least three terminals
for connection to an external circuit. A voltage or current applied to one pair of the
transistor's terminals changes the current flowing through another pair of terminals. Because
the controlled (output) power can be much more than the controlling (input) power, the
transistor provides amplification of a signal. Some transistors are packaged individually but
many more are found embedded in integrated circuits.

The transistor is the fundamental building block of modern electronic devices,


and its presence is ubiquitous in modern electronic systems

4.1.4 INFRARED SENSORS:

Active and passive infrared sensors are manufactured for traffic applications. The
sensors are mounted overhead to view approaching or departing traffic or traffic from a side-
looking configuration. Infrared sensors are used for signal control; volume, speed, and class
measurement, as well as detecting pedestrians in crosswalks. With infrared sensors, the word
detector takes on another meaning, namely the light-sensitive element that converts the
reflected or emitted energy into electrical signals. Real-time signal processing is used to
analyze the received signals for the presence of a vehicle.

4.1.4.1 ACTIVE INFRARED SENSOR:

Active infrared sensors illuminate detection zones with low power infrared
energy supplied by laser diodes operating in the near infrared region of the electromagnetic
spectrum at 0.85 m. The infrared energy reflected from vehicles traveling through the
detection zone is focused by an optical system onto an infrared-sensitive material mounted at
the focal plane of the optics.

29
The active infrared laser sensor has two sets of optics. The transmitting optics
split the pulsed laser diode output into two beams separated by several degrees as displayed
in Figure 24. The receiving optics has a wider field of view so that it can better receive the
energy scattered from the vehicles. By transmitting two or more beams, the laser radars
measure vehicle speed by recording the times at which the vehicle enters the detection area of
each beam.

4.1.4.2 PASSIVE INFRARED SENSORS:

Passive sensors detect the energy that is emitted from vehicles, road surfaces,
other objects in their field of view, and from the atmosphere, but they transmit no energy of
their own. Non-imaging passive infrared sensors used in traffic management applications
contain one or several (typically not more than five) energy-sensitive detector elements on the
focal plane that gather energy from the entire scene. The detector in a non-imaging sensor
generally has a large instantaneous field of view. The instantaneous field of view is equal to
the angle, e.g. in the x-y plane, subtended by a pixel. Objects within the scene cannot be further
divided into sub-objects or pixels (picture elements) with this device.
Imaging sensors, such as modern charge-coupled device (CCD) cameras, contain
two-dimensional arrays of detectors, each detector having a small instantaneous field of view.
The two-dimensional array gathers energy from the scene over an area corresponding to the
field of view of the entire array. Imaging sensors display the pixel-resolution details found in
the imaged area.

4.2 APPLICATIONS:
1. Automatic Speed Controller can be installed in an automobile and used for reducing
the vehicle speed.
2. It is used to prevent accidents at hospitals, schools and at required zones etc.
3. It is used for saving the fuel in the vehicle by slowing down the speed of vehicle.
4. It can be used any type of vehicle i.e. cars, lorries, buses, etc.
30
CHAPTER 5

PROGRAM CODE

;P1.0
;P1.1

;P0 = DISP DATA

;P2.7 = RS
;P2.6 = R/W
;P2.5 = EN

;P2.4=SW1
;P2.3=SW1
;P2.2=SW1

; 50H = DISP LOCATION ADD


; 51H = DISP VALUE
; 60H = voltage set value
; 61H = frq set value
; 70H = voltage READ value
; 71H = frq READ value

TXD MACRO
JNB TI,$
CLR TI
MOV SBUF,R6
MACEND
31
3

ORG 0
LJMP START
ORG 0050H
START:

CLR P2.0
CLR P2.1

LCALL LCDINI
LCALL DEL

MOV DPTR,#0900H
LCALL TLINE
MOV DPTR,#0910H
LCALL BLINE

LCALL SSEC

MOV DPTR,#0920H
LCALL TLINE
MOV DPTR,#0930H
LCALL BLINE

;********* READ VAL DISP ***********


MOV R6,#FFH

XX1: LCALL SSEN

32
CLR A
MOV A,51H
CPL A
MOV 51H,A

MOV 50H,#8BH
MOV A,51H
MOV 70H,A
LCALL VFDIS
;-------------
MOV 75H,#00H
LCALL SCOMP
CLR A
MOV A,75H
CJNE A,#01H,XX2
SETB P2.0
SETB P2.1
LJMP XX1

XX2: CLR P2.0


CLR P2.1
LJMP XX1

;*********** VOL COMP *********


TLINE: CLR p2.7
CLR p2.6
MOV P0,#80H
LCALL WRI
MOV R7,#00H
TKL:
CLR A 33
MOVC A,@A+DPTR
MOV P0,A
LCALL WRD
INC DPTR
INC R7
CJNE R7,#10H,TKL
RET

BLINE: CLR p2.7


CLR p2.6
MOV P0,#C0H
LCALL WRI
MOV R7,#00H
BKL:
CLR A
MOVC A,@A+DPTR
MOV P0,A
LCALL WRD
INC DPTR
INC R7
CJNE R7,#10H,BKL
RET
********* SPEED SENSE ************

SSEN: ;MOV PSW,#18H

JNB P1.0,EXITX

MOV R6,#00H

mov r2,#05H 34
SD1: mov r3,#FFH
SD2: mov r4,#FFH

WE:
JB P1.1,EXITX

MOV R0,#FFH
DJNZ R0,$
JB P1.1,WE

INC R6
;-----------------
MOV R5,#01H
GBY: MOV R1,#05H
GBX: JB P1.1,EXITX
MOV R0,#FFH
DJNZ R0,$
DJNZ R1,GBX
DJNZ R5,GBY
;----------------
VVVV: CJNE R6,#FFH,WEE
LJMP WER

WEE: djnz r4,WE


djnz r3,SD2
djnz r2,SD1

WER:
EXITX:
MOV 51H,R6
MOV PSW,#00H 35
RET
;*********** VOL COMP *********
SCOMP: CLR C
CLR A
MOV A,#64H ;SET VOL DATA
CJNE A,70H,GTLS1
RET
GTLS1: JNC GT1
MOV 75H,#01H
GT1: RET
;------------------------
;##############################

36
CHAPTER 6
CONCLUSION

The main objective of the project is to control the speed of vehicles at sensitive zones which
exceed the specified speed limit.

The RF transmitter in the vehicle continuously transmits the data and searches for the RF
code. When it receives a code, it transmits that code to the micro controller and comparison of
that code is done in the micro controller. If that code matches with sensitive zone`s starting code,
it activates the control relay and car speed is reduced. Again, if the sensitive zones ending code
is received, the micro controller automatically de-activates the control relay and the vehicle`s
speed is attained to normal state.

37
FUTURE SCOPE

 We can modify the system with the help of GPS to identify the respective zones.
 We can also modify the system with efficient braking system in association with air
flow control to the carburetor.
 This system can be more effectively used for any kind of automobiles such as lorries,
buses, cars, bikes etc.

REFERENCES

 Kenneth J. Ayala, The 8051Microcontroller.

 Muhammad Ali Mazidi, The 8051 Microcontroller and Embedded Systems.

 Vijay Garg, Principles and Applications of GSM.

38

También podría gustarte