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

A Project

on
AUTOMATIC RAILWAY GATE CONTROL SYSTEM
INTEGRATED B.TECH+M.TECH
in
ELECTRONICS AND COMMUNICATION TECHNOLOGY

Submitted by:
Rohit Saini

Enrollment No.-11/IEC/084

Pankaj Saha

Enrollment No.-11/IEC/070

Mohit Kumar

Enrollment No.-10/IEC/061R

Nitin Kain

Enrollment No.-11/IEC/068

Supervised by:
Mr. Rajendra Bahadur Singh
Faculty Associate

SCHOOL OF INFORMATION AND COMMUNICATION TECHNOLOGY


GAUTAM BUDDHA UNIVERSITY, greater noida-201312, GAUTAM
BUDH NAGAR, UTTAR PRADESH, INDIA
November, 2014

ABSTRACT:-

This project work aims at the design, development and testing of working model
entitled Automatic Railway Gate Controller. This paper is to provide an automatic
railway gate at a level crossing replacing the gates operated by the gatekeeper. It is
basically related to Radio communication and signaling system. The points or
places where the Railway track crosses the road are called level crossings. Level
crossings cannot be used simultaneously both by road traffic and trains, as this
result in accidents leading to loss of precious lives. This type of gates can be
employed in an unmanned level crossing where the chances of accidents are higher
and reliable operation is required. Since, the operation is automatic; error due to
manual operation is prevented. The model of railway track controller is designed
by using Atmel 89S52 microcontroller, IR sensors and LDR to avoid railway
accidents. By employing the automatic railway gate control at the level crossing
the arrival of the train is detected by the sensor placed near to the gate. Hence, the
time for which it is closed is less compared to the manually operated gates and also
reduces the human labour. Automatic railway gate control is highly economical
microcontroller based arrangement, designed for use in almost all the unmanned
level crossings in the country.
Keywords: LED, Atmel 89s52 Microcontroller, IR Transceiver, Automatic railway
gate control system, LDR.

INDEX
S.no
page No

List of contents

1) Introduction
i. Introduction
ii. Block diagram & Description

05
07

2) Introduction to microcontroller
i. Introduction to micro controller
ii. AT 89S52 Microcontroller

08-09
10-14

3) DC motor
i. Introduction to DC motor
ii. Types & applications.

15-17
18 -19

i. Introduction to L293D
ii. Pin description of L293D

20-21
22-24

4) L293D IC

5) LM 324 IC
i. LM 324 & Features

6) Light Dependable Resistor

25-27

28-30

7) 555 IC and Infrared Sensors


i. Introduction to 555 IC

31-33

ii. Infrared sensors

34-35

8) Regulated Power Supply


I.

Regulated Power Supply & Features

36-38

9) Working of Project and Flow chart


i. Working of project
ii. Flow chart

39-40
41

10) Conclusion

42-43

11) Bibliography

44-45

12)

CHAPTER 1
INTRODUCTION

1.1 INTRODUCTION
Aim of this project is to control the unmanned rail gate automatically using
embedded platform. Today often we see newspapers very often about the railway
accidents happening at un- attended railway gates. Present project is designed to
avoid such accidents if implemented in spirit. This project is developed in order to
help the INDIAN RAILWAYS in making its present working system a better one,
by eliminating some of the loopholes existing in it. Based on the responses and
reports obtained as a result of the significant development in the working system of
INDIAN RAILWAYS, this project can be further extended to meet the demands
according to situation. This can be further implemented to have control room to
regulate the working of the system. Thus becomes the user friendliness.
This system is to manage the control system of railway gate using the
microcontroller. The main purpose of this system is about railway gate control
system and level crossing between railroad and highway for decreasing railroadrelated accident and increasing safety. In addition, it also provides safety road users
by reducing the accidents that usually occur due to carelessness of road users and
errors made by the gatekeepers.
In this project AT89s52 Micro controller Integrated Chip plays the main role.
The program for this project is embedded in this Micro controller Integrated Chip
and interfaced to all the peripherals. The timer program is inside the Micro
controller IC to maintain all the functions as per the scheduled time. Keil compiler
is used for the making of code and hex file.

1.2 Block diagram

CHAPTER 2
INTRODUCTION TO MICROCONTROLLER

2.1 INTRODUCTION TO MICROCONTROLLER:


A computer-on-a-chip is a variation of a microprocessor, which combines
the processor core (CPU), some memory, and I/O (input/output) lines, all on one
chip. The computer-on-a-chip is called the microcomputer whose proper meaning
is a computer using a (number of) microprocessor(s) as its CPUs, while the
concept of the microcomputer is known to be a microcontroller. A microcontroller
can be viewed as a set of digital logic circuits integrated on a single silicon chip.
This chip is used for only specific applications.
ADVANTAGES OF MICROCONTROLLER:
A designer will use a Microcontroller to
1. Gather input from various sensors
2. Process this input into a set of actions
3. Use the output mechanisms on the Microcontroller to do something useful
4. RAM and ROM are inbuilt in the MC.
5. Multi machine control is possible simultaneously.
6. ROM, EPROM, [EEPROM] or Flash memory for program and operating
parameter storage.
Examples:
8051, 89C51 (ATMAL), PIC (Microchip), Motorola (Motorola), ARM
Processor.
Applications: Cell phones, Computers, Robots, Interfacing to two pcs.
9

2.2 AT89S52 MICTROCONTROLLER:


Description:
The AT89S52 is a low-power, high-performance CMOS 8-bit microcontroller
with 8K bytes of in-system programmable Flash memory. The device is
manufactured using Atmels high-density nonvolatile memory technology and is
compatible with the industry-standard 80C51 instruction set and pin out. The onchip 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 in-system programmable Flash on a monolithic chip, the Atmel
AT89S52 is a powerful microcontroller which provides a highly-flexible and costeffective solution to many embedded control applications.

2.2.1 Features
Compatible with MCS-51 Products
8K Bytes of In-System Programmable (ISP) Flash Memory Endurance:
1000 Write/Erase Cycles
4.0V to 5.5V Operating Range
Fully Static Operation: 0 Hz to 33 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
Full Duplex UART Serial Channel
Low-power Idle and Power-down Modes
Interrupt Recovery from Power-down Mode
10

Watchdog Timer
Dual Data Pointer

2.2.2 Architecture

Fig 2.1 Architecture of AT89S52

11

2.2.3 PIN Diagram of 89s52 Microcontroller


DIP

Fig 2.2 Pin diagram of 89S52

12

2.2.4 Pin Description


Pin ( 32 39 ) Port 0: Port 0 is an 8-bit open drain bidirectional port. As an open
drain output port, it can sink eight LS TTL loads. Port 0 pins that have 1s written to
them float, and in that state will function as high impedance inputs. Port 0 is also
the multiplexed low-order address and data bus during accesses to external
memory. In this application it uses strong internal pull ups when emitting 1s. Port 0
emits code bytes during program verification. In this application, external pull ups
are required.
Pin ( 1- 8 ) Port 1: Port 1 is an 8-bit bidirectional I/O port with internal pull ups.
Port 1 pins that have 1s written to them are pulled high by the internal pull ups, and
in that state can be used as inputs. As inputs, port 1 pins that are externally being
pulled low will source current because of the internal pull ups.
Alternate Functions of Port 1 used for In system Programmable
P.5

MOSI --------- Instruction Input

P.6

MISO ---------- Data Output

P.7

SCK ----------- Clk in

Pin ( 21 28 ) Port 2: Port 2 is an 8-bit bidirectional I/O port with internal pull
ups. Port 2 emits the high-order address byte during accesses to external memory
that use 16-bit addresses. In this application, it uses the strong internal pull ups
when emitting 1s.
Pin (10 17) Port 3: Port 3 is an 8-bit bidirectional I/O port with internal pull
ups. It also serves the functions of various special features of the 80C51 Family as
follows:
Port Pin Alternate Function
P3.0- RxD (serial input port)
P3.1 -TxD (serial output port)
P3.2 -INT0 (external interrupt 0)
13

P3.3- INT1 (external interrupt 1)


P3.4 -T0 (timer 0 external input)
P3.5 -T1 (timer 1 external input)
P3.6 -WR (external data memory write strobe)
P3.7 -RD (external data memory read strobe)
Pin 40 VCC: -Supply voltage
Pin 20 VSS: -Circuit ground potential
Pin 29 PSEN: Program Store Enable is the read strobe to external Program
Memory. When the device is executing out of external Program Memory, PSEN is
activated twice each machine cycle (except that two PSEN activations are skipped
during accesses to external Data Memory). PSEN is not activated when the device
is executing out of internal Program Memory.
Pin 30 ALE/PROG: Address Latch Enable output pulse for latching the low byte
of the address during accesses to external memory. ALE is emitted at a constant
rate of 1/6 of the oscillator frequency, for external timing or clocking purposes,
even when there are no accesses to external memory. (However, one ALE pulse is
skipped during each access to external Data Memory.) This pin is also the program
pulse input (PROG) during EPROM programming.
Pin 31 EA/VPP: When EA is held high the CPU executes out of internal Program
Memory. Holding EA low forces the CPU to execute out of external memory
regardless of the Program Counter value. In the 80C31, EA must be externally
wired low. In the EPROM devices, this pin also receives the programming supply
voltage (VPP) during EPROM programming.
Pin 18 XTAL1: Input to the inverting oscillator amplifier.
Pin 19 XTAL2: Output from the inverting oscillator amplifier.

14

CHAPTER 3
DC MOTOR

15

DC Motor
3.1 Introduction to DC motor:
Almost every mechanical movement that we see around us is accomplished by an
electric motor. Motors take electrical energy and produce mechanical energy.
A direct current (DC) motor is a fairly simple electric motor that uses electricity
and a magnetic field to produce torque, which causes it to turn. At its most simple,
it requires two magnets of opposite polarity and an electric coil, which acts as an
electromagnet. The repellent and attractive electromagnetic forces of the magnets
provide the torque that causes the motor to turn.

3.2 Construction
DC motors consist of one set of coils, called armature winding, inside another
set of coils or a set of permanent magnets, called the stator. Applying a voltage to
the coils produces a torque in the armature, resulting in motion.
Stator
The stator is the stationary outside part of a motor.
The stator of a permanent magnet dc motor is composed of two or more
permanent magnet pole pieces.
The magnetic field can alternatively be created by an electromagnet. In this
case, a DC coil (field
winding) is wound around a magnetic material that forms part of the stator.
Rotor
The rotor is the inner part which rotates.
The rotor is composed of windings (called armature windings) which are
connected to the external
circuit through a mechanical commutator.
Both stator and rotor are made of ferromagnetic materials. The two are
separated by air-gap.
16

Winding
A winding is made up of series or parallel connection of coils.
Armature winding - The winding through which the voltage is applied or
induced.
Field winding - The winding through which a current is passed to produce
flux (for the electromagnet)
Windings are usually made of copper.

3.3 Principle of operation


This DC or direct current motor works on the principal, when a current
carrying conductor is placed in a magnetic field, it experiences a torque and has a
tendency to move. This is known as motoring action. If the direction of current in
the wire is reversed, the direction of rotation also reverses. When magnetic field
and electric field interact they produce a mechanical force, and based on that the
working principle of dc motor established.

The direction of rotation of a this motor is given by Flemings left hand rule,
which states that if the index finger, middle finger and thumb of your left hand are
extended mutually perpendicular to each other and if the index finger represents
the direction of magnetic field, middle finger indicates the direction of current,
then the thumb represents the direction in which force is experienced by the shaft
of the dc motor.
Structurally and construction wise a direct current motor is exactly similar to a
DC generator, but electrically it is just the opposite. Here we unlike a generator we
supply electrical energy to the input port and derive mechanical energy from the
output port.
17

3.4 Types of DC motors


1. Shunt DC motor: The rotor and stator windings are connected in parallel.
2. Sparately Excited motor: The rotor and stator are each connected from a
different power supply, this gives another degree of freedom for controlling
the motor over the shunt.

3. Series motor: the stator and rotor windings are connected in series. Thus the
torque is proportional to I2 so it gives the highest torque per current ratio
over all other dc motors. It is therefore used in starter motors of cars and
elevator motors (p. 563 Chapman, 4e, 2005 McGrow Hill).
4. Permanent Magnet (PMDC) motors: The stator is a permanent magnet, so
the motor is smaller in size.

5. Compouned motor: the stator is connected to the rotor through a compound


of shunt and series windings, if the shunt and series windings add up
together, the motor is called comulatively compounded. If they subtract
from each other, then a differentially compounded motor results, which is
unsuitable for any application.

3.5 Motor used in project


DC High-speed Motor - RF-310TA-11400
Specifications:
Compact, efficient, lightweight, and powerful
No load condition:

18

a) 2800rpm
b) 0.017A current
Maximum efficiency condition:
a) 2200rpm
b) 0.06A current
Torque: 15g-cm torque @ 0.22A
OPERATING VOLTAGE = 2.5 volt

3.6 Applications:
1. The series DC motor is an industry workhorse for both high and low power,
fixed
and
variable
speed
electric
drives.
Applications range from cheap toys to automotive applications.
2. They are inexpensive to manufacture and are used in variable speed
household appliances such as sewing machines and power tools.
3. Its high starting torque makes it particularly suitable for a wide range of
traction applications.
4. Train and automotive traction applications.

19

CHAPTER 4
L293D MOTOR DRIVER

20

4.1 Introduction to L293D IC


L293D IC generally comes as a standard 16-pin DIP (dual-in line package).
This motor driver IC can simultaneously control two small motors in either
direction; forward and reverse with just 4 microcontroller pins (if you do not use
enable pins). Some of the features (and drawbacks) of this IC are:
1. Output current capability is limited to 600mA per channel with peak output
current limited to 1.2A (non-repetitive). This means you cannot drive bigger
motors with this IC. However, most small motors used in hobby robotics
should work. If you are unsure whether the IC can handle a particular motor,
connect the IC to its circuit and run the motor with your finger on the IC. If
it gets really hot, then beware... Also note the words "non-repetitive"; if the
current output repeatedly reaches 1.2A, it might destroy the drive transistors.
2. Supply voltage can be as large as 36 Volts. This means you do not have to
worry much about voltage regulation.
3. L293D has an enable facility which helps you enable the IC output pins. If
an enable pin is set to logic high, then state of the inputs match the state of
the outputs. If you pull this low, then the outputs will be turned off
regardless of the input states
4. The datasheet also mentions an "over temperature protection" built into the
IC. This means an internal sensor senses its internal temperature and stops
driving the motors if the temperature crosses a set point
21

5. Another major feature of L293D is its internal clamp diodes. This flyback
diode helps protect the driver IC from voltage spikes that occur when the
motor coil is turned on and off (mostly when turned off)
6. The logical low in the IC is set to 1.5V. This means the pin is set high only if
the voltage across the pin crosses 1.5V which makes it suitable for use in
high frequency applications like switching applications (upto 5KHz)
7. Lastly, this integrated circuit not only drives DC motors, but can also be
used to drive relay solenoids, stepper motors etc.

4.2 Pin Diagram of L293D Motor Driver

Fig 4.1 Pin diagram of L293D

4.2.1 Pin Description:


Pin No
1
2
3
4

Function
Enable pin for Motor 1; active high
Input 1 for Motor 1
Output 1 for Motor 1
Ground (0V)

Name
Enable 1,2
Input 1
Output 1
Ground

22

5
6
7
8
9
10
11
12
13
14
15
16

Ground (0V)
Output 2 for Motor 1
Input 2 for Motor 1
Supply voltage for Motors; 9-12V (up to 36V)
Enable pin for Motor 2; active high
Input 1 for Motor 1
Output 1 for Motor 1
Ground (0V)
Ground (0V)
Output 2 for Motor 1
Input2 for Motor 1
Supply voltage; 5V (up to 36V)

Ground
Output 2
Input 2
Vcc 2
Enable 3,4
Input 3
Output 3
Ground
Ground
Output 4
Input 4

Vcc 1

4.2 Block Diagram

23

4.4 L293D Connections


The circuit shown to the right is the most basic implementation of L293D IC.
There are 16 pins sticking out of this IC and we have to understand the
functionality of each pin before implementing this in a circuit
1. Pin1 and Pin9 are "Enable" pins. They should be connected to +5V for the
drivers to function. If they pulled low (GND), then the outputs will be turned
off regardless of the input states, stopping the motors. If you have two spare
pins in your microcontroller, connect these pins to the microcontroller, or
just connect them to regulated positive 5 Volts.

2. Pin4, Pin5, Pin12 and Pin13 are ground pins which should ideally be
connected to microcontroller's ground.

3. Pin2, Pin7, Pin10 and Pin15 are logic input pins. These are control pins
which should be connected to microcontroller pins. Pin2 and Pin7 control
the first motor (left); Pin10 and Pin15 control the second motor(right).
24

4. Pin3, Pin6, Pin11, and Pin14 are output pins. Tie Pin3 and Pin6 to the first
motor, Pin11 and Pin14 to second motor.

5. Pin16 powers the IC and it should be connected


to regulated +5Volts.

6. Pin8 powers the two motors and should be


connected to positive lead of a secondary battery.
As per the datasheet, supply voltage can be as
high as 36 Volts.

25

CHAPTER 5
LM 324 IC

26

LM 324:
5.1 Introduction:
These amplifiers are designed to specifically to operate from a solitary supply
over a wide range of voltages. Also can function when the difference between the
two supplies is 3V to 30V and VCC is at least 1.5V more positive than the input
common mode voltage.

27

Fig: 5.1 Pin diagram of LM324

5.2 Pin Descriptions


V+ = Supply voltage
GND = Gnd (0V) connection for supply voltage
Input(s) = Input to Op-Amp
Output(s) = Output of Op-Amp

5.2.1 Features:
Supply voltage V + : +32VDC or +16VDC

28

Differential Input Voltage : 32VDC


Input Voltage : -0.3VDC to +32VDC
Power Dissipation : 570mW
Operating Temperature : 0 to 70C degree
Output Current Source : Typical 40mA
Output Current Source : Typical 40mA
Output Current Sink : Typical 20mA
Input Offset Voltage : Typical 2.0mVDC
Operates on a single supply over a range of voltages

Unique features:
In the linear mode, the input common-mode voltage range includes
ground and the output voltage can also swing to ground, even though operated
from only a single power supply voltage. The unity gain crossover frequency
and the input bias current are temperature-compensated.
5.3 Applications:
In Transducer amplifiers.
DC amplification blocks and conventional operations.

29

CHAPTER 6
LIGHT DEPENDENT RESISTOR

LIGHT DEPENDENT RESISTOR


6.1 Description:
30

This practical is about using a light dependent resistor (LDR) as a sensor.


The LDR must be part of a voltage divider circuit in order to give an output
voltage, Vout , which changes with illumination.
A light dependent resistor is a resistor whose resistance decreases with
increasing incident light intensity. It can also be referenced as a photo conductor.
An LDR is made of a high resistance semiconductor. If light falling on the device
is of high enough frequency, photons absorbed by the semiconductor give bound
electrons enough energy to jump into the conduction band. The resulting free
electron (and its hole partner) conduct electricity, thereby lowering resistance.
An LDR device can be either intrinsic or extrinsic. An intrinsic semiconductor
has its own charge carriers and is not an efficient semiconductor, e.g. silicon. In
intrinsic devices the only available electrons are in the valence band, and hence the
photon must have enough energy to excite the electron across the entire band gap.
Extrinsic devices have impurities, also called do pants, and added whose ground
state energy is closer to the conduction band; since the electrons do not have as far
to jump, lower energy photons (i.e., longer wavelengths and lower frequencies) are
sufficient to trigger the device. If a sample of silicon has some of its atoms
replaced by phosphorus atoms (impurities), there will be extra electrons available
for conduction.

Fig 6.1.1 Light dependent resistor

Note that an LDR responds in an extremely non-linear way to the light intensity.
The resistance of a LDR changes from a few meg-ohms in dim light to a few kilo
31

ohms in bright light (maybe even a few ohms depending upon the light intensity
and LDR used.). So I would suggest that u first connect the LDR as
VCC ------ LDR------- LM 324 -------- Microcontroller.
and plot the voltage across the 1K resistor with respect to different light intensities
on the LDR.Then connect this voltage output to a ADC via a simple non-inverting
op-amp

amplifier

and

connect

the

ADC

to

the

Microcontroller.

Applications:
Camera light meters, street lights, clock radios, alarms, and outdoor clocks.
They are also used in so dynamic compressors together with a small
incandescent lamp or light emitting diode to control gain reduction.
Lead sulfide and Indium sulfide LDRs are used for the mid infrared spectral
region.Ge: Cu photoconductors are among the best far-infrared detectors
available, and are used for infrared astronomy and infrared spectroscopy.

32

CHAPTER 7
555 IC AND INFRARED SENSORS

7.1 Introduction to 555 IC


The 555 integrated circuit is an extremely versatile timer that can be used in
many different applications. This IC is a monolithic timing circuit that is a highly
stable controller capable of producing accurate time delays or oscillations. For a
stable operation as an oscillator, the free running frequency and the duty cycle are
both accurately controlled with two external resistors and one capacitor. The circuit
may be triggered and reset on falling waveforms, and the output structure can
source or sink up to 200ma or drive TTL Circuits.

33

This integrated circuit contains nearly 25 transistor, a diode or two, and more
than 10 resistors. Obviously, if you built this IC from separate components, it
would be many, many times larger than on a monolithic chip.
The 555 timer offers timing from microseconds through hours and operates
in both astable and monostable modes. It has an adjustable duty cycle, and the
output can drive TTL devices. Its output can operate in normally on and normally
off modes and the IC offers a frequency stability of 0.005% per degrees centigrade.
7.1.1 Block Diagram

Fig. 7.1.1 555 IC block Diagram

7.1.2 Pin Diagram:

34

7.1.3 Pin Description:


Pin No

Function

Name

1
2
3
4
5

Ground (0V)
Voltage below 1/3 Vcc to trigger the pulse
Pulsating output
Active low; interrupts the timing interval at Output
Provides access to the internal voltage divider; default 2/3 Vcc

Ground
Trigger
Output
Reset
Control Voltage

6
7
8

The pulse ends when the voltage is greater than Control


Open collector output; to discharge the capacitor
Supply voltage; 5V (4.5V - 16 V)

Threshold
Discharge
Vcc

7.1.4 Features :
Timing from micro seconds through hours
Monostable and Astable operation
Adjustable duty cycle
Ability to operate from a wide range of supply voltages
Output compatible with CMOS, DTL and TTL (when used with
appropriate supply voltage)
High current output that can sink or source 200 mA
Trigger and reset inputs are logic compatible
Output can be operated normal ON and OFF
High temperature stability

35

7.1.5 Applications
Applications for the 555 chip include precision timing, pulse generation, pulse
width modulation, pulse position modulation, sequential timing, and missing pulse
detection.

INFRARED SENSORS
7.2 Introduction
IR transceiver is used here for determining the arrival and departure of train.
This is done by using IR Transceiver in which presence of train is detected as
logical zero.
A. Transmitter
The Infrared Emitting Diode (IR333/H0/L10) is a high intensity diode, molded
in a blue transparent package. The device is spectrally matched with
phototransistor, photodiode and IR receiver module. It finds applications in IR
remote control units, smoke detectors, free air transmission systems etc.
B. Receiver
The IR LED converts the incident IR radiations to an equivalent electric current
which when passed through a resistor results in a certain amount of voltage drop.
This value of voltage will depend upon the intensity of incident IR radiations or in
other words, the distance between IR transmitter and receiver. The receiver is
connected in reverse bias n the circuit. The IR rays emitted by the transmitter get
reflected back after hitting the target. Receiver coverts this received radiations to a
corresponding electric current.

36

Fig 7.2.1 IR circuit

7.2.1 Working of the infrared sensor Circuit


In this IR detector and transmitter circuit the IC 555 is working under
MONOSTABLE mode. The pin 2 i.e. trigger pin and when grounded via IR
receiver, the pin 3 output is low. As soon as the IR light beam transmitted is
obstructed, a momentary pulse actuates the relay output (or LED). The IR
transmitter is simple series connected resistor network from battery. The timing
capacitor connected to pin 6 and 7 to ground. The time can varied as per
requirement by changing the R value.

37

CHAPTER 8
REGULATED POWERSUPPLY

38

8.1 REGULATED POWER SUPPLY:


A variable regulated power supply,also called a variable bench power supply,is
one which you can continuously adjust the output voltage to your requirements.
Varying the output of the power supply is recommended way to test a project after
having double checked parts placement against circuit drawings and the parts
placement
This type of regulation is ideal for having a simple variable bench power
supply. Actually this is quite important

because one of the first projects a

hobbyist should undertake is the construction of a variable regulated power


supply. While a dedicated supply is quite handy e.g 5V or 12V,its much handier to
have a variable supply on hand, especially for testing.
Most digital logic circuits and processors need a 5 volt power supply. To use
these parts we need to build a regulated 5 volt source. Usually you start with an
unregulated power to make a 5 volt power supply, we use a LM7805 voltage regulator
IC (Integrated Circuit).

Fig: 8.1.1 LM 7805 block diagram

39

Fig: 8.1.2 Pin representation of LM 7805


The LM7805 is simple to use. You simply connect the positive lead of your
unregulated DC power supply(anything from 9VDC to 24VDC) to the Input pin,
connect the negative lead to the Common pin and then when you turn on the
power, you get a 5 volt supply from the Output pin.
Circuit features:
Brief description of operation: Gives out well regulated +5V output,
output current capability of 100mA.
Circuit protection: Built-in overheating protection shuts down output
when regulator IC gets too hot.
Circuit complexity: Very simple and easy to build.
Circuit performance: Very stable +5V output voltage, reliable
operation
Availability of components: Easy to get, uses only very common basic
components.
Design testing: Based on datasheet example circuit, I have used this
circuit successfully as part of many electronic projects.
Applications: Part of electronics devices, small laboratory power
supply

40

CHAPTER 9
WORKING OF PROJECT AND FLOW CHART

41

9.1 WORKING OF MODEL

It deals with two things. Firstly, it deals with the reduction of time for which
the gate is being kept closed. And secondly, to provide safety to the road users by
reducing the accidents that usually occur due to carelessness of road users and at
times errors made by the gatekeepers.
By employing the automatic railway gate control at the level crossing the
arrival of train is detected by the sensor placed on either side of the gate at about
4km from the level crossing. Once the arrival is sensed, the sensed signal is sent to
the microcontroller and it checks for possible presence of vehicle between the
gates, again using sensors. Subsequently, buzzer indication and light signals on
either side are provided to the road users indicating the closure of gates. Once, no
vehicle is sensed in between the gate the motor is activated and the gates are
closed.
But, for the worst case if any obstacle is sensed, it is indicated to the train
driver by signals (RED) placed at about 2km, so as to bring it to halt well before
42

the level crossing. When no obstacle is sensed GREEN light is indicated, and the
train is to free to move. The departure of the train is detected by sensors placed at
about 1km from the gate. The signal about the departure is sent to the
microcontroller, which in turn operates the motor and opens the gate. Thus, the
time for which the gate is closed is less compared to the manually operated gates.

9.2 FLOW CHART


START

43

Make the initial


settings for train &
road users
.

If arrival of
train in either
of directions

Buzzers & signal


warnings to road
users

If
obstacles

Stop warning & close


the gate
Set the signal for
train

If train
departure

Open the gate

44

CHAPTER 10
CONCLUSION

45

10.1 CONCLUSION:
From the above discussion and information of this system we, upto
now surely comes to know that it is highly reliable effective and economical at
dense traffic area, sub urban area and the route where frequency of trains is more.
As it saves some auxiliary structure as well as the expenditure on
attendant it is more economical at above mentioned places than traditional railway
crossing gate system. We know that though it is very beneficial but it is also
impossible to install such system at each and every places, but it gives certainly a
considerable benefit to us, thereby to our nation.

46

CHAPTER 11
BIBLIOGRAPHY

47

REFERENCES:
i)

Krishna, ShashiYadav and Nidhi, Automatic Railway Gate Control Using Microcontroller,
Oriental Journal Of Computer Science & Technology, Vol.6, No.4, December 2013.

ii) Ahmed Salih Mahdi. Al-Zuhairi,Automatic Railway Gate and Crossing Control based Sensors
&Microcontroller , in International Journal of Computer Trends and Technology (IJCTT)
Volume 4 Issue 7July 2013.

48

iii) J. Banuchandar, V. Kaliraj, P. Balasubramanian, S. Deepa, N. Thamilarasi, Automated


Unmanned Railway Level Crossing System, in International Journal of Modern Engineering
Research (IJMER)Volume.2, Issue.1, Jan-Feb 2012 .
iv) The 8051 Microcontroller and Embedded Systems By Muhammad Ali Mazidi
v) Fundamentals Of Embedded Software By Daniel W Lewis
vi) M. Kottalil1 ,Abhijith S2, Ajmal M M3, Abhilash L J.4,Ajith Babu, Automatic Railway Gate
Control System, in International Journal of Advanced Research in Electrical,
vii) Electronics and Instrumentation Engineering (IJAREEIE)- Vol. 3, Issue 2, February 2014.
viii)

Principles of Electronics by V.K.MEHTA.

ix) Let Us C -By Yashwant Kanetkar (Fifth Edition).

49